login-action/dist/index.js
CrazyMax caca3368ce
handle proxy settings for aws-sdk
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-16 13:53:16 +01:00

82917 lines
No EOL
3.2 MiB
Generated
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 46748:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"name":"@aws-sdk/client-ecr-public","description":"AWS SDK for JavaScript Ecr Public Client for Node.js, Browser and React Native","version":"3.45.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"jest --coverage --passWithNoTests"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.45.0","@aws-sdk/config-resolver":"3.45.0","@aws-sdk/credential-provider-node":"3.45.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-signing":"3.45.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ecr-public","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-ecr-public"}}');
/***/ }),
/***/ 16879:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"name":"@aws-sdk/client-ecr","description":"AWS SDK for JavaScript Ecr Client for Node.js, Browser and React Native","version":"3.45.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"exit 0"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.45.0","@aws-sdk/config-resolver":"3.45.0","@aws-sdk/credential-provider-node":"3.45.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-signing":"3.45.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","@aws-sdk/util-waiter":"3.40.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ecr","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-ecr"}}');
/***/ }),
/***/ 63966:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.45.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"exit 0"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/config-resolver":"3.45.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
/***/ }),
/***/ 1121:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.45.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"exit 0"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/config-resolver":"3.45.0","@aws-sdk/credential-provider-node":"3.45.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-sdk-sts":"3.45.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-signing":"3.45.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","entities":"2.2.0","fast-xml-parser":"3.19.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}');
/***/ }),
/***/ 35981:
/***/ (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 __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRegistriesData = exports.getAccountIDs = exports.getRegion = exports.isPubECR = exports.isECR = void 0;
const core = __importStar(__nccwpck_require__(42186));
const client_ecr_1 = __nccwpck_require__(8923);
const client_ecr_public_1 = __nccwpck_require__(42308);
const node_http_handler_1 = __nccwpck_require__(68805);
const proxy_agent_1 = __importDefault(__nccwpck_require__(67367));
const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/;
exports.isECR = (registry) => {
return ecrRegistryRegex.test(registry) || exports.isPubECR(registry);
};
exports.isPubECR = (registry) => {
return registry === 'public.ecr.aws';
};
exports.getRegion = (registry) => {
if (exports.isPubECR(registry)) {
return process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || 'us-east-1';
}
const matches = registry.match(ecrRegistryRegex);
if (!matches) {
return '';
}
return matches[3];
};
exports.getAccountIDs = (registry) => {
if (exports.isPubECR(registry)) {
return [];
}
const matches = registry.match(ecrRegistryRegex);
if (!matches) {
return [];
}
let accountIDs = [matches[2]];
if (process.env.AWS_ACCOUNT_IDS) {
accountIDs.push(...process.env.AWS_ACCOUNT_IDS.split(','));
}
return accountIDs.filter((item, index) => accountIDs.indexOf(item) === index);
};
exports.getRegistriesData = (registry, username, password) => __awaiter(void 0, void 0, void 0, function* () {
const region = exports.getRegion(registry);
const accountIDs = exports.getAccountIDs(registry);
const authTokenRequest = {};
if (accountIDs.length > 0) {
core.debug(`Requesting AWS ECR auth token for ${accountIDs.join(', ')}`);
authTokenRequest['registryIds'] = accountIDs;
}
let httpProxyAgent = null;
const httpProxy = process.env.http_proxy || process.env.HTTP_PROXY || '';
if (httpProxy) {
core.debug(`Using http proxy ${httpProxy}`);
httpProxyAgent = new proxy_agent_1.default(httpProxy);
}
let httpsProxyAgent = null;
const httpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY || '';
if (httpsProxy) {
core.debug(`Using https proxy ${httpsProxy}`);
httpsProxyAgent = new proxy_agent_1.default(httpsProxy);
}
const credentials = username && password
? {
accessKeyId: username,
secretAccessKey: password
}
: undefined;
if (exports.isPubECR(registry)) {
core.info(`AWS Public ECR detected with ${region} region`);
const ecrPublic = new client_ecr_public_1.ECRPUBLIC({
customUserAgent: 'docker-login-action',
credentials,
region: region,
requestHandler: new node_http_handler_1.NodeHttpHandler({
httpAgent: httpProxyAgent,
httpsAgent: httpsProxyAgent
})
});
const authTokenResponse = yield ecrPublic.getAuthorizationToken(authTokenRequest);
if (!authTokenResponse.authorizationData || !authTokenResponse.authorizationData.authorizationToken) {
throw new Error('Could not retrieve an authorization token from AWS Public ECR');
}
const authToken = Buffer.from(authTokenResponse.authorizationData.authorizationToken, 'base64').toString('utf-8');
const creds = authToken.split(':', 2);
return [
{
registry: 'public.ecr.aws',
username: creds[0],
password: creds[1]
}
];
}
else {
core.info(`AWS ECR detected with ${region} region`);
const ecr = new client_ecr_1.ECR({
customUserAgent: 'docker-login-action',
credentials,
region: region,
requestHandler: new node_http_handler_1.NodeHttpHandler({
httpAgent: httpProxyAgent,
httpsAgent: httpsProxyAgent
})
});
const authTokenResponse = yield ecr.getAuthorizationToken(authTokenRequest);
if (!Array.isArray(authTokenResponse.authorizationData) || !authTokenResponse.authorizationData.length) {
throw new Error('Could not retrieve an authorization token from AWS ECR');
}
const regDatas = [];
for (const authData of authTokenResponse.authorizationData) {
const authToken = Buffer.from(authData.authorizationToken || '', 'base64').toString('utf-8');
const creds = authToken.split(':', 2);
regDatas.push({
registry: authData.proxyEndpoint || '',
username: creds[0],
password: creds[1]
});
}
return regDatas;
}
});
//# sourceMappingURL=aws.js.map
/***/ }),
/***/ 13842:
/***/ (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.getInputs = void 0;
const core = __importStar(__nccwpck_require__(42186));
function getInputs() {
return {
registry: core.getInput('registry'),
username: core.getInput('username'),
password: core.getInput('password'),
ecr: core.getInput('ecr'),
logout: core.getBooleanInput('logout')
};
}
exports.getInputs = getInputs;
//# sourceMappingURL=context.js.map
/***/ }),
/***/ 3758:
/***/ (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.loginECR = exports.loginStandard = exports.logout = exports.login = void 0;
const aws = __importStar(__nccwpck_require__(35981));
const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514));
function login(registry, username, password, ecr) {
return __awaiter(this, void 0, void 0, function* () {
if (/true/i.test(ecr) || (ecr == 'auto' && aws.isECR(registry))) {
yield loginECR(registry, username, password);
}
else {
yield loginStandard(registry, username, password);
}
});
}
exports.login = login;
function logout(registry) {
return __awaiter(this, void 0, void 0, function* () {
yield exec
.getExecOutput('docker', ['logout', registry], {
ignoreReturnCode: true
})
.then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
core.warning(res.stderr.trim());
}
});
});
}
exports.logout = logout;
function loginStandard(registry, username, password) {
return __awaiter(this, void 0, void 0, function* () {
if (!username || !password) {
throw new Error('Username and password required');
}
let loginArgs = ['login', '--password-stdin'];
loginArgs.push('--username', username);
loginArgs.push(registry);
if (registry) {
core.info(`Logging into ${registry}...`);
}
else {
core.info(`Logging into Docker Hub...`);
}
yield exec
.getExecOutput('docker', loginArgs, {
ignoreReturnCode: true,
silent: true,
input: Buffer.from(password)
})
.then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.trim());
}
core.info(`Login Succeeded!`);
});
});
}
exports.loginStandard = loginStandard;
function loginECR(registry, username, password) {
return __awaiter(this, void 0, void 0, function* () {
core.info(`Retrieving registries data through AWS SDK...`);
const regDatas = yield aws.getRegistriesData(registry, username, password);
for (const regData of regDatas) {
core.info(`Logging into ${regData.registry}...`);
yield exec
.getExecOutput('docker', ['login', '--password-stdin', '--username', regData.username, regData.registry], {
ignoreReturnCode: true,
silent: true,
input: Buffer.from(regData.password)
})
.then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.trim());
}
core.info('Login Succeeded!');
});
}
});
}
exports.loginECR = loginECR;
//# sourceMappingURL=docker.js.map
/***/ }),
/***/ 3109:
/***/ (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.run = void 0;
const core = __importStar(__nccwpck_require__(42186));
const context = __importStar(__nccwpck_require__(13842));
const docker = __importStar(__nccwpck_require__(3758));
const stateHelper = __importStar(__nccwpck_require__(88647));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const input = context.getInputs();
stateHelper.setRegistry(input.registry);
stateHelper.setLogout(input.logout);
yield docker.login(input.registry, input.username, input.password, input.ecr);
}
catch (error) {
core.setFailed(error.message);
}
});
}
exports.run = run;
function logout() {
return __awaiter(this, void 0, void 0, function* () {
if (!stateHelper.logout) {
return;
}
yield docker.logout(stateHelper.registry);
});
}
if (!stateHelper.IsPost) {
run();
}
else {
logout();
}
//# sourceMappingURL=main.js.map
/***/ }),
/***/ 88647:
/***/ (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.setLogout = exports.setRegistry = exports.logout = exports.registry = exports.IsPost = void 0;
const core = __importStar(__nccwpck_require__(42186));
exports.IsPost = !!process.env['STATE_isPost'];
exports.registry = process.env['STATE_registry'] || '';
exports.logout = /true/i.test(process.env['STATE_logout'] || '');
function setRegistry(registry) {
core.saveState('registry', registry);
}
exports.setRegistry = setRegistry;
function setLogout(logout) {
core.saveState('logout', logout);
}
exports.setLogout = setLogout;
if (!exports.IsPost) {
core.saveState('isPost', 'true');
}
//# sourceMappingURL=state-helper.js.map
/***/ }),
/***/ 87351:
/***/ (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__(12087));
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
/***/ }),
/***/ 42186:
/***/ (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__(87351);
const file_command_1 = __nccwpck_require__(717);
const utils_1 = __nccwpck_require__(5278);
const os = __importStar(__nccwpck_require__(12087));
const path = __importStar(__nccwpck_require__(85622));
const oidc_utils_1 = __nccwpck_require__(98041);
/**
* 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;
//# 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__(35747));
const os = __importStar(__nccwpck_require__(12087));
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
/***/ }),
/***/ 98041:
/***/ (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__(39925);
const auth_1 = __nccwpck_require__(23702);
const core_1 = __nccwpck_require__(42186);
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
/***/ }),
/***/ 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
/***/ }),
/***/ 71514:
/***/ (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__(24304);
const tr = __importStar(__nccwpck_require__(88159));
/**
* 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
/***/ }),
/***/ 88159:
/***/ (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__(12087));
const events = __importStar(__nccwpck_require__(28614));
const child = __importStar(__nccwpck_require__(63129));
const path = __importStar(__nccwpck_require__(85622));
const io = __importStar(__nccwpck_require__(47351));
const ioUtil = __importStar(__nccwpck_require__(81962));
const timers_1 = __nccwpck_require__(78213);
/* 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
/***/ }),
/***/ 23702:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
class BasicCredentialHandler {
constructor(username, password) {
this.username = username;
this.password = password;
}
prepareRequest(options) {
options.headers['Authorization'] =
'Basic ' +
Buffer.from(this.username + ':' + this.password).toString('base64');
}
// This handler cannot handle 401
canHandleAuthentication(response) {
return false;
}
handleAuthentication(httpClient, requestInfo, objs) {
return null;
}
}
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) {
options.headers['Authorization'] = 'Bearer ' + this.token;
}
// This handler cannot handle 401
canHandleAuthentication(response) {
return false;
}
handleAuthentication(httpClient, requestInfo, objs) {
return null;
}
}
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) {
options.headers['Authorization'] =
'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');
}
// This handler cannot handle 401
canHandleAuthentication(response) {
return false;
}
handleAuthentication(httpClient, requestInfo, objs) {
return null;
}
}
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
/***/ }),
/***/ 39925:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const http = __nccwpck_require__(98605);
const https = __nccwpck_require__(57211);
const pm = __nccwpck_require__(16443);
let tunnel;
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) {
let 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 new Promise(async (resolve, reject) => {
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) {
let 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 this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
}
get(requestUrl, additionalHeaders) {
return this.request('GET', requestUrl, null, additionalHeaders || {});
}
del(requestUrl, additionalHeaders) {
return this.request('DELETE', requestUrl, null, additionalHeaders || {});
}
post(requestUrl, data, additionalHeaders) {
return this.request('POST', requestUrl, data, additionalHeaders || {});
}
patch(requestUrl, data, additionalHeaders) {
return this.request('PATCH', requestUrl, data, additionalHeaders || {});
}
put(requestUrl, data, additionalHeaders) {
return this.request('PUT', requestUrl, data, additionalHeaders || {});
}
head(requestUrl, additionalHeaders) {
return this.request('HEAD', requestUrl, null, additionalHeaders || {});
}
sendStream(verb, requestUrl, stream, additionalHeaders) {
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
*/
async getJson(requestUrl, additionalHeaders = {}) {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async postJson(requestUrl, obj, additionalHeaders = {}) {
let 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);
let res = await this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async putJson(requestUrl, obj, additionalHeaders = {}) {
let 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);
let res = await this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async patchJson(requestUrl, obj, additionalHeaders = {}) {
let 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);
let res = await 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
*/
async request(verb, requestUrl, data, headers) {
if (this._disposed) {
throw new Error('Client has already been disposed.');
}
let parsedUrl = new URL(requestUrl);
let info = this._prepareRequest(verb, parsedUrl, headers);
// Only perform retries on reads since writes may not be idempotent.
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
? this._maxRetries + 1
: 1;
let numTries = 0;
let response;
while (numTries < maxTries) {
response = await this.requestRaw(info, data);
// Check if it's an authentication challenge
if (response &&
response.message &&
response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (let i = 0; i < this.handlers.length; i++) {
if (this.handlers[i].canHandleAuthentication(response)) {
authenticationHandler = this.handlers[i];
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 (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&
this._allowRedirects &&
redirectsRemaining > 0) {
const redirectUrl = response.message.headers['location'];
if (!redirectUrl) {
// if there's no location to redirect to, we won't
break;
}
let 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.
await response.readBody();
// strip authorization header if redirected to a different hostname
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (let 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 = await this.requestRaw(info, data);
redirectsRemaining--;
}
if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
// If not a retry code, return immediately instead of retrying
return response;
}
numTries += 1;
if (numTries < maxTries) {
await response.readBody();
await this._performExponentialBackoff(numTries);
}
}
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 new Promise((resolve, reject) => {
let callbackForResult = function (err, res) {
if (err) {
reject(err);
}
resolve(res);
};
this.requestRawWithCallback(info, data, callbackForResult);
});
}
/**
* Raw request with callback.
* @param info
* @param data
* @param onResult
*/
requestRawWithCallback(info, data, onResult) {
let socket;
if (typeof data === 'string') {
info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
}
let callbackCalled = false;
let handleResult = (err, res) => {
if (!callbackCalled) {
callbackCalled = true;
onResult(err, res);
}
};
let req = info.httpModule.request(info.options, (msg) => {
let res = new HttpClientResponse(msg);
handleResult(null, res);
});
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), null);
});
req.on('error', function (err) {
// err has statusCode property
// res should have headers
handleResult(err, null);
});
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) {
let 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) {
this.handlers.forEach(handler => {
handler.prepareRequest(info.options);
});
}
return info;
}
_mergeHeaders(headers) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
}
return lowercaseKeys(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
_getAgent(parsedUrl) {
let agent;
let proxyUrl = pm.getProxyUrl(parsedUrl);
let 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;
}
if (useProxy) {
// If using proxy, need tunnel
if (!tunnel) {
tunnel = __nccwpck_require__(74294);
}
const agentOptions = {
maxSockets: maxSockets,
keepAlive: this._keepAlive,
proxy: {
...((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: 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) {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise(resolve => setTimeout(() => resolve(), ms));
}
static dateTimeDeserializer(key, value) {
if (typeof value === 'string') {
let a = new Date(value);
if (!isNaN(a.valueOf())) {
return a;
}
}
return value;
}
async _processResponse(res, options) {
return new Promise(async (resolve, reject) => {
const statusCode = res.message.statusCode;
const response = {
statusCode: statusCode,
result: null,
headers: {}
};
// not found leads to null obj returned
if (statusCode == HttpCodes.NotFound) {
resolve(response);
}
let obj;
let contents;
// get the result from the body
try {
contents = await res.readBody();
if (contents && contents.length > 0) {
if (options && options.deserializeDates) {
obj = JSON.parse(contents, HttpClient.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 + ')';
}
let err = new HttpClientError(msg, statusCode);
err.result = response.result;
reject(err);
}
else {
resolve(response);
}
});
}
}
exports.HttpClient = HttpClient;
/***/ }),
/***/ 16443:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
function getProxyUrl(reqUrl) {
let usingSsl = reqUrl.protocol === 'https:';
let proxyUrl;
if (checkBypass(reqUrl)) {
return proxyUrl;
}
let proxyVar;
if (usingSsl) {
proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];
}
else {
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
}
if (proxyVar) {
proxyUrl = new URL(proxyVar);
}
return proxyUrl;
}
exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
let 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
let upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === 'number') {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
// Compare request host against noproxy
for (let 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;
/***/ }),
/***/ 81962:
/***/ (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__(35747));
const path = __importStar(__nccwpck_require__(85622));
_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
/***/ }),
/***/ 47351:
/***/ (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__(42357);
const childProcess = __importStar(__nccwpck_require__(63129));
const path = __importStar(__nccwpck_require__(85622));
const util_1 = __nccwpck_require__(31669);
const ioUtil = __importStar(__nccwpck_require__(81962));
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
/***/ }),
/***/ 86087:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ECRPUBLIC = void 0;
const BatchCheckLayerAvailabilityCommand_1 = __nccwpck_require__(25356);
const BatchDeleteImageCommand_1 = __nccwpck_require__(56517);
const CompleteLayerUploadCommand_1 = __nccwpck_require__(55490);
const CreateRepositoryCommand_1 = __nccwpck_require__(39633);
const DeleteRepositoryCommand_1 = __nccwpck_require__(60467);
const DeleteRepositoryPolicyCommand_1 = __nccwpck_require__(62528);
const DescribeImagesCommand_1 = __nccwpck_require__(22776);
const DescribeImageTagsCommand_1 = __nccwpck_require__(47670);
const DescribeRegistriesCommand_1 = __nccwpck_require__(78696);
const DescribeRepositoriesCommand_1 = __nccwpck_require__(82218);
const GetAuthorizationTokenCommand_1 = __nccwpck_require__(92674);
const GetRegistryCatalogDataCommand_1 = __nccwpck_require__(26518);
const GetRepositoryCatalogDataCommand_1 = __nccwpck_require__(53189);
const GetRepositoryPolicyCommand_1 = __nccwpck_require__(8562);
const InitiateLayerUploadCommand_1 = __nccwpck_require__(83675);
const ListTagsForResourceCommand_1 = __nccwpck_require__(80575);
const PutImageCommand_1 = __nccwpck_require__(86486);
const PutRegistryCatalogDataCommand_1 = __nccwpck_require__(46805);
const PutRepositoryCatalogDataCommand_1 = __nccwpck_require__(83753);
const SetRepositoryPolicyCommand_1 = __nccwpck_require__(79838);
const TagResourceCommand_1 = __nccwpck_require__(39869);
const UntagResourceCommand_1 = __nccwpck_require__(66689);
const UploadLayerPartCommand_1 = __nccwpck_require__(97429);
const ECRPUBLICClient_1 = __nccwpck_require__(30608);
class ECRPUBLIC extends ECRPUBLICClient_1.ECRPUBLICClient {
batchCheckLayerAvailability(args, optionsOrCb, cb) {
const command = new BatchCheckLayerAvailabilityCommand_1.BatchCheckLayerAvailabilityCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
batchDeleteImage(args, optionsOrCb, cb) {
const command = new BatchDeleteImageCommand_1.BatchDeleteImageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
completeLayerUpload(args, optionsOrCb, cb) {
const command = new CompleteLayerUploadCommand_1.CompleteLayerUploadCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
createRepository(args, optionsOrCb, cb) {
const command = new CreateRepositoryCommand_1.CreateRepositoryCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deleteRepository(args, optionsOrCb, cb) {
const command = new DeleteRepositoryCommand_1.DeleteRepositoryCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deleteRepositoryPolicy(args, optionsOrCb, cb) {
const command = new DeleteRepositoryPolicyCommand_1.DeleteRepositoryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeImages(args, optionsOrCb, cb) {
const command = new DescribeImagesCommand_1.DescribeImagesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeImageTags(args, optionsOrCb, cb) {
const command = new DescribeImageTagsCommand_1.DescribeImageTagsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeRegistries(args, optionsOrCb, cb) {
const command = new DescribeRegistriesCommand_1.DescribeRegistriesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeRepositories(args, optionsOrCb, cb) {
const command = new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getAuthorizationToken(args, optionsOrCb, cb) {
const command = new GetAuthorizationTokenCommand_1.GetAuthorizationTokenCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRegistryCatalogData(args, optionsOrCb, cb) {
const command = new GetRegistryCatalogDataCommand_1.GetRegistryCatalogDataCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRepositoryCatalogData(args, optionsOrCb, cb) {
const command = new GetRepositoryCatalogDataCommand_1.GetRepositoryCatalogDataCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRepositoryPolicy(args, optionsOrCb, cb) {
const command = new GetRepositoryPolicyCommand_1.GetRepositoryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
initiateLayerUpload(args, optionsOrCb, cb) {
const command = new InitiateLayerUploadCommand_1.InitiateLayerUploadCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listTagsForResource(args, optionsOrCb, cb) {
const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putImage(args, optionsOrCb, cb) {
const command = new PutImageCommand_1.PutImageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putRegistryCatalogData(args, optionsOrCb, cb) {
const command = new PutRegistryCatalogDataCommand_1.PutRegistryCatalogDataCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putRepositoryCatalogData(args, optionsOrCb, cb) {
const command = new PutRepositoryCatalogDataCommand_1.PutRepositoryCatalogDataCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
setRepositoryPolicy(args, optionsOrCb, cb) {
const command = new SetRepositoryPolicyCommand_1.SetRepositoryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
tagResource(args, optionsOrCb, cb) {
const command = new TagResourceCommand_1.TagResourceCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
untagResource(args, optionsOrCb, cb) {
const command = new UntagResourceCommand_1.UntagResourceCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
uploadLayerPart(args, optionsOrCb, cb) {
const command = new UploadLayerPartCommand_1.UploadLayerPartCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
}
exports.ECRPUBLIC = ECRPUBLIC;
/***/ }),
/***/ 30608:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ECRPUBLICClient = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const middleware_content_length_1 = __nccwpck_require__(42245);
const middleware_host_header_1 = __nccwpck_require__(22545);
const middleware_logger_1 = __nccwpck_require__(20014);
const middleware_retry_1 = __nccwpck_require__(96064);
const middleware_signing_1 = __nccwpck_require__(14935);
const middleware_user_agent_1 = __nccwpck_require__(64688);
const smithy_client_1 = __nccwpck_require__(4963);
const runtimeConfig_1 = __nccwpck_require__(49324);
class ECRPUBLICClient extends smithy_client_1.Client {
constructor(configuration) {
const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
const _config_1 = config_resolver_1.resolveRegionConfig(_config_0);
const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);
const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);
const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);
const _config_5 = middleware_signing_1.resolveAwsAuthConfig(_config_4);
const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5);
super(_config_6);
this.config = _config_6;
this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));
this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));
this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));
this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config));
this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
}
destroy() {
super.destroy();
}
}
exports.ECRPUBLICClient = ECRPUBLICClient;
/***/ }),
/***/ 25356:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchCheckLayerAvailabilityCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class BatchCheckLayerAvailabilityCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "BatchCheckLayerAvailabilityCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1BatchCheckLayerAvailabilityCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand(output, context);
}
}
exports.BatchCheckLayerAvailabilityCommand = BatchCheckLayerAvailabilityCommand;
/***/ }),
/***/ 56517:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchDeleteImageCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class BatchDeleteImageCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "BatchDeleteImageCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.BatchDeleteImageRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.BatchDeleteImageResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1BatchDeleteImageCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1BatchDeleteImageCommand(output, context);
}
}
exports.BatchDeleteImageCommand = BatchDeleteImageCommand;
/***/ }),
/***/ 55490:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CompleteLayerUploadCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class CompleteLayerUploadCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "CompleteLayerUploadCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.CompleteLayerUploadRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.CompleteLayerUploadResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1CompleteLayerUploadCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1CompleteLayerUploadCommand(output, context);
}
}
exports.CompleteLayerUploadCommand = CompleteLayerUploadCommand;
/***/ }),
/***/ 39633:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CreateRepositoryCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class CreateRepositoryCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "CreateRepositoryCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.CreateRepositoryRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.CreateRepositoryResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1CreateRepositoryCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1CreateRepositoryCommand(output, context);
}
}
exports.CreateRepositoryCommand = CreateRepositoryCommand;
/***/ }),
/***/ 60467:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeleteRepositoryCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class DeleteRepositoryCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "DeleteRepositoryCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeleteRepositoryRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeleteRepositoryResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryCommand(output, context);
}
}
exports.DeleteRepositoryCommand = DeleteRepositoryCommand;
/***/ }),
/***/ 62528:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeleteRepositoryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class DeleteRepositoryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "DeleteRepositoryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryPolicyCommand(output, context);
}
}
exports.DeleteRepositoryPolicyCommand = DeleteRepositoryPolicyCommand;
/***/ }),
/***/ 47670:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeImageTagsCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class DescribeImageTagsCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "DescribeImageTagsCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeImageTagsRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeImageTagsResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeImageTagsCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeImageTagsCommand(output, context);
}
}
exports.DescribeImageTagsCommand = DescribeImageTagsCommand;
/***/ }),
/***/ 22776:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeImagesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class DescribeImagesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "DescribeImagesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeImagesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeImagesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeImagesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeImagesCommand(output, context);
}
}
exports.DescribeImagesCommand = DescribeImagesCommand;
/***/ }),
/***/ 78696:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeRegistriesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class DescribeRegistriesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "DescribeRegistriesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeRegistriesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeRegistriesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeRegistriesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeRegistriesCommand(output, context);
}
}
exports.DescribeRegistriesCommand = DescribeRegistriesCommand;
/***/ }),
/***/ 82218:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeRepositoriesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class DescribeRepositoriesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "DescribeRepositoriesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeRepositoriesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeRepositoriesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeRepositoriesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeRepositoriesCommand(output, context);
}
}
exports.DescribeRepositoriesCommand = DescribeRepositoriesCommand;
/***/ }),
/***/ 92674:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetAuthorizationTokenCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class GetAuthorizationTokenCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "GetAuthorizationTokenCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetAuthorizationTokenRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetAuthorizationTokenResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetAuthorizationTokenCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetAuthorizationTokenCommand(output, context);
}
}
exports.GetAuthorizationTokenCommand = GetAuthorizationTokenCommand;
/***/ }),
/***/ 26518:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRegistryCatalogDataCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class GetRegistryCatalogDataCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "GetRegistryCatalogDataCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRegistryCatalogDataRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRegistryCatalogDataResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetRegistryCatalogDataCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetRegistryCatalogDataCommand(output, context);
}
}
exports.GetRegistryCatalogDataCommand = GetRegistryCatalogDataCommand;
/***/ }),
/***/ 53189:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRepositoryCatalogDataCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class GetRepositoryCatalogDataCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "GetRepositoryCatalogDataCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRepositoryCatalogDataRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRepositoryCatalogDataResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetRepositoryCatalogDataCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetRepositoryCatalogDataCommand(output, context);
}
}
exports.GetRepositoryCatalogDataCommand = GetRepositoryCatalogDataCommand;
/***/ }),
/***/ 8562:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRepositoryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class GetRepositoryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "GetRepositoryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRepositoryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRepositoryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetRepositoryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetRepositoryPolicyCommand(output, context);
}
}
exports.GetRepositoryPolicyCommand = GetRepositoryPolicyCommand;
/***/ }),
/***/ 83675:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InitiateLayerUploadCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class InitiateLayerUploadCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "InitiateLayerUploadCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.InitiateLayerUploadRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.InitiateLayerUploadResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1InitiateLayerUploadCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1InitiateLayerUploadCommand(output, context);
}
}
exports.InitiateLayerUploadCommand = InitiateLayerUploadCommand;
/***/ }),
/***/ 80575:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ListTagsForResourceCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class ListTagsForResourceCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "ListTagsForResourceCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.ListTagsForResourceRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1ListTagsForResourceCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1ListTagsForResourceCommand(output, context);
}
}
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
/***/ }),
/***/ 86486:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutImageCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class PutImageCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "PutImageCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutImageRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutImageResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutImageCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutImageCommand(output, context);
}
}
exports.PutImageCommand = PutImageCommand;
/***/ }),
/***/ 46805:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutRegistryCatalogDataCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class PutRegistryCatalogDataCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "PutRegistryCatalogDataCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutRegistryCatalogDataRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutRegistryCatalogDataResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutRegistryCatalogDataCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutRegistryCatalogDataCommand(output, context);
}
}
exports.PutRegistryCatalogDataCommand = PutRegistryCatalogDataCommand;
/***/ }),
/***/ 83753:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutRepositoryCatalogDataCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class PutRepositoryCatalogDataCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "PutRepositoryCatalogDataCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutRepositoryCatalogDataRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutRepositoryCatalogDataResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutRepositoryCatalogDataCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutRepositoryCatalogDataCommand(output, context);
}
}
exports.PutRepositoryCatalogDataCommand = PutRepositoryCatalogDataCommand;
/***/ }),
/***/ 79838:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SetRepositoryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class SetRepositoryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "SetRepositoryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.SetRepositoryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.SetRepositoryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1SetRepositoryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1SetRepositoryPolicyCommand(output, context);
}
}
exports.SetRepositoryPolicyCommand = SetRepositoryPolicyCommand;
/***/ }),
/***/ 39869:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TagResourceCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class TagResourceCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "TagResourceCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.TagResourceRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.TagResourceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1TagResourceCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1TagResourceCommand(output, context);
}
}
exports.TagResourceCommand = TagResourceCommand;
/***/ }),
/***/ 66689:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UntagResourceCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class UntagResourceCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "UntagResourceCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.UntagResourceRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.UntagResourceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1UntagResourceCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1UntagResourceCommand(output, context);
}
}
exports.UntagResourceCommand = UntagResourceCommand;
/***/ }),
/***/ 97429:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UploadLayerPartCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(38818);
const Aws_json1_1_1 = __nccwpck_require__(64170);
class UploadLayerPartCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRPUBLICClient";
const commandName = "UploadLayerPartCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.UploadLayerPartRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.UploadLayerPartResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1UploadLayerPartCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1UploadLayerPartCommand(output, context);
}
}
exports.UploadLayerPartCommand = UploadLayerPartCommand;
/***/ }),
/***/ 65442:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(25356), exports);
tslib_1.__exportStar(__nccwpck_require__(56517), exports);
tslib_1.__exportStar(__nccwpck_require__(55490), exports);
tslib_1.__exportStar(__nccwpck_require__(39633), exports);
tslib_1.__exportStar(__nccwpck_require__(60467), exports);
tslib_1.__exportStar(__nccwpck_require__(62528), exports);
tslib_1.__exportStar(__nccwpck_require__(47670), exports);
tslib_1.__exportStar(__nccwpck_require__(22776), exports);
tslib_1.__exportStar(__nccwpck_require__(78696), exports);
tslib_1.__exportStar(__nccwpck_require__(82218), exports);
tslib_1.__exportStar(__nccwpck_require__(92674), exports);
tslib_1.__exportStar(__nccwpck_require__(26518), exports);
tslib_1.__exportStar(__nccwpck_require__(53189), exports);
tslib_1.__exportStar(__nccwpck_require__(8562), exports);
tslib_1.__exportStar(__nccwpck_require__(83675), exports);
tslib_1.__exportStar(__nccwpck_require__(80575), exports);
tslib_1.__exportStar(__nccwpck_require__(86486), exports);
tslib_1.__exportStar(__nccwpck_require__(46805), exports);
tslib_1.__exportStar(__nccwpck_require__(83753), exports);
tslib_1.__exportStar(__nccwpck_require__(79838), exports);
tslib_1.__exportStar(__nccwpck_require__(39869), exports);
tslib_1.__exportStar(__nccwpck_require__(66689), exports);
tslib_1.__exportStar(__nccwpck_require__(97429), exports);
/***/ }),
/***/ 68593:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultRegionInfoProvider = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const regionHash = {};
const partitionHash = {
aws: {
regions: [
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ca-central-1",
"eu-central-1",
"eu-north-1",
"eu-south-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"me-south-1",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr-public.{region}.amazonaws.com",
tags: [],
},
{
hostname: "api.ecr-public-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "api.ecr-public-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "api.ecr-public.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr-public.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "api.ecr-public-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "api.ecr-public-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "api.ecr-public.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr-public.{region}.c2s.ic.gov",
tags: [],
},
{
hostname: "api.ecr-public-fips.{region}.c2s.ic.gov",
tags: ["fips"],
},
],
},
"aws-iso-b": {
regions: ["us-isob-east-1"],
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr-public.{region}.sc2s.sgov.gov",
tags: [],
},
{
hostname: "api.ecr-public-fips.{region}.sc2s.sgov.gov",
tags: ["fips"],
},
],
},
"aws-us-gov": {
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr-public.{region}.amazonaws.com",
tags: [],
},
{
hostname: "api.ecr-public-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "api.ecr-public-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "api.ecr-public.{region}.api.aws",
tags: ["dualstack"],
},
],
},
};
const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
...options,
signingService: "ecr-public",
regionHash,
partitionHash,
});
exports.defaultRegionInfoProvider = defaultRegionInfoProvider;
/***/ }),
/***/ 42308:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(86087), exports);
tslib_1.__exportStar(__nccwpck_require__(30608), exports);
tslib_1.__exportStar(__nccwpck_require__(65442), exports);
tslib_1.__exportStar(__nccwpck_require__(30183), exports);
tslib_1.__exportStar(__nccwpck_require__(75945), exports);
/***/ }),
/***/ 30183:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(38818), exports);
/***/ }),
/***/ 38818:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RegistryAliasStatus = exports.DescribeRegistriesRequest = exports.DescribeImageTagsResponse = exports.ImageTagDetail = exports.ReferencedImageDetail = exports.DescribeImageTagsRequest = exports.ImageNotFoundException = exports.DescribeImagesResponse = exports.ImageDetail = exports.DescribeImagesRequest = exports.RepositoryPolicyNotFoundException = exports.DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyRequest = exports.RepositoryNotEmptyException = exports.DeleteRepositoryResponse = exports.DeleteRepositoryRequest = exports.TooManyTagsException = exports.RepositoryAlreadyExistsException = exports.LimitExceededException = exports.InvalidTagParameterException = exports.CreateRepositoryResponse = exports.Repository = exports.RepositoryCatalogData = exports.CreateRepositoryRequest = exports.Tag = exports.RepositoryCatalogDataInput = exports.UploadNotFoundException = exports.UnsupportedCommandException = exports.LayerPartTooSmallException = exports.LayerAlreadyExistsException = exports.InvalidLayerException = exports.EmptyUploadException = exports.CompleteLayerUploadResponse = exports.CompleteLayerUploadRequest = exports.BatchDeleteImageResponse = exports.ImageFailure = exports.ImageFailureCode = exports.BatchDeleteImageRequest = exports.ImageIdentifier = exports.ServerException = exports.RepositoryNotFoundException = exports.RegistryNotFoundException = exports.InvalidParameterException = exports.BatchCheckLayerAvailabilityResponse = exports.Layer = exports.LayerAvailability = exports.LayerFailure = exports.LayerFailureCode = exports.BatchCheckLayerAvailabilityRequest = exports.AuthorizationData = void 0;
exports.UploadLayerPartResponse = exports.UploadLayerPartRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.SetRepositoryPolicyResponse = exports.SetRepositoryPolicyRequest = exports.PutRepositoryCatalogDataResponse = exports.PutRepositoryCatalogDataRequest = exports.PutRegistryCatalogDataResponse = exports.PutRegistryCatalogDataRequest = exports.ReferencedImagesNotFoundException = exports.PutImageResponse = exports.PutImageRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.LayersNotFoundException = exports.InvalidLayerPartException = exports.InitiateLayerUploadResponse = exports.InitiateLayerUploadRequest = exports.ImageTagAlreadyExistsException = exports.ImageDigestDoesNotMatchException = exports.ImageAlreadyExistsException = exports.Image = exports.GetRepositoryPolicyResponse = exports.GetRepositoryPolicyRequest = exports.GetRepositoryCatalogDataResponse = exports.GetRepositoryCatalogDataRequest = exports.GetRegistryCatalogDataResponse = exports.RegistryCatalogData = exports.GetRegistryCatalogDataRequest = exports.GetAuthorizationTokenResponse = exports.GetAuthorizationTokenRequest = exports.DescribeRepositoriesResponse = exports.DescribeRepositoriesRequest = exports.DescribeRegistriesResponse = exports.Registry = exports.RegistryAlias = void 0;
var AuthorizationData;
(function (AuthorizationData) {
AuthorizationData.filterSensitiveLog = (obj) => ({
...obj,
});
})(AuthorizationData = exports.AuthorizationData || (exports.AuthorizationData = {}));
var BatchCheckLayerAvailabilityRequest;
(function (BatchCheckLayerAvailabilityRequest) {
BatchCheckLayerAvailabilityRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchCheckLayerAvailabilityRequest = exports.BatchCheckLayerAvailabilityRequest || (exports.BatchCheckLayerAvailabilityRequest = {}));
var LayerFailureCode;
(function (LayerFailureCode) {
LayerFailureCode["InvalidLayerDigest"] = "InvalidLayerDigest";
LayerFailureCode["MissingLayerDigest"] = "MissingLayerDigest";
})(LayerFailureCode = exports.LayerFailureCode || (exports.LayerFailureCode = {}));
var LayerFailure;
(function (LayerFailure) {
LayerFailure.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerFailure = exports.LayerFailure || (exports.LayerFailure = {}));
var LayerAvailability;
(function (LayerAvailability) {
LayerAvailability["AVAILABLE"] = "AVAILABLE";
LayerAvailability["UNAVAILABLE"] = "UNAVAILABLE";
})(LayerAvailability = exports.LayerAvailability || (exports.LayerAvailability = {}));
var Layer;
(function (Layer) {
Layer.filterSensitiveLog = (obj) => ({
...obj,
});
})(Layer = exports.Layer || (exports.Layer = {}));
var BatchCheckLayerAvailabilityResponse;
(function (BatchCheckLayerAvailabilityResponse) {
BatchCheckLayerAvailabilityResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchCheckLayerAvailabilityResponse = exports.BatchCheckLayerAvailabilityResponse || (exports.BatchCheckLayerAvailabilityResponse = {}));
var InvalidParameterException;
(function (InvalidParameterException) {
InvalidParameterException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {}));
var RegistryNotFoundException;
(function (RegistryNotFoundException) {
RegistryNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegistryNotFoundException = exports.RegistryNotFoundException || (exports.RegistryNotFoundException = {}));
var RepositoryNotFoundException;
(function (RepositoryNotFoundException) {
RepositoryNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryNotFoundException = exports.RepositoryNotFoundException || (exports.RepositoryNotFoundException = {}));
var ServerException;
(function (ServerException) {
ServerException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ServerException = exports.ServerException || (exports.ServerException = {}));
var ImageIdentifier;
(function (ImageIdentifier) {
ImageIdentifier.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageIdentifier = exports.ImageIdentifier || (exports.ImageIdentifier = {}));
var BatchDeleteImageRequest;
(function (BatchDeleteImageRequest) {
BatchDeleteImageRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchDeleteImageRequest = exports.BatchDeleteImageRequest || (exports.BatchDeleteImageRequest = {}));
var ImageFailureCode;
(function (ImageFailureCode) {
ImageFailureCode["ImageNotFound"] = "ImageNotFound";
ImageFailureCode["ImageReferencedByManifestList"] = "ImageReferencedByManifestList";
ImageFailureCode["ImageTagDoesNotMatchDigest"] = "ImageTagDoesNotMatchDigest";
ImageFailureCode["InvalidImageDigest"] = "InvalidImageDigest";
ImageFailureCode["InvalidImageTag"] = "InvalidImageTag";
ImageFailureCode["KmsError"] = "KmsError";
ImageFailureCode["MissingDigestAndTag"] = "MissingDigestAndTag";
})(ImageFailureCode = exports.ImageFailureCode || (exports.ImageFailureCode = {}));
var ImageFailure;
(function (ImageFailure) {
ImageFailure.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageFailure = exports.ImageFailure || (exports.ImageFailure = {}));
var BatchDeleteImageResponse;
(function (BatchDeleteImageResponse) {
BatchDeleteImageResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchDeleteImageResponse = exports.BatchDeleteImageResponse || (exports.BatchDeleteImageResponse = {}));
var CompleteLayerUploadRequest;
(function (CompleteLayerUploadRequest) {
CompleteLayerUploadRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(CompleteLayerUploadRequest = exports.CompleteLayerUploadRequest || (exports.CompleteLayerUploadRequest = {}));
var CompleteLayerUploadResponse;
(function (CompleteLayerUploadResponse) {
CompleteLayerUploadResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(CompleteLayerUploadResponse = exports.CompleteLayerUploadResponse || (exports.CompleteLayerUploadResponse = {}));
var EmptyUploadException;
(function (EmptyUploadException) {
EmptyUploadException.filterSensitiveLog = (obj) => ({
...obj,
});
})(EmptyUploadException = exports.EmptyUploadException || (exports.EmptyUploadException = {}));
var InvalidLayerException;
(function (InvalidLayerException) {
InvalidLayerException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidLayerException = exports.InvalidLayerException || (exports.InvalidLayerException = {}));
var LayerAlreadyExistsException;
(function (LayerAlreadyExistsException) {
LayerAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerAlreadyExistsException = exports.LayerAlreadyExistsException || (exports.LayerAlreadyExistsException = {}));
var LayerPartTooSmallException;
(function (LayerPartTooSmallException) {
LayerPartTooSmallException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerPartTooSmallException = exports.LayerPartTooSmallException || (exports.LayerPartTooSmallException = {}));
var UnsupportedCommandException;
(function (UnsupportedCommandException) {
UnsupportedCommandException.filterSensitiveLog = (obj) => ({
...obj,
});
})(UnsupportedCommandException = exports.UnsupportedCommandException || (exports.UnsupportedCommandException = {}));
var UploadNotFoundException;
(function (UploadNotFoundException) {
UploadNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(UploadNotFoundException = exports.UploadNotFoundException || (exports.UploadNotFoundException = {}));
var RepositoryCatalogDataInput;
(function (RepositoryCatalogDataInput) {
RepositoryCatalogDataInput.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryCatalogDataInput = exports.RepositoryCatalogDataInput || (exports.RepositoryCatalogDataInput = {}));
var Tag;
(function (Tag) {
Tag.filterSensitiveLog = (obj) => ({
...obj,
});
})(Tag = exports.Tag || (exports.Tag = {}));
var CreateRepositoryRequest;
(function (CreateRepositoryRequest) {
CreateRepositoryRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(CreateRepositoryRequest = exports.CreateRepositoryRequest || (exports.CreateRepositoryRequest = {}));
var RepositoryCatalogData;
(function (RepositoryCatalogData) {
RepositoryCatalogData.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryCatalogData = exports.RepositoryCatalogData || (exports.RepositoryCatalogData = {}));
var Repository;
(function (Repository) {
Repository.filterSensitiveLog = (obj) => ({
...obj,
});
})(Repository = exports.Repository || (exports.Repository = {}));
var CreateRepositoryResponse;
(function (CreateRepositoryResponse) {
CreateRepositoryResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(CreateRepositoryResponse = exports.CreateRepositoryResponse || (exports.CreateRepositoryResponse = {}));
var InvalidTagParameterException;
(function (InvalidTagParameterException) {
InvalidTagParameterException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidTagParameterException = exports.InvalidTagParameterException || (exports.InvalidTagParameterException = {}));
var LimitExceededException;
(function (LimitExceededException) {
LimitExceededException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {}));
var RepositoryAlreadyExistsException;
(function (RepositoryAlreadyExistsException) {
RepositoryAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryAlreadyExistsException = exports.RepositoryAlreadyExistsException || (exports.RepositoryAlreadyExistsException = {}));
var TooManyTagsException;
(function (TooManyTagsException) {
TooManyTagsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(TooManyTagsException = exports.TooManyTagsException || (exports.TooManyTagsException = {}));
var DeleteRepositoryRequest;
(function (DeleteRepositoryRequest) {
DeleteRepositoryRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryRequest = exports.DeleteRepositoryRequest || (exports.DeleteRepositoryRequest = {}));
var DeleteRepositoryResponse;
(function (DeleteRepositoryResponse) {
DeleteRepositoryResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryResponse = exports.DeleteRepositoryResponse || (exports.DeleteRepositoryResponse = {}));
var RepositoryNotEmptyException;
(function (RepositoryNotEmptyException) {
RepositoryNotEmptyException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryNotEmptyException = exports.RepositoryNotEmptyException || (exports.RepositoryNotEmptyException = {}));
var DeleteRepositoryPolicyRequest;
(function (DeleteRepositoryPolicyRequest) {
DeleteRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryPolicyRequest = exports.DeleteRepositoryPolicyRequest || (exports.DeleteRepositoryPolicyRequest = {}));
var DeleteRepositoryPolicyResponse;
(function (DeleteRepositoryPolicyResponse) {
DeleteRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyResponse || (exports.DeleteRepositoryPolicyResponse = {}));
var RepositoryPolicyNotFoundException;
(function (RepositoryPolicyNotFoundException) {
RepositoryPolicyNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryPolicyNotFoundException = exports.RepositoryPolicyNotFoundException || (exports.RepositoryPolicyNotFoundException = {}));
var DescribeImagesRequest;
(function (DescribeImagesRequest) {
DescribeImagesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImagesRequest = exports.DescribeImagesRequest || (exports.DescribeImagesRequest = {}));
var ImageDetail;
(function (ImageDetail) {
ImageDetail.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageDetail = exports.ImageDetail || (exports.ImageDetail = {}));
var DescribeImagesResponse;
(function (DescribeImagesResponse) {
DescribeImagesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImagesResponse = exports.DescribeImagesResponse || (exports.DescribeImagesResponse = {}));
var ImageNotFoundException;
(function (ImageNotFoundException) {
ImageNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageNotFoundException = exports.ImageNotFoundException || (exports.ImageNotFoundException = {}));
var DescribeImageTagsRequest;
(function (DescribeImageTagsRequest) {
DescribeImageTagsRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImageTagsRequest = exports.DescribeImageTagsRequest || (exports.DescribeImageTagsRequest = {}));
var ReferencedImageDetail;
(function (ReferencedImageDetail) {
ReferencedImageDetail.filterSensitiveLog = (obj) => ({
...obj,
});
})(ReferencedImageDetail = exports.ReferencedImageDetail || (exports.ReferencedImageDetail = {}));
var ImageTagDetail;
(function (ImageTagDetail) {
ImageTagDetail.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageTagDetail = exports.ImageTagDetail || (exports.ImageTagDetail = {}));
var DescribeImageTagsResponse;
(function (DescribeImageTagsResponse) {
DescribeImageTagsResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImageTagsResponse = exports.DescribeImageTagsResponse || (exports.DescribeImageTagsResponse = {}));
var DescribeRegistriesRequest;
(function (DescribeRegistriesRequest) {
DescribeRegistriesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRegistriesRequest = exports.DescribeRegistriesRequest || (exports.DescribeRegistriesRequest = {}));
var RegistryAliasStatus;
(function (RegistryAliasStatus) {
RegistryAliasStatus["ACTIVE"] = "ACTIVE";
RegistryAliasStatus["PENDING"] = "PENDING";
RegistryAliasStatus["REJECTED"] = "REJECTED";
})(RegistryAliasStatus = exports.RegistryAliasStatus || (exports.RegistryAliasStatus = {}));
var RegistryAlias;
(function (RegistryAlias) {
RegistryAlias.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegistryAlias = exports.RegistryAlias || (exports.RegistryAlias = {}));
var Registry;
(function (Registry) {
Registry.filterSensitiveLog = (obj) => ({
...obj,
});
})(Registry = exports.Registry || (exports.Registry = {}));
var DescribeRegistriesResponse;
(function (DescribeRegistriesResponse) {
DescribeRegistriesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRegistriesResponse = exports.DescribeRegistriesResponse || (exports.DescribeRegistriesResponse = {}));
var DescribeRepositoriesRequest;
(function (DescribeRepositoriesRequest) {
DescribeRepositoriesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRepositoriesRequest = exports.DescribeRepositoriesRequest || (exports.DescribeRepositoriesRequest = {}));
var DescribeRepositoriesResponse;
(function (DescribeRepositoriesResponse) {
DescribeRepositoriesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRepositoriesResponse = exports.DescribeRepositoriesResponse || (exports.DescribeRepositoriesResponse = {}));
var GetAuthorizationTokenRequest;
(function (GetAuthorizationTokenRequest) {
GetAuthorizationTokenRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetAuthorizationTokenRequest = exports.GetAuthorizationTokenRequest || (exports.GetAuthorizationTokenRequest = {}));
var GetAuthorizationTokenResponse;
(function (GetAuthorizationTokenResponse) {
GetAuthorizationTokenResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetAuthorizationTokenResponse = exports.GetAuthorizationTokenResponse || (exports.GetAuthorizationTokenResponse = {}));
var GetRegistryCatalogDataRequest;
(function (GetRegistryCatalogDataRequest) {
GetRegistryCatalogDataRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRegistryCatalogDataRequest = exports.GetRegistryCatalogDataRequest || (exports.GetRegistryCatalogDataRequest = {}));
var RegistryCatalogData;
(function (RegistryCatalogData) {
RegistryCatalogData.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegistryCatalogData = exports.RegistryCatalogData || (exports.RegistryCatalogData = {}));
var GetRegistryCatalogDataResponse;
(function (GetRegistryCatalogDataResponse) {
GetRegistryCatalogDataResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRegistryCatalogDataResponse = exports.GetRegistryCatalogDataResponse || (exports.GetRegistryCatalogDataResponse = {}));
var GetRepositoryCatalogDataRequest;
(function (GetRepositoryCatalogDataRequest) {
GetRepositoryCatalogDataRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRepositoryCatalogDataRequest = exports.GetRepositoryCatalogDataRequest || (exports.GetRepositoryCatalogDataRequest = {}));
var GetRepositoryCatalogDataResponse;
(function (GetRepositoryCatalogDataResponse) {
GetRepositoryCatalogDataResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRepositoryCatalogDataResponse = exports.GetRepositoryCatalogDataResponse || (exports.GetRepositoryCatalogDataResponse = {}));
var GetRepositoryPolicyRequest;
(function (GetRepositoryPolicyRequest) {
GetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRepositoryPolicyRequest = exports.GetRepositoryPolicyRequest || (exports.GetRepositoryPolicyRequest = {}));
var GetRepositoryPolicyResponse;
(function (GetRepositoryPolicyResponse) {
GetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRepositoryPolicyResponse = exports.GetRepositoryPolicyResponse || (exports.GetRepositoryPolicyResponse = {}));
var Image;
(function (Image) {
Image.filterSensitiveLog = (obj) => ({
...obj,
});
})(Image = exports.Image || (exports.Image = {}));
var ImageAlreadyExistsException;
(function (ImageAlreadyExistsException) {
ImageAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageAlreadyExistsException = exports.ImageAlreadyExistsException || (exports.ImageAlreadyExistsException = {}));
var ImageDigestDoesNotMatchException;
(function (ImageDigestDoesNotMatchException) {
ImageDigestDoesNotMatchException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageDigestDoesNotMatchException = exports.ImageDigestDoesNotMatchException || (exports.ImageDigestDoesNotMatchException = {}));
var ImageTagAlreadyExistsException;
(function (ImageTagAlreadyExistsException) {
ImageTagAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageTagAlreadyExistsException = exports.ImageTagAlreadyExistsException || (exports.ImageTagAlreadyExistsException = {}));
var InitiateLayerUploadRequest;
(function (InitiateLayerUploadRequest) {
InitiateLayerUploadRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(InitiateLayerUploadRequest = exports.InitiateLayerUploadRequest || (exports.InitiateLayerUploadRequest = {}));
var InitiateLayerUploadResponse;
(function (InitiateLayerUploadResponse) {
InitiateLayerUploadResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(InitiateLayerUploadResponse = exports.InitiateLayerUploadResponse || (exports.InitiateLayerUploadResponse = {}));
var InvalidLayerPartException;
(function (InvalidLayerPartException) {
InvalidLayerPartException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidLayerPartException = exports.InvalidLayerPartException || (exports.InvalidLayerPartException = {}));
var LayersNotFoundException;
(function (LayersNotFoundException) {
LayersNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayersNotFoundException = exports.LayersNotFoundException || (exports.LayersNotFoundException = {}));
var ListTagsForResourceRequest;
(function (ListTagsForResourceRequest) {
ListTagsForResourceRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListTagsForResourceRequest = exports.ListTagsForResourceRequest || (exports.ListTagsForResourceRequest = {}));
var ListTagsForResourceResponse;
(function (ListTagsForResourceResponse) {
ListTagsForResourceResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListTagsForResourceResponse = exports.ListTagsForResourceResponse || (exports.ListTagsForResourceResponse = {}));
var PutImageRequest;
(function (PutImageRequest) {
PutImageRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageRequest = exports.PutImageRequest || (exports.PutImageRequest = {}));
var PutImageResponse;
(function (PutImageResponse) {
PutImageResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageResponse = exports.PutImageResponse || (exports.PutImageResponse = {}));
var ReferencedImagesNotFoundException;
(function (ReferencedImagesNotFoundException) {
ReferencedImagesNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ReferencedImagesNotFoundException = exports.ReferencedImagesNotFoundException || (exports.ReferencedImagesNotFoundException = {}));
var PutRegistryCatalogDataRequest;
(function (PutRegistryCatalogDataRequest) {
PutRegistryCatalogDataRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRegistryCatalogDataRequest = exports.PutRegistryCatalogDataRequest || (exports.PutRegistryCatalogDataRequest = {}));
var PutRegistryCatalogDataResponse;
(function (PutRegistryCatalogDataResponse) {
PutRegistryCatalogDataResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRegistryCatalogDataResponse = exports.PutRegistryCatalogDataResponse || (exports.PutRegistryCatalogDataResponse = {}));
var PutRepositoryCatalogDataRequest;
(function (PutRepositoryCatalogDataRequest) {
PutRepositoryCatalogDataRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRepositoryCatalogDataRequest = exports.PutRepositoryCatalogDataRequest || (exports.PutRepositoryCatalogDataRequest = {}));
var PutRepositoryCatalogDataResponse;
(function (PutRepositoryCatalogDataResponse) {
PutRepositoryCatalogDataResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRepositoryCatalogDataResponse = exports.PutRepositoryCatalogDataResponse || (exports.PutRepositoryCatalogDataResponse = {}));
var SetRepositoryPolicyRequest;
(function (SetRepositoryPolicyRequest) {
SetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(SetRepositoryPolicyRequest = exports.SetRepositoryPolicyRequest || (exports.SetRepositoryPolicyRequest = {}));
var SetRepositoryPolicyResponse;
(function (SetRepositoryPolicyResponse) {
SetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(SetRepositoryPolicyResponse = exports.SetRepositoryPolicyResponse || (exports.SetRepositoryPolicyResponse = {}));
var TagResourceRequest;
(function (TagResourceRequest) {
TagResourceRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(TagResourceRequest = exports.TagResourceRequest || (exports.TagResourceRequest = {}));
var TagResourceResponse;
(function (TagResourceResponse) {
TagResourceResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(TagResourceResponse = exports.TagResourceResponse || (exports.TagResourceResponse = {}));
var UntagResourceRequest;
(function (UntagResourceRequest) {
UntagResourceRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(UntagResourceRequest = exports.UntagResourceRequest || (exports.UntagResourceRequest = {}));
var UntagResourceResponse;
(function (UntagResourceResponse) {
UntagResourceResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {}));
var UploadLayerPartRequest;
(function (UploadLayerPartRequest) {
UploadLayerPartRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(UploadLayerPartRequest = exports.UploadLayerPartRequest || (exports.UploadLayerPartRequest = {}));
var UploadLayerPartResponse;
(function (UploadLayerPartResponse) {
UploadLayerPartResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(UploadLayerPartResponse = exports.UploadLayerPartResponse || (exports.UploadLayerPartResponse = {}));
/***/ }),
/***/ 99634:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeImageTags = void 0;
const DescribeImageTagsCommand_1 = __nccwpck_require__(47670);
const ECRPUBLIC_1 = __nccwpck_require__(86087);
const ECRPUBLICClient_1 = __nccwpck_require__(30608);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeImageTagsCommand_1.DescribeImageTagsCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeImageTags(input, ...args);
};
async function* paginateDescribeImageTags(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeImageTags = paginateDescribeImageTags;
/***/ }),
/***/ 74128:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeImages = void 0;
const DescribeImagesCommand_1 = __nccwpck_require__(22776);
const ECRPUBLIC_1 = __nccwpck_require__(86087);
const ECRPUBLICClient_1 = __nccwpck_require__(30608);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeImagesCommand_1.DescribeImagesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeImages(input, ...args);
};
async function* paginateDescribeImages(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeImages = paginateDescribeImages;
/***/ }),
/***/ 11720:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeRegistries = void 0;
const DescribeRegistriesCommand_1 = __nccwpck_require__(78696);
const ECRPUBLIC_1 = __nccwpck_require__(86087);
const ECRPUBLICClient_1 = __nccwpck_require__(30608);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeRegistriesCommand_1.DescribeRegistriesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeRegistries(input, ...args);
};
async function* paginateDescribeRegistries(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeRegistries = paginateDescribeRegistries;
/***/ }),
/***/ 65474:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeRepositories = void 0;
const DescribeRepositoriesCommand_1 = __nccwpck_require__(82218);
const ECRPUBLIC_1 = __nccwpck_require__(86087);
const ECRPUBLICClient_1 = __nccwpck_require__(30608);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeRepositories(input, ...args);
};
async function* paginateDescribeRepositories(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeRepositories = paginateDescribeRepositories;
/***/ }),
/***/ 93463:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 75945:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(99634), exports);
tslib_1.__exportStar(__nccwpck_require__(74128), exports);
tslib_1.__exportStar(__nccwpck_require__(11720), exports);
tslib_1.__exportStar(__nccwpck_require__(65474), exports);
tslib_1.__exportStar(__nccwpck_require__(93463), exports);
/***/ }),
/***/ 64170:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deserializeAws_json1_1UploadLayerPartCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1SetRepositoryPolicyCommand = exports.deserializeAws_json1_1PutRepositoryCatalogDataCommand = exports.deserializeAws_json1_1PutRegistryCatalogDataCommand = exports.deserializeAws_json1_1PutImageCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1InitiateLayerUploadCommand = exports.deserializeAws_json1_1GetRepositoryPolicyCommand = exports.deserializeAws_json1_1GetRepositoryCatalogDataCommand = exports.deserializeAws_json1_1GetRegistryCatalogDataCommand = exports.deserializeAws_json1_1GetAuthorizationTokenCommand = exports.deserializeAws_json1_1DescribeRepositoriesCommand = exports.deserializeAws_json1_1DescribeRegistriesCommand = exports.deserializeAws_json1_1DescribeImageTagsCommand = exports.deserializeAws_json1_1DescribeImagesCommand = exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = exports.deserializeAws_json1_1DeleteRepositoryCommand = exports.deserializeAws_json1_1CreateRepositoryCommand = exports.deserializeAws_json1_1CompleteLayerUploadCommand = exports.deserializeAws_json1_1BatchDeleteImageCommand = exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = exports.serializeAws_json1_1UploadLayerPartCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1SetRepositoryPolicyCommand = exports.serializeAws_json1_1PutRepositoryCatalogDataCommand = exports.serializeAws_json1_1PutRegistryCatalogDataCommand = exports.serializeAws_json1_1PutImageCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1InitiateLayerUploadCommand = exports.serializeAws_json1_1GetRepositoryPolicyCommand = exports.serializeAws_json1_1GetRepositoryCatalogDataCommand = exports.serializeAws_json1_1GetRegistryCatalogDataCommand = exports.serializeAws_json1_1GetAuthorizationTokenCommand = exports.serializeAws_json1_1DescribeRepositoriesCommand = exports.serializeAws_json1_1DescribeRegistriesCommand = exports.serializeAws_json1_1DescribeImageTagsCommand = exports.serializeAws_json1_1DescribeImagesCommand = exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = exports.serializeAws_json1_1DeleteRepositoryCommand = exports.serializeAws_json1_1CreateRepositoryCommand = exports.serializeAws_json1_1CompleteLayerUploadCommand = exports.serializeAws_json1_1BatchDeleteImageCommand = exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const smithy_client_1 = __nccwpck_require__(4963);
const serializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.BatchCheckLayerAvailability",
};
let body;
body = JSON.stringify(serializeAws_json1_1BatchCheckLayerAvailabilityRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = serializeAws_json1_1BatchCheckLayerAvailabilityCommand;
const serializeAws_json1_1BatchDeleteImageCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.BatchDeleteImage",
};
let body;
body = JSON.stringify(serializeAws_json1_1BatchDeleteImageRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1BatchDeleteImageCommand = serializeAws_json1_1BatchDeleteImageCommand;
const serializeAws_json1_1CompleteLayerUploadCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.CompleteLayerUpload",
};
let body;
body = JSON.stringify(serializeAws_json1_1CompleteLayerUploadRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1CompleteLayerUploadCommand = serializeAws_json1_1CompleteLayerUploadCommand;
const serializeAws_json1_1CreateRepositoryCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.CreateRepository",
};
let body;
body = JSON.stringify(serializeAws_json1_1CreateRepositoryRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1CreateRepositoryCommand = serializeAws_json1_1CreateRepositoryCommand;
const serializeAws_json1_1DeleteRepositoryCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.DeleteRepository",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeleteRepositoryRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeleteRepositoryCommand = serializeAws_json1_1DeleteRepositoryCommand;
const serializeAws_json1_1DeleteRepositoryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.DeleteRepositoryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeleteRepositoryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = serializeAws_json1_1DeleteRepositoryPolicyCommand;
const serializeAws_json1_1DescribeImagesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.DescribeImages",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeImagesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeImagesCommand = serializeAws_json1_1DescribeImagesCommand;
const serializeAws_json1_1DescribeImageTagsCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.DescribeImageTags",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeImageTagsRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeImageTagsCommand = serializeAws_json1_1DescribeImageTagsCommand;
const serializeAws_json1_1DescribeRegistriesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.DescribeRegistries",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeRegistriesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeRegistriesCommand = serializeAws_json1_1DescribeRegistriesCommand;
const serializeAws_json1_1DescribeRepositoriesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.DescribeRepositories",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeRepositoriesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeRepositoriesCommand = serializeAws_json1_1DescribeRepositoriesCommand;
const serializeAws_json1_1GetAuthorizationTokenCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.GetAuthorizationToken",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetAuthorizationTokenRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetAuthorizationTokenCommand = serializeAws_json1_1GetAuthorizationTokenCommand;
const serializeAws_json1_1GetRegistryCatalogDataCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.GetRegistryCatalogData",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetRegistryCatalogDataRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetRegistryCatalogDataCommand = serializeAws_json1_1GetRegistryCatalogDataCommand;
const serializeAws_json1_1GetRepositoryCatalogDataCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.GetRepositoryCatalogData",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetRepositoryCatalogDataRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetRepositoryCatalogDataCommand = serializeAws_json1_1GetRepositoryCatalogDataCommand;
const serializeAws_json1_1GetRepositoryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.GetRepositoryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetRepositoryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetRepositoryPolicyCommand = serializeAws_json1_1GetRepositoryPolicyCommand;
const serializeAws_json1_1InitiateLayerUploadCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.InitiateLayerUpload",
};
let body;
body = JSON.stringify(serializeAws_json1_1InitiateLayerUploadRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1InitiateLayerUploadCommand = serializeAws_json1_1InitiateLayerUploadCommand;
const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.ListTagsForResource",
};
let body;
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand;
const serializeAws_json1_1PutImageCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.PutImage",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutImageRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutImageCommand = serializeAws_json1_1PutImageCommand;
const serializeAws_json1_1PutRegistryCatalogDataCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.PutRegistryCatalogData",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutRegistryCatalogDataRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutRegistryCatalogDataCommand = serializeAws_json1_1PutRegistryCatalogDataCommand;
const serializeAws_json1_1PutRepositoryCatalogDataCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.PutRepositoryCatalogData",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutRepositoryCatalogDataRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutRepositoryCatalogDataCommand = serializeAws_json1_1PutRepositoryCatalogDataCommand;
const serializeAws_json1_1SetRepositoryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.SetRepositoryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1SetRepositoryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1SetRepositoryPolicyCommand = serializeAws_json1_1SetRepositoryPolicyCommand;
const serializeAws_json1_1TagResourceCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.TagResource",
};
let body;
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand;
const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.UntagResource",
};
let body;
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;
const serializeAws_json1_1UploadLayerPartCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "SpencerFrontendService.UploadLayerPart",
};
let body;
body = JSON.stringify(serializeAws_json1_1UploadLayerPartRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1UploadLayerPartCommand = serializeAws_json1_1UploadLayerPartCommand;
const deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1BatchCheckLayerAvailabilityResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = deserializeAws_json1_1BatchCheckLayerAvailabilityCommand;
const deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryNotFoundException":
case "com.amazonaws.ecrpublic#RegistryNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1BatchDeleteImageCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1BatchDeleteImageCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1BatchDeleteImageResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1BatchDeleteImageCommand = deserializeAws_json1_1BatchDeleteImageCommand;
const deserializeAws_json1_1BatchDeleteImageCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1CompleteLayerUploadCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1CompleteLayerUploadCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1CompleteLayerUploadResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1CompleteLayerUploadCommand = deserializeAws_json1_1CompleteLayerUploadCommand;
const deserializeAws_json1_1CompleteLayerUploadCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "EmptyUploadException":
case "com.amazonaws.ecrpublic#EmptyUploadException":
response = {
...(await deserializeAws_json1_1EmptyUploadExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidLayerException":
case "com.amazonaws.ecrpublic#InvalidLayerException":
response = {
...(await deserializeAws_json1_1InvalidLayerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayerAlreadyExistsException":
case "com.amazonaws.ecrpublic#LayerAlreadyExistsException":
response = {
...(await deserializeAws_json1_1LayerAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayerPartTooSmallException":
case "com.amazonaws.ecrpublic#LayerPartTooSmallException":
response = {
...(await deserializeAws_json1_1LayerPartTooSmallExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryNotFoundException":
case "com.amazonaws.ecrpublic#RegistryNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UploadNotFoundException":
case "com.amazonaws.ecrpublic#UploadNotFoundException":
response = {
...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1CreateRepositoryCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1CreateRepositoryCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1CreateRepositoryResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1CreateRepositoryCommand = deserializeAws_json1_1CreateRepositoryCommand;
const deserializeAws_json1_1CreateRepositoryCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidTagParameterException":
case "com.amazonaws.ecrpublic#InvalidTagParameterException":
response = {
...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecrpublic#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryAlreadyExistsException":
case "com.amazonaws.ecrpublic#RepositoryAlreadyExistsException":
response = {
...(await deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyTagsException":
case "com.amazonaws.ecrpublic#TooManyTagsException":
response = {
...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeleteRepositoryCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeleteRepositoryCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeleteRepositoryResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeleteRepositoryCommand = deserializeAws_json1_1DeleteRepositoryCommand;
const deserializeAws_json1_1DeleteRepositoryCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotEmptyException":
case "com.amazonaws.ecrpublic#RepositoryNotEmptyException":
response = {
...(await deserializeAws_json1_1RepositoryNotEmptyExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeleteRepositoryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeleteRepositoryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeleteRepositoryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = deserializeAws_json1_1DeleteRepositoryPolicyCommand;
const deserializeAws_json1_1DeleteRepositoryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryPolicyNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryPolicyNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeImagesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeImagesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeImagesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeImagesCommand = deserializeAws_json1_1DescribeImagesCommand;
const deserializeAws_json1_1DescribeImagesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageNotFoundException":
case "com.amazonaws.ecrpublic#ImageNotFoundException":
response = {
...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeImageTagsCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeImageTagsCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeImageTagsResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeImageTagsCommand = deserializeAws_json1_1DescribeImageTagsCommand;
const deserializeAws_json1_1DescribeImageTagsCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeRegistriesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeRegistriesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeRegistriesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeRegistriesCommand = deserializeAws_json1_1DescribeRegistriesCommand;
const deserializeAws_json1_1DescribeRegistriesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeRepositoriesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeRepositoriesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeRepositoriesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeRepositoriesCommand = deserializeAws_json1_1DescribeRepositoriesCommand;
const deserializeAws_json1_1DescribeRepositoriesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetAuthorizationTokenCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetAuthorizationTokenCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetAuthorizationTokenResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetAuthorizationTokenCommand = deserializeAws_json1_1GetAuthorizationTokenCommand;
const deserializeAws_json1_1GetAuthorizationTokenCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetRegistryCatalogDataCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetRegistryCatalogDataCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetRegistryCatalogDataResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetRegistryCatalogDataCommand = deserializeAws_json1_1GetRegistryCatalogDataCommand;
const deserializeAws_json1_1GetRegistryCatalogDataCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetRepositoryCatalogDataCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetRepositoryCatalogDataCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetRepositoryCatalogDataResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetRepositoryCatalogDataCommand = deserializeAws_json1_1GetRepositoryCatalogDataCommand;
const deserializeAws_json1_1GetRepositoryCatalogDataCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetRepositoryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetRepositoryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetRepositoryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetRepositoryPolicyCommand = deserializeAws_json1_1GetRepositoryPolicyCommand;
const deserializeAws_json1_1GetRepositoryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryPolicyNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryPolicyNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1InitiateLayerUploadCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1InitiateLayerUploadCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1InitiateLayerUploadResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1InitiateLayerUploadCommand = deserializeAws_json1_1InitiateLayerUploadCommand;
const deserializeAws_json1_1InitiateLayerUploadCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryNotFoundException":
case "com.amazonaws.ecrpublic#RegistryNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand;
const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutImageCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutImageCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutImageResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutImageCommand = deserializeAws_json1_1PutImageCommand;
const deserializeAws_json1_1PutImageCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageAlreadyExistsException":
case "com.amazonaws.ecrpublic#ImageAlreadyExistsException":
response = {
...(await deserializeAws_json1_1ImageAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ImageDigestDoesNotMatchException":
case "com.amazonaws.ecrpublic#ImageDigestDoesNotMatchException":
response = {
...(await deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ImageTagAlreadyExistsException":
case "com.amazonaws.ecrpublic#ImageTagAlreadyExistsException":
response = {
...(await deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayersNotFoundException":
case "com.amazonaws.ecrpublic#LayersNotFoundException":
response = {
...(await deserializeAws_json1_1LayersNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecrpublic#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ReferencedImagesNotFoundException":
case "com.amazonaws.ecrpublic#ReferencedImagesNotFoundException":
response = {
...(await deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryNotFoundException":
case "com.amazonaws.ecrpublic#RegistryNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutRegistryCatalogDataCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutRegistryCatalogDataCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutRegistryCatalogDataResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutRegistryCatalogDataCommand = deserializeAws_json1_1PutRegistryCatalogDataCommand;
const deserializeAws_json1_1PutRegistryCatalogDataCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutRepositoryCatalogDataCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutRepositoryCatalogDataCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutRepositoryCatalogDataResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutRepositoryCatalogDataCommand = deserializeAws_json1_1PutRepositoryCatalogDataCommand;
const deserializeAws_json1_1PutRepositoryCatalogDataCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1SetRepositoryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1SetRepositoryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1SetRepositoryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1SetRepositoryPolicyCommand = deserializeAws_json1_1SetRepositoryPolicyCommand;
const deserializeAws_json1_1SetRepositoryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1TagResourceCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1TagResourceResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand;
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidTagParameterException":
case "com.amazonaws.ecrpublic#InvalidTagParameterException":
response = {
...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyTagsException":
case "com.amazonaws.ecrpublic#TooManyTagsException":
response = {
...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1UntagResourceCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand;
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidTagParameterException":
case "com.amazonaws.ecrpublic#InvalidTagParameterException":
response = {
...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyTagsException":
case "com.amazonaws.ecrpublic#TooManyTagsException":
response = {
...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1UploadLayerPartCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1UploadLayerPartCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1UploadLayerPartResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1UploadLayerPartCommand = deserializeAws_json1_1UploadLayerPartCommand;
const deserializeAws_json1_1UploadLayerPartCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidLayerPartException":
case "com.amazonaws.ecrpublic#InvalidLayerPartException":
response = {
...(await deserializeAws_json1_1InvalidLayerPartExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecrpublic#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecrpublic#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryNotFoundException":
case "com.amazonaws.ecrpublic#RegistryNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecrpublic#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedCommandException":
case "com.amazonaws.ecrpublic#UnsupportedCommandException":
response = {
...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UploadNotFoundException":
case "com.amazonaws.ecrpublic#UploadNotFoundException":
response = {
...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1EmptyUploadExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1EmptyUploadException(body, context);
const contents = {
name: "EmptyUploadException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageAlreadyExistsException(body, context);
const contents = {
name: "ImageAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageDigestDoesNotMatchException(body, context);
const contents = {
name: "ImageDigestDoesNotMatchException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageNotFoundException(body, context);
const contents = {
name: "ImageNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageTagAlreadyExistsException(body, context);
const contents = {
name: "ImageTagAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidLayerExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidLayerException(body, context);
const contents = {
name: "InvalidLayerException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidLayerPartExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidLayerPartException(body, context);
const contents = {
name: "InvalidLayerPartException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
const contents = {
name: "InvalidParameterException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidTagParameterExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidTagParameterException(body, context);
const contents = {
name: "InvalidTagParameterException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayerAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayerAlreadyExistsException(body, context);
const contents = {
name: "LayerAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayerPartTooSmallExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayerPartTooSmallException(body, context);
const contents = {
name: "LayerPartTooSmallException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayersNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayersNotFoundException(body, context);
const contents = {
name: "LayersNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
const contents = {
name: "LimitExceededException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ReferencedImagesNotFoundException(body, context);
const contents = {
name: "ReferencedImagesNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RegistryNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RegistryNotFoundException(body, context);
const contents = {
name: "RegistryNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryAlreadyExistsException(body, context);
const contents = {
name: "RepositoryAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryNotEmptyExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryNotEmptyException(body, context);
const contents = {
name: "RepositoryNotEmptyException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryNotFoundException(body, context);
const contents = {
name: "RepositoryNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryPolicyNotFoundException(body, context);
const contents = {
name: "RepositoryPolicyNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ServerExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ServerException(body, context);
const contents = {
name: "ServerException",
$fault: "server",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
const contents = {
name: "TooManyTagsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1UnsupportedCommandExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1UnsupportedCommandException(body, context);
const contents = {
name: "UnsupportedCommandException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1UploadNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1UploadNotFoundException(body, context);
const contents = {
name: "UploadNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const serializeAws_json1_1ArchitectureList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1BatchCheckLayerAvailabilityRequest = (input, context) => {
return {
...(input.layerDigests !== undefined &&
input.layerDigests !== null && {
layerDigests: serializeAws_json1_1BatchedOperationLayerDigestList(input.layerDigests, context),
}),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1BatchDeleteImageRequest = (input, context) => {
return {
...(input.imageIds !== undefined &&
input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1BatchedOperationLayerDigestList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1CompleteLayerUploadRequest = (input, context) => {
return {
...(input.layerDigests !== undefined &&
input.layerDigests !== null && {
layerDigests: serializeAws_json1_1LayerDigestList(input.layerDigests, context),
}),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }),
};
};
const serializeAws_json1_1CreateRepositoryRequest = (input, context) => {
return {
...(input.catalogData !== undefined &&
input.catalogData !== null && {
catalogData: serializeAws_json1_1RepositoryCatalogDataInput(input.catalogData, context),
}),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
};
};
const serializeAws_json1_1DeleteRepositoryPolicyRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DeleteRepositoryRequest = (input, context) => {
return {
...(input.force !== undefined && input.force !== null && { force: input.force }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribeImagesRequest = (input, context) => {
return {
...(input.imageIds !== undefined &&
input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }),
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribeImageTagsRequest = (input, context) => {
return {
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribeRegistriesRequest = (input, context) => {
return {
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
};
};
const serializeAws_json1_1DescribeRepositoriesRequest = (input, context) => {
return {
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryNames !== undefined &&
input.repositoryNames !== null && {
repositoryNames: serializeAws_json1_1RepositoryNameList(input.repositoryNames, context),
}),
};
};
const serializeAws_json1_1GetAuthorizationTokenRequest = (input, context) => {
return {};
};
const serializeAws_json1_1GetRegistryCatalogDataRequest = (input, context) => {
return {};
};
const serializeAws_json1_1GetRepositoryCatalogDataRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1GetRepositoryPolicyRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1ImageIdentifier = (input, context) => {
return {
...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }),
...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }),
};
};
const serializeAws_json1_1ImageIdentifierList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1ImageIdentifier(entry, context);
});
};
const serializeAws_json1_1InitiateLayerUploadRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1LayerDigestList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
return {
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
};
};
const serializeAws_json1_1OperatingSystemList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1PutImageRequest = (input, context) => {
return {
...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }),
...(input.imageManifest !== undefined && input.imageManifest !== null && { imageManifest: input.imageManifest }),
...(input.imageManifestMediaType !== undefined &&
input.imageManifestMediaType !== null && { imageManifestMediaType: input.imageManifestMediaType }),
...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1PutRegistryCatalogDataRequest = (input, context) => {
return {
...(input.displayName !== undefined && input.displayName !== null && { displayName: input.displayName }),
};
};
const serializeAws_json1_1PutRepositoryCatalogDataRequest = (input, context) => {
return {
...(input.catalogData !== undefined &&
input.catalogData !== null && {
catalogData: serializeAws_json1_1RepositoryCatalogDataInput(input.catalogData, context),
}),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1RepositoryCatalogDataInput = (input, context) => {
return {
...(input.aboutText !== undefined && input.aboutText !== null && { aboutText: input.aboutText }),
...(input.architectures !== undefined &&
input.architectures !== null && {
architectures: serializeAws_json1_1ArchitectureList(input.architectures, context),
}),
...(input.description !== undefined && input.description !== null && { description: input.description }),
...(input.logoImageBlob !== undefined &&
input.logoImageBlob !== null && { logoImageBlob: context.base64Encoder(input.logoImageBlob) }),
...(input.operatingSystems !== undefined &&
input.operatingSystems !== null && {
operatingSystems: serializeAws_json1_1OperatingSystemList(input.operatingSystems, context),
}),
...(input.usageText !== undefined && input.usageText !== null && { usageText: input.usageText }),
};
};
const serializeAws_json1_1RepositoryNameList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1SetRepositoryPolicyRequest = (input, context) => {
return {
...(input.force !== undefined && input.force !== null && { force: input.force }),
...(input.policyText !== undefined && input.policyText !== null && { policyText: input.policyText }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1Tag = (input, context) => {
return {
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
};
};
const serializeAws_json1_1TagKeyList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1TagList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1Tag(entry, context);
});
};
const serializeAws_json1_1TagResourceRequest = (input, context) => {
return {
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
};
};
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
return {
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
...(input.tagKeys !== undefined &&
input.tagKeys !== null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }),
};
};
const serializeAws_json1_1UploadLayerPartRequest = (input, context) => {
return {
...(input.layerPartBlob !== undefined &&
input.layerPartBlob !== null && { layerPartBlob: context.base64Encoder(input.layerPartBlob) }),
...(input.partFirstByte !== undefined && input.partFirstByte !== null && { partFirstByte: input.partFirstByte }),
...(input.partLastByte !== undefined && input.partLastByte !== null && { partLastByte: input.partLastByte }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }),
};
};
const deserializeAws_json1_1ArchitectureList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1AuthorizationData = (output, context) => {
return {
authorizationToken: smithy_client_1.expectString(output.authorizationToken),
expiresAt: output.expiresAt !== undefined && output.expiresAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.expiresAt)))
: undefined,
};
};
const deserializeAws_json1_1BatchCheckLayerAvailabilityResponse = (output, context) => {
return {
failures: output.failures !== undefined && output.failures !== null
? deserializeAws_json1_1LayerFailureList(output.failures, context)
: undefined,
layers: output.layers !== undefined && output.layers !== null
? deserializeAws_json1_1LayerList(output.layers, context)
: undefined,
};
};
const deserializeAws_json1_1BatchDeleteImageResponse = (output, context) => {
return {
failures: output.failures !== undefined && output.failures !== null
? deserializeAws_json1_1ImageFailureList(output.failures, context)
: undefined,
imageIds: output.imageIds !== undefined && output.imageIds !== null
? deserializeAws_json1_1ImageIdentifierList(output.imageIds, context)
: undefined,
};
};
const deserializeAws_json1_1CompleteLayerUploadResponse = (output, context) => {
return {
layerDigest: smithy_client_1.expectString(output.layerDigest),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1CreateRepositoryResponse = (output, context) => {
return {
catalogData: output.catalogData !== undefined && output.catalogData !== null
? deserializeAws_json1_1RepositoryCatalogData(output.catalogData, context)
: undefined,
repository: output.repository !== undefined && output.repository !== null
? deserializeAws_json1_1Repository(output.repository, context)
: undefined,
};
};
const deserializeAws_json1_1DeleteRepositoryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1DeleteRepositoryResponse = (output, context) => {
return {
repository: output.repository !== undefined && output.repository !== null
? deserializeAws_json1_1Repository(output.repository, context)
: undefined,
};
};
const deserializeAws_json1_1DescribeImagesResponse = (output, context) => {
return {
imageDetails: output.imageDetails !== undefined && output.imageDetails !== null
? deserializeAws_json1_1ImageDetailList(output.imageDetails, context)
: undefined,
nextToken: smithy_client_1.expectString(output.nextToken),
};
};
const deserializeAws_json1_1DescribeImageTagsResponse = (output, context) => {
return {
imageTagDetails: output.imageTagDetails !== undefined && output.imageTagDetails !== null
? deserializeAws_json1_1ImageTagDetailList(output.imageTagDetails, context)
: undefined,
nextToken: smithy_client_1.expectString(output.nextToken),
};
};
const deserializeAws_json1_1DescribeRegistriesResponse = (output, context) => {
return {
nextToken: smithy_client_1.expectString(output.nextToken),
registries: output.registries !== undefined && output.registries !== null
? deserializeAws_json1_1RegistryList(output.registries, context)
: undefined,
};
};
const deserializeAws_json1_1DescribeRepositoriesResponse = (output, context) => {
return {
nextToken: smithy_client_1.expectString(output.nextToken),
repositories: output.repositories !== undefined && output.repositories !== null
? deserializeAws_json1_1RepositoryList(output.repositories, context)
: undefined,
};
};
const deserializeAws_json1_1EmptyUploadException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1GetAuthorizationTokenResponse = (output, context) => {
return {
authorizationData: output.authorizationData !== undefined && output.authorizationData !== null
? deserializeAws_json1_1AuthorizationData(output.authorizationData, context)
: undefined,
};
};
const deserializeAws_json1_1GetRegistryCatalogDataResponse = (output, context) => {
return {
registryCatalogData: output.registryCatalogData !== undefined && output.registryCatalogData !== null
? deserializeAws_json1_1RegistryCatalogData(output.registryCatalogData, context)
: undefined,
};
};
const deserializeAws_json1_1GetRepositoryCatalogDataResponse = (output, context) => {
return {
catalogData: output.catalogData !== undefined && output.catalogData !== null
? deserializeAws_json1_1RepositoryCatalogData(output.catalogData, context)
: undefined,
};
};
const deserializeAws_json1_1GetRepositoryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1Image = (output, context) => {
return {
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
imageManifest: smithy_client_1.expectString(output.imageManifest),
imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1ImageAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageDetail = (output, context) => {
return {
artifactMediaType: smithy_client_1.expectString(output.artifactMediaType),
imageDigest: smithy_client_1.expectString(output.imageDigest),
imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType),
imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt)))
: undefined,
imageSizeInBytes: smithy_client_1.expectLong(output.imageSizeInBytes),
imageTags: output.imageTags !== undefined && output.imageTags !== null
? deserializeAws_json1_1ImageTagList(output.imageTags, context)
: undefined,
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1ImageDetailList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageDetail(entry, context);
});
};
const deserializeAws_json1_1ImageDigestDoesNotMatchException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageFailure = (output, context) => {
return {
failureCode: smithy_client_1.expectString(output.failureCode),
failureReason: smithy_client_1.expectString(output.failureReason),
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
};
};
const deserializeAws_json1_1ImageFailureList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageFailure(entry, context);
});
};
const deserializeAws_json1_1ImageIdentifier = (output, context) => {
return {
imageDigest: smithy_client_1.expectString(output.imageDigest),
imageTag: smithy_client_1.expectString(output.imageTag),
};
};
const deserializeAws_json1_1ImageIdentifierList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageIdentifier(entry, context);
});
};
const deserializeAws_json1_1ImageNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageTagAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageTagDetail = (output, context) => {
return {
createdAt: output.createdAt !== undefined && output.createdAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))
: undefined,
imageDetail: output.imageDetail !== undefined && output.imageDetail !== null
? deserializeAws_json1_1ReferencedImageDetail(output.imageDetail, context)
: undefined,
imageTag: smithy_client_1.expectString(output.imageTag),
};
};
const deserializeAws_json1_1ImageTagDetailList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageTagDetail(entry, context);
});
};
const deserializeAws_json1_1ImageTagList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1InitiateLayerUploadResponse = (output, context) => {
return {
partSize: smithy_client_1.expectLong(output.partSize),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1InvalidLayerException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1InvalidLayerPartException = (output, context) => {
return {
lastValidByteReceived: smithy_client_1.expectLong(output.lastValidByteReceived),
message: smithy_client_1.expectString(output.message),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1InvalidParameterException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1InvalidTagParameterException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1Layer = (output, context) => {
return {
layerAvailability: smithy_client_1.expectString(output.layerAvailability),
layerDigest: smithy_client_1.expectString(output.layerDigest),
layerSize: smithy_client_1.expectLong(output.layerSize),
mediaType: smithy_client_1.expectString(output.mediaType),
};
};
const deserializeAws_json1_1LayerAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LayerFailure = (output, context) => {
return {
failureCode: smithy_client_1.expectString(output.failureCode),
failureReason: smithy_client_1.expectString(output.failureReason),
layerDigest: smithy_client_1.expectString(output.layerDigest),
};
};
const deserializeAws_json1_1LayerFailureList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1LayerFailure(entry, context);
});
};
const deserializeAws_json1_1LayerList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Layer(entry, context);
});
};
const deserializeAws_json1_1LayerPartTooSmallException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LayersNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LimitExceededException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
return {
tags: output.tags !== undefined && output.tags !== null
? deserializeAws_json1_1TagList(output.tags, context)
: undefined,
};
};
const deserializeAws_json1_1OperatingSystemList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1PutImageResponse = (output, context) => {
return {
image: output.image !== undefined && output.image !== null
? deserializeAws_json1_1Image(output.image, context)
: undefined,
};
};
const deserializeAws_json1_1PutRegistryCatalogDataResponse = (output, context) => {
return {
registryCatalogData: output.registryCatalogData !== undefined && output.registryCatalogData !== null
? deserializeAws_json1_1RegistryCatalogData(output.registryCatalogData, context)
: undefined,
};
};
const deserializeAws_json1_1PutRepositoryCatalogDataResponse = (output, context) => {
return {
catalogData: output.catalogData !== undefined && output.catalogData !== null
? deserializeAws_json1_1RepositoryCatalogData(output.catalogData, context)
: undefined,
};
};
const deserializeAws_json1_1ReferencedImageDetail = (output, context) => {
return {
artifactMediaType: smithy_client_1.expectString(output.artifactMediaType),
imageDigest: smithy_client_1.expectString(output.imageDigest),
imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType),
imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt)))
: undefined,
imageSizeInBytes: smithy_client_1.expectLong(output.imageSizeInBytes),
};
};
const deserializeAws_json1_1ReferencedImagesNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1Registry = (output, context) => {
return {
aliases: output.aliases !== undefined && output.aliases !== null
? deserializeAws_json1_1RegistryAliasList(output.aliases, context)
: undefined,
registryArn: smithy_client_1.expectString(output.registryArn),
registryId: smithy_client_1.expectString(output.registryId),
registryUri: smithy_client_1.expectString(output.registryUri),
verified: smithy_client_1.expectBoolean(output.verified),
};
};
const deserializeAws_json1_1RegistryAlias = (output, context) => {
return {
defaultRegistryAlias: smithy_client_1.expectBoolean(output.defaultRegistryAlias),
name: smithy_client_1.expectString(output.name),
primaryRegistryAlias: smithy_client_1.expectBoolean(output.primaryRegistryAlias),
status: smithy_client_1.expectString(output.status),
};
};
const deserializeAws_json1_1RegistryAliasList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1RegistryAlias(entry, context);
});
};
const deserializeAws_json1_1RegistryCatalogData = (output, context) => {
return {
displayName: smithy_client_1.expectString(output.displayName),
};
};
const deserializeAws_json1_1RegistryList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Registry(entry, context);
});
};
const deserializeAws_json1_1RegistryNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1Repository = (output, context) => {
return {
createdAt: output.createdAt !== undefined && output.createdAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))
: undefined,
registryId: smithy_client_1.expectString(output.registryId),
repositoryArn: smithy_client_1.expectString(output.repositoryArn),
repositoryName: smithy_client_1.expectString(output.repositoryName),
repositoryUri: smithy_client_1.expectString(output.repositoryUri),
};
};
const deserializeAws_json1_1RepositoryAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryCatalogData = (output, context) => {
return {
aboutText: smithy_client_1.expectString(output.aboutText),
architectures: output.architectures !== undefined && output.architectures !== null
? deserializeAws_json1_1ArchitectureList(output.architectures, context)
: undefined,
description: smithy_client_1.expectString(output.description),
logoUrl: smithy_client_1.expectString(output.logoUrl),
marketplaceCertified: smithy_client_1.expectBoolean(output.marketplaceCertified),
operatingSystems: output.operatingSystems !== undefined && output.operatingSystems !== null
? deserializeAws_json1_1OperatingSystemList(output.operatingSystems, context)
: undefined,
usageText: smithy_client_1.expectString(output.usageText),
};
};
const deserializeAws_json1_1RepositoryList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Repository(entry, context);
});
};
const deserializeAws_json1_1RepositoryNotEmptyException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryPolicyNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ServerException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1SetRepositoryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1Tag = (output, context) => {
return {
Key: smithy_client_1.expectString(output.Key),
Value: smithy_client_1.expectString(output.Value),
};
};
const deserializeAws_json1_1TagList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Tag(entry, context);
});
};
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
return {};
};
const deserializeAws_json1_1TooManyTagsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1UnsupportedCommandException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
return {};
};
const deserializeAws_json1_1UploadLayerPartResponse = (output, context) => {
return {
lastByteReceived: smithy_client_1.expectLong(output.lastByteReceived),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1UploadNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeMetadata = (output) => {
var _a;
return ({
httpStatusCode: output.statusCode,
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
};
const collectBody = (streamBody = new Uint8Array(), context) => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
};
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
}
if (body !== undefined) {
contents.body = body;
}
return new protocol_http_1.HttpRequest(contents);
};
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
return JSON.parse(encoded);
}
return {};
});
const loadRestJsonErrorCode = (output, data) => {
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
const sanitizeErrorCode = (rawValue) => {
let cleanValue = rawValue;
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
};
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== undefined) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== undefined) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== undefined) {
return sanitizeErrorCode(data["__type"]);
}
return "";
};
/***/ }),
/***/ 49324:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(46748));
const client_sts_1 = __nccwpck_require__(52209);
const config_resolver_1 = __nccwpck_require__(56153);
const credential_provider_node_1 = __nccwpck_require__(75531);
const hash_node_1 = __nccwpck_require__(97442);
const middleware_retry_1 = __nccwpck_require__(96064);
const node_config_provider_1 = __nccwpck_require__(87684);
const node_http_handler_1 = __nccwpck_require__(68805);
const util_base64_node_1 = __nccwpck_require__(18588);
const util_body_length_node_1 = __nccwpck_require__(74147);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const util_utf8_node_1 = __nccwpck_require__(66278);
const runtimeConfig_shared_1 = __nccwpck_require__(76746);
const smithy_client_1 = __nccwpck_require__(4963);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "node",
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : client_sts_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 76746:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const url_parser_1 = __nccwpck_require__(2992);
const endpoints_1 = __nccwpck_require__(68593);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e;
return ({
apiVersion: "2020-10-30",
disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,
serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "ECR PUBLIC",
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
});
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 59167:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ECR = void 0;
const BatchCheckLayerAvailabilityCommand_1 = __nccwpck_require__(63804);
const BatchDeleteImageCommand_1 = __nccwpck_require__(15511);
const BatchGetImageCommand_1 = __nccwpck_require__(78859);
const BatchGetRepositoryScanningConfigurationCommand_1 = __nccwpck_require__(79728);
const CompleteLayerUploadCommand_1 = __nccwpck_require__(49003);
const CreatePullThroughCacheRuleCommand_1 = __nccwpck_require__(71454);
const CreateRepositoryCommand_1 = __nccwpck_require__(5074);
const DeleteLifecyclePolicyCommand_1 = __nccwpck_require__(48981);
const DeletePullThroughCacheRuleCommand_1 = __nccwpck_require__(83793);
const DeleteRegistryPolicyCommand_1 = __nccwpck_require__(31424);
const DeleteRepositoryCommand_1 = __nccwpck_require__(88651);
const DeleteRepositoryPolicyCommand_1 = __nccwpck_require__(36828);
const DescribeImageReplicationStatusCommand_1 = __nccwpck_require__(39694);
const DescribeImageScanFindingsCommand_1 = __nccwpck_require__(72987);
const DescribeImagesCommand_1 = __nccwpck_require__(95353);
const DescribePullThroughCacheRulesCommand_1 = __nccwpck_require__(31484);
const DescribeRegistryCommand_1 = __nccwpck_require__(26166);
const DescribeRepositoriesCommand_1 = __nccwpck_require__(21200);
const GetAuthorizationTokenCommand_1 = __nccwpck_require__(35828);
const GetDownloadUrlForLayerCommand_1 = __nccwpck_require__(51401);
const GetLifecyclePolicyCommand_1 = __nccwpck_require__(48469);
const GetLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(17006);
const GetRegistryPolicyCommand_1 = __nccwpck_require__(33685);
const GetRegistryScanningConfigurationCommand_1 = __nccwpck_require__(82741);
const GetRepositoryPolicyCommand_1 = __nccwpck_require__(46330);
const InitiateLayerUploadCommand_1 = __nccwpck_require__(6936);
const ListImagesCommand_1 = __nccwpck_require__(3854);
const ListTagsForResourceCommand_1 = __nccwpck_require__(97403);
const PutImageCommand_1 = __nccwpck_require__(66844);
const PutImageScanningConfigurationCommand_1 = __nccwpck_require__(87935);
const PutImageTagMutabilityCommand_1 = __nccwpck_require__(66495);
const PutLifecyclePolicyCommand_1 = __nccwpck_require__(33854);
const PutRegistryPolicyCommand_1 = __nccwpck_require__(97928);
const PutRegistryScanningConfigurationCommand_1 = __nccwpck_require__(29529);
const PutReplicationConfigurationCommand_1 = __nccwpck_require__(13350);
const SetRepositoryPolicyCommand_1 = __nccwpck_require__(78300);
const StartImageScanCommand_1 = __nccwpck_require__(47984);
const StartLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(35905);
const TagResourceCommand_1 = __nccwpck_require__(82665);
const UntagResourceCommand_1 = __nccwpck_require__(37225);
const UploadLayerPartCommand_1 = __nccwpck_require__(55825);
const ECRClient_1 = __nccwpck_require__(83391);
class ECR extends ECRClient_1.ECRClient {
batchCheckLayerAvailability(args, optionsOrCb, cb) {
const command = new BatchCheckLayerAvailabilityCommand_1.BatchCheckLayerAvailabilityCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
batchDeleteImage(args, optionsOrCb, cb) {
const command = new BatchDeleteImageCommand_1.BatchDeleteImageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
batchGetImage(args, optionsOrCb, cb) {
const command = new BatchGetImageCommand_1.BatchGetImageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
batchGetRepositoryScanningConfiguration(args, optionsOrCb, cb) {
const command = new BatchGetRepositoryScanningConfigurationCommand_1.BatchGetRepositoryScanningConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
completeLayerUpload(args, optionsOrCb, cb) {
const command = new CompleteLayerUploadCommand_1.CompleteLayerUploadCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
createPullThroughCacheRule(args, optionsOrCb, cb) {
const command = new CreatePullThroughCacheRuleCommand_1.CreatePullThroughCacheRuleCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
createRepository(args, optionsOrCb, cb) {
const command = new CreateRepositoryCommand_1.CreateRepositoryCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deleteLifecyclePolicy(args, optionsOrCb, cb) {
const command = new DeleteLifecyclePolicyCommand_1.DeleteLifecyclePolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deletePullThroughCacheRule(args, optionsOrCb, cb) {
const command = new DeletePullThroughCacheRuleCommand_1.DeletePullThroughCacheRuleCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deleteRegistryPolicy(args, optionsOrCb, cb) {
const command = new DeleteRegistryPolicyCommand_1.DeleteRegistryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deleteRepository(args, optionsOrCb, cb) {
const command = new DeleteRepositoryCommand_1.DeleteRepositoryCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
deleteRepositoryPolicy(args, optionsOrCb, cb) {
const command = new DeleteRepositoryPolicyCommand_1.DeleteRepositoryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeImageReplicationStatus(args, optionsOrCb, cb) {
const command = new DescribeImageReplicationStatusCommand_1.DescribeImageReplicationStatusCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeImages(args, optionsOrCb, cb) {
const command = new DescribeImagesCommand_1.DescribeImagesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeImageScanFindings(args, optionsOrCb, cb) {
const command = new DescribeImageScanFindingsCommand_1.DescribeImageScanFindingsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describePullThroughCacheRules(args, optionsOrCb, cb) {
const command = new DescribePullThroughCacheRulesCommand_1.DescribePullThroughCacheRulesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeRegistry(args, optionsOrCb, cb) {
const command = new DescribeRegistryCommand_1.DescribeRegistryCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
describeRepositories(args, optionsOrCb, cb) {
const command = new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getAuthorizationToken(args, optionsOrCb, cb) {
const command = new GetAuthorizationTokenCommand_1.GetAuthorizationTokenCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getDownloadUrlForLayer(args, optionsOrCb, cb) {
const command = new GetDownloadUrlForLayerCommand_1.GetDownloadUrlForLayerCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getLifecyclePolicy(args, optionsOrCb, cb) {
const command = new GetLifecyclePolicyCommand_1.GetLifecyclePolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getLifecyclePolicyPreview(args, optionsOrCb, cb) {
const command = new GetLifecyclePolicyPreviewCommand_1.GetLifecyclePolicyPreviewCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRegistryPolicy(args, optionsOrCb, cb) {
const command = new GetRegistryPolicyCommand_1.GetRegistryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRegistryScanningConfiguration(args, optionsOrCb, cb) {
const command = new GetRegistryScanningConfigurationCommand_1.GetRegistryScanningConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getRepositoryPolicy(args, optionsOrCb, cb) {
const command = new GetRepositoryPolicyCommand_1.GetRepositoryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
initiateLayerUpload(args, optionsOrCb, cb) {
const command = new InitiateLayerUploadCommand_1.InitiateLayerUploadCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listImages(args, optionsOrCb, cb) {
const command = new ListImagesCommand_1.ListImagesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listTagsForResource(args, optionsOrCb, cb) {
const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putImage(args, optionsOrCb, cb) {
const command = new PutImageCommand_1.PutImageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putImageScanningConfiguration(args, optionsOrCb, cb) {
const command = new PutImageScanningConfigurationCommand_1.PutImageScanningConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putImageTagMutability(args, optionsOrCb, cb) {
const command = new PutImageTagMutabilityCommand_1.PutImageTagMutabilityCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putLifecyclePolicy(args, optionsOrCb, cb) {
const command = new PutLifecyclePolicyCommand_1.PutLifecyclePolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putRegistryPolicy(args, optionsOrCb, cb) {
const command = new PutRegistryPolicyCommand_1.PutRegistryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putRegistryScanningConfiguration(args, optionsOrCb, cb) {
const command = new PutRegistryScanningConfigurationCommand_1.PutRegistryScanningConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
putReplicationConfiguration(args, optionsOrCb, cb) {
const command = new PutReplicationConfigurationCommand_1.PutReplicationConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
setRepositoryPolicy(args, optionsOrCb, cb) {
const command = new SetRepositoryPolicyCommand_1.SetRepositoryPolicyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
startImageScan(args, optionsOrCb, cb) {
const command = new StartImageScanCommand_1.StartImageScanCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
startLifecyclePolicyPreview(args, optionsOrCb, cb) {
const command = new StartLifecyclePolicyPreviewCommand_1.StartLifecyclePolicyPreviewCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
tagResource(args, optionsOrCb, cb) {
const command = new TagResourceCommand_1.TagResourceCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
untagResource(args, optionsOrCb, cb) {
const command = new UntagResourceCommand_1.UntagResourceCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
uploadLayerPart(args, optionsOrCb, cb) {
const command = new UploadLayerPartCommand_1.UploadLayerPartCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
}
exports.ECR = ECR;
/***/ }),
/***/ 83391:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ECRClient = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const middleware_content_length_1 = __nccwpck_require__(42245);
const middleware_host_header_1 = __nccwpck_require__(22545);
const middleware_logger_1 = __nccwpck_require__(20014);
const middleware_retry_1 = __nccwpck_require__(96064);
const middleware_signing_1 = __nccwpck_require__(14935);
const middleware_user_agent_1 = __nccwpck_require__(64688);
const smithy_client_1 = __nccwpck_require__(4963);
const runtimeConfig_1 = __nccwpck_require__(869);
class ECRClient extends smithy_client_1.Client {
constructor(configuration) {
const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
const _config_1 = config_resolver_1.resolveRegionConfig(_config_0);
const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);
const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);
const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);
const _config_5 = middleware_signing_1.resolveAwsAuthConfig(_config_4);
const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5);
super(_config_6);
this.config = _config_6;
this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));
this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));
this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));
this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config));
this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
}
destroy() {
super.destroy();
}
}
exports.ECRClient = ECRClient;
/***/ }),
/***/ 63804:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchCheckLayerAvailabilityCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class BatchCheckLayerAvailabilityCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "BatchCheckLayerAvailabilityCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1BatchCheckLayerAvailabilityCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand(output, context);
}
}
exports.BatchCheckLayerAvailabilityCommand = BatchCheckLayerAvailabilityCommand;
/***/ }),
/***/ 15511:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchDeleteImageCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class BatchDeleteImageCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "BatchDeleteImageCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.BatchDeleteImageRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.BatchDeleteImageResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1BatchDeleteImageCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1BatchDeleteImageCommand(output, context);
}
}
exports.BatchDeleteImageCommand = BatchDeleteImageCommand;
/***/ }),
/***/ 78859:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchGetImageCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class BatchGetImageCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "BatchGetImageCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.BatchGetImageRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.BatchGetImageResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1BatchGetImageCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1BatchGetImageCommand(output, context);
}
}
exports.BatchGetImageCommand = BatchGetImageCommand;
/***/ }),
/***/ 79728:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BatchGetRepositoryScanningConfigurationCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class BatchGetRepositoryScanningConfigurationCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "BatchGetRepositoryScanningConfigurationCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.BatchGetRepositoryScanningConfigurationRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.BatchGetRepositoryScanningConfigurationResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand(output, context);
}
}
exports.BatchGetRepositoryScanningConfigurationCommand = BatchGetRepositoryScanningConfigurationCommand;
/***/ }),
/***/ 49003:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CompleteLayerUploadCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class CompleteLayerUploadCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "CompleteLayerUploadCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.CompleteLayerUploadRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.CompleteLayerUploadResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1CompleteLayerUploadCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1CompleteLayerUploadCommand(output, context);
}
}
exports.CompleteLayerUploadCommand = CompleteLayerUploadCommand;
/***/ }),
/***/ 71454:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CreatePullThroughCacheRuleCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class CreatePullThroughCacheRuleCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "CreatePullThroughCacheRuleCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.CreatePullThroughCacheRuleRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.CreatePullThroughCacheRuleResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1CreatePullThroughCacheRuleCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1CreatePullThroughCacheRuleCommand(output, context);
}
}
exports.CreatePullThroughCacheRuleCommand = CreatePullThroughCacheRuleCommand;
/***/ }),
/***/ 5074:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CreateRepositoryCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class CreateRepositoryCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "CreateRepositoryCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.CreateRepositoryRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.CreateRepositoryResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1CreateRepositoryCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1CreateRepositoryCommand(output, context);
}
}
exports.CreateRepositoryCommand = CreateRepositoryCommand;
/***/ }),
/***/ 48981:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeleteLifecyclePolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DeleteLifecyclePolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DeleteLifecyclePolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeleteLifecyclePolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeleteLifecyclePolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeleteLifecyclePolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeleteLifecyclePolicyCommand(output, context);
}
}
exports.DeleteLifecyclePolicyCommand = DeleteLifecyclePolicyCommand;
/***/ }),
/***/ 83793:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeletePullThroughCacheRuleCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DeletePullThroughCacheRuleCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DeletePullThroughCacheRuleCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeletePullThroughCacheRuleRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeletePullThroughCacheRuleResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeletePullThroughCacheRuleCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeletePullThroughCacheRuleCommand(output, context);
}
}
exports.DeletePullThroughCacheRuleCommand = DeletePullThroughCacheRuleCommand;
/***/ }),
/***/ 31424:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeleteRegistryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DeleteRegistryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DeleteRegistryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeleteRegistryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeleteRegistryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeleteRegistryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeleteRegistryPolicyCommand(output, context);
}
}
exports.DeleteRegistryPolicyCommand = DeleteRegistryPolicyCommand;
/***/ }),
/***/ 88651:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeleteRepositoryCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DeleteRepositoryCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DeleteRepositoryCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeleteRepositoryRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeleteRepositoryResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryCommand(output, context);
}
}
exports.DeleteRepositoryCommand = DeleteRepositoryCommand;
/***/ }),
/***/ 36828:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DeleteRepositoryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DeleteRepositoryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DeleteRepositoryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryPolicyCommand(output, context);
}
}
exports.DeleteRepositoryPolicyCommand = DeleteRepositoryPolicyCommand;
/***/ }),
/***/ 39694:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeImageReplicationStatusCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DescribeImageReplicationStatusCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DescribeImageReplicationStatusCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeImageReplicationStatusRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeImageReplicationStatusResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeImageReplicationStatusCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeImageReplicationStatusCommand(output, context);
}
}
exports.DescribeImageReplicationStatusCommand = DescribeImageReplicationStatusCommand;
/***/ }),
/***/ 72987:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeImageScanFindingsCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DescribeImageScanFindingsCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DescribeImageScanFindingsCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeImageScanFindingsRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeImageScanFindingsResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeImageScanFindingsCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeImageScanFindingsCommand(output, context);
}
}
exports.DescribeImageScanFindingsCommand = DescribeImageScanFindingsCommand;
/***/ }),
/***/ 95353:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeImagesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DescribeImagesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DescribeImagesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeImagesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeImagesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeImagesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeImagesCommand(output, context);
}
}
exports.DescribeImagesCommand = DescribeImagesCommand;
/***/ }),
/***/ 31484:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribePullThroughCacheRulesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DescribePullThroughCacheRulesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DescribePullThroughCacheRulesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribePullThroughCacheRulesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribePullThroughCacheRulesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribePullThroughCacheRulesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribePullThroughCacheRulesCommand(output, context);
}
}
exports.DescribePullThroughCacheRulesCommand = DescribePullThroughCacheRulesCommand;
/***/ }),
/***/ 26166:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeRegistryCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DescribeRegistryCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DescribeRegistryCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeRegistryRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeRegistryResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeRegistryCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeRegistryCommand(output, context);
}
}
exports.DescribeRegistryCommand = DescribeRegistryCommand;
/***/ }),
/***/ 21200:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DescribeRepositoriesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class DescribeRepositoriesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "DescribeRepositoriesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DescribeRepositoriesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DescribeRepositoriesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1DescribeRepositoriesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1DescribeRepositoriesCommand(output, context);
}
}
exports.DescribeRepositoriesCommand = DescribeRepositoriesCommand;
/***/ }),
/***/ 35828:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetAuthorizationTokenCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetAuthorizationTokenCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetAuthorizationTokenCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetAuthorizationTokenRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetAuthorizationTokenResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetAuthorizationTokenCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetAuthorizationTokenCommand(output, context);
}
}
exports.GetAuthorizationTokenCommand = GetAuthorizationTokenCommand;
/***/ }),
/***/ 51401:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetDownloadUrlForLayerCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetDownloadUrlForLayerCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetDownloadUrlForLayerCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetDownloadUrlForLayerRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetDownloadUrlForLayerResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetDownloadUrlForLayerCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetDownloadUrlForLayerCommand(output, context);
}
}
exports.GetDownloadUrlForLayerCommand = GetDownloadUrlForLayerCommand;
/***/ }),
/***/ 48469:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetLifecyclePolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetLifecyclePolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetLifecyclePolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetLifecyclePolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetLifecyclePolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetLifecyclePolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetLifecyclePolicyCommand(output, context);
}
}
exports.GetLifecyclePolicyCommand = GetLifecyclePolicyCommand;
/***/ }),
/***/ 17006:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetLifecyclePolicyPreviewCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetLifecyclePolicyPreviewCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetLifecyclePolicyPreviewCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetLifecyclePolicyPreviewRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetLifecyclePolicyPreviewResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetLifecyclePolicyPreviewCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetLifecyclePolicyPreviewCommand(output, context);
}
}
exports.GetLifecyclePolicyPreviewCommand = GetLifecyclePolicyPreviewCommand;
/***/ }),
/***/ 33685:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRegistryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetRegistryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetRegistryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRegistryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRegistryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetRegistryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetRegistryPolicyCommand(output, context);
}
}
exports.GetRegistryPolicyCommand = GetRegistryPolicyCommand;
/***/ }),
/***/ 82741:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRegistryScanningConfigurationCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetRegistryScanningConfigurationCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetRegistryScanningConfigurationCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRegistryScanningConfigurationRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRegistryScanningConfigurationResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetRegistryScanningConfigurationCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetRegistryScanningConfigurationCommand(output, context);
}
}
exports.GetRegistryScanningConfigurationCommand = GetRegistryScanningConfigurationCommand;
/***/ }),
/***/ 46330:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRepositoryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class GetRepositoryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "GetRepositoryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRepositoryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRepositoryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1GetRepositoryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1GetRepositoryPolicyCommand(output, context);
}
}
exports.GetRepositoryPolicyCommand = GetRepositoryPolicyCommand;
/***/ }),
/***/ 6936:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.InitiateLayerUploadCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class InitiateLayerUploadCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "InitiateLayerUploadCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.InitiateLayerUploadRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.InitiateLayerUploadResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1InitiateLayerUploadCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1InitiateLayerUploadCommand(output, context);
}
}
exports.InitiateLayerUploadCommand = InitiateLayerUploadCommand;
/***/ }),
/***/ 3854:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ListImagesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class ListImagesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "ListImagesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.ListImagesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.ListImagesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1ListImagesCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1ListImagesCommand(output, context);
}
}
exports.ListImagesCommand = ListImagesCommand;
/***/ }),
/***/ 97403:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ListTagsForResourceCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class ListTagsForResourceCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "ListTagsForResourceCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.ListTagsForResourceRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1ListTagsForResourceCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1ListTagsForResourceCommand(output, context);
}
}
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
/***/ }),
/***/ 66844:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutImageCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutImageCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutImageCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutImageRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutImageResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutImageCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutImageCommand(output, context);
}
}
exports.PutImageCommand = PutImageCommand;
/***/ }),
/***/ 87935:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutImageScanningConfigurationCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutImageScanningConfigurationCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutImageScanningConfigurationCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutImageScanningConfigurationRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutImageScanningConfigurationResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutImageScanningConfigurationCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutImageScanningConfigurationCommand(output, context);
}
}
exports.PutImageScanningConfigurationCommand = PutImageScanningConfigurationCommand;
/***/ }),
/***/ 66495:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutImageTagMutabilityCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutImageTagMutabilityCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutImageTagMutabilityCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutImageTagMutabilityRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutImageTagMutabilityResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutImageTagMutabilityCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutImageTagMutabilityCommand(output, context);
}
}
exports.PutImageTagMutabilityCommand = PutImageTagMutabilityCommand;
/***/ }),
/***/ 33854:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutLifecyclePolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutLifecyclePolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutLifecyclePolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutLifecyclePolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutLifecyclePolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutLifecyclePolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutLifecyclePolicyCommand(output, context);
}
}
exports.PutLifecyclePolicyCommand = PutLifecyclePolicyCommand;
/***/ }),
/***/ 97928:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutRegistryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutRegistryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutRegistryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutRegistryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutRegistryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutRegistryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutRegistryPolicyCommand(output, context);
}
}
exports.PutRegistryPolicyCommand = PutRegistryPolicyCommand;
/***/ }),
/***/ 29529:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutRegistryScanningConfigurationCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutRegistryScanningConfigurationCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutRegistryScanningConfigurationCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutRegistryScanningConfigurationRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutRegistryScanningConfigurationResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutRegistryScanningConfigurationCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutRegistryScanningConfigurationCommand(output, context);
}
}
exports.PutRegistryScanningConfigurationCommand = PutRegistryScanningConfigurationCommand;
/***/ }),
/***/ 13350:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PutReplicationConfigurationCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class PutReplicationConfigurationCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "PutReplicationConfigurationCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.PutReplicationConfigurationRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.PutReplicationConfigurationResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1PutReplicationConfigurationCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1PutReplicationConfigurationCommand(output, context);
}
}
exports.PutReplicationConfigurationCommand = PutReplicationConfigurationCommand;
/***/ }),
/***/ 78300:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SetRepositoryPolicyCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class SetRepositoryPolicyCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "SetRepositoryPolicyCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.SetRepositoryPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.SetRepositoryPolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1SetRepositoryPolicyCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1SetRepositoryPolicyCommand(output, context);
}
}
exports.SetRepositoryPolicyCommand = SetRepositoryPolicyCommand;
/***/ }),
/***/ 47984:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StartImageScanCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class StartImageScanCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "StartImageScanCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.StartImageScanRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.StartImageScanResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1StartImageScanCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1StartImageScanCommand(output, context);
}
}
exports.StartImageScanCommand = StartImageScanCommand;
/***/ }),
/***/ 35905:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StartLifecyclePolicyPreviewCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class StartLifecyclePolicyPreviewCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "StartLifecyclePolicyPreviewCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.StartLifecyclePolicyPreviewRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.StartLifecyclePolicyPreviewResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1StartLifecyclePolicyPreviewCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1StartLifecyclePolicyPreviewCommand(output, context);
}
}
exports.StartLifecyclePolicyPreviewCommand = StartLifecyclePolicyPreviewCommand;
/***/ }),
/***/ 82665:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TagResourceCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class TagResourceCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "TagResourceCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.TagResourceRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.TagResourceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1TagResourceCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1TagResourceCommand(output, context);
}
}
exports.TagResourceCommand = TagResourceCommand;
/***/ }),
/***/ 37225:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UntagResourceCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class UntagResourceCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "UntagResourceCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.UntagResourceRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.UntagResourceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1UntagResourceCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1UntagResourceCommand(output, context);
}
}
exports.UntagResourceCommand = UntagResourceCommand;
/***/ }),
/***/ 55825:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UploadLayerPartCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(79088);
const Aws_json1_1_1 = __nccwpck_require__(56704);
class UploadLayerPartCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ECRClient";
const commandName = "UploadLayerPartCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.UploadLayerPartRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.UploadLayerPartResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_json1_1_1.serializeAws_json1_1UploadLayerPartCommand(input, context);
}
deserialize(output, context) {
return Aws_json1_1_1.deserializeAws_json1_1UploadLayerPartCommand(output, context);
}
}
exports.UploadLayerPartCommand = UploadLayerPartCommand;
/***/ }),
/***/ 67407:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(63804), exports);
tslib_1.__exportStar(__nccwpck_require__(15511), exports);
tslib_1.__exportStar(__nccwpck_require__(78859), exports);
tslib_1.__exportStar(__nccwpck_require__(79728), exports);
tslib_1.__exportStar(__nccwpck_require__(49003), exports);
tslib_1.__exportStar(__nccwpck_require__(71454), exports);
tslib_1.__exportStar(__nccwpck_require__(5074), exports);
tslib_1.__exportStar(__nccwpck_require__(48981), exports);
tslib_1.__exportStar(__nccwpck_require__(83793), exports);
tslib_1.__exportStar(__nccwpck_require__(31424), exports);
tslib_1.__exportStar(__nccwpck_require__(88651), exports);
tslib_1.__exportStar(__nccwpck_require__(36828), exports);
tslib_1.__exportStar(__nccwpck_require__(39694), exports);
tslib_1.__exportStar(__nccwpck_require__(72987), exports);
tslib_1.__exportStar(__nccwpck_require__(95353), exports);
tslib_1.__exportStar(__nccwpck_require__(31484), exports);
tslib_1.__exportStar(__nccwpck_require__(26166), exports);
tslib_1.__exportStar(__nccwpck_require__(21200), exports);
tslib_1.__exportStar(__nccwpck_require__(35828), exports);
tslib_1.__exportStar(__nccwpck_require__(51401), exports);
tslib_1.__exportStar(__nccwpck_require__(48469), exports);
tslib_1.__exportStar(__nccwpck_require__(17006), exports);
tslib_1.__exportStar(__nccwpck_require__(33685), exports);
tslib_1.__exportStar(__nccwpck_require__(82741), exports);
tslib_1.__exportStar(__nccwpck_require__(46330), exports);
tslib_1.__exportStar(__nccwpck_require__(6936), exports);
tslib_1.__exportStar(__nccwpck_require__(3854), exports);
tslib_1.__exportStar(__nccwpck_require__(97403), exports);
tslib_1.__exportStar(__nccwpck_require__(66844), exports);
tslib_1.__exportStar(__nccwpck_require__(87935), exports);
tslib_1.__exportStar(__nccwpck_require__(66495), exports);
tslib_1.__exportStar(__nccwpck_require__(33854), exports);
tslib_1.__exportStar(__nccwpck_require__(97928), exports);
tslib_1.__exportStar(__nccwpck_require__(29529), exports);
tslib_1.__exportStar(__nccwpck_require__(13350), exports);
tslib_1.__exportStar(__nccwpck_require__(78300), exports);
tslib_1.__exportStar(__nccwpck_require__(47984), exports);
tslib_1.__exportStar(__nccwpck_require__(35905), exports);
tslib_1.__exportStar(__nccwpck_require__(82665), exports);
tslib_1.__exportStar(__nccwpck_require__(37225), exports);
tslib_1.__exportStar(__nccwpck_require__(55825), exports);
/***/ }),
/***/ 63070:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultRegionInfoProvider = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const regionHash = {
"af-south-1": {
variants: [
{
hostname: "api.ecr.af-south-1.amazonaws.com",
tags: [],
},
],
signingRegion: "af-south-1",
},
"ap-east-1": {
variants: [
{
hostname: "api.ecr.ap-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-east-1",
},
"ap-northeast-1": {
variants: [
{
hostname: "api.ecr.ap-northeast-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-northeast-1",
},
"ap-northeast-2": {
variants: [
{
hostname: "api.ecr.ap-northeast-2.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-northeast-2",
},
"ap-northeast-3": {
variants: [
{
hostname: "api.ecr.ap-northeast-3.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-northeast-3",
},
"ap-south-1": {
variants: [
{
hostname: "api.ecr.ap-south-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-south-1",
},
"ap-southeast-1": {
variants: [
{
hostname: "api.ecr.ap-southeast-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-southeast-1",
},
"ap-southeast-2": {
variants: [
{
hostname: "api.ecr.ap-southeast-2.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-southeast-2",
},
"ap-southeast-3": {
variants: [
{
hostname: "api.ecr.ap-southeast-3.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-southeast-3",
},
"ca-central-1": {
variants: [
{
hostname: "api.ecr.ca-central-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ca-central-1",
},
"cn-north-1": {
variants: [
{
hostname: "api.ecr.cn-north-1.amazonaws.com.cn",
tags: [],
},
],
signingRegion: "cn-north-1",
},
"cn-northwest-1": {
variants: [
{
hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn",
tags: [],
},
],
signingRegion: "cn-northwest-1",
},
"eu-central-1": {
variants: [
{
hostname: "api.ecr.eu-central-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-central-1",
},
"eu-north-1": {
variants: [
{
hostname: "api.ecr.eu-north-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-north-1",
},
"eu-south-1": {
variants: [
{
hostname: "api.ecr.eu-south-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-south-1",
},
"eu-west-1": {
variants: [
{
hostname: "api.ecr.eu-west-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-west-1",
},
"eu-west-2": {
variants: [
{
hostname: "api.ecr.eu-west-2.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-west-2",
},
"eu-west-3": {
variants: [
{
hostname: "api.ecr.eu-west-3.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-west-3",
},
"me-south-1": {
variants: [
{
hostname: "api.ecr.me-south-1.amazonaws.com",
tags: [],
},
],
signingRegion: "me-south-1",
},
"sa-east-1": {
variants: [
{
hostname: "api.ecr.sa-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "sa-east-1",
},
"us-east-1": {
variants: [
{
hostname: "api.ecr.us-east-1.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.us-east-1.amazonaws.com",
tags: ["fips"],
},
],
signingRegion: "us-east-1",
},
"us-east-2": {
variants: [
{
hostname: "api.ecr.us-east-2.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.us-east-2.amazonaws.com",
tags: ["fips"],
},
],
signingRegion: "us-east-2",
},
"us-gov-east-1": {
variants: [
{
hostname: "api.ecr.us-gov-east-1.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
tags: ["fips"],
},
],
signingRegion: "us-gov-east-1",
},
"us-gov-west-1": {
variants: [
{
hostname: "api.ecr.us-gov-west-1.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
tags: ["fips"],
},
],
signingRegion: "us-gov-west-1",
},
"us-iso-east-1": {
variants: [
{
hostname: "api.ecr.us-iso-east-1.c2s.ic.gov",
tags: [],
},
],
signingRegion: "us-iso-east-1",
},
"us-iso-west-1": {
variants: [
{
hostname: "api.ecr.us-iso-west-1.c2s.ic.gov",
tags: [],
},
],
signingRegion: "us-iso-west-1",
},
"us-isob-east-1": {
variants: [
{
hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov",
tags: [],
},
],
signingRegion: "us-isob-east-1",
},
"us-west-1": {
variants: [
{
hostname: "api.ecr.us-west-1.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.us-west-1.amazonaws.com",
tags: ["fips"],
},
],
signingRegion: "us-west-1",
},
"us-west-2": {
variants: [
{
hostname: "api.ecr.us-west-2.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.us-west-2.amazonaws.com",
tags: ["fips"],
},
],
signingRegion: "us-west-2",
},
};
const partitionHash = {
aws: {
regions: [
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ca-central-1",
"dkr-us-east-1",
"dkr-us-east-2",
"dkr-us-west-1",
"dkr-us-west-2",
"eu-central-1",
"eu-north-1",
"eu-south-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"fips-dkr-us-east-1",
"fips-dkr-us-east-2",
"fips-dkr-us-west-1",
"fips-dkr-us-west-2",
"fips-us-east-1",
"fips-us-east-2",
"fips-us-west-1",
"fips-us-west-2",
"me-south-1",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr.{region}.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "api.ecr-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "api.ecr.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "api.ecr-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "api.ecr-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "api.ecr.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr.{region}.c2s.ic.gov",
tags: [],
},
{
hostname: "api.ecr-fips.{region}.c2s.ic.gov",
tags: ["fips"],
},
],
},
"aws-iso-b": {
regions: ["us-isob-east-1"],
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr.{region}.sc2s.sgov.gov",
tags: [],
},
{
hostname: "api.ecr-fips.{region}.sc2s.sgov.gov",
tags: ["fips"],
},
],
},
"aws-us-gov": {
regions: [
"dkr-us-gov-east-1",
"dkr-us-gov-west-1",
"fips-dkr-us-gov-east-1",
"fips-dkr-us-gov-west-1",
"fips-us-gov-east-1",
"fips-us-gov-west-1",
"us-gov-east-1",
"us-gov-west-1",
],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
variants: [
{
hostname: "api.ecr.{region}.amazonaws.com",
tags: [],
},
{
hostname: "ecr-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "api.ecr-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "api.ecr.{region}.api.aws",
tags: ["dualstack"],
},
],
},
};
const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
...options,
signingService: "ecr",
regionHash,
partitionHash,
});
exports.defaultRegionInfoProvider = defaultRegionInfoProvider;
/***/ }),
/***/ 8923:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(59167), exports);
tslib_1.__exportStar(__nccwpck_require__(83391), exports);
tslib_1.__exportStar(__nccwpck_require__(67407), exports);
tslib_1.__exportStar(__nccwpck_require__(57451), exports);
tslib_1.__exportStar(__nccwpck_require__(35356), exports);
tslib_1.__exportStar(__nccwpck_require__(28406), exports);
/***/ }),
/***/ 57451:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(79088), exports);
/***/ }),
/***/ 79088:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TooManyTagsException = exports.RepositoryAlreadyExistsException = exports.InvalidTagParameterException = exports.CreateRepositoryResponse = exports.Repository = exports.CreateRepositoryRequest = exports.Tag = exports.ImageTagMutability = exports.ImageScanningConfiguration = exports.EncryptionConfiguration = exports.EncryptionType = exports.UnsupportedUpstreamRegistryException = exports.PullThroughCacheRuleAlreadyExistsException = exports.LimitExceededException = exports.CreatePullThroughCacheRuleResponse = exports.CreatePullThroughCacheRuleRequest = exports.UploadNotFoundException = exports.LayerPartTooSmallException = exports.LayerAlreadyExistsException = exports.KmsException = exports.InvalidLayerException = exports.EmptyUploadException = exports.CompleteLayerUploadResponse = exports.CompleteLayerUploadRequest = exports.ValidationException = exports.BatchGetRepositoryScanningConfigurationResponse = exports.RepositoryScanningConfiguration = exports.ScanFrequency = exports.ScanningRepositoryFilter = exports.ScanningRepositoryFilterType = exports.RepositoryScanningConfigurationFailure = exports.ScanningConfigurationFailureCode = exports.BatchGetRepositoryScanningConfigurationRequest = exports.BatchGetImageResponse = exports.Image = exports.BatchGetImageRequest = exports.BatchDeleteImageResponse = exports.ImageFailure = exports.ImageFailureCode = exports.BatchDeleteImageRequest = exports.ImageIdentifier = exports.ServerException = exports.RepositoryNotFoundException = exports.InvalidParameterException = exports.BatchCheckLayerAvailabilityResponse = exports.Layer = exports.LayerAvailability = exports.LayerFailure = exports.LayerFailureCode = exports.BatchCheckLayerAvailabilityRequest = void 0;
exports.DescribePullThroughCacheRulesResponse = exports.PullThroughCacheRule = exports.DescribePullThroughCacheRulesRequest = exports.ScanNotFoundException = exports.DescribeImageScanFindingsResponse = exports.ImageScanFindings = exports.ImageScanFinding = exports.Attribute = exports.EnhancedImageScanFinding = exports.ScoreDetails = exports.CvssScoreDetails = exports.CvssScoreAdjustment = exports.Resource = exports.ResourceDetails = exports.AwsEcrContainerImageDetails = exports.Remediation = exports.Recommendation = exports.PackageVulnerabilityDetails = exports.VulnerablePackage = exports.CvssScore = exports.DescribeImageScanFindingsRequest = exports.DescribeImagesResponse = exports.ImageDetail = exports.ImageScanStatus = exports.ScanStatus = exports.ImageScanFindingsSummary = exports.FindingSeverity = exports.DescribeImagesRequest = exports.DescribeImagesFilter = exports.TagStatus = exports.ImageNotFoundException = exports.DescribeImageReplicationStatusResponse = exports.ImageReplicationStatus = exports.ReplicationStatus = exports.DescribeImageReplicationStatusRequest = exports.RepositoryPolicyNotFoundException = exports.DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyRequest = exports.RepositoryNotEmptyException = exports.DeleteRepositoryResponse = exports.DeleteRepositoryRequest = exports.RegistryPolicyNotFoundException = exports.DeleteRegistryPolicyResponse = exports.DeleteRegistryPolicyRequest = exports.PullThroughCacheRuleNotFoundException = exports.DeletePullThroughCacheRuleResponse = exports.DeletePullThroughCacheRuleRequest = exports.LifecyclePolicyNotFoundException = exports.DeleteLifecyclePolicyResponse = exports.DeleteLifecyclePolicyRequest = void 0;
exports.PutImageScanningConfigurationRequest = exports.ReferencedImagesNotFoundException = exports.PutImageResponse = exports.PutImageRequest = exports.ImageTagAlreadyExistsException = exports.ImageDigestDoesNotMatchException = exports.ImageAlreadyExistsException = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListImagesResponse = exports.ListImagesRequest = exports.ListImagesFilter = exports.InitiateLayerUploadResponse = exports.InitiateLayerUploadRequest = exports.GetRepositoryPolicyResponse = exports.GetRepositoryPolicyRequest = exports.GetRegistryScanningConfigurationResponse = exports.RegistryScanningConfiguration = exports.ScanType = exports.RegistryScanningRule = exports.GetRegistryScanningConfigurationRequest = exports.GetRegistryPolicyResponse = exports.GetRegistryPolicyRequest = exports.LifecyclePolicyPreviewNotFoundException = exports.GetLifecyclePolicyPreviewResponse = exports.LifecyclePolicyPreviewSummary = exports.LifecyclePolicyPreviewStatus = exports.LifecyclePolicyPreviewResult = exports.LifecyclePolicyRuleAction = exports.ImageActionType = exports.GetLifecyclePolicyPreviewRequest = exports.LifecyclePolicyPreviewFilter = exports.GetLifecyclePolicyResponse = exports.GetLifecyclePolicyRequest = exports.LayersNotFoundException = exports.LayerInaccessibleException = exports.GetDownloadUrlForLayerResponse = exports.GetDownloadUrlForLayerRequest = exports.GetAuthorizationTokenResponse = exports.AuthorizationData = exports.GetAuthorizationTokenRequest = exports.DescribeRepositoriesResponse = exports.DescribeRepositoriesRequest = exports.DescribeRegistryResponse = exports.ReplicationConfiguration = exports.ReplicationRule = exports.RepositoryFilter = exports.RepositoryFilterType = exports.ReplicationDestination = exports.DescribeRegistryRequest = void 0;
exports.UploadLayerPartResponse = exports.UploadLayerPartRequest = exports.InvalidLayerPartException = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.StartLifecyclePolicyPreviewResponse = exports.StartLifecyclePolicyPreviewRequest = exports.LifecyclePolicyPreviewInProgressException = exports.UnsupportedImageTypeException = exports.StartImageScanResponse = exports.StartImageScanRequest = exports.SetRepositoryPolicyResponse = exports.SetRepositoryPolicyRequest = exports.PutReplicationConfigurationResponse = exports.PutReplicationConfigurationRequest = exports.PutRegistryScanningConfigurationResponse = exports.PutRegistryScanningConfigurationRequest = exports.PutRegistryPolicyResponse = exports.PutRegistryPolicyRequest = exports.PutLifecyclePolicyResponse = exports.PutLifecyclePolicyRequest = exports.PutImageTagMutabilityResponse = exports.PutImageTagMutabilityRequest = exports.PutImageScanningConfigurationResponse = void 0;
var BatchCheckLayerAvailabilityRequest;
(function (BatchCheckLayerAvailabilityRequest) {
BatchCheckLayerAvailabilityRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchCheckLayerAvailabilityRequest = exports.BatchCheckLayerAvailabilityRequest || (exports.BatchCheckLayerAvailabilityRequest = {}));
var LayerFailureCode;
(function (LayerFailureCode) {
LayerFailureCode["InvalidLayerDigest"] = "InvalidLayerDigest";
LayerFailureCode["MissingLayerDigest"] = "MissingLayerDigest";
})(LayerFailureCode = exports.LayerFailureCode || (exports.LayerFailureCode = {}));
var LayerFailure;
(function (LayerFailure) {
LayerFailure.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerFailure = exports.LayerFailure || (exports.LayerFailure = {}));
var LayerAvailability;
(function (LayerAvailability) {
LayerAvailability["AVAILABLE"] = "AVAILABLE";
LayerAvailability["UNAVAILABLE"] = "UNAVAILABLE";
})(LayerAvailability = exports.LayerAvailability || (exports.LayerAvailability = {}));
var Layer;
(function (Layer) {
Layer.filterSensitiveLog = (obj) => ({
...obj,
});
})(Layer = exports.Layer || (exports.Layer = {}));
var BatchCheckLayerAvailabilityResponse;
(function (BatchCheckLayerAvailabilityResponse) {
BatchCheckLayerAvailabilityResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchCheckLayerAvailabilityResponse = exports.BatchCheckLayerAvailabilityResponse || (exports.BatchCheckLayerAvailabilityResponse = {}));
var InvalidParameterException;
(function (InvalidParameterException) {
InvalidParameterException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {}));
var RepositoryNotFoundException;
(function (RepositoryNotFoundException) {
RepositoryNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryNotFoundException = exports.RepositoryNotFoundException || (exports.RepositoryNotFoundException = {}));
var ServerException;
(function (ServerException) {
ServerException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ServerException = exports.ServerException || (exports.ServerException = {}));
var ImageIdentifier;
(function (ImageIdentifier) {
ImageIdentifier.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageIdentifier = exports.ImageIdentifier || (exports.ImageIdentifier = {}));
var BatchDeleteImageRequest;
(function (BatchDeleteImageRequest) {
BatchDeleteImageRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchDeleteImageRequest = exports.BatchDeleteImageRequest || (exports.BatchDeleteImageRequest = {}));
var ImageFailureCode;
(function (ImageFailureCode) {
ImageFailureCode["ImageNotFound"] = "ImageNotFound";
ImageFailureCode["ImageReferencedByManifestList"] = "ImageReferencedByManifestList";
ImageFailureCode["ImageTagDoesNotMatchDigest"] = "ImageTagDoesNotMatchDigest";
ImageFailureCode["InvalidImageDigest"] = "InvalidImageDigest";
ImageFailureCode["InvalidImageTag"] = "InvalidImageTag";
ImageFailureCode["KmsError"] = "KmsError";
ImageFailureCode["MissingDigestAndTag"] = "MissingDigestAndTag";
})(ImageFailureCode = exports.ImageFailureCode || (exports.ImageFailureCode = {}));
var ImageFailure;
(function (ImageFailure) {
ImageFailure.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageFailure = exports.ImageFailure || (exports.ImageFailure = {}));
var BatchDeleteImageResponse;
(function (BatchDeleteImageResponse) {
BatchDeleteImageResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchDeleteImageResponse = exports.BatchDeleteImageResponse || (exports.BatchDeleteImageResponse = {}));
var BatchGetImageRequest;
(function (BatchGetImageRequest) {
BatchGetImageRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchGetImageRequest = exports.BatchGetImageRequest || (exports.BatchGetImageRequest = {}));
var Image;
(function (Image) {
Image.filterSensitiveLog = (obj) => ({
...obj,
});
})(Image = exports.Image || (exports.Image = {}));
var BatchGetImageResponse;
(function (BatchGetImageResponse) {
BatchGetImageResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchGetImageResponse = exports.BatchGetImageResponse || (exports.BatchGetImageResponse = {}));
var BatchGetRepositoryScanningConfigurationRequest;
(function (BatchGetRepositoryScanningConfigurationRequest) {
BatchGetRepositoryScanningConfigurationRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchGetRepositoryScanningConfigurationRequest = exports.BatchGetRepositoryScanningConfigurationRequest || (exports.BatchGetRepositoryScanningConfigurationRequest = {}));
var ScanningConfigurationFailureCode;
(function (ScanningConfigurationFailureCode) {
ScanningConfigurationFailureCode["REPOSITORY_NOT_FOUND"] = "REPOSITORY_NOT_FOUND";
})(ScanningConfigurationFailureCode = exports.ScanningConfigurationFailureCode || (exports.ScanningConfigurationFailureCode = {}));
var RepositoryScanningConfigurationFailure;
(function (RepositoryScanningConfigurationFailure) {
RepositoryScanningConfigurationFailure.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryScanningConfigurationFailure = exports.RepositoryScanningConfigurationFailure || (exports.RepositoryScanningConfigurationFailure = {}));
var ScanningRepositoryFilterType;
(function (ScanningRepositoryFilterType) {
ScanningRepositoryFilterType["WILDCARD"] = "WILDCARD";
})(ScanningRepositoryFilterType = exports.ScanningRepositoryFilterType || (exports.ScanningRepositoryFilterType = {}));
var ScanningRepositoryFilter;
(function (ScanningRepositoryFilter) {
ScanningRepositoryFilter.filterSensitiveLog = (obj) => ({
...obj,
});
})(ScanningRepositoryFilter = exports.ScanningRepositoryFilter || (exports.ScanningRepositoryFilter = {}));
var ScanFrequency;
(function (ScanFrequency) {
ScanFrequency["CONTINUOUS_SCAN"] = "CONTINUOUS_SCAN";
ScanFrequency["MANUAL"] = "MANUAL";
ScanFrequency["SCAN_ON_PUSH"] = "SCAN_ON_PUSH";
})(ScanFrequency = exports.ScanFrequency || (exports.ScanFrequency = {}));
var RepositoryScanningConfiguration;
(function (RepositoryScanningConfiguration) {
RepositoryScanningConfiguration.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryScanningConfiguration = exports.RepositoryScanningConfiguration || (exports.RepositoryScanningConfiguration = {}));
var BatchGetRepositoryScanningConfigurationResponse;
(function (BatchGetRepositoryScanningConfigurationResponse) {
BatchGetRepositoryScanningConfigurationResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(BatchGetRepositoryScanningConfigurationResponse = exports.BatchGetRepositoryScanningConfigurationResponse || (exports.BatchGetRepositoryScanningConfigurationResponse = {}));
var ValidationException;
(function (ValidationException) {
ValidationException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ValidationException = exports.ValidationException || (exports.ValidationException = {}));
var CompleteLayerUploadRequest;
(function (CompleteLayerUploadRequest) {
CompleteLayerUploadRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(CompleteLayerUploadRequest = exports.CompleteLayerUploadRequest || (exports.CompleteLayerUploadRequest = {}));
var CompleteLayerUploadResponse;
(function (CompleteLayerUploadResponse) {
CompleteLayerUploadResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(CompleteLayerUploadResponse = exports.CompleteLayerUploadResponse || (exports.CompleteLayerUploadResponse = {}));
var EmptyUploadException;
(function (EmptyUploadException) {
EmptyUploadException.filterSensitiveLog = (obj) => ({
...obj,
});
})(EmptyUploadException = exports.EmptyUploadException || (exports.EmptyUploadException = {}));
var InvalidLayerException;
(function (InvalidLayerException) {
InvalidLayerException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidLayerException = exports.InvalidLayerException || (exports.InvalidLayerException = {}));
var KmsException;
(function (KmsException) {
KmsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(KmsException = exports.KmsException || (exports.KmsException = {}));
var LayerAlreadyExistsException;
(function (LayerAlreadyExistsException) {
LayerAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerAlreadyExistsException = exports.LayerAlreadyExistsException || (exports.LayerAlreadyExistsException = {}));
var LayerPartTooSmallException;
(function (LayerPartTooSmallException) {
LayerPartTooSmallException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerPartTooSmallException = exports.LayerPartTooSmallException || (exports.LayerPartTooSmallException = {}));
var UploadNotFoundException;
(function (UploadNotFoundException) {
UploadNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(UploadNotFoundException = exports.UploadNotFoundException || (exports.UploadNotFoundException = {}));
var CreatePullThroughCacheRuleRequest;
(function (CreatePullThroughCacheRuleRequest) {
CreatePullThroughCacheRuleRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(CreatePullThroughCacheRuleRequest = exports.CreatePullThroughCacheRuleRequest || (exports.CreatePullThroughCacheRuleRequest = {}));
var CreatePullThroughCacheRuleResponse;
(function (CreatePullThroughCacheRuleResponse) {
CreatePullThroughCacheRuleResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(CreatePullThroughCacheRuleResponse = exports.CreatePullThroughCacheRuleResponse || (exports.CreatePullThroughCacheRuleResponse = {}));
var LimitExceededException;
(function (LimitExceededException) {
LimitExceededException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {}));
var PullThroughCacheRuleAlreadyExistsException;
(function (PullThroughCacheRuleAlreadyExistsException) {
PullThroughCacheRuleAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(PullThroughCacheRuleAlreadyExistsException = exports.PullThroughCacheRuleAlreadyExistsException || (exports.PullThroughCacheRuleAlreadyExistsException = {}));
var UnsupportedUpstreamRegistryException;
(function (UnsupportedUpstreamRegistryException) {
UnsupportedUpstreamRegistryException.filterSensitiveLog = (obj) => ({
...obj,
});
})(UnsupportedUpstreamRegistryException = exports.UnsupportedUpstreamRegistryException || (exports.UnsupportedUpstreamRegistryException = {}));
var EncryptionType;
(function (EncryptionType) {
EncryptionType["AES256"] = "AES256";
EncryptionType["KMS"] = "KMS";
})(EncryptionType = exports.EncryptionType || (exports.EncryptionType = {}));
var EncryptionConfiguration;
(function (EncryptionConfiguration) {
EncryptionConfiguration.filterSensitiveLog = (obj) => ({
...obj,
});
})(EncryptionConfiguration = exports.EncryptionConfiguration || (exports.EncryptionConfiguration = {}));
var ImageScanningConfiguration;
(function (ImageScanningConfiguration) {
ImageScanningConfiguration.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageScanningConfiguration = exports.ImageScanningConfiguration || (exports.ImageScanningConfiguration = {}));
var ImageTagMutability;
(function (ImageTagMutability) {
ImageTagMutability["IMMUTABLE"] = "IMMUTABLE";
ImageTagMutability["MUTABLE"] = "MUTABLE";
})(ImageTagMutability = exports.ImageTagMutability || (exports.ImageTagMutability = {}));
var Tag;
(function (Tag) {
Tag.filterSensitiveLog = (obj) => ({
...obj,
});
})(Tag = exports.Tag || (exports.Tag = {}));
var CreateRepositoryRequest;
(function (CreateRepositoryRequest) {
CreateRepositoryRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(CreateRepositoryRequest = exports.CreateRepositoryRequest || (exports.CreateRepositoryRequest = {}));
var Repository;
(function (Repository) {
Repository.filterSensitiveLog = (obj) => ({
...obj,
});
})(Repository = exports.Repository || (exports.Repository = {}));
var CreateRepositoryResponse;
(function (CreateRepositoryResponse) {
CreateRepositoryResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(CreateRepositoryResponse = exports.CreateRepositoryResponse || (exports.CreateRepositoryResponse = {}));
var InvalidTagParameterException;
(function (InvalidTagParameterException) {
InvalidTagParameterException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidTagParameterException = exports.InvalidTagParameterException || (exports.InvalidTagParameterException = {}));
var RepositoryAlreadyExistsException;
(function (RepositoryAlreadyExistsException) {
RepositoryAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryAlreadyExistsException = exports.RepositoryAlreadyExistsException || (exports.RepositoryAlreadyExistsException = {}));
var TooManyTagsException;
(function (TooManyTagsException) {
TooManyTagsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(TooManyTagsException = exports.TooManyTagsException || (exports.TooManyTagsException = {}));
var DeleteLifecyclePolicyRequest;
(function (DeleteLifecyclePolicyRequest) {
DeleteLifecyclePolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteLifecyclePolicyRequest = exports.DeleteLifecyclePolicyRequest || (exports.DeleteLifecyclePolicyRequest = {}));
var DeleteLifecyclePolicyResponse;
(function (DeleteLifecyclePolicyResponse) {
DeleteLifecyclePolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteLifecyclePolicyResponse = exports.DeleteLifecyclePolicyResponse || (exports.DeleteLifecyclePolicyResponse = {}));
var LifecyclePolicyNotFoundException;
(function (LifecyclePolicyNotFoundException) {
LifecyclePolicyNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyNotFoundException = exports.LifecyclePolicyNotFoundException || (exports.LifecyclePolicyNotFoundException = {}));
var DeletePullThroughCacheRuleRequest;
(function (DeletePullThroughCacheRuleRequest) {
DeletePullThroughCacheRuleRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeletePullThroughCacheRuleRequest = exports.DeletePullThroughCacheRuleRequest || (exports.DeletePullThroughCacheRuleRequest = {}));
var DeletePullThroughCacheRuleResponse;
(function (DeletePullThroughCacheRuleResponse) {
DeletePullThroughCacheRuleResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeletePullThroughCacheRuleResponse = exports.DeletePullThroughCacheRuleResponse || (exports.DeletePullThroughCacheRuleResponse = {}));
var PullThroughCacheRuleNotFoundException;
(function (PullThroughCacheRuleNotFoundException) {
PullThroughCacheRuleNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(PullThroughCacheRuleNotFoundException = exports.PullThroughCacheRuleNotFoundException || (exports.PullThroughCacheRuleNotFoundException = {}));
var DeleteRegistryPolicyRequest;
(function (DeleteRegistryPolicyRequest) {
DeleteRegistryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRegistryPolicyRequest = exports.DeleteRegistryPolicyRequest || (exports.DeleteRegistryPolicyRequest = {}));
var DeleteRegistryPolicyResponse;
(function (DeleteRegistryPolicyResponse) {
DeleteRegistryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRegistryPolicyResponse = exports.DeleteRegistryPolicyResponse || (exports.DeleteRegistryPolicyResponse = {}));
var RegistryPolicyNotFoundException;
(function (RegistryPolicyNotFoundException) {
RegistryPolicyNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegistryPolicyNotFoundException = exports.RegistryPolicyNotFoundException || (exports.RegistryPolicyNotFoundException = {}));
var DeleteRepositoryRequest;
(function (DeleteRepositoryRequest) {
DeleteRepositoryRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryRequest = exports.DeleteRepositoryRequest || (exports.DeleteRepositoryRequest = {}));
var DeleteRepositoryResponse;
(function (DeleteRepositoryResponse) {
DeleteRepositoryResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryResponse = exports.DeleteRepositoryResponse || (exports.DeleteRepositoryResponse = {}));
var RepositoryNotEmptyException;
(function (RepositoryNotEmptyException) {
RepositoryNotEmptyException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryNotEmptyException = exports.RepositoryNotEmptyException || (exports.RepositoryNotEmptyException = {}));
var DeleteRepositoryPolicyRequest;
(function (DeleteRepositoryPolicyRequest) {
DeleteRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryPolicyRequest = exports.DeleteRepositoryPolicyRequest || (exports.DeleteRepositoryPolicyRequest = {}));
var DeleteRepositoryPolicyResponse;
(function (DeleteRepositoryPolicyResponse) {
DeleteRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyResponse || (exports.DeleteRepositoryPolicyResponse = {}));
var RepositoryPolicyNotFoundException;
(function (RepositoryPolicyNotFoundException) {
RepositoryPolicyNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryPolicyNotFoundException = exports.RepositoryPolicyNotFoundException || (exports.RepositoryPolicyNotFoundException = {}));
var DescribeImageReplicationStatusRequest;
(function (DescribeImageReplicationStatusRequest) {
DescribeImageReplicationStatusRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImageReplicationStatusRequest = exports.DescribeImageReplicationStatusRequest || (exports.DescribeImageReplicationStatusRequest = {}));
var ReplicationStatus;
(function (ReplicationStatus) {
ReplicationStatus["COMPLETE"] = "COMPLETE";
ReplicationStatus["FAILED"] = "FAILED";
ReplicationStatus["IN_PROGRESS"] = "IN_PROGRESS";
})(ReplicationStatus = exports.ReplicationStatus || (exports.ReplicationStatus = {}));
var ImageReplicationStatus;
(function (ImageReplicationStatus) {
ImageReplicationStatus.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageReplicationStatus = exports.ImageReplicationStatus || (exports.ImageReplicationStatus = {}));
var DescribeImageReplicationStatusResponse;
(function (DescribeImageReplicationStatusResponse) {
DescribeImageReplicationStatusResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImageReplicationStatusResponse = exports.DescribeImageReplicationStatusResponse || (exports.DescribeImageReplicationStatusResponse = {}));
var ImageNotFoundException;
(function (ImageNotFoundException) {
ImageNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageNotFoundException = exports.ImageNotFoundException || (exports.ImageNotFoundException = {}));
var TagStatus;
(function (TagStatus) {
TagStatus["ANY"] = "ANY";
TagStatus["TAGGED"] = "TAGGED";
TagStatus["UNTAGGED"] = "UNTAGGED";
})(TagStatus = exports.TagStatus || (exports.TagStatus = {}));
var DescribeImagesFilter;
(function (DescribeImagesFilter) {
DescribeImagesFilter.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImagesFilter = exports.DescribeImagesFilter || (exports.DescribeImagesFilter = {}));
var DescribeImagesRequest;
(function (DescribeImagesRequest) {
DescribeImagesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImagesRequest = exports.DescribeImagesRequest || (exports.DescribeImagesRequest = {}));
var FindingSeverity;
(function (FindingSeverity) {
FindingSeverity["CRITICAL"] = "CRITICAL";
FindingSeverity["HIGH"] = "HIGH";
FindingSeverity["INFORMATIONAL"] = "INFORMATIONAL";
FindingSeverity["LOW"] = "LOW";
FindingSeverity["MEDIUM"] = "MEDIUM";
FindingSeverity["UNDEFINED"] = "UNDEFINED";
})(FindingSeverity = exports.FindingSeverity || (exports.FindingSeverity = {}));
var ImageScanFindingsSummary;
(function (ImageScanFindingsSummary) {
ImageScanFindingsSummary.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageScanFindingsSummary = exports.ImageScanFindingsSummary || (exports.ImageScanFindingsSummary = {}));
var ScanStatus;
(function (ScanStatus) {
ScanStatus["ACTIVE"] = "ACTIVE";
ScanStatus["COMPLETE"] = "COMPLETE";
ScanStatus["FAILED"] = "FAILED";
ScanStatus["FINDINGS_UNAVAILABLE"] = "FINDINGS_UNAVAILABLE";
ScanStatus["IN_PROGRESS"] = "IN_PROGRESS";
ScanStatus["PENDING"] = "PENDING";
ScanStatus["SCAN_ELIGIBILITY_EXPIRED"] = "SCAN_ELIGIBILITY_EXPIRED";
ScanStatus["UNSUPPORTED_IMAGE"] = "UNSUPPORTED_IMAGE";
})(ScanStatus = exports.ScanStatus || (exports.ScanStatus = {}));
var ImageScanStatus;
(function (ImageScanStatus) {
ImageScanStatus.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageScanStatus = exports.ImageScanStatus || (exports.ImageScanStatus = {}));
var ImageDetail;
(function (ImageDetail) {
ImageDetail.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageDetail = exports.ImageDetail || (exports.ImageDetail = {}));
var DescribeImagesResponse;
(function (DescribeImagesResponse) {
DescribeImagesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImagesResponse = exports.DescribeImagesResponse || (exports.DescribeImagesResponse = {}));
var DescribeImageScanFindingsRequest;
(function (DescribeImageScanFindingsRequest) {
DescribeImageScanFindingsRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImageScanFindingsRequest = exports.DescribeImageScanFindingsRequest || (exports.DescribeImageScanFindingsRequest = {}));
var CvssScore;
(function (CvssScore) {
CvssScore.filterSensitiveLog = (obj) => ({
...obj,
});
})(CvssScore = exports.CvssScore || (exports.CvssScore = {}));
var VulnerablePackage;
(function (VulnerablePackage) {
VulnerablePackage.filterSensitiveLog = (obj) => ({
...obj,
});
})(VulnerablePackage = exports.VulnerablePackage || (exports.VulnerablePackage = {}));
var PackageVulnerabilityDetails;
(function (PackageVulnerabilityDetails) {
PackageVulnerabilityDetails.filterSensitiveLog = (obj) => ({
...obj,
});
})(PackageVulnerabilityDetails = exports.PackageVulnerabilityDetails || (exports.PackageVulnerabilityDetails = {}));
var Recommendation;
(function (Recommendation) {
Recommendation.filterSensitiveLog = (obj) => ({
...obj,
});
})(Recommendation = exports.Recommendation || (exports.Recommendation = {}));
var Remediation;
(function (Remediation) {
Remediation.filterSensitiveLog = (obj) => ({
...obj,
});
})(Remediation = exports.Remediation || (exports.Remediation = {}));
var AwsEcrContainerImageDetails;
(function (AwsEcrContainerImageDetails) {
AwsEcrContainerImageDetails.filterSensitiveLog = (obj) => ({
...obj,
});
})(AwsEcrContainerImageDetails = exports.AwsEcrContainerImageDetails || (exports.AwsEcrContainerImageDetails = {}));
var ResourceDetails;
(function (ResourceDetails) {
ResourceDetails.filterSensitiveLog = (obj) => ({
...obj,
});
})(ResourceDetails = exports.ResourceDetails || (exports.ResourceDetails = {}));
var Resource;
(function (Resource) {
Resource.filterSensitiveLog = (obj) => ({
...obj,
});
})(Resource = exports.Resource || (exports.Resource = {}));
var CvssScoreAdjustment;
(function (CvssScoreAdjustment) {
CvssScoreAdjustment.filterSensitiveLog = (obj) => ({
...obj,
});
})(CvssScoreAdjustment = exports.CvssScoreAdjustment || (exports.CvssScoreAdjustment = {}));
var CvssScoreDetails;
(function (CvssScoreDetails) {
CvssScoreDetails.filterSensitiveLog = (obj) => ({
...obj,
});
})(CvssScoreDetails = exports.CvssScoreDetails || (exports.CvssScoreDetails = {}));
var ScoreDetails;
(function (ScoreDetails) {
ScoreDetails.filterSensitiveLog = (obj) => ({
...obj,
});
})(ScoreDetails = exports.ScoreDetails || (exports.ScoreDetails = {}));
var EnhancedImageScanFinding;
(function (EnhancedImageScanFinding) {
EnhancedImageScanFinding.filterSensitiveLog = (obj) => ({
...obj,
});
})(EnhancedImageScanFinding = exports.EnhancedImageScanFinding || (exports.EnhancedImageScanFinding = {}));
var Attribute;
(function (Attribute) {
Attribute.filterSensitiveLog = (obj) => ({
...obj,
});
})(Attribute = exports.Attribute || (exports.Attribute = {}));
var ImageScanFinding;
(function (ImageScanFinding) {
ImageScanFinding.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageScanFinding = exports.ImageScanFinding || (exports.ImageScanFinding = {}));
var ImageScanFindings;
(function (ImageScanFindings) {
ImageScanFindings.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageScanFindings = exports.ImageScanFindings || (exports.ImageScanFindings = {}));
var DescribeImageScanFindingsResponse;
(function (DescribeImageScanFindingsResponse) {
DescribeImageScanFindingsResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeImageScanFindingsResponse = exports.DescribeImageScanFindingsResponse || (exports.DescribeImageScanFindingsResponse = {}));
var ScanNotFoundException;
(function (ScanNotFoundException) {
ScanNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ScanNotFoundException = exports.ScanNotFoundException || (exports.ScanNotFoundException = {}));
var DescribePullThroughCacheRulesRequest;
(function (DescribePullThroughCacheRulesRequest) {
DescribePullThroughCacheRulesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribePullThroughCacheRulesRequest = exports.DescribePullThroughCacheRulesRequest || (exports.DescribePullThroughCacheRulesRequest = {}));
var PullThroughCacheRule;
(function (PullThroughCacheRule) {
PullThroughCacheRule.filterSensitiveLog = (obj) => ({
...obj,
});
})(PullThroughCacheRule = exports.PullThroughCacheRule || (exports.PullThroughCacheRule = {}));
var DescribePullThroughCacheRulesResponse;
(function (DescribePullThroughCacheRulesResponse) {
DescribePullThroughCacheRulesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribePullThroughCacheRulesResponse = exports.DescribePullThroughCacheRulesResponse || (exports.DescribePullThroughCacheRulesResponse = {}));
var DescribeRegistryRequest;
(function (DescribeRegistryRequest) {
DescribeRegistryRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRegistryRequest = exports.DescribeRegistryRequest || (exports.DescribeRegistryRequest = {}));
var ReplicationDestination;
(function (ReplicationDestination) {
ReplicationDestination.filterSensitiveLog = (obj) => ({
...obj,
});
})(ReplicationDestination = exports.ReplicationDestination || (exports.ReplicationDestination = {}));
var RepositoryFilterType;
(function (RepositoryFilterType) {
RepositoryFilterType["PREFIX_MATCH"] = "PREFIX_MATCH";
})(RepositoryFilterType = exports.RepositoryFilterType || (exports.RepositoryFilterType = {}));
var RepositoryFilter;
(function (RepositoryFilter) {
RepositoryFilter.filterSensitiveLog = (obj) => ({
...obj,
});
})(RepositoryFilter = exports.RepositoryFilter || (exports.RepositoryFilter = {}));
var ReplicationRule;
(function (ReplicationRule) {
ReplicationRule.filterSensitiveLog = (obj) => ({
...obj,
});
})(ReplicationRule = exports.ReplicationRule || (exports.ReplicationRule = {}));
var ReplicationConfiguration;
(function (ReplicationConfiguration) {
ReplicationConfiguration.filterSensitiveLog = (obj) => ({
...obj,
});
})(ReplicationConfiguration = exports.ReplicationConfiguration || (exports.ReplicationConfiguration = {}));
var DescribeRegistryResponse;
(function (DescribeRegistryResponse) {
DescribeRegistryResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRegistryResponse = exports.DescribeRegistryResponse || (exports.DescribeRegistryResponse = {}));
var DescribeRepositoriesRequest;
(function (DescribeRepositoriesRequest) {
DescribeRepositoriesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRepositoriesRequest = exports.DescribeRepositoriesRequest || (exports.DescribeRepositoriesRequest = {}));
var DescribeRepositoriesResponse;
(function (DescribeRepositoriesResponse) {
DescribeRepositoriesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DescribeRepositoriesResponse = exports.DescribeRepositoriesResponse || (exports.DescribeRepositoriesResponse = {}));
var GetAuthorizationTokenRequest;
(function (GetAuthorizationTokenRequest) {
GetAuthorizationTokenRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetAuthorizationTokenRequest = exports.GetAuthorizationTokenRequest || (exports.GetAuthorizationTokenRequest = {}));
var AuthorizationData;
(function (AuthorizationData) {
AuthorizationData.filterSensitiveLog = (obj) => ({
...obj,
});
})(AuthorizationData = exports.AuthorizationData || (exports.AuthorizationData = {}));
var GetAuthorizationTokenResponse;
(function (GetAuthorizationTokenResponse) {
GetAuthorizationTokenResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetAuthorizationTokenResponse = exports.GetAuthorizationTokenResponse || (exports.GetAuthorizationTokenResponse = {}));
var GetDownloadUrlForLayerRequest;
(function (GetDownloadUrlForLayerRequest) {
GetDownloadUrlForLayerRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetDownloadUrlForLayerRequest = exports.GetDownloadUrlForLayerRequest || (exports.GetDownloadUrlForLayerRequest = {}));
var GetDownloadUrlForLayerResponse;
(function (GetDownloadUrlForLayerResponse) {
GetDownloadUrlForLayerResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetDownloadUrlForLayerResponse = exports.GetDownloadUrlForLayerResponse || (exports.GetDownloadUrlForLayerResponse = {}));
var LayerInaccessibleException;
(function (LayerInaccessibleException) {
LayerInaccessibleException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayerInaccessibleException = exports.LayerInaccessibleException || (exports.LayerInaccessibleException = {}));
var LayersNotFoundException;
(function (LayersNotFoundException) {
LayersNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LayersNotFoundException = exports.LayersNotFoundException || (exports.LayersNotFoundException = {}));
var GetLifecyclePolicyRequest;
(function (GetLifecyclePolicyRequest) {
GetLifecyclePolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetLifecyclePolicyRequest = exports.GetLifecyclePolicyRequest || (exports.GetLifecyclePolicyRequest = {}));
var GetLifecyclePolicyResponse;
(function (GetLifecyclePolicyResponse) {
GetLifecyclePolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetLifecyclePolicyResponse = exports.GetLifecyclePolicyResponse || (exports.GetLifecyclePolicyResponse = {}));
var LifecyclePolicyPreviewFilter;
(function (LifecyclePolicyPreviewFilter) {
LifecyclePolicyPreviewFilter.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyPreviewFilter = exports.LifecyclePolicyPreviewFilter || (exports.LifecyclePolicyPreviewFilter = {}));
var GetLifecyclePolicyPreviewRequest;
(function (GetLifecyclePolicyPreviewRequest) {
GetLifecyclePolicyPreviewRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetLifecyclePolicyPreviewRequest = exports.GetLifecyclePolicyPreviewRequest || (exports.GetLifecyclePolicyPreviewRequest = {}));
var ImageActionType;
(function (ImageActionType) {
ImageActionType["EXPIRE"] = "EXPIRE";
})(ImageActionType = exports.ImageActionType || (exports.ImageActionType = {}));
var LifecyclePolicyRuleAction;
(function (LifecyclePolicyRuleAction) {
LifecyclePolicyRuleAction.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyRuleAction = exports.LifecyclePolicyRuleAction || (exports.LifecyclePolicyRuleAction = {}));
var LifecyclePolicyPreviewResult;
(function (LifecyclePolicyPreviewResult) {
LifecyclePolicyPreviewResult.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyPreviewResult = exports.LifecyclePolicyPreviewResult || (exports.LifecyclePolicyPreviewResult = {}));
var LifecyclePolicyPreviewStatus;
(function (LifecyclePolicyPreviewStatus) {
LifecyclePolicyPreviewStatus["COMPLETE"] = "COMPLETE";
LifecyclePolicyPreviewStatus["EXPIRED"] = "EXPIRED";
LifecyclePolicyPreviewStatus["FAILED"] = "FAILED";
LifecyclePolicyPreviewStatus["IN_PROGRESS"] = "IN_PROGRESS";
})(LifecyclePolicyPreviewStatus = exports.LifecyclePolicyPreviewStatus || (exports.LifecyclePolicyPreviewStatus = {}));
var LifecyclePolicyPreviewSummary;
(function (LifecyclePolicyPreviewSummary) {
LifecyclePolicyPreviewSummary.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyPreviewSummary = exports.LifecyclePolicyPreviewSummary || (exports.LifecyclePolicyPreviewSummary = {}));
var GetLifecyclePolicyPreviewResponse;
(function (GetLifecyclePolicyPreviewResponse) {
GetLifecyclePolicyPreviewResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetLifecyclePolicyPreviewResponse = exports.GetLifecyclePolicyPreviewResponse || (exports.GetLifecyclePolicyPreviewResponse = {}));
var LifecyclePolicyPreviewNotFoundException;
(function (LifecyclePolicyPreviewNotFoundException) {
LifecyclePolicyPreviewNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyPreviewNotFoundException = exports.LifecyclePolicyPreviewNotFoundException || (exports.LifecyclePolicyPreviewNotFoundException = {}));
var GetRegistryPolicyRequest;
(function (GetRegistryPolicyRequest) {
GetRegistryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRegistryPolicyRequest = exports.GetRegistryPolicyRequest || (exports.GetRegistryPolicyRequest = {}));
var GetRegistryPolicyResponse;
(function (GetRegistryPolicyResponse) {
GetRegistryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRegistryPolicyResponse = exports.GetRegistryPolicyResponse || (exports.GetRegistryPolicyResponse = {}));
var GetRegistryScanningConfigurationRequest;
(function (GetRegistryScanningConfigurationRequest) {
GetRegistryScanningConfigurationRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRegistryScanningConfigurationRequest = exports.GetRegistryScanningConfigurationRequest || (exports.GetRegistryScanningConfigurationRequest = {}));
var RegistryScanningRule;
(function (RegistryScanningRule) {
RegistryScanningRule.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegistryScanningRule = exports.RegistryScanningRule || (exports.RegistryScanningRule = {}));
var ScanType;
(function (ScanType) {
ScanType["BASIC"] = "BASIC";
ScanType["ENHANCED"] = "ENHANCED";
})(ScanType = exports.ScanType || (exports.ScanType = {}));
var RegistryScanningConfiguration;
(function (RegistryScanningConfiguration) {
RegistryScanningConfiguration.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegistryScanningConfiguration = exports.RegistryScanningConfiguration || (exports.RegistryScanningConfiguration = {}));
var GetRegistryScanningConfigurationResponse;
(function (GetRegistryScanningConfigurationResponse) {
GetRegistryScanningConfigurationResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRegistryScanningConfigurationResponse = exports.GetRegistryScanningConfigurationResponse || (exports.GetRegistryScanningConfigurationResponse = {}));
var GetRepositoryPolicyRequest;
(function (GetRepositoryPolicyRequest) {
GetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRepositoryPolicyRequest = exports.GetRepositoryPolicyRequest || (exports.GetRepositoryPolicyRequest = {}));
var GetRepositoryPolicyResponse;
(function (GetRepositoryPolicyResponse) {
GetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetRepositoryPolicyResponse = exports.GetRepositoryPolicyResponse || (exports.GetRepositoryPolicyResponse = {}));
var InitiateLayerUploadRequest;
(function (InitiateLayerUploadRequest) {
InitiateLayerUploadRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(InitiateLayerUploadRequest = exports.InitiateLayerUploadRequest || (exports.InitiateLayerUploadRequest = {}));
var InitiateLayerUploadResponse;
(function (InitiateLayerUploadResponse) {
InitiateLayerUploadResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(InitiateLayerUploadResponse = exports.InitiateLayerUploadResponse || (exports.InitiateLayerUploadResponse = {}));
var ListImagesFilter;
(function (ListImagesFilter) {
ListImagesFilter.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListImagesFilter = exports.ListImagesFilter || (exports.ListImagesFilter = {}));
var ListImagesRequest;
(function (ListImagesRequest) {
ListImagesRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListImagesRequest = exports.ListImagesRequest || (exports.ListImagesRequest = {}));
var ListImagesResponse;
(function (ListImagesResponse) {
ListImagesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListImagesResponse = exports.ListImagesResponse || (exports.ListImagesResponse = {}));
var ListTagsForResourceRequest;
(function (ListTagsForResourceRequest) {
ListTagsForResourceRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListTagsForResourceRequest = exports.ListTagsForResourceRequest || (exports.ListTagsForResourceRequest = {}));
var ListTagsForResourceResponse;
(function (ListTagsForResourceResponse) {
ListTagsForResourceResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListTagsForResourceResponse = exports.ListTagsForResourceResponse || (exports.ListTagsForResourceResponse = {}));
var ImageAlreadyExistsException;
(function (ImageAlreadyExistsException) {
ImageAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageAlreadyExistsException = exports.ImageAlreadyExistsException || (exports.ImageAlreadyExistsException = {}));
var ImageDigestDoesNotMatchException;
(function (ImageDigestDoesNotMatchException) {
ImageDigestDoesNotMatchException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageDigestDoesNotMatchException = exports.ImageDigestDoesNotMatchException || (exports.ImageDigestDoesNotMatchException = {}));
var ImageTagAlreadyExistsException;
(function (ImageTagAlreadyExistsException) {
ImageTagAlreadyExistsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ImageTagAlreadyExistsException = exports.ImageTagAlreadyExistsException || (exports.ImageTagAlreadyExistsException = {}));
var PutImageRequest;
(function (PutImageRequest) {
PutImageRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageRequest = exports.PutImageRequest || (exports.PutImageRequest = {}));
var PutImageResponse;
(function (PutImageResponse) {
PutImageResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageResponse = exports.PutImageResponse || (exports.PutImageResponse = {}));
var ReferencedImagesNotFoundException;
(function (ReferencedImagesNotFoundException) {
ReferencedImagesNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ReferencedImagesNotFoundException = exports.ReferencedImagesNotFoundException || (exports.ReferencedImagesNotFoundException = {}));
var PutImageScanningConfigurationRequest;
(function (PutImageScanningConfigurationRequest) {
PutImageScanningConfigurationRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageScanningConfigurationRequest = exports.PutImageScanningConfigurationRequest || (exports.PutImageScanningConfigurationRequest = {}));
var PutImageScanningConfigurationResponse;
(function (PutImageScanningConfigurationResponse) {
PutImageScanningConfigurationResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageScanningConfigurationResponse = exports.PutImageScanningConfigurationResponse || (exports.PutImageScanningConfigurationResponse = {}));
var PutImageTagMutabilityRequest;
(function (PutImageTagMutabilityRequest) {
PutImageTagMutabilityRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageTagMutabilityRequest = exports.PutImageTagMutabilityRequest || (exports.PutImageTagMutabilityRequest = {}));
var PutImageTagMutabilityResponse;
(function (PutImageTagMutabilityResponse) {
PutImageTagMutabilityResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutImageTagMutabilityResponse = exports.PutImageTagMutabilityResponse || (exports.PutImageTagMutabilityResponse = {}));
var PutLifecyclePolicyRequest;
(function (PutLifecyclePolicyRequest) {
PutLifecyclePolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutLifecyclePolicyRequest = exports.PutLifecyclePolicyRequest || (exports.PutLifecyclePolicyRequest = {}));
var PutLifecyclePolicyResponse;
(function (PutLifecyclePolicyResponse) {
PutLifecyclePolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutLifecyclePolicyResponse = exports.PutLifecyclePolicyResponse || (exports.PutLifecyclePolicyResponse = {}));
var PutRegistryPolicyRequest;
(function (PutRegistryPolicyRequest) {
PutRegistryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRegistryPolicyRequest = exports.PutRegistryPolicyRequest || (exports.PutRegistryPolicyRequest = {}));
var PutRegistryPolicyResponse;
(function (PutRegistryPolicyResponse) {
PutRegistryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRegistryPolicyResponse = exports.PutRegistryPolicyResponse || (exports.PutRegistryPolicyResponse = {}));
var PutRegistryScanningConfigurationRequest;
(function (PutRegistryScanningConfigurationRequest) {
PutRegistryScanningConfigurationRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRegistryScanningConfigurationRequest = exports.PutRegistryScanningConfigurationRequest || (exports.PutRegistryScanningConfigurationRequest = {}));
var PutRegistryScanningConfigurationResponse;
(function (PutRegistryScanningConfigurationResponse) {
PutRegistryScanningConfigurationResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutRegistryScanningConfigurationResponse = exports.PutRegistryScanningConfigurationResponse || (exports.PutRegistryScanningConfigurationResponse = {}));
var PutReplicationConfigurationRequest;
(function (PutReplicationConfigurationRequest) {
PutReplicationConfigurationRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutReplicationConfigurationRequest = exports.PutReplicationConfigurationRequest || (exports.PutReplicationConfigurationRequest = {}));
var PutReplicationConfigurationResponse;
(function (PutReplicationConfigurationResponse) {
PutReplicationConfigurationResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(PutReplicationConfigurationResponse = exports.PutReplicationConfigurationResponse || (exports.PutReplicationConfigurationResponse = {}));
var SetRepositoryPolicyRequest;
(function (SetRepositoryPolicyRequest) {
SetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(SetRepositoryPolicyRequest = exports.SetRepositoryPolicyRequest || (exports.SetRepositoryPolicyRequest = {}));
var SetRepositoryPolicyResponse;
(function (SetRepositoryPolicyResponse) {
SetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(SetRepositoryPolicyResponse = exports.SetRepositoryPolicyResponse || (exports.SetRepositoryPolicyResponse = {}));
var StartImageScanRequest;
(function (StartImageScanRequest) {
StartImageScanRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(StartImageScanRequest = exports.StartImageScanRequest || (exports.StartImageScanRequest = {}));
var StartImageScanResponse;
(function (StartImageScanResponse) {
StartImageScanResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(StartImageScanResponse = exports.StartImageScanResponse || (exports.StartImageScanResponse = {}));
var UnsupportedImageTypeException;
(function (UnsupportedImageTypeException) {
UnsupportedImageTypeException.filterSensitiveLog = (obj) => ({
...obj,
});
})(UnsupportedImageTypeException = exports.UnsupportedImageTypeException || (exports.UnsupportedImageTypeException = {}));
var LifecyclePolicyPreviewInProgressException;
(function (LifecyclePolicyPreviewInProgressException) {
LifecyclePolicyPreviewInProgressException.filterSensitiveLog = (obj) => ({
...obj,
});
})(LifecyclePolicyPreviewInProgressException = exports.LifecyclePolicyPreviewInProgressException || (exports.LifecyclePolicyPreviewInProgressException = {}));
var StartLifecyclePolicyPreviewRequest;
(function (StartLifecyclePolicyPreviewRequest) {
StartLifecyclePolicyPreviewRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(StartLifecyclePolicyPreviewRequest = exports.StartLifecyclePolicyPreviewRequest || (exports.StartLifecyclePolicyPreviewRequest = {}));
var StartLifecyclePolicyPreviewResponse;
(function (StartLifecyclePolicyPreviewResponse) {
StartLifecyclePolicyPreviewResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(StartLifecyclePolicyPreviewResponse = exports.StartLifecyclePolicyPreviewResponse || (exports.StartLifecyclePolicyPreviewResponse = {}));
var TagResourceRequest;
(function (TagResourceRequest) {
TagResourceRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(TagResourceRequest = exports.TagResourceRequest || (exports.TagResourceRequest = {}));
var TagResourceResponse;
(function (TagResourceResponse) {
TagResourceResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(TagResourceResponse = exports.TagResourceResponse || (exports.TagResourceResponse = {}));
var UntagResourceRequest;
(function (UntagResourceRequest) {
UntagResourceRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(UntagResourceRequest = exports.UntagResourceRequest || (exports.UntagResourceRequest = {}));
var UntagResourceResponse;
(function (UntagResourceResponse) {
UntagResourceResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {}));
var InvalidLayerPartException;
(function (InvalidLayerPartException) {
InvalidLayerPartException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidLayerPartException = exports.InvalidLayerPartException || (exports.InvalidLayerPartException = {}));
var UploadLayerPartRequest;
(function (UploadLayerPartRequest) {
UploadLayerPartRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(UploadLayerPartRequest = exports.UploadLayerPartRequest || (exports.UploadLayerPartRequest = {}));
var UploadLayerPartResponse;
(function (UploadLayerPartResponse) {
UploadLayerPartResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(UploadLayerPartResponse = exports.UploadLayerPartResponse || (exports.UploadLayerPartResponse = {}));
/***/ }),
/***/ 30862:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeImageScanFindings = void 0;
const DescribeImageScanFindingsCommand_1 = __nccwpck_require__(72987);
const ECR_1 = __nccwpck_require__(59167);
const ECRClient_1 = __nccwpck_require__(83391);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeImageScanFindingsCommand_1.DescribeImageScanFindingsCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeImageScanFindings(input, ...args);
};
async function* paginateDescribeImageScanFindings(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECR_1.ECR) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRClient_1.ECRClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECR | ECRClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeImageScanFindings = paginateDescribeImageScanFindings;
/***/ }),
/***/ 51351:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeImages = void 0;
const DescribeImagesCommand_1 = __nccwpck_require__(95353);
const ECR_1 = __nccwpck_require__(59167);
const ECRClient_1 = __nccwpck_require__(83391);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeImagesCommand_1.DescribeImagesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeImages(input, ...args);
};
async function* paginateDescribeImages(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECR_1.ECR) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRClient_1.ECRClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECR | ECRClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeImages = paginateDescribeImages;
/***/ }),
/***/ 59589:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribePullThroughCacheRules = void 0;
const DescribePullThroughCacheRulesCommand_1 = __nccwpck_require__(31484);
const ECR_1 = __nccwpck_require__(59167);
const ECRClient_1 = __nccwpck_require__(83391);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribePullThroughCacheRulesCommand_1.DescribePullThroughCacheRulesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describePullThroughCacheRules(input, ...args);
};
async function* paginateDescribePullThroughCacheRules(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECR_1.ECR) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRClient_1.ECRClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECR | ECRClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribePullThroughCacheRules = paginateDescribePullThroughCacheRules;
/***/ }),
/***/ 16404:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateDescribeRepositories = void 0;
const DescribeRepositoriesCommand_1 = __nccwpck_require__(21200);
const ECR_1 = __nccwpck_require__(59167);
const ECRClient_1 = __nccwpck_require__(83391);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.describeRepositories(input, ...args);
};
async function* paginateDescribeRepositories(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECR_1.ECR) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRClient_1.ECRClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECR | ECRClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateDescribeRepositories = paginateDescribeRepositories;
/***/ }),
/***/ 50987:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateGetLifecyclePolicyPreview = void 0;
const GetLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(17006);
const ECR_1 = __nccwpck_require__(59167);
const ECRClient_1 = __nccwpck_require__(83391);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new GetLifecyclePolicyPreviewCommand_1.GetLifecyclePolicyPreviewCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.getLifecyclePolicyPreview(input, ...args);
};
async function* paginateGetLifecyclePolicyPreview(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECR_1.ECR) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRClient_1.ECRClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECR | ECRClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateGetLifecyclePolicyPreview = paginateGetLifecyclePolicyPreview;
/***/ }),
/***/ 9010:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 1066:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateListImages = void 0;
const ListImagesCommand_1 = __nccwpck_require__(3854);
const ECR_1 = __nccwpck_require__(59167);
const ECRClient_1 = __nccwpck_require__(83391);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new ListImagesCommand_1.ListImagesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.listImages(input, ...args);
};
async function* paginateListImages(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof ECR_1.ECR) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof ECRClient_1.ECRClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected ECR | ECRClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateListImages = paginateListImages;
/***/ }),
/***/ 35356:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(30862), exports);
tslib_1.__exportStar(__nccwpck_require__(51351), exports);
tslib_1.__exportStar(__nccwpck_require__(59589), exports);
tslib_1.__exportStar(__nccwpck_require__(16404), exports);
tslib_1.__exportStar(__nccwpck_require__(50987), exports);
tslib_1.__exportStar(__nccwpck_require__(9010), exports);
tslib_1.__exportStar(__nccwpck_require__(1066), exports);
/***/ }),
/***/ 56704:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deserializeAws_json1_1DeletePullThroughCacheRuleCommand = exports.deserializeAws_json1_1DeleteLifecyclePolicyCommand = exports.deserializeAws_json1_1CreateRepositoryCommand = exports.deserializeAws_json1_1CreatePullThroughCacheRuleCommand = exports.deserializeAws_json1_1CompleteLayerUploadCommand = exports.deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = exports.deserializeAws_json1_1BatchGetImageCommand = exports.deserializeAws_json1_1BatchDeleteImageCommand = exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = exports.serializeAws_json1_1UploadLayerPartCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1StartLifecyclePolicyPreviewCommand = exports.serializeAws_json1_1StartImageScanCommand = exports.serializeAws_json1_1SetRepositoryPolicyCommand = exports.serializeAws_json1_1PutReplicationConfigurationCommand = exports.serializeAws_json1_1PutRegistryScanningConfigurationCommand = exports.serializeAws_json1_1PutRegistryPolicyCommand = exports.serializeAws_json1_1PutLifecyclePolicyCommand = exports.serializeAws_json1_1PutImageTagMutabilityCommand = exports.serializeAws_json1_1PutImageScanningConfigurationCommand = exports.serializeAws_json1_1PutImageCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListImagesCommand = exports.serializeAws_json1_1InitiateLayerUploadCommand = exports.serializeAws_json1_1GetRepositoryPolicyCommand = exports.serializeAws_json1_1GetRegistryScanningConfigurationCommand = exports.serializeAws_json1_1GetRegistryPolicyCommand = exports.serializeAws_json1_1GetLifecyclePolicyPreviewCommand = exports.serializeAws_json1_1GetLifecyclePolicyCommand = exports.serializeAws_json1_1GetDownloadUrlForLayerCommand = exports.serializeAws_json1_1GetAuthorizationTokenCommand = exports.serializeAws_json1_1DescribeRepositoriesCommand = exports.serializeAws_json1_1DescribeRegistryCommand = exports.serializeAws_json1_1DescribePullThroughCacheRulesCommand = exports.serializeAws_json1_1DescribeImageScanFindingsCommand = exports.serializeAws_json1_1DescribeImagesCommand = exports.serializeAws_json1_1DescribeImageReplicationStatusCommand = exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = exports.serializeAws_json1_1DeleteRepositoryCommand = exports.serializeAws_json1_1DeleteRegistryPolicyCommand = exports.serializeAws_json1_1DeletePullThroughCacheRuleCommand = exports.serializeAws_json1_1DeleteLifecyclePolicyCommand = exports.serializeAws_json1_1CreateRepositoryCommand = exports.serializeAws_json1_1CreatePullThroughCacheRuleCommand = exports.serializeAws_json1_1CompleteLayerUploadCommand = exports.serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = exports.serializeAws_json1_1BatchGetImageCommand = exports.serializeAws_json1_1BatchDeleteImageCommand = exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = void 0;
exports.deserializeAws_json1_1UploadLayerPartCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1StartLifecyclePolicyPreviewCommand = exports.deserializeAws_json1_1StartImageScanCommand = exports.deserializeAws_json1_1SetRepositoryPolicyCommand = exports.deserializeAws_json1_1PutReplicationConfigurationCommand = exports.deserializeAws_json1_1PutRegistryScanningConfigurationCommand = exports.deserializeAws_json1_1PutRegistryPolicyCommand = exports.deserializeAws_json1_1PutLifecyclePolicyCommand = exports.deserializeAws_json1_1PutImageTagMutabilityCommand = exports.deserializeAws_json1_1PutImageScanningConfigurationCommand = exports.deserializeAws_json1_1PutImageCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListImagesCommand = exports.deserializeAws_json1_1InitiateLayerUploadCommand = exports.deserializeAws_json1_1GetRepositoryPolicyCommand = exports.deserializeAws_json1_1GetRegistryScanningConfigurationCommand = exports.deserializeAws_json1_1GetRegistryPolicyCommand = exports.deserializeAws_json1_1GetLifecyclePolicyPreviewCommand = exports.deserializeAws_json1_1GetLifecyclePolicyCommand = exports.deserializeAws_json1_1GetDownloadUrlForLayerCommand = exports.deserializeAws_json1_1GetAuthorizationTokenCommand = exports.deserializeAws_json1_1DescribeRepositoriesCommand = exports.deserializeAws_json1_1DescribeRegistryCommand = exports.deserializeAws_json1_1DescribePullThroughCacheRulesCommand = exports.deserializeAws_json1_1DescribeImageScanFindingsCommand = exports.deserializeAws_json1_1DescribeImagesCommand = exports.deserializeAws_json1_1DescribeImageReplicationStatusCommand = exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = exports.deserializeAws_json1_1DeleteRepositoryCommand = exports.deserializeAws_json1_1DeleteRegistryPolicyCommand = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const smithy_client_1 = __nccwpck_require__(4963);
const serializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchCheckLayerAvailability",
};
let body;
body = JSON.stringify(serializeAws_json1_1BatchCheckLayerAvailabilityRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = serializeAws_json1_1BatchCheckLayerAvailabilityCommand;
const serializeAws_json1_1BatchDeleteImageCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchDeleteImage",
};
let body;
body = JSON.stringify(serializeAws_json1_1BatchDeleteImageRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1BatchDeleteImageCommand = serializeAws_json1_1BatchDeleteImageCommand;
const serializeAws_json1_1BatchGetImageCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchGetImage",
};
let body;
body = JSON.stringify(serializeAws_json1_1BatchGetImageRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1BatchGetImageCommand = serializeAws_json1_1BatchGetImageCommand;
const serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchGetRepositoryScanningConfiguration",
};
let body;
body = JSON.stringify(serializeAws_json1_1BatchGetRepositoryScanningConfigurationRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand;
const serializeAws_json1_1CompleteLayerUploadCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.CompleteLayerUpload",
};
let body;
body = JSON.stringify(serializeAws_json1_1CompleteLayerUploadRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1CompleteLayerUploadCommand = serializeAws_json1_1CompleteLayerUploadCommand;
const serializeAws_json1_1CreatePullThroughCacheRuleCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.CreatePullThroughCacheRule",
};
let body;
body = JSON.stringify(serializeAws_json1_1CreatePullThroughCacheRuleRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1CreatePullThroughCacheRuleCommand = serializeAws_json1_1CreatePullThroughCacheRuleCommand;
const serializeAws_json1_1CreateRepositoryCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.CreateRepository",
};
let body;
body = JSON.stringify(serializeAws_json1_1CreateRepositoryRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1CreateRepositoryCommand = serializeAws_json1_1CreateRepositoryCommand;
const serializeAws_json1_1DeleteLifecyclePolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteLifecyclePolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeleteLifecyclePolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeleteLifecyclePolicyCommand = serializeAws_json1_1DeleteLifecyclePolicyCommand;
const serializeAws_json1_1DeletePullThroughCacheRuleCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeletePullThroughCacheRule",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeletePullThroughCacheRuleRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeletePullThroughCacheRuleCommand = serializeAws_json1_1DeletePullThroughCacheRuleCommand;
const serializeAws_json1_1DeleteRegistryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteRegistryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeleteRegistryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeleteRegistryPolicyCommand = serializeAws_json1_1DeleteRegistryPolicyCommand;
const serializeAws_json1_1DeleteRepositoryCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteRepository",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeleteRepositoryRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeleteRepositoryCommand = serializeAws_json1_1DeleteRepositoryCommand;
const serializeAws_json1_1DeleteRepositoryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteRepositoryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1DeleteRepositoryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = serializeAws_json1_1DeleteRepositoryPolicyCommand;
const serializeAws_json1_1DescribeImageReplicationStatusCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeImageReplicationStatus",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeImageReplicationStatusRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeImageReplicationStatusCommand = serializeAws_json1_1DescribeImageReplicationStatusCommand;
const serializeAws_json1_1DescribeImagesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeImages",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeImagesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeImagesCommand = serializeAws_json1_1DescribeImagesCommand;
const serializeAws_json1_1DescribeImageScanFindingsCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeImageScanFindings",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeImageScanFindingsRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeImageScanFindingsCommand = serializeAws_json1_1DescribeImageScanFindingsCommand;
const serializeAws_json1_1DescribePullThroughCacheRulesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribePullThroughCacheRulesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribePullThroughCacheRulesCommand = serializeAws_json1_1DescribePullThroughCacheRulesCommand;
const serializeAws_json1_1DescribeRegistryCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeRegistry",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeRegistryRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeRegistryCommand = serializeAws_json1_1DescribeRegistryCommand;
const serializeAws_json1_1DescribeRepositoriesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeRepositories",
};
let body;
body = JSON.stringify(serializeAws_json1_1DescribeRepositoriesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1DescribeRepositoriesCommand = serializeAws_json1_1DescribeRepositoriesCommand;
const serializeAws_json1_1GetAuthorizationTokenCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetAuthorizationTokenRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetAuthorizationTokenCommand = serializeAws_json1_1GetAuthorizationTokenCommand;
const serializeAws_json1_1GetDownloadUrlForLayerCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetDownloadUrlForLayer",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetDownloadUrlForLayerRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetDownloadUrlForLayerCommand = serializeAws_json1_1GetDownloadUrlForLayerCommand;
const serializeAws_json1_1GetLifecyclePolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetLifecyclePolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetLifecyclePolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetLifecyclePolicyCommand = serializeAws_json1_1GetLifecyclePolicyCommand;
const serializeAws_json1_1GetLifecyclePolicyPreviewCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetLifecyclePolicyPreview",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetLifecyclePolicyPreviewRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetLifecyclePolicyPreviewCommand = serializeAws_json1_1GetLifecyclePolicyPreviewCommand;
const serializeAws_json1_1GetRegistryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetRegistryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetRegistryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetRegistryPolicyCommand = serializeAws_json1_1GetRegistryPolicyCommand;
const serializeAws_json1_1GetRegistryScanningConfigurationCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetRegistryScanningConfiguration",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetRegistryScanningConfigurationRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetRegistryScanningConfigurationCommand = serializeAws_json1_1GetRegistryScanningConfigurationCommand;
const serializeAws_json1_1GetRepositoryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetRepositoryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1GetRepositoryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1GetRepositoryPolicyCommand = serializeAws_json1_1GetRepositoryPolicyCommand;
const serializeAws_json1_1InitiateLayerUploadCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.InitiateLayerUpload",
};
let body;
body = JSON.stringify(serializeAws_json1_1InitiateLayerUploadRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1InitiateLayerUploadCommand = serializeAws_json1_1InitiateLayerUploadCommand;
const serializeAws_json1_1ListImagesCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.ListImages",
};
let body;
body = JSON.stringify(serializeAws_json1_1ListImagesRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1ListImagesCommand = serializeAws_json1_1ListImagesCommand;
const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.ListTagsForResource",
};
let body;
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand;
const serializeAws_json1_1PutImageCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutImage",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutImageRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutImageCommand = serializeAws_json1_1PutImageCommand;
const serializeAws_json1_1PutImageScanningConfigurationCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutImageScanningConfigurationRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutImageScanningConfigurationCommand = serializeAws_json1_1PutImageScanningConfigurationCommand;
const serializeAws_json1_1PutImageTagMutabilityCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutImageTagMutability",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutImageTagMutabilityRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutImageTagMutabilityCommand = serializeAws_json1_1PutImageTagMutabilityCommand;
const serializeAws_json1_1PutLifecyclePolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutLifecyclePolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutLifecyclePolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutLifecyclePolicyCommand = serializeAws_json1_1PutLifecyclePolicyCommand;
const serializeAws_json1_1PutRegistryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutRegistryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutRegistryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutRegistryPolicyCommand = serializeAws_json1_1PutRegistryPolicyCommand;
const serializeAws_json1_1PutRegistryScanningConfigurationCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutRegistryScanningConfiguration",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutRegistryScanningConfigurationRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutRegistryScanningConfigurationCommand = serializeAws_json1_1PutRegistryScanningConfigurationCommand;
const serializeAws_json1_1PutReplicationConfigurationCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutReplicationConfiguration",
};
let body;
body = JSON.stringify(serializeAws_json1_1PutReplicationConfigurationRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1PutReplicationConfigurationCommand = serializeAws_json1_1PutReplicationConfigurationCommand;
const serializeAws_json1_1SetRepositoryPolicyCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.SetRepositoryPolicy",
};
let body;
body = JSON.stringify(serializeAws_json1_1SetRepositoryPolicyRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1SetRepositoryPolicyCommand = serializeAws_json1_1SetRepositoryPolicyCommand;
const serializeAws_json1_1StartImageScanCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.StartImageScan",
};
let body;
body = JSON.stringify(serializeAws_json1_1StartImageScanRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1StartImageScanCommand = serializeAws_json1_1StartImageScanCommand;
const serializeAws_json1_1StartLifecyclePolicyPreviewCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.StartLifecyclePolicyPreview",
};
let body;
body = JSON.stringify(serializeAws_json1_1StartLifecyclePolicyPreviewRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1StartLifecyclePolicyPreviewCommand = serializeAws_json1_1StartLifecyclePolicyPreviewCommand;
const serializeAws_json1_1TagResourceCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.TagResource",
};
let body;
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand;
const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.UntagResource",
};
let body;
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;
const serializeAws_json1_1UploadLayerPartCommand = async (input, context) => {
const headers = {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": "AmazonEC2ContainerRegistry_V20150921.UploadLayerPart",
};
let body;
body = JSON.stringify(serializeAws_json1_1UploadLayerPartRequest(input, context));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_json1_1UploadLayerPartCommand = serializeAws_json1_1UploadLayerPartCommand;
const deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1BatchCheckLayerAvailabilityResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = deserializeAws_json1_1BatchCheckLayerAvailabilityCommand;
const deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1BatchDeleteImageCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1BatchDeleteImageCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1BatchDeleteImageResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1BatchDeleteImageCommand = deserializeAws_json1_1BatchDeleteImageCommand;
const deserializeAws_json1_1BatchDeleteImageCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1BatchGetImageCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1BatchGetImageCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1BatchGetImageResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1BatchGetImageCommand = deserializeAws_json1_1BatchGetImageCommand;
const deserializeAws_json1_1BatchGetImageCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1BatchGetRepositoryScanningConfigurationResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand;
const deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1CompleteLayerUploadCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1CompleteLayerUploadCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1CompleteLayerUploadResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1CompleteLayerUploadCommand = deserializeAws_json1_1CompleteLayerUploadCommand;
const deserializeAws_json1_1CompleteLayerUploadCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "EmptyUploadException":
case "com.amazonaws.ecr#EmptyUploadException":
response = {
...(await deserializeAws_json1_1EmptyUploadExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidLayerException":
case "com.amazonaws.ecr#InvalidLayerException":
response = {
...(await deserializeAws_json1_1InvalidLayerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "KmsException":
case "com.amazonaws.ecr#KmsException":
response = {
...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayerAlreadyExistsException":
case "com.amazonaws.ecr#LayerAlreadyExistsException":
response = {
...(await deserializeAws_json1_1LayerAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayerPartTooSmallException":
case "com.amazonaws.ecr#LayerPartTooSmallException":
response = {
...(await deserializeAws_json1_1LayerPartTooSmallExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UploadNotFoundException":
case "com.amazonaws.ecr#UploadNotFoundException":
response = {
...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1CreatePullThroughCacheRuleCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1CreatePullThroughCacheRuleCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1CreatePullThroughCacheRuleResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1CreatePullThroughCacheRuleCommand = deserializeAws_json1_1CreatePullThroughCacheRuleCommand;
const deserializeAws_json1_1CreatePullThroughCacheRuleCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecr#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PullThroughCacheRuleAlreadyExistsException":
case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException":
response = {
...(await deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedUpstreamRegistryException":
case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException":
response = {
...(await deserializeAws_json1_1UnsupportedUpstreamRegistryExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1CreateRepositoryCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1CreateRepositoryCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1CreateRepositoryResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1CreateRepositoryCommand = deserializeAws_json1_1CreateRepositoryCommand;
const deserializeAws_json1_1CreateRepositoryCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidTagParameterException":
case "com.amazonaws.ecr#InvalidTagParameterException":
response = {
...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "KmsException":
case "com.amazonaws.ecr#KmsException":
response = {
...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecr#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryAlreadyExistsException":
case "com.amazonaws.ecr#RepositoryAlreadyExistsException":
response = {
...(await deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyTagsException":
case "com.amazonaws.ecr#TooManyTagsException":
response = {
...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeleteLifecyclePolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeleteLifecyclePolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeleteLifecyclePolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeleteLifecyclePolicyCommand = deserializeAws_json1_1DeleteLifecyclePolicyCommand;
const deserializeAws_json1_1DeleteLifecyclePolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LifecyclePolicyNotFoundException":
case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
response = {
...(await deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeletePullThroughCacheRuleCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeletePullThroughCacheRuleCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeletePullThroughCacheRuleResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeletePullThroughCacheRuleCommand = deserializeAws_json1_1DeletePullThroughCacheRuleCommand;
const deserializeAws_json1_1DeletePullThroughCacheRuleCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PullThroughCacheRuleNotFoundException":
case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
response = {
...(await deserializeAws_json1_1PullThroughCacheRuleNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeleteRegistryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeleteRegistryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeleteRegistryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeleteRegistryPolicyCommand = deserializeAws_json1_1DeleteRegistryPolicyCommand;
const deserializeAws_json1_1DeleteRegistryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryPolicyNotFoundException":
case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryPolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeleteRepositoryCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeleteRepositoryCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeleteRepositoryResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeleteRepositoryCommand = deserializeAws_json1_1DeleteRepositoryCommand;
const deserializeAws_json1_1DeleteRepositoryCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "KmsException":
case "com.amazonaws.ecr#KmsException":
response = {
...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotEmptyException":
case "com.amazonaws.ecr#RepositoryNotEmptyException":
response = {
...(await deserializeAws_json1_1RepositoryNotEmptyExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DeleteRepositoryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DeleteRepositoryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DeleteRepositoryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = deserializeAws_json1_1DeleteRepositoryPolicyCommand;
const deserializeAws_json1_1DeleteRepositoryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryPolicyNotFoundException":
case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeImageReplicationStatusCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeImageReplicationStatusCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeImageReplicationStatusResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeImageReplicationStatusCommand = deserializeAws_json1_1DescribeImageReplicationStatusCommand;
const deserializeAws_json1_1DescribeImageReplicationStatusCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageNotFoundException":
case "com.amazonaws.ecr#ImageNotFoundException":
response = {
...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeImagesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeImagesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeImagesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeImagesCommand = deserializeAws_json1_1DescribeImagesCommand;
const deserializeAws_json1_1DescribeImagesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageNotFoundException":
case "com.amazonaws.ecr#ImageNotFoundException":
response = {
...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeImageScanFindingsCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeImageScanFindingsCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeImageScanFindingsResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeImageScanFindingsCommand = deserializeAws_json1_1DescribeImageScanFindingsCommand;
const deserializeAws_json1_1DescribeImageScanFindingsCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageNotFoundException":
case "com.amazonaws.ecr#ImageNotFoundException":
response = {
...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ScanNotFoundException":
case "com.amazonaws.ecr#ScanNotFoundException":
response = {
...(await deserializeAws_json1_1ScanNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribePullThroughCacheRulesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribePullThroughCacheRulesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribePullThroughCacheRulesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribePullThroughCacheRulesCommand = deserializeAws_json1_1DescribePullThroughCacheRulesCommand;
const deserializeAws_json1_1DescribePullThroughCacheRulesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PullThroughCacheRuleNotFoundException":
case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
response = {
...(await deserializeAws_json1_1PullThroughCacheRuleNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeRegistryCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeRegistryCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeRegistryResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeRegistryCommand = deserializeAws_json1_1DescribeRegistryCommand;
const deserializeAws_json1_1DescribeRegistryCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1DescribeRepositoriesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1DescribeRepositoriesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1DescribeRepositoriesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1DescribeRepositoriesCommand = deserializeAws_json1_1DescribeRepositoriesCommand;
const deserializeAws_json1_1DescribeRepositoriesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetAuthorizationTokenCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetAuthorizationTokenCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetAuthorizationTokenResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetAuthorizationTokenCommand = deserializeAws_json1_1GetAuthorizationTokenCommand;
const deserializeAws_json1_1GetAuthorizationTokenCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetDownloadUrlForLayerCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetDownloadUrlForLayerCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetDownloadUrlForLayerResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetDownloadUrlForLayerCommand = deserializeAws_json1_1GetDownloadUrlForLayerCommand;
const deserializeAws_json1_1GetDownloadUrlForLayerCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayerInaccessibleException":
case "com.amazonaws.ecr#LayerInaccessibleException":
response = {
...(await deserializeAws_json1_1LayerInaccessibleExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayersNotFoundException":
case "com.amazonaws.ecr#LayersNotFoundException":
response = {
...(await deserializeAws_json1_1LayersNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetLifecyclePolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetLifecyclePolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetLifecyclePolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetLifecyclePolicyCommand = deserializeAws_json1_1GetLifecyclePolicyCommand;
const deserializeAws_json1_1GetLifecyclePolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LifecyclePolicyNotFoundException":
case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
response = {
...(await deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetLifecyclePolicyPreviewCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetLifecyclePolicyPreviewCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetLifecyclePolicyPreviewResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetLifecyclePolicyPreviewCommand = deserializeAws_json1_1GetLifecyclePolicyPreviewCommand;
const deserializeAws_json1_1GetLifecyclePolicyPreviewCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LifecyclePolicyPreviewNotFoundException":
case "com.amazonaws.ecr#LifecyclePolicyPreviewNotFoundException":
response = {
...(await deserializeAws_json1_1LifecyclePolicyPreviewNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetRegistryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetRegistryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetRegistryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetRegistryPolicyCommand = deserializeAws_json1_1GetRegistryPolicyCommand;
const deserializeAws_json1_1GetRegistryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegistryPolicyNotFoundException":
case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
response = {
...(await deserializeAws_json1_1RegistryPolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetRegistryScanningConfigurationCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetRegistryScanningConfigurationCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetRegistryScanningConfigurationResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetRegistryScanningConfigurationCommand = deserializeAws_json1_1GetRegistryScanningConfigurationCommand;
const deserializeAws_json1_1GetRegistryScanningConfigurationCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1GetRepositoryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1GetRepositoryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1GetRepositoryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1GetRepositoryPolicyCommand = deserializeAws_json1_1GetRepositoryPolicyCommand;
const deserializeAws_json1_1GetRepositoryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryPolicyNotFoundException":
case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1InitiateLayerUploadCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1InitiateLayerUploadCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1InitiateLayerUploadResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1InitiateLayerUploadCommand = deserializeAws_json1_1InitiateLayerUploadCommand;
const deserializeAws_json1_1InitiateLayerUploadCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "KmsException":
case "com.amazonaws.ecr#KmsException":
response = {
...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1ListImagesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1ListImagesCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1ListImagesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1ListImagesCommand = deserializeAws_json1_1ListImagesCommand;
const deserializeAws_json1_1ListImagesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand;
const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutImageCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutImageCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutImageResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutImageCommand = deserializeAws_json1_1PutImageCommand;
const deserializeAws_json1_1PutImageCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageAlreadyExistsException":
case "com.amazonaws.ecr#ImageAlreadyExistsException":
response = {
...(await deserializeAws_json1_1ImageAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ImageDigestDoesNotMatchException":
case "com.amazonaws.ecr#ImageDigestDoesNotMatchException":
response = {
...(await deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ImageTagAlreadyExistsException":
case "com.amazonaws.ecr#ImageTagAlreadyExistsException":
response = {
...(await deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "KmsException":
case "com.amazonaws.ecr#KmsException":
response = {
...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LayersNotFoundException":
case "com.amazonaws.ecr#LayersNotFoundException":
response = {
...(await deserializeAws_json1_1LayersNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecr#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ReferencedImagesNotFoundException":
case "com.amazonaws.ecr#ReferencedImagesNotFoundException":
response = {
...(await deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutImageScanningConfigurationCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutImageScanningConfigurationCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutImageScanningConfigurationResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutImageScanningConfigurationCommand = deserializeAws_json1_1PutImageScanningConfigurationCommand;
const deserializeAws_json1_1PutImageScanningConfigurationCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutImageTagMutabilityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutImageTagMutabilityCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutImageTagMutabilityResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutImageTagMutabilityCommand = deserializeAws_json1_1PutImageTagMutabilityCommand;
const deserializeAws_json1_1PutImageTagMutabilityCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutLifecyclePolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutLifecyclePolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutLifecyclePolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutLifecyclePolicyCommand = deserializeAws_json1_1PutLifecyclePolicyCommand;
const deserializeAws_json1_1PutLifecyclePolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutRegistryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutRegistryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutRegistryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutRegistryPolicyCommand = deserializeAws_json1_1PutRegistryPolicyCommand;
const deserializeAws_json1_1PutRegistryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutRegistryScanningConfigurationCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutRegistryScanningConfigurationCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutRegistryScanningConfigurationResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutRegistryScanningConfigurationCommand = deserializeAws_json1_1PutRegistryScanningConfigurationCommand;
const deserializeAws_json1_1PutRegistryScanningConfigurationCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1PutReplicationConfigurationCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1PutReplicationConfigurationCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1PutReplicationConfigurationResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1PutReplicationConfigurationCommand = deserializeAws_json1_1PutReplicationConfigurationCommand;
const deserializeAws_json1_1PutReplicationConfigurationCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1SetRepositoryPolicyCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1SetRepositoryPolicyCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1SetRepositoryPolicyResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1SetRepositoryPolicyCommand = deserializeAws_json1_1SetRepositoryPolicyCommand;
const deserializeAws_json1_1SetRepositoryPolicyCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1StartImageScanCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1StartImageScanCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1StartImageScanResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1StartImageScanCommand = deserializeAws_json1_1StartImageScanCommand;
const deserializeAws_json1_1StartImageScanCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ImageNotFoundException":
case "com.amazonaws.ecr#ImageNotFoundException":
response = {
...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecr#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnsupportedImageTypeException":
case "com.amazonaws.ecr#UnsupportedImageTypeException":
response = {
...(await deserializeAws_json1_1UnsupportedImageTypeExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ValidationException":
case "com.amazonaws.ecr#ValidationException":
response = {
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1StartLifecyclePolicyPreviewCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1StartLifecyclePolicyPreviewCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1StartLifecyclePolicyPreviewResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1StartLifecyclePolicyPreviewCommand = deserializeAws_json1_1StartLifecyclePolicyPreviewCommand;
const deserializeAws_json1_1StartLifecyclePolicyPreviewCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LifecyclePolicyNotFoundException":
case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
response = {
...(await deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LifecyclePolicyPreviewInProgressException":
case "com.amazonaws.ecr#LifecyclePolicyPreviewInProgressException":
response = {
...(await deserializeAws_json1_1LifecyclePolicyPreviewInProgressExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1TagResourceCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1TagResourceResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand;
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidTagParameterException":
case "com.amazonaws.ecr#InvalidTagParameterException":
response = {
...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyTagsException":
case "com.amazonaws.ecr#TooManyTagsException":
response = {
...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1UntagResourceCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand;
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidTagParameterException":
case "com.amazonaws.ecr#InvalidTagParameterException":
response = {
...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyTagsException":
case "com.amazonaws.ecr#TooManyTagsException":
response = {
...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1UploadLayerPartCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_json1_1UploadLayerPartCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_json1_1UploadLayerPartResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_json1_1UploadLayerPartCommand = deserializeAws_json1_1UploadLayerPartCommand;
const deserializeAws_json1_1UploadLayerPartCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidLayerPartException":
case "com.amazonaws.ecr#InvalidLayerPartException":
response = {
...(await deserializeAws_json1_1InvalidLayerPartExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidParameterException":
case "com.amazonaws.ecr#InvalidParameterException":
response = {
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "KmsException":
case "com.amazonaws.ecr#KmsException":
response = {
...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "LimitExceededException":
case "com.amazonaws.ecr#LimitExceededException":
response = {
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RepositoryNotFoundException":
case "com.amazonaws.ecr#RepositoryNotFoundException":
response = {
...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ServerException":
case "com.amazonaws.ecr#ServerException":
response = {
...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UploadNotFoundException":
case "com.amazonaws.ecr#UploadNotFoundException":
response = {
...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_json1_1EmptyUploadExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1EmptyUploadException(body, context);
const contents = {
name: "EmptyUploadException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageAlreadyExistsException(body, context);
const contents = {
name: "ImageAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageDigestDoesNotMatchException(body, context);
const contents = {
name: "ImageDigestDoesNotMatchException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageNotFoundException(body, context);
const contents = {
name: "ImageNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ImageTagAlreadyExistsException(body, context);
const contents = {
name: "ImageTagAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidLayerExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidLayerException(body, context);
const contents = {
name: "InvalidLayerException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidLayerPartExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidLayerPartException(body, context);
const contents = {
name: "InvalidLayerPartException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
const contents = {
name: "InvalidParameterException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1InvalidTagParameterExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1InvalidTagParameterException(body, context);
const contents = {
name: "InvalidTagParameterException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1KmsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1KmsException(body, context);
const contents = {
name: "KmsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayerAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayerAlreadyExistsException(body, context);
const contents = {
name: "LayerAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayerInaccessibleExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayerInaccessibleException(body, context);
const contents = {
name: "LayerInaccessibleException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayerPartTooSmallExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayerPartTooSmallException(body, context);
const contents = {
name: "LayerPartTooSmallException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LayersNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LayersNotFoundException(body, context);
const contents = {
name: "LayersNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LifecyclePolicyNotFoundException(body, context);
const contents = {
name: "LifecyclePolicyNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LifecyclePolicyPreviewInProgressExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LifecyclePolicyPreviewInProgressException(body, context);
const contents = {
name: "LifecyclePolicyPreviewInProgressException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LifecyclePolicyPreviewNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LifecyclePolicyPreviewNotFoundException(body, context);
const contents = {
name: "LifecyclePolicyPreviewNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
const contents = {
name: "LimitExceededException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsException(body, context);
const contents = {
name: "PullThroughCacheRuleAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1PullThroughCacheRuleNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1PullThroughCacheRuleNotFoundException(body, context);
const contents = {
name: "PullThroughCacheRuleNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ReferencedImagesNotFoundException(body, context);
const contents = {
name: "ReferencedImagesNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RegistryPolicyNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RegistryPolicyNotFoundException(body, context);
const contents = {
name: "RegistryPolicyNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryAlreadyExistsException(body, context);
const contents = {
name: "RepositoryAlreadyExistsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryNotEmptyExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryNotEmptyException(body, context);
const contents = {
name: "RepositoryNotEmptyException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryNotFoundException(body, context);
const contents = {
name: "RepositoryNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1RepositoryPolicyNotFoundException(body, context);
const contents = {
name: "RepositoryPolicyNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ScanNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ScanNotFoundException(body, context);
const contents = {
name: "ScanNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ServerExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ServerException(body, context);
const contents = {
name: "ServerException",
$fault: "server",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
const contents = {
name: "TooManyTagsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1UnsupportedImageTypeExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1UnsupportedImageTypeException(body, context);
const contents = {
name: "UnsupportedImageTypeException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1UnsupportedUpstreamRegistryExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1UnsupportedUpstreamRegistryException(body, context);
const contents = {
name: "UnsupportedUpstreamRegistryException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1UploadNotFoundExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1UploadNotFoundException(body, context);
const contents = {
name: "UploadNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_json1_1ValidationException(body, context);
const contents = {
name: "ValidationException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const serializeAws_json1_1BatchCheckLayerAvailabilityRequest = (input, context) => {
return {
...(input.layerDigests !== undefined &&
input.layerDigests !== null && {
layerDigests: serializeAws_json1_1BatchedOperationLayerDigestList(input.layerDigests, context),
}),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1BatchDeleteImageRequest = (input, context) => {
return {
...(input.imageIds !== undefined &&
input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1BatchedOperationLayerDigestList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1BatchGetImageRequest = (input, context) => {
return {
...(input.acceptedMediaTypes !== undefined &&
input.acceptedMediaTypes !== null && {
acceptedMediaTypes: serializeAws_json1_1MediaTypeList(input.acceptedMediaTypes, context),
}),
...(input.imageIds !== undefined &&
input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1BatchGetRepositoryScanningConfigurationRequest = (input, context) => {
return {
...(input.repositoryNames !== undefined &&
input.repositoryNames !== null && {
repositoryNames: serializeAws_json1_1ScanningConfigurationRepositoryNameList(input.repositoryNames, context),
}),
};
};
const serializeAws_json1_1CompleteLayerUploadRequest = (input, context) => {
return {
...(input.layerDigests !== undefined &&
input.layerDigests !== null && {
layerDigests: serializeAws_json1_1LayerDigestList(input.layerDigests, context),
}),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }),
};
};
const serializeAws_json1_1CreatePullThroughCacheRuleRequest = (input, context) => {
return {
...(input.ecrRepositoryPrefix !== undefined &&
input.ecrRepositoryPrefix !== null && { ecrRepositoryPrefix: input.ecrRepositoryPrefix }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.upstreamRegistryUrl !== undefined &&
input.upstreamRegistryUrl !== null && { upstreamRegistryUrl: input.upstreamRegistryUrl }),
};
};
const serializeAws_json1_1CreateRepositoryRequest = (input, context) => {
return {
...(input.encryptionConfiguration !== undefined &&
input.encryptionConfiguration !== null && {
encryptionConfiguration: serializeAws_json1_1EncryptionConfiguration(input.encryptionConfiguration, context),
}),
...(input.imageScanningConfiguration !== undefined &&
input.imageScanningConfiguration !== null && {
imageScanningConfiguration: serializeAws_json1_1ImageScanningConfiguration(input.imageScanningConfiguration, context),
}),
...(input.imageTagMutability !== undefined &&
input.imageTagMutability !== null && { imageTagMutability: input.imageTagMutability }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
};
};
const serializeAws_json1_1DeleteLifecyclePolicyRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DeletePullThroughCacheRuleRequest = (input, context) => {
return {
...(input.ecrRepositoryPrefix !== undefined &&
input.ecrRepositoryPrefix !== null && { ecrRepositoryPrefix: input.ecrRepositoryPrefix }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
};
};
const serializeAws_json1_1DeleteRegistryPolicyRequest = (input, context) => {
return {};
};
const serializeAws_json1_1DeleteRepositoryPolicyRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DeleteRepositoryRequest = (input, context) => {
return {
...(input.force !== undefined && input.force !== null && { force: input.force }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribeImageReplicationStatusRequest = (input, context) => {
return {
...(input.imageId !== undefined &&
input.imageId !== null && { imageId: serializeAws_json1_1ImageIdentifier(input.imageId, context) }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribeImageScanFindingsRequest = (input, context) => {
return {
...(input.imageId !== undefined &&
input.imageId !== null && { imageId: serializeAws_json1_1ImageIdentifier(input.imageId, context) }),
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribeImagesFilter = (input, context) => {
return {
...(input.tagStatus !== undefined && input.tagStatus !== null && { tagStatus: input.tagStatus }),
};
};
const serializeAws_json1_1DescribeImagesRequest = (input, context) => {
return {
...(input.filter !== undefined &&
input.filter !== null && { filter: serializeAws_json1_1DescribeImagesFilter(input.filter, context) }),
...(input.imageIds !== undefined &&
input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }),
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1DescribePullThroughCacheRulesRequest = (input, context) => {
return {
...(input.ecrRepositoryPrefixes !== undefined &&
input.ecrRepositoryPrefixes !== null && {
ecrRepositoryPrefixes: serializeAws_json1_1PullThroughCacheRuleRepositoryPrefixList(input.ecrRepositoryPrefixes, context),
}),
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
};
};
const serializeAws_json1_1DescribeRegistryRequest = (input, context) => {
return {};
};
const serializeAws_json1_1DescribeRepositoriesRequest = (input, context) => {
return {
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryNames !== undefined &&
input.repositoryNames !== null && {
repositoryNames: serializeAws_json1_1RepositoryNameList(input.repositoryNames, context),
}),
};
};
const serializeAws_json1_1EncryptionConfiguration = (input, context) => {
return {
...(input.encryptionType !== undefined &&
input.encryptionType !== null && { encryptionType: input.encryptionType }),
...(input.kmsKey !== undefined && input.kmsKey !== null && { kmsKey: input.kmsKey }),
};
};
const serializeAws_json1_1GetAuthorizationTokenRegistryIdList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1GetAuthorizationTokenRequest = (input, context) => {
return {
...(input.registryIds !== undefined &&
input.registryIds !== null && {
registryIds: serializeAws_json1_1GetAuthorizationTokenRegistryIdList(input.registryIds, context),
}),
};
};
const serializeAws_json1_1GetDownloadUrlForLayerRequest = (input, context) => {
return {
...(input.layerDigest !== undefined && input.layerDigest !== null && { layerDigest: input.layerDigest }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1GetLifecyclePolicyPreviewRequest = (input, context) => {
return {
...(input.filter !== undefined &&
input.filter !== null && { filter: serializeAws_json1_1LifecyclePolicyPreviewFilter(input.filter, context) }),
...(input.imageIds !== undefined &&
input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }),
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1GetLifecyclePolicyRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1GetRegistryPolicyRequest = (input, context) => {
return {};
};
const serializeAws_json1_1GetRegistryScanningConfigurationRequest = (input, context) => {
return {};
};
const serializeAws_json1_1GetRepositoryPolicyRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1ImageIdentifier = (input, context) => {
return {
...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }),
...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }),
};
};
const serializeAws_json1_1ImageIdentifierList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1ImageIdentifier(entry, context);
});
};
const serializeAws_json1_1ImageScanningConfiguration = (input, context) => {
return {
...(input.scanOnPush !== undefined && input.scanOnPush !== null && { scanOnPush: input.scanOnPush }),
};
};
const serializeAws_json1_1InitiateLayerUploadRequest = (input, context) => {
return {
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1LayerDigestList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1LifecyclePolicyPreviewFilter = (input, context) => {
return {
...(input.tagStatus !== undefined && input.tagStatus !== null && { tagStatus: input.tagStatus }),
};
};
const serializeAws_json1_1ListImagesFilter = (input, context) => {
return {
...(input.tagStatus !== undefined && input.tagStatus !== null && { tagStatus: input.tagStatus }),
};
};
const serializeAws_json1_1ListImagesRequest = (input, context) => {
return {
...(input.filter !== undefined &&
input.filter !== null && { filter: serializeAws_json1_1ListImagesFilter(input.filter, context) }),
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
return {
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
};
};
const serializeAws_json1_1MediaTypeList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1PullThroughCacheRuleRepositoryPrefixList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1PutImageRequest = (input, context) => {
return {
...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }),
...(input.imageManifest !== undefined && input.imageManifest !== null && { imageManifest: input.imageManifest }),
...(input.imageManifestMediaType !== undefined &&
input.imageManifestMediaType !== null && { imageManifestMediaType: input.imageManifestMediaType }),
...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1PutImageScanningConfigurationRequest = (input, context) => {
return {
...(input.imageScanningConfiguration !== undefined &&
input.imageScanningConfiguration !== null && {
imageScanningConfiguration: serializeAws_json1_1ImageScanningConfiguration(input.imageScanningConfiguration, context),
}),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1PutImageTagMutabilityRequest = (input, context) => {
return {
...(input.imageTagMutability !== undefined &&
input.imageTagMutability !== null && { imageTagMutability: input.imageTagMutability }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1PutLifecyclePolicyRequest = (input, context) => {
return {
...(input.lifecyclePolicyText !== undefined &&
input.lifecyclePolicyText !== null && { lifecyclePolicyText: input.lifecyclePolicyText }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1PutRegistryPolicyRequest = (input, context) => {
return {
...(input.policyText !== undefined && input.policyText !== null && { policyText: input.policyText }),
};
};
const serializeAws_json1_1PutRegistryScanningConfigurationRequest = (input, context) => {
return {
...(input.rules !== undefined &&
input.rules !== null && { rules: serializeAws_json1_1RegistryScanningRuleList(input.rules, context) }),
...(input.scanType !== undefined && input.scanType !== null && { scanType: input.scanType }),
};
};
const serializeAws_json1_1PutReplicationConfigurationRequest = (input, context) => {
return {
...(input.replicationConfiguration !== undefined &&
input.replicationConfiguration !== null && {
replicationConfiguration: serializeAws_json1_1ReplicationConfiguration(input.replicationConfiguration, context),
}),
};
};
const serializeAws_json1_1RegistryScanningRule = (input, context) => {
return {
...(input.repositoryFilters !== undefined &&
input.repositoryFilters !== null && {
repositoryFilters: serializeAws_json1_1ScanningRepositoryFilterList(input.repositoryFilters, context),
}),
...(input.scanFrequency !== undefined && input.scanFrequency !== null && { scanFrequency: input.scanFrequency }),
};
};
const serializeAws_json1_1RegistryScanningRuleList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1RegistryScanningRule(entry, context);
});
};
const serializeAws_json1_1ReplicationConfiguration = (input, context) => {
return {
...(input.rules !== undefined &&
input.rules !== null && { rules: serializeAws_json1_1ReplicationRuleList(input.rules, context) }),
};
};
const serializeAws_json1_1ReplicationDestination = (input, context) => {
return {
...(input.region !== undefined && input.region !== null && { region: input.region }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
};
};
const serializeAws_json1_1ReplicationDestinationList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1ReplicationDestination(entry, context);
});
};
const serializeAws_json1_1ReplicationRule = (input, context) => {
return {
...(input.destinations !== undefined &&
input.destinations !== null && {
destinations: serializeAws_json1_1ReplicationDestinationList(input.destinations, context),
}),
...(input.repositoryFilters !== undefined &&
input.repositoryFilters !== null && {
repositoryFilters: serializeAws_json1_1RepositoryFilterList(input.repositoryFilters, context),
}),
};
};
const serializeAws_json1_1ReplicationRuleList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1ReplicationRule(entry, context);
});
};
const serializeAws_json1_1RepositoryFilter = (input, context) => {
return {
...(input.filter !== undefined && input.filter !== null && { filter: input.filter }),
...(input.filterType !== undefined && input.filterType !== null && { filterType: input.filterType }),
};
};
const serializeAws_json1_1RepositoryFilterList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1RepositoryFilter(entry, context);
});
};
const serializeAws_json1_1RepositoryNameList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1ScanningConfigurationRepositoryNameList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1ScanningRepositoryFilter = (input, context) => {
return {
...(input.filter !== undefined && input.filter !== null && { filter: input.filter }),
...(input.filterType !== undefined && input.filterType !== null && { filterType: input.filterType }),
};
};
const serializeAws_json1_1ScanningRepositoryFilterList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1ScanningRepositoryFilter(entry, context);
});
};
const serializeAws_json1_1SetRepositoryPolicyRequest = (input, context) => {
return {
...(input.force !== undefined && input.force !== null && { force: input.force }),
...(input.policyText !== undefined && input.policyText !== null && { policyText: input.policyText }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1StartImageScanRequest = (input, context) => {
return {
...(input.imageId !== undefined &&
input.imageId !== null && { imageId: serializeAws_json1_1ImageIdentifier(input.imageId, context) }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1StartLifecyclePolicyPreviewRequest = (input, context) => {
return {
...(input.lifecyclePolicyText !== undefined &&
input.lifecyclePolicyText !== null && { lifecyclePolicyText: input.lifecyclePolicyText }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
};
};
const serializeAws_json1_1Tag = (input, context) => {
return {
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
};
};
const serializeAws_json1_1TagKeyList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return entry;
});
};
const serializeAws_json1_1TagList = (input, context) => {
return input
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return serializeAws_json1_1Tag(entry, context);
});
};
const serializeAws_json1_1TagResourceRequest = (input, context) => {
return {
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
};
};
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
return {
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
...(input.tagKeys !== undefined &&
input.tagKeys !== null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }),
};
};
const serializeAws_json1_1UploadLayerPartRequest = (input, context) => {
return {
...(input.layerPartBlob !== undefined &&
input.layerPartBlob !== null && { layerPartBlob: context.base64Encoder(input.layerPartBlob) }),
...(input.partFirstByte !== undefined && input.partFirstByte !== null && { partFirstByte: input.partFirstByte }),
...(input.partLastByte !== undefined && input.partLastByte !== null && { partLastByte: input.partLastByte }),
...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }),
...(input.repositoryName !== undefined &&
input.repositoryName !== null && { repositoryName: input.repositoryName }),
...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }),
};
};
const deserializeAws_json1_1Attribute = (output, context) => {
return {
key: smithy_client_1.expectString(output.key),
value: smithy_client_1.expectString(output.value),
};
};
const deserializeAws_json1_1AttributeList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Attribute(entry, context);
});
};
const deserializeAws_json1_1AuthorizationData = (output, context) => {
return {
authorizationToken: smithy_client_1.expectString(output.authorizationToken),
expiresAt: output.expiresAt !== undefined && output.expiresAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.expiresAt)))
: undefined,
proxyEndpoint: smithy_client_1.expectString(output.proxyEndpoint),
};
};
const deserializeAws_json1_1AuthorizationDataList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1AuthorizationData(entry, context);
});
};
const deserializeAws_json1_1AwsEcrContainerImageDetails = (output, context) => {
return {
architecture: smithy_client_1.expectString(output.architecture),
author: smithy_client_1.expectString(output.author),
imageHash: smithy_client_1.expectString(output.imageHash),
imageTags: output.imageTags !== undefined && output.imageTags !== null
? deserializeAws_json1_1ImageTagsList(output.imageTags, context)
: undefined,
platform: smithy_client_1.expectString(output.platform),
pushedAt: output.pushedAt !== undefined && output.pushedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.pushedAt)))
: undefined,
registry: smithy_client_1.expectString(output.registry),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1BatchCheckLayerAvailabilityResponse = (output, context) => {
return {
failures: output.failures !== undefined && output.failures !== null
? deserializeAws_json1_1LayerFailureList(output.failures, context)
: undefined,
layers: output.layers !== undefined && output.layers !== null
? deserializeAws_json1_1LayerList(output.layers, context)
: undefined,
};
};
const deserializeAws_json1_1BatchDeleteImageResponse = (output, context) => {
return {
failures: output.failures !== undefined && output.failures !== null
? deserializeAws_json1_1ImageFailureList(output.failures, context)
: undefined,
imageIds: output.imageIds !== undefined && output.imageIds !== null
? deserializeAws_json1_1ImageIdentifierList(output.imageIds, context)
: undefined,
};
};
const deserializeAws_json1_1BatchGetImageResponse = (output, context) => {
return {
failures: output.failures !== undefined && output.failures !== null
? deserializeAws_json1_1ImageFailureList(output.failures, context)
: undefined,
images: output.images !== undefined && output.images !== null
? deserializeAws_json1_1ImageList(output.images, context)
: undefined,
};
};
const deserializeAws_json1_1BatchGetRepositoryScanningConfigurationResponse = (output, context) => {
return {
failures: output.failures !== undefined && output.failures !== null
? deserializeAws_json1_1RepositoryScanningConfigurationFailureList(output.failures, context)
: undefined,
scanningConfigurations: output.scanningConfigurations !== undefined && output.scanningConfigurations !== null
? deserializeAws_json1_1RepositoryScanningConfigurationList(output.scanningConfigurations, context)
: undefined,
};
};
const deserializeAws_json1_1CompleteLayerUploadResponse = (output, context) => {
return {
layerDigest: smithy_client_1.expectString(output.layerDigest),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1CreatePullThroughCacheRuleResponse = (output, context) => {
return {
createdAt: output.createdAt !== undefined && output.createdAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))
: undefined,
ecrRepositoryPrefix: smithy_client_1.expectString(output.ecrRepositoryPrefix),
registryId: smithy_client_1.expectString(output.registryId),
upstreamRegistryUrl: smithy_client_1.expectString(output.upstreamRegistryUrl),
};
};
const deserializeAws_json1_1CreateRepositoryResponse = (output, context) => {
return {
repository: output.repository !== undefined && output.repository !== null
? deserializeAws_json1_1Repository(output.repository, context)
: undefined,
};
};
const deserializeAws_json1_1CvssScore = (output, context) => {
return {
baseScore: smithy_client_1.limitedParseDouble(output.baseScore),
scoringVector: smithy_client_1.expectString(output.scoringVector),
source: smithy_client_1.expectString(output.source),
version: smithy_client_1.expectString(output.version),
};
};
const deserializeAws_json1_1CvssScoreAdjustment = (output, context) => {
return {
metric: smithy_client_1.expectString(output.metric),
reason: smithy_client_1.expectString(output.reason),
};
};
const deserializeAws_json1_1CvssScoreAdjustmentList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1CvssScoreAdjustment(entry, context);
});
};
const deserializeAws_json1_1CvssScoreDetails = (output, context) => {
return {
adjustments: output.adjustments !== undefined && output.adjustments !== null
? deserializeAws_json1_1CvssScoreAdjustmentList(output.adjustments, context)
: undefined,
score: smithy_client_1.limitedParseDouble(output.score),
scoreSource: smithy_client_1.expectString(output.scoreSource),
scoringVector: smithy_client_1.expectString(output.scoringVector),
version: smithy_client_1.expectString(output.version),
};
};
const deserializeAws_json1_1CvssScoreList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1CvssScore(entry, context);
});
};
const deserializeAws_json1_1DeleteLifecyclePolicyResponse = (output, context) => {
return {
lastEvaluatedAt: output.lastEvaluatedAt !== undefined && output.lastEvaluatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastEvaluatedAt)))
: undefined,
lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1DeletePullThroughCacheRuleResponse = (output, context) => {
return {
createdAt: output.createdAt !== undefined && output.createdAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))
: undefined,
ecrRepositoryPrefix: smithy_client_1.expectString(output.ecrRepositoryPrefix),
registryId: smithy_client_1.expectString(output.registryId),
upstreamRegistryUrl: smithy_client_1.expectString(output.upstreamRegistryUrl),
};
};
const deserializeAws_json1_1DeleteRegistryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
};
};
const deserializeAws_json1_1DeleteRepositoryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1DeleteRepositoryResponse = (output, context) => {
return {
repository: output.repository !== undefined && output.repository !== null
? deserializeAws_json1_1Repository(output.repository, context)
: undefined,
};
};
const deserializeAws_json1_1DescribeImageReplicationStatusResponse = (output, context) => {
return {
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
replicationStatuses: output.replicationStatuses !== undefined && output.replicationStatuses !== null
? deserializeAws_json1_1ImageReplicationStatusList(output.replicationStatuses, context)
: undefined,
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1DescribeImageScanFindingsResponse = (output, context) => {
return {
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
imageScanFindings: output.imageScanFindings !== undefined && output.imageScanFindings !== null
? deserializeAws_json1_1ImageScanFindings(output.imageScanFindings, context)
: undefined,
imageScanStatus: output.imageScanStatus !== undefined && output.imageScanStatus !== null
? deserializeAws_json1_1ImageScanStatus(output.imageScanStatus, context)
: undefined,
nextToken: smithy_client_1.expectString(output.nextToken),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1DescribeImagesResponse = (output, context) => {
return {
imageDetails: output.imageDetails !== undefined && output.imageDetails !== null
? deserializeAws_json1_1ImageDetailList(output.imageDetails, context)
: undefined,
nextToken: smithy_client_1.expectString(output.nextToken),
};
};
const deserializeAws_json1_1DescribePullThroughCacheRulesResponse = (output, context) => {
return {
nextToken: smithy_client_1.expectString(output.nextToken),
pullThroughCacheRules: output.pullThroughCacheRules !== undefined && output.pullThroughCacheRules !== null
? deserializeAws_json1_1PullThroughCacheRuleList(output.pullThroughCacheRules, context)
: undefined,
};
};
const deserializeAws_json1_1DescribeRegistryResponse = (output, context) => {
return {
registryId: smithy_client_1.expectString(output.registryId),
replicationConfiguration: output.replicationConfiguration !== undefined && output.replicationConfiguration !== null
? deserializeAws_json1_1ReplicationConfiguration(output.replicationConfiguration, context)
: undefined,
};
};
const deserializeAws_json1_1DescribeRepositoriesResponse = (output, context) => {
return {
nextToken: smithy_client_1.expectString(output.nextToken),
repositories: output.repositories !== undefined && output.repositories !== null
? deserializeAws_json1_1RepositoryList(output.repositories, context)
: undefined,
};
};
const deserializeAws_json1_1EmptyUploadException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1EncryptionConfiguration = (output, context) => {
return {
encryptionType: smithy_client_1.expectString(output.encryptionType),
kmsKey: smithy_client_1.expectString(output.kmsKey),
};
};
const deserializeAws_json1_1EnhancedImageScanFinding = (output, context) => {
return {
awsAccountId: smithy_client_1.expectString(output.awsAccountId),
description: smithy_client_1.expectString(output.description),
findingArn: smithy_client_1.expectString(output.findingArn),
firstObservedAt: output.firstObservedAt !== undefined && output.firstObservedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.firstObservedAt)))
: undefined,
lastObservedAt: output.lastObservedAt !== undefined && output.lastObservedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastObservedAt)))
: undefined,
packageVulnerabilityDetails: output.packageVulnerabilityDetails !== undefined && output.packageVulnerabilityDetails !== null
? deserializeAws_json1_1PackageVulnerabilityDetails(output.packageVulnerabilityDetails, context)
: undefined,
remediation: output.remediation !== undefined && output.remediation !== null
? deserializeAws_json1_1Remediation(output.remediation, context)
: undefined,
resources: output.resources !== undefined && output.resources !== null
? deserializeAws_json1_1ResourceList(output.resources, context)
: undefined,
score: smithy_client_1.limitedParseDouble(output.score),
scoreDetails: output.scoreDetails !== undefined && output.scoreDetails !== null
? deserializeAws_json1_1ScoreDetails(output.scoreDetails, context)
: undefined,
severity: smithy_client_1.expectString(output.severity),
status: smithy_client_1.expectString(output.status),
title: smithy_client_1.expectString(output.title),
type: smithy_client_1.expectString(output.type),
updatedAt: output.updatedAt !== undefined && output.updatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.updatedAt)))
: undefined,
};
};
const deserializeAws_json1_1EnhancedImageScanFindingList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1EnhancedImageScanFinding(entry, context);
});
};
const deserializeAws_json1_1FindingSeverityCounts = (output, context) => {
return Object.entries(output).reduce((acc, [key, value]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: smithy_client_1.expectInt32(value),
};
}, {});
};
const deserializeAws_json1_1GetAuthorizationTokenResponse = (output, context) => {
return {
authorizationData: output.authorizationData !== undefined && output.authorizationData !== null
? deserializeAws_json1_1AuthorizationDataList(output.authorizationData, context)
: undefined,
};
};
const deserializeAws_json1_1GetDownloadUrlForLayerResponse = (output, context) => {
return {
downloadUrl: smithy_client_1.expectString(output.downloadUrl),
layerDigest: smithy_client_1.expectString(output.layerDigest),
};
};
const deserializeAws_json1_1GetLifecyclePolicyPreviewResponse = (output, context) => {
return {
lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText),
nextToken: smithy_client_1.expectString(output.nextToken),
previewResults: output.previewResults !== undefined && output.previewResults !== null
? deserializeAws_json1_1LifecyclePolicyPreviewResultList(output.previewResults, context)
: undefined,
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
status: smithy_client_1.expectString(output.status),
summary: output.summary !== undefined && output.summary !== null
? deserializeAws_json1_1LifecyclePolicyPreviewSummary(output.summary, context)
: undefined,
};
};
const deserializeAws_json1_1GetLifecyclePolicyResponse = (output, context) => {
return {
lastEvaluatedAt: output.lastEvaluatedAt !== undefined && output.lastEvaluatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastEvaluatedAt)))
: undefined,
lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1GetRegistryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
};
};
const deserializeAws_json1_1GetRegistryScanningConfigurationResponse = (output, context) => {
return {
registryId: smithy_client_1.expectString(output.registryId),
scanningConfiguration: output.scanningConfiguration !== undefined && output.scanningConfiguration !== null
? deserializeAws_json1_1RegistryScanningConfiguration(output.scanningConfiguration, context)
: undefined,
};
};
const deserializeAws_json1_1GetRepositoryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1Image = (output, context) => {
return {
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
imageManifest: smithy_client_1.expectString(output.imageManifest),
imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1ImageAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageDetail = (output, context) => {
return {
artifactMediaType: smithy_client_1.expectString(output.artifactMediaType),
imageDigest: smithy_client_1.expectString(output.imageDigest),
imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType),
imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt)))
: undefined,
imageScanFindingsSummary: output.imageScanFindingsSummary !== undefined && output.imageScanFindingsSummary !== null
? deserializeAws_json1_1ImageScanFindingsSummary(output.imageScanFindingsSummary, context)
: undefined,
imageScanStatus: output.imageScanStatus !== undefined && output.imageScanStatus !== null
? deserializeAws_json1_1ImageScanStatus(output.imageScanStatus, context)
: undefined,
imageSizeInBytes: smithy_client_1.expectLong(output.imageSizeInBytes),
imageTags: output.imageTags !== undefined && output.imageTags !== null
? deserializeAws_json1_1ImageTagList(output.imageTags, context)
: undefined,
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1ImageDetailList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageDetail(entry, context);
});
};
const deserializeAws_json1_1ImageDigestDoesNotMatchException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageFailure = (output, context) => {
return {
failureCode: smithy_client_1.expectString(output.failureCode),
failureReason: smithy_client_1.expectString(output.failureReason),
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
};
};
const deserializeAws_json1_1ImageFailureList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageFailure(entry, context);
});
};
const deserializeAws_json1_1ImageIdentifier = (output, context) => {
return {
imageDigest: smithy_client_1.expectString(output.imageDigest),
imageTag: smithy_client_1.expectString(output.imageTag),
};
};
const deserializeAws_json1_1ImageIdentifierList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageIdentifier(entry, context);
});
};
const deserializeAws_json1_1ImageList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Image(entry, context);
});
};
const deserializeAws_json1_1ImageNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageReplicationStatus = (output, context) => {
return {
failureCode: smithy_client_1.expectString(output.failureCode),
region: smithy_client_1.expectString(output.region),
registryId: smithy_client_1.expectString(output.registryId),
status: smithy_client_1.expectString(output.status),
};
};
const deserializeAws_json1_1ImageReplicationStatusList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageReplicationStatus(entry, context);
});
};
const deserializeAws_json1_1ImageScanFinding = (output, context) => {
return {
attributes: output.attributes !== undefined && output.attributes !== null
? deserializeAws_json1_1AttributeList(output.attributes, context)
: undefined,
description: smithy_client_1.expectString(output.description),
name: smithy_client_1.expectString(output.name),
severity: smithy_client_1.expectString(output.severity),
uri: smithy_client_1.expectString(output.uri),
};
};
const deserializeAws_json1_1ImageScanFindingList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ImageScanFinding(entry, context);
});
};
const deserializeAws_json1_1ImageScanFindings = (output, context) => {
return {
enhancedFindings: output.enhancedFindings !== undefined && output.enhancedFindings !== null
? deserializeAws_json1_1EnhancedImageScanFindingList(output.enhancedFindings, context)
: undefined,
findingSeverityCounts: output.findingSeverityCounts !== undefined && output.findingSeverityCounts !== null
? deserializeAws_json1_1FindingSeverityCounts(output.findingSeverityCounts, context)
: undefined,
findings: output.findings !== undefined && output.findings !== null
? deserializeAws_json1_1ImageScanFindingList(output.findings, context)
: undefined,
imageScanCompletedAt: output.imageScanCompletedAt !== undefined && output.imageScanCompletedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imageScanCompletedAt)))
: undefined,
vulnerabilitySourceUpdatedAt: output.vulnerabilitySourceUpdatedAt !== undefined && output.vulnerabilitySourceUpdatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vulnerabilitySourceUpdatedAt)))
: undefined,
};
};
const deserializeAws_json1_1ImageScanFindingsSummary = (output, context) => {
return {
findingSeverityCounts: output.findingSeverityCounts !== undefined && output.findingSeverityCounts !== null
? deserializeAws_json1_1FindingSeverityCounts(output.findingSeverityCounts, context)
: undefined,
imageScanCompletedAt: output.imageScanCompletedAt !== undefined && output.imageScanCompletedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imageScanCompletedAt)))
: undefined,
vulnerabilitySourceUpdatedAt: output.vulnerabilitySourceUpdatedAt !== undefined && output.vulnerabilitySourceUpdatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vulnerabilitySourceUpdatedAt)))
: undefined,
};
};
const deserializeAws_json1_1ImageScanningConfiguration = (output, context) => {
return {
scanOnPush: smithy_client_1.expectBoolean(output.scanOnPush),
};
};
const deserializeAws_json1_1ImageScanStatus = (output, context) => {
return {
description: smithy_client_1.expectString(output.description),
status: smithy_client_1.expectString(output.status),
};
};
const deserializeAws_json1_1ImageTagAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ImageTagList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1ImageTagsList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1InitiateLayerUploadResponse = (output, context) => {
return {
partSize: smithy_client_1.expectLong(output.partSize),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1InvalidLayerException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1InvalidLayerPartException = (output, context) => {
return {
lastValidByteReceived: smithy_client_1.expectLong(output.lastValidByteReceived),
message: smithy_client_1.expectString(output.message),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1InvalidParameterException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1InvalidTagParameterException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1KmsException = (output, context) => {
return {
kmsError: smithy_client_1.expectString(output.kmsError),
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1Layer = (output, context) => {
return {
layerAvailability: smithy_client_1.expectString(output.layerAvailability),
layerDigest: smithy_client_1.expectString(output.layerDigest),
layerSize: smithy_client_1.expectLong(output.layerSize),
mediaType: smithy_client_1.expectString(output.mediaType),
};
};
const deserializeAws_json1_1LayerAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LayerFailure = (output, context) => {
return {
failureCode: smithy_client_1.expectString(output.failureCode),
failureReason: smithy_client_1.expectString(output.failureReason),
layerDigest: smithy_client_1.expectString(output.layerDigest),
};
};
const deserializeAws_json1_1LayerFailureList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1LayerFailure(entry, context);
});
};
const deserializeAws_json1_1LayerInaccessibleException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LayerList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Layer(entry, context);
});
};
const deserializeAws_json1_1LayerPartTooSmallException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LayersNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LifecyclePolicyNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LifecyclePolicyPreviewInProgressException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LifecyclePolicyPreviewNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1LifecyclePolicyPreviewResult = (output, context) => {
return {
action: output.action !== undefined && output.action !== null
? deserializeAws_json1_1LifecyclePolicyRuleAction(output.action, context)
: undefined,
appliedRulePriority: smithy_client_1.expectInt32(output.appliedRulePriority),
imageDigest: smithy_client_1.expectString(output.imageDigest),
imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt)))
: undefined,
imageTags: output.imageTags !== undefined && output.imageTags !== null
? deserializeAws_json1_1ImageTagList(output.imageTags, context)
: undefined,
};
};
const deserializeAws_json1_1LifecyclePolicyPreviewResultList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1LifecyclePolicyPreviewResult(entry, context);
});
};
const deserializeAws_json1_1LifecyclePolicyPreviewSummary = (output, context) => {
return {
expiringImageTotalCount: smithy_client_1.expectInt32(output.expiringImageTotalCount),
};
};
const deserializeAws_json1_1LifecyclePolicyRuleAction = (output, context) => {
return {
type: smithy_client_1.expectString(output.type),
};
};
const deserializeAws_json1_1LimitExceededException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ListImagesResponse = (output, context) => {
return {
imageIds: output.imageIds !== undefined && output.imageIds !== null
? deserializeAws_json1_1ImageIdentifierList(output.imageIds, context)
: undefined,
nextToken: smithy_client_1.expectString(output.nextToken),
};
};
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
return {
tags: output.tags !== undefined && output.tags !== null
? deserializeAws_json1_1TagList(output.tags, context)
: undefined,
};
};
const deserializeAws_json1_1PackageVulnerabilityDetails = (output, context) => {
return {
cvss: output.cvss !== undefined && output.cvss !== null
? deserializeAws_json1_1CvssScoreList(output.cvss, context)
: undefined,
referenceUrls: output.referenceUrls !== undefined && output.referenceUrls !== null
? deserializeAws_json1_1ReferenceUrlsList(output.referenceUrls, context)
: undefined,
relatedVulnerabilities: output.relatedVulnerabilities !== undefined && output.relatedVulnerabilities !== null
? deserializeAws_json1_1RelatedVulnerabilitiesList(output.relatedVulnerabilities, context)
: undefined,
source: smithy_client_1.expectString(output.source),
sourceUrl: smithy_client_1.expectString(output.sourceUrl),
vendorCreatedAt: output.vendorCreatedAt !== undefined && output.vendorCreatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vendorCreatedAt)))
: undefined,
vendorSeverity: smithy_client_1.expectString(output.vendorSeverity),
vendorUpdatedAt: output.vendorUpdatedAt !== undefined && output.vendorUpdatedAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vendorUpdatedAt)))
: undefined,
vulnerabilityId: smithy_client_1.expectString(output.vulnerabilityId),
vulnerablePackages: output.vulnerablePackages !== undefined && output.vulnerablePackages !== null
? deserializeAws_json1_1VulnerablePackagesList(output.vulnerablePackages, context)
: undefined,
};
};
const deserializeAws_json1_1PullThroughCacheRule = (output, context) => {
return {
createdAt: output.createdAt !== undefined && output.createdAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))
: undefined,
ecrRepositoryPrefix: smithy_client_1.expectString(output.ecrRepositoryPrefix),
registryId: smithy_client_1.expectString(output.registryId),
upstreamRegistryUrl: smithy_client_1.expectString(output.upstreamRegistryUrl),
};
};
const deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1PullThroughCacheRuleList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1PullThroughCacheRule(entry, context);
});
};
const deserializeAws_json1_1PullThroughCacheRuleNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1PutImageResponse = (output, context) => {
return {
image: output.image !== undefined && output.image !== null
? deserializeAws_json1_1Image(output.image, context)
: undefined,
};
};
const deserializeAws_json1_1PutImageScanningConfigurationResponse = (output, context) => {
return {
imageScanningConfiguration: output.imageScanningConfiguration !== undefined && output.imageScanningConfiguration !== null
? deserializeAws_json1_1ImageScanningConfiguration(output.imageScanningConfiguration, context)
: undefined,
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1PutImageTagMutabilityResponse = (output, context) => {
return {
imageTagMutability: smithy_client_1.expectString(output.imageTagMutability),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1PutLifecyclePolicyResponse = (output, context) => {
return {
lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1PutRegistryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
};
};
const deserializeAws_json1_1PutRegistryScanningConfigurationResponse = (output, context) => {
return {
registryScanningConfiguration: output.registryScanningConfiguration !== undefined && output.registryScanningConfiguration !== null
? deserializeAws_json1_1RegistryScanningConfiguration(output.registryScanningConfiguration, context)
: undefined,
};
};
const deserializeAws_json1_1PutReplicationConfigurationResponse = (output, context) => {
return {
replicationConfiguration: output.replicationConfiguration !== undefined && output.replicationConfiguration !== null
? deserializeAws_json1_1ReplicationConfiguration(output.replicationConfiguration, context)
: undefined,
};
};
const deserializeAws_json1_1Recommendation = (output, context) => {
return {
text: smithy_client_1.expectString(output.text),
url: smithy_client_1.expectString(output.url),
};
};
const deserializeAws_json1_1ReferencedImagesNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ReferenceUrlsList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1RegistryPolicyNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RegistryScanningConfiguration = (output, context) => {
return {
rules: output.rules !== undefined && output.rules !== null
? deserializeAws_json1_1RegistryScanningRuleList(output.rules, context)
: undefined,
scanType: smithy_client_1.expectString(output.scanType),
};
};
const deserializeAws_json1_1RegistryScanningRule = (output, context) => {
return {
repositoryFilters: output.repositoryFilters !== undefined && output.repositoryFilters !== null
? deserializeAws_json1_1ScanningRepositoryFilterList(output.repositoryFilters, context)
: undefined,
scanFrequency: smithy_client_1.expectString(output.scanFrequency),
};
};
const deserializeAws_json1_1RegistryScanningRuleList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1RegistryScanningRule(entry, context);
});
};
const deserializeAws_json1_1RelatedVulnerabilitiesList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return smithy_client_1.expectString(entry);
});
};
const deserializeAws_json1_1Remediation = (output, context) => {
return {
recommendation: output.recommendation !== undefined && output.recommendation !== null
? deserializeAws_json1_1Recommendation(output.recommendation, context)
: undefined,
};
};
const deserializeAws_json1_1ReplicationConfiguration = (output, context) => {
return {
rules: output.rules !== undefined && output.rules !== null
? deserializeAws_json1_1ReplicationRuleList(output.rules, context)
: undefined,
};
};
const deserializeAws_json1_1ReplicationDestination = (output, context) => {
return {
region: smithy_client_1.expectString(output.region),
registryId: smithy_client_1.expectString(output.registryId),
};
};
const deserializeAws_json1_1ReplicationDestinationList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ReplicationDestination(entry, context);
});
};
const deserializeAws_json1_1ReplicationRule = (output, context) => {
return {
destinations: output.destinations !== undefined && output.destinations !== null
? deserializeAws_json1_1ReplicationDestinationList(output.destinations, context)
: undefined,
repositoryFilters: output.repositoryFilters !== undefined && output.repositoryFilters !== null
? deserializeAws_json1_1RepositoryFilterList(output.repositoryFilters, context)
: undefined,
};
};
const deserializeAws_json1_1ReplicationRuleList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ReplicationRule(entry, context);
});
};
const deserializeAws_json1_1Repository = (output, context) => {
return {
createdAt: output.createdAt !== undefined && output.createdAt !== null
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt)))
: undefined,
encryptionConfiguration: output.encryptionConfiguration !== undefined && output.encryptionConfiguration !== null
? deserializeAws_json1_1EncryptionConfiguration(output.encryptionConfiguration, context)
: undefined,
imageScanningConfiguration: output.imageScanningConfiguration !== undefined && output.imageScanningConfiguration !== null
? deserializeAws_json1_1ImageScanningConfiguration(output.imageScanningConfiguration, context)
: undefined,
imageTagMutability: smithy_client_1.expectString(output.imageTagMutability),
registryId: smithy_client_1.expectString(output.registryId),
repositoryArn: smithy_client_1.expectString(output.repositoryArn),
repositoryName: smithy_client_1.expectString(output.repositoryName),
repositoryUri: smithy_client_1.expectString(output.repositoryUri),
};
};
const deserializeAws_json1_1RepositoryAlreadyExistsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryFilter = (output, context) => {
return {
filter: smithy_client_1.expectString(output.filter),
filterType: smithy_client_1.expectString(output.filterType),
};
};
const deserializeAws_json1_1RepositoryFilterList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1RepositoryFilter(entry, context);
});
};
const deserializeAws_json1_1RepositoryList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Repository(entry, context);
});
};
const deserializeAws_json1_1RepositoryNotEmptyException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryPolicyNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1RepositoryScanningConfiguration = (output, context) => {
return {
appliedScanFilters: output.appliedScanFilters !== undefined && output.appliedScanFilters !== null
? deserializeAws_json1_1ScanningRepositoryFilterList(output.appliedScanFilters, context)
: undefined,
repositoryArn: smithy_client_1.expectString(output.repositoryArn),
repositoryName: smithy_client_1.expectString(output.repositoryName),
scanFrequency: smithy_client_1.expectString(output.scanFrequency),
scanOnPush: smithy_client_1.expectBoolean(output.scanOnPush),
};
};
const deserializeAws_json1_1RepositoryScanningConfigurationFailure = (output, context) => {
return {
failureCode: smithy_client_1.expectString(output.failureCode),
failureReason: smithy_client_1.expectString(output.failureReason),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1RepositoryScanningConfigurationFailureList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1RepositoryScanningConfigurationFailure(entry, context);
});
};
const deserializeAws_json1_1RepositoryScanningConfigurationList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1RepositoryScanningConfiguration(entry, context);
});
};
const deserializeAws_json1_1Resource = (output, context) => {
return {
details: output.details !== undefined && output.details !== null
? deserializeAws_json1_1ResourceDetails(output.details, context)
: undefined,
id: smithy_client_1.expectString(output.id),
tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,
type: smithy_client_1.expectString(output.type),
};
};
const deserializeAws_json1_1ResourceDetails = (output, context) => {
return {
awsEcrContainerImage: output.awsEcrContainerImage !== undefined && output.awsEcrContainerImage !== null
? deserializeAws_json1_1AwsEcrContainerImageDetails(output.awsEcrContainerImage, context)
: undefined,
};
};
const deserializeAws_json1_1ResourceList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Resource(entry, context);
});
};
const deserializeAws_json1_1ScanningRepositoryFilter = (output, context) => {
return {
filter: smithy_client_1.expectString(output.filter),
filterType: smithy_client_1.expectString(output.filterType),
};
};
const deserializeAws_json1_1ScanningRepositoryFilterList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1ScanningRepositoryFilter(entry, context);
});
};
const deserializeAws_json1_1ScanNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ScoreDetails = (output, context) => {
return {
cvss: output.cvss !== undefined && output.cvss !== null
? deserializeAws_json1_1CvssScoreDetails(output.cvss, context)
: undefined,
};
};
const deserializeAws_json1_1ServerException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1SetRepositoryPolicyResponse = (output, context) => {
return {
policyText: smithy_client_1.expectString(output.policyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1StartImageScanResponse = (output, context) => {
return {
imageId: output.imageId !== undefined && output.imageId !== null
? deserializeAws_json1_1ImageIdentifier(output.imageId, context)
: undefined,
imageScanStatus: output.imageScanStatus !== undefined && output.imageScanStatus !== null
? deserializeAws_json1_1ImageScanStatus(output.imageScanStatus, context)
: undefined,
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
};
};
const deserializeAws_json1_1StartLifecyclePolicyPreviewResponse = (output, context) => {
return {
lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
status: smithy_client_1.expectString(output.status),
};
};
const deserializeAws_json1_1Tag = (output, context) => {
return {
Key: smithy_client_1.expectString(output.Key),
Value: smithy_client_1.expectString(output.Value),
};
};
const deserializeAws_json1_1TagList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1Tag(entry, context);
});
};
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
return {};
};
const deserializeAws_json1_1Tags = (output, context) => {
return Object.entries(output).reduce((acc, [key, value]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: smithy_client_1.expectString(value),
};
}, {});
};
const deserializeAws_json1_1TooManyTagsException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1UnsupportedImageTypeException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1UnsupportedUpstreamRegistryException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
return {};
};
const deserializeAws_json1_1UploadLayerPartResponse = (output, context) => {
return {
lastByteReceived: smithy_client_1.expectLong(output.lastByteReceived),
registryId: smithy_client_1.expectString(output.registryId),
repositoryName: smithy_client_1.expectString(output.repositoryName),
uploadId: smithy_client_1.expectString(output.uploadId),
};
};
const deserializeAws_json1_1UploadNotFoundException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1ValidationException = (output, context) => {
return {
message: smithy_client_1.expectString(output.message),
};
};
const deserializeAws_json1_1VulnerablePackage = (output, context) => {
return {
arch: smithy_client_1.expectString(output.arch),
epoch: smithy_client_1.expectInt32(output.epoch),
filePath: smithy_client_1.expectString(output.filePath),
name: smithy_client_1.expectString(output.name),
packageManager: smithy_client_1.expectString(output.packageManager),
release: smithy_client_1.expectString(output.release),
sourceLayerHash: smithy_client_1.expectString(output.sourceLayerHash),
version: smithy_client_1.expectString(output.version),
};
};
const deserializeAws_json1_1VulnerablePackagesList = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_json1_1VulnerablePackage(entry, context);
});
};
const deserializeMetadata = (output) => {
var _a;
return ({
httpStatusCode: output.statusCode,
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
};
const collectBody = (streamBody = new Uint8Array(), context) => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
};
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
}
if (body !== undefined) {
contents.body = body;
}
return new protocol_http_1.HttpRequest(contents);
};
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
return JSON.parse(encoded);
}
return {};
});
const loadRestJsonErrorCode = (output, data) => {
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
const sanitizeErrorCode = (rawValue) => {
let cleanValue = rawValue;
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
};
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== undefined) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== undefined) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== undefined) {
return sanitizeErrorCode(data["__type"]);
}
return "";
};
/***/ }),
/***/ 869:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(16879));
const client_sts_1 = __nccwpck_require__(52209);
const config_resolver_1 = __nccwpck_require__(56153);
const credential_provider_node_1 = __nccwpck_require__(75531);
const hash_node_1 = __nccwpck_require__(97442);
const middleware_retry_1 = __nccwpck_require__(96064);
const node_config_provider_1 = __nccwpck_require__(87684);
const node_http_handler_1 = __nccwpck_require__(68805);
const util_base64_node_1 = __nccwpck_require__(18588);
const util_body_length_node_1 = __nccwpck_require__(74147);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const util_utf8_node_1 = __nccwpck_require__(66278);
const runtimeConfig_shared_1 = __nccwpck_require__(70542);
const smithy_client_1 = __nccwpck_require__(4963);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "node",
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : client_sts_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 70542:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const url_parser_1 = __nccwpck_require__(2992);
const endpoints_1 = __nccwpck_require__(63070);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e;
return ({
apiVersion: "2015-09-21",
disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,
serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "ECR",
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
});
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 28406:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(78547), exports);
tslib_1.__exportStar(__nccwpck_require__(45723), exports);
/***/ }),
/***/ 78547:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.waitUntilImageScanComplete = exports.waitForImageScanComplete = void 0;
const util_waiter_1 = __nccwpck_require__(21627);
const DescribeImageScanFindingsCommand_1 = __nccwpck_require__(72987);
const checkState = async (client, input) => {
let reason;
try {
const result = await client.send(new DescribeImageScanFindingsCommand_1.DescribeImageScanFindingsCommand(input));
reason = result;
try {
const returnComparator = () => {
return result.imageScanStatus.status;
};
if (returnComparator() === "COMPLETE") {
return { state: util_waiter_1.WaiterState.SUCCESS, reason };
}
}
catch (e) { }
try {
const returnComparator = () => {
return result.imageScanStatus.status;
};
if (returnComparator() === "FAILED") {
return { state: util_waiter_1.WaiterState.FAILURE, reason };
}
}
catch (e) { }
}
catch (exception) {
reason = exception;
}
return { state: util_waiter_1.WaiterState.RETRY, reason };
};
const waitForImageScanComplete = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
exports.waitForImageScanComplete = waitForImageScanComplete;
const waitUntilImageScanComplete = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return util_waiter_1.checkExceptions(result);
};
exports.waitUntilImageScanComplete = waitUntilImageScanComplete;
/***/ }),
/***/ 45723:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.waitUntilLifecyclePolicyPreviewComplete = exports.waitForLifecyclePolicyPreviewComplete = void 0;
const util_waiter_1 = __nccwpck_require__(21627);
const GetLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(17006);
const checkState = async (client, input) => {
let reason;
try {
const result = await client.send(new GetLifecyclePolicyPreviewCommand_1.GetLifecyclePolicyPreviewCommand(input));
reason = result;
try {
const returnComparator = () => {
return result.status;
};
if (returnComparator() === "COMPLETE") {
return { state: util_waiter_1.WaiterState.SUCCESS, reason };
}
}
catch (e) { }
try {
const returnComparator = () => {
return result.status;
};
if (returnComparator() === "FAILED") {
return { state: util_waiter_1.WaiterState.FAILURE, reason };
}
}
catch (e) { }
}
catch (exception) {
reason = exception;
}
return { state: util_waiter_1.WaiterState.RETRY, reason };
};
const waitForLifecyclePolicyPreviewComplete = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
exports.waitForLifecyclePolicyPreviewComplete = waitForLifecyclePolicyPreviewComplete;
const waitUntilLifecyclePolicyPreviewComplete = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return util_waiter_1.checkExceptions(result);
};
exports.waitUntilLifecyclePolicyPreviewComplete = waitUntilLifecyclePolicyPreviewComplete;
/***/ }),
/***/ 69838:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SSO = void 0;
const GetRoleCredentialsCommand_1 = __nccwpck_require__(18972);
const ListAccountRolesCommand_1 = __nccwpck_require__(1513);
const ListAccountsCommand_1 = __nccwpck_require__(64296);
const LogoutCommand_1 = __nccwpck_require__(12586);
const SSOClient_1 = __nccwpck_require__(71057);
class SSO extends SSOClient_1.SSOClient {
getRoleCredentials(args, optionsOrCb, cb) {
const command = new GetRoleCredentialsCommand_1.GetRoleCredentialsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listAccountRoles(args, optionsOrCb, cb) {
const command = new ListAccountRolesCommand_1.ListAccountRolesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
listAccounts(args, optionsOrCb, cb) {
const command = new ListAccountsCommand_1.ListAccountsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
logout(args, optionsOrCb, cb) {
const command = new LogoutCommand_1.LogoutCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
}
exports.SSO = SSO;
/***/ }),
/***/ 71057:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SSOClient = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const middleware_content_length_1 = __nccwpck_require__(42245);
const middleware_host_header_1 = __nccwpck_require__(22545);
const middleware_logger_1 = __nccwpck_require__(20014);
const middleware_retry_1 = __nccwpck_require__(96064);
const middleware_user_agent_1 = __nccwpck_require__(64688);
const smithy_client_1 = __nccwpck_require__(4963);
const runtimeConfig_1 = __nccwpck_require__(19756);
class SSOClient extends smithy_client_1.Client {
constructor(configuration) {
const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
const _config_1 = config_resolver_1.resolveRegionConfig(_config_0);
const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);
const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);
const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);
const _config_5 = middleware_user_agent_1.resolveUserAgentConfig(_config_4);
super(_config_5);
this.config = _config_5;
this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));
this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));
this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));
this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));
this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
}
destroy() {
super.destroy();
}
}
exports.SSOClient = SSOClient;
/***/ }),
/***/ 18972:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetRoleCredentialsCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(66390);
const Aws_restJson1_1 = __nccwpck_require__(98507);
class GetRoleCredentialsCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "SSOClient";
const commandName = "GetRoleCredentialsCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_restJson1_1.serializeAws_restJson1GetRoleCredentialsCommand(input, context);
}
deserialize(output, context) {
return Aws_restJson1_1.deserializeAws_restJson1GetRoleCredentialsCommand(output, context);
}
}
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
/***/ }),
/***/ 1513:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ListAccountRolesCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(66390);
const Aws_restJson1_1 = __nccwpck_require__(98507);
class ListAccountRolesCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "SSOClient";
const commandName = "ListAccountRolesCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.ListAccountRolesRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.ListAccountRolesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_restJson1_1.serializeAws_restJson1ListAccountRolesCommand(input, context);
}
deserialize(output, context) {
return Aws_restJson1_1.deserializeAws_restJson1ListAccountRolesCommand(output, context);
}
}
exports.ListAccountRolesCommand = ListAccountRolesCommand;
/***/ }),
/***/ 64296:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ListAccountsCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(66390);
const Aws_restJson1_1 = __nccwpck_require__(98507);
class ListAccountsCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "SSOClient";
const commandName = "ListAccountsCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.ListAccountsRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.ListAccountsResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_restJson1_1.serializeAws_restJson1ListAccountsCommand(input, context);
}
deserialize(output, context) {
return Aws_restJson1_1.deserializeAws_restJson1ListAccountsCommand(output, context);
}
}
exports.ListAccountsCommand = ListAccountsCommand;
/***/ }),
/***/ 12586:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LogoutCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(66390);
const Aws_restJson1_1 = __nccwpck_require__(98507);
class LogoutCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "SSOClient";
const commandName = "LogoutCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.LogoutRequest.filterSensitiveLog,
outputFilterSensitiveLog: (output) => output,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_restJson1_1.serializeAws_restJson1LogoutCommand(input, context);
}
deserialize(output, context) {
return Aws_restJson1_1.deserializeAws_restJson1LogoutCommand(output, context);
}
}
exports.LogoutCommand = LogoutCommand;
/***/ }),
/***/ 65706:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(18972), exports);
tslib_1.__exportStar(__nccwpck_require__(1513), exports);
tslib_1.__exportStar(__nccwpck_require__(64296), exports);
tslib_1.__exportStar(__nccwpck_require__(12586), exports);
/***/ }),
/***/ 33546:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultRegionInfoProvider = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const regionHash = {
"ap-northeast-1": {
variants: [
{
hostname: "portal.sso.ap-northeast-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-northeast-1",
},
"ap-northeast-2": {
variants: [
{
hostname: "portal.sso.ap-northeast-2.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-northeast-2",
},
"ap-south-1": {
variants: [
{
hostname: "portal.sso.ap-south-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-south-1",
},
"ap-southeast-1": {
variants: [
{
hostname: "portal.sso.ap-southeast-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-southeast-1",
},
"ap-southeast-2": {
variants: [
{
hostname: "portal.sso.ap-southeast-2.amazonaws.com",
tags: [],
},
],
signingRegion: "ap-southeast-2",
},
"ca-central-1": {
variants: [
{
hostname: "portal.sso.ca-central-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ca-central-1",
},
"eu-central-1": {
variants: [
{
hostname: "portal.sso.eu-central-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-central-1",
},
"eu-north-1": {
variants: [
{
hostname: "portal.sso.eu-north-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-north-1",
},
"eu-west-1": {
variants: [
{
hostname: "portal.sso.eu-west-1.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-west-1",
},
"eu-west-2": {
variants: [
{
hostname: "portal.sso.eu-west-2.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-west-2",
},
"eu-west-3": {
variants: [
{
hostname: "portal.sso.eu-west-3.amazonaws.com",
tags: [],
},
],
signingRegion: "eu-west-3",
},
"sa-east-1": {
variants: [
{
hostname: "portal.sso.sa-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "sa-east-1",
},
"us-east-1": {
variants: [
{
hostname: "portal.sso.us-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-east-1",
},
"us-east-2": {
variants: [
{
hostname: "portal.sso.us-east-2.amazonaws.com",
tags: [],
},
],
signingRegion: "us-east-2",
},
"us-gov-west-1": {
variants: [
{
hostname: "portal.sso.us-gov-west-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-gov-west-1",
},
"us-west-2": {
variants: [
{
hostname: "portal.sso.us-west-2.amazonaws.com",
tags: [],
},
],
signingRegion: "us-west-2",
},
};
const partitionHash = {
aws: {
regions: [
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ca-central-1",
"eu-central-1",
"eu-north-1",
"eu-south-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"me-south-1",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
variants: [
{
hostname: "portal.sso.{region}.amazonaws.com",
tags: [],
},
{
hostname: "portal.sso-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "portal.sso-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "portal.sso.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
variants: [
{
hostname: "portal.sso.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "portal.sso-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "portal.sso-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "portal.sso.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
variants: [
{
hostname: "portal.sso.{region}.c2s.ic.gov",
tags: [],
},
{
hostname: "portal.sso-fips.{region}.c2s.ic.gov",
tags: ["fips"],
},
],
},
"aws-iso-b": {
regions: ["us-isob-east-1"],
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
variants: [
{
hostname: "portal.sso.{region}.sc2s.sgov.gov",
tags: [],
},
{
hostname: "portal.sso-fips.{region}.sc2s.sgov.gov",
tags: ["fips"],
},
],
},
"aws-us-gov": {
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
variants: [
{
hostname: "portal.sso.{region}.amazonaws.com",
tags: [],
},
{
hostname: "portal.sso-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "portal.sso-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "portal.sso.{region}.api.aws",
tags: ["dualstack"],
},
],
},
};
const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
...options,
signingService: "awsssoportal",
regionHash,
partitionHash,
});
exports.defaultRegionInfoProvider = defaultRegionInfoProvider;
/***/ }),
/***/ 82666:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(69838), exports);
tslib_1.__exportStar(__nccwpck_require__(71057), exports);
tslib_1.__exportStar(__nccwpck_require__(65706), exports);
tslib_1.__exportStar(__nccwpck_require__(14952), exports);
tslib_1.__exportStar(__nccwpck_require__(36773), exports);
/***/ }),
/***/ 14952:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(66390), exports);
/***/ }),
/***/ 66390:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LogoutRequest = exports.ListAccountsResponse = exports.ListAccountsRequest = exports.ListAccountRolesResponse = exports.RoleInfo = exports.ListAccountRolesRequest = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.GetRoleCredentialsResponse = exports.RoleCredentials = exports.GetRoleCredentialsRequest = exports.AccountInfo = void 0;
const smithy_client_1 = __nccwpck_require__(4963);
var AccountInfo;
(function (AccountInfo) {
AccountInfo.filterSensitiveLog = (obj) => ({
...obj,
});
})(AccountInfo = exports.AccountInfo || (exports.AccountInfo = {}));
var GetRoleCredentialsRequest;
(function (GetRoleCredentialsRequest) {
GetRoleCredentialsRequest.filterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
});
})(GetRoleCredentialsRequest = exports.GetRoleCredentialsRequest || (exports.GetRoleCredentialsRequest = {}));
var RoleCredentials;
(function (RoleCredentials) {
RoleCredentials.filterSensitiveLog = (obj) => ({
...obj,
...(obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }),
...(obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }),
});
})(RoleCredentials = exports.RoleCredentials || (exports.RoleCredentials = {}));
var GetRoleCredentialsResponse;
(function (GetRoleCredentialsResponse) {
GetRoleCredentialsResponse.filterSensitiveLog = (obj) => ({
...obj,
...(obj.roleCredentials && { roleCredentials: RoleCredentials.filterSensitiveLog(obj.roleCredentials) }),
});
})(GetRoleCredentialsResponse = exports.GetRoleCredentialsResponse || (exports.GetRoleCredentialsResponse = {}));
var InvalidRequestException;
(function (InvalidRequestException) {
InvalidRequestException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidRequestException = exports.InvalidRequestException || (exports.InvalidRequestException = {}));
var ResourceNotFoundException;
(function (ResourceNotFoundException) {
ResourceNotFoundException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));
var TooManyRequestsException;
(function (TooManyRequestsException) {
TooManyRequestsException.filterSensitiveLog = (obj) => ({
...obj,
});
})(TooManyRequestsException = exports.TooManyRequestsException || (exports.TooManyRequestsException = {}));
var UnauthorizedException;
(function (UnauthorizedException) {
UnauthorizedException.filterSensitiveLog = (obj) => ({
...obj,
});
})(UnauthorizedException = exports.UnauthorizedException || (exports.UnauthorizedException = {}));
var ListAccountRolesRequest;
(function (ListAccountRolesRequest) {
ListAccountRolesRequest.filterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
});
})(ListAccountRolesRequest = exports.ListAccountRolesRequest || (exports.ListAccountRolesRequest = {}));
var RoleInfo;
(function (RoleInfo) {
RoleInfo.filterSensitiveLog = (obj) => ({
...obj,
});
})(RoleInfo = exports.RoleInfo || (exports.RoleInfo = {}));
var ListAccountRolesResponse;
(function (ListAccountRolesResponse) {
ListAccountRolesResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListAccountRolesResponse = exports.ListAccountRolesResponse || (exports.ListAccountRolesResponse = {}));
var ListAccountsRequest;
(function (ListAccountsRequest) {
ListAccountsRequest.filterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
});
})(ListAccountsRequest = exports.ListAccountsRequest || (exports.ListAccountsRequest = {}));
var ListAccountsResponse;
(function (ListAccountsResponse) {
ListAccountsResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(ListAccountsResponse = exports.ListAccountsResponse || (exports.ListAccountsResponse = {}));
var LogoutRequest;
(function (LogoutRequest) {
LogoutRequest.filterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
});
})(LogoutRequest = exports.LogoutRequest || (exports.LogoutRequest = {}));
/***/ }),
/***/ 80849:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 88460:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateListAccountRoles = void 0;
const ListAccountRolesCommand_1 = __nccwpck_require__(1513);
const SSO_1 = __nccwpck_require__(69838);
const SSOClient_1 = __nccwpck_require__(71057);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new ListAccountRolesCommand_1.ListAccountRolesCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.listAccountRoles(input, ...args);
};
async function* paginateListAccountRoles(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof SSO_1.SSO) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof SSOClient_1.SSOClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected SSO | SSOClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateListAccountRoles = paginateListAccountRoles;
/***/ }),
/***/ 50938:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paginateListAccounts = void 0;
const ListAccountsCommand_1 = __nccwpck_require__(64296);
const SSO_1 = __nccwpck_require__(69838);
const SSOClient_1 = __nccwpck_require__(71057);
const makePagedClientRequest = async (client, input, ...args) => {
return await client.send(new ListAccountsCommand_1.ListAccountsCommand(input), ...args);
};
const makePagedRequest = async (client, input, ...args) => {
return await client.listAccounts(input, ...args);
};
async function* paginateListAccounts(config, input, ...additionalArguments) {
let token = config.startingToken || undefined;
let hasNext = true;
let page;
while (hasNext) {
input.nextToken = token;
input["maxResults"] = config.pageSize;
if (config.client instanceof SSO_1.SSO) {
page = await makePagedRequest(config.client, input, ...additionalArguments);
}
else if (config.client instanceof SSOClient_1.SSOClient) {
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
}
else {
throw new Error("Invalid client, expected SSO | SSOClient");
}
yield page;
token = page.nextToken;
hasNext = !!token;
}
return undefined;
}
exports.paginateListAccounts = paginateListAccounts;
/***/ }),
/***/ 36773:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(80849), exports);
tslib_1.__exportStar(__nccwpck_require__(88460), exports);
tslib_1.__exportStar(__nccwpck_require__(50938), exports);
/***/ }),
/***/ 98507:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deserializeAws_restJson1LogoutCommand = exports.deserializeAws_restJson1ListAccountsCommand = exports.deserializeAws_restJson1ListAccountRolesCommand = exports.deserializeAws_restJson1GetRoleCredentialsCommand = exports.serializeAws_restJson1LogoutCommand = exports.serializeAws_restJson1ListAccountsCommand = exports.serializeAws_restJson1ListAccountRolesCommand = exports.serializeAws_restJson1GetRoleCredentialsCommand = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const smithy_client_1 = __nccwpck_require__(4963);
const serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = {
...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }),
};
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials";
const query = {
...(input.roleName !== undefined && { role_name: input.roleName }),
...(input.accountId !== undefined && { account_id: input.accountId }),
};
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.serializeAws_restJson1GetRoleCredentialsCommand = serializeAws_restJson1GetRoleCredentialsCommand;
const serializeAws_restJson1ListAccountRolesCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = {
...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }),
};
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles";
const query = {
...(input.nextToken !== undefined && { next_token: input.nextToken }),
...(input.maxResults !== undefined && { max_result: input.maxResults.toString() }),
...(input.accountId !== undefined && { account_id: input.accountId }),
};
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.serializeAws_restJson1ListAccountRolesCommand = serializeAws_restJson1ListAccountRolesCommand;
const serializeAws_restJson1ListAccountsCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = {
...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }),
};
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts";
const query = {
...(input.nextToken !== undefined && { next_token: input.nextToken }),
...(input.maxResults !== undefined && { max_result: input.maxResults.toString() }),
};
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "GET",
headers,
path: resolvedPath,
query,
body,
});
};
exports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAccountsCommand;
const serializeAws_restJson1LogoutCommand = async (input, context) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const headers = {
...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }),
};
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/logout";
let body;
return new protocol_http_1.HttpRequest({
protocol,
hostname,
port,
method: "POST",
headers,
path: resolvedPath,
body,
});
};
exports.serializeAws_restJson1LogoutCommand = serializeAws_restJson1LogoutCommand;
const deserializeAws_restJson1GetRoleCredentialsCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return deserializeAws_restJson1GetRoleCredentialsCommandError(output, context);
}
const contents = {
$metadata: deserializeMetadata(output),
roleCredentials: undefined,
};
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
if (data.roleCredentials !== undefined && data.roleCredentials !== null) {
contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context);
}
return Promise.resolve(contents);
};
exports.deserializeAws_restJson1GetRoleCredentialsCommand = deserializeAws_restJson1GetRoleCredentialsCommand;
const deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
response = {
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ResourceNotFoundException":
case "com.amazonaws.sso#ResourceNotFoundException":
response = {
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
response = {
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
response = {
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_restJson1ListAccountRolesCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return deserializeAws_restJson1ListAccountRolesCommandError(output, context);
}
const contents = {
$metadata: deserializeMetadata(output),
nextToken: undefined,
roleList: undefined,
};
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
if (data.nextToken !== undefined && data.nextToken !== null) {
contents.nextToken = smithy_client_1.expectString(data.nextToken);
}
if (data.roleList !== undefined && data.roleList !== null) {
contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context);
}
return Promise.resolve(contents);
};
exports.deserializeAws_restJson1ListAccountRolesCommand = deserializeAws_restJson1ListAccountRolesCommand;
const deserializeAws_restJson1ListAccountRolesCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
response = {
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ResourceNotFoundException":
case "com.amazonaws.sso#ResourceNotFoundException":
response = {
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
response = {
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
response = {
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_restJson1ListAccountsCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return deserializeAws_restJson1ListAccountsCommandError(output, context);
}
const contents = {
$metadata: deserializeMetadata(output),
accountList: undefined,
nextToken: undefined,
};
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
if (data.accountList !== undefined && data.accountList !== null) {
contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context);
}
if (data.nextToken !== undefined && data.nextToken !== null) {
contents.nextToken = smithy_client_1.expectString(data.nextToken);
}
return Promise.resolve(contents);
};
exports.deserializeAws_restJson1ListAccountsCommand = deserializeAws_restJson1ListAccountsCommand;
const deserializeAws_restJson1ListAccountsCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
response = {
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "ResourceNotFoundException":
case "com.amazonaws.sso#ResourceNotFoundException":
response = {
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
response = {
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
response = {
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_restJson1LogoutCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return deserializeAws_restJson1LogoutCommandError(output, context);
}
const contents = {
$metadata: deserializeMetadata(output),
};
await collectBody(output.body, context);
return Promise.resolve(contents);
};
exports.deserializeAws_restJson1LogoutCommand = deserializeAws_restJson1LogoutCommand;
const deserializeAws_restJson1LogoutCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
response = {
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
response = {
...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
response = {
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.code || parsedBody.Code || errorCode;
response = {
...parsedBody,
name: `${errorCode}`,
message: parsedBody.message || parsedBody.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
const contents = {
name: "InvalidRequestException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
message: undefined,
};
const data = parsedOutput.body;
if (data.message !== undefined && data.message !== null) {
contents.message = smithy_client_1.expectString(data.message);
}
return contents;
};
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
const contents = {
name: "ResourceNotFoundException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
message: undefined,
};
const data = parsedOutput.body;
if (data.message !== undefined && data.message !== null) {
contents.message = smithy_client_1.expectString(data.message);
}
return contents;
};
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
const contents = {
name: "TooManyRequestsException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
message: undefined,
};
const data = parsedOutput.body;
if (data.message !== undefined && data.message !== null) {
contents.message = smithy_client_1.expectString(data.message);
}
return contents;
};
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
const contents = {
name: "UnauthorizedException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
message: undefined,
};
const data = parsedOutput.body;
if (data.message !== undefined && data.message !== null) {
contents.message = smithy_client_1.expectString(data.message);
}
return contents;
};
const deserializeAws_restJson1AccountInfo = (output, context) => {
return {
accountId: smithy_client_1.expectString(output.accountId),
accountName: smithy_client_1.expectString(output.accountName),
emailAddress: smithy_client_1.expectString(output.emailAddress),
};
};
const deserializeAws_restJson1AccountListType = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_restJson1AccountInfo(entry, context);
});
};
const deserializeAws_restJson1RoleCredentials = (output, context) => {
return {
accessKeyId: smithy_client_1.expectString(output.accessKeyId),
expiration: smithy_client_1.expectLong(output.expiration),
secretAccessKey: smithy_client_1.expectString(output.secretAccessKey),
sessionToken: smithy_client_1.expectString(output.sessionToken),
};
};
const deserializeAws_restJson1RoleInfo = (output, context) => {
return {
accountId: smithy_client_1.expectString(output.accountId),
roleName: smithy_client_1.expectString(output.roleName),
};
};
const deserializeAws_restJson1RoleListType = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_restJson1RoleInfo(entry, context);
});
};
const deserializeMetadata = (output) => {
var _a;
return ({
httpStatusCode: output.statusCode,
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
};
const collectBody = (streamBody = new Uint8Array(), context) => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
};
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
const isSerializableHeaderValue = (value) => value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
return JSON.parse(encoded);
}
return {};
});
const loadRestJsonErrorCode = (output, data) => {
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
const sanitizeErrorCode = (rawValue) => {
let cleanValue = rawValue;
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
};
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== undefined) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== undefined) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== undefined) {
return sanitizeErrorCode(data["__type"]);
}
return "";
};
/***/ }),
/***/ 19756:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(63966));
const config_resolver_1 = __nccwpck_require__(56153);
const hash_node_1 = __nccwpck_require__(97442);
const middleware_retry_1 = __nccwpck_require__(96064);
const node_config_provider_1 = __nccwpck_require__(87684);
const node_http_handler_1 = __nccwpck_require__(68805);
const util_base64_node_1 = __nccwpck_require__(18588);
const util_body_length_node_1 = __nccwpck_require__(74147);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const util_utf8_node_1 = __nccwpck_require__(66278);
const runtimeConfig_shared_1 = __nccwpck_require__(44809);
const smithy_client_1 = __nccwpck_require__(4963);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "node",
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
defaultUserAgentProvider: (_d = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _d !== void 0 ? _d : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: (_e = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _e !== void 0 ? _e : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: (_f = config === null || config === void 0 ? void 0 : config.region) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: (_g = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _g !== void 0 ? _g : new node_http_handler_1.NodeHttpHandler(),
retryMode: (_h = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _h !== void 0 ? _h : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: (_j = config === null || config === void 0 ? void 0 : config.sha256) !== null && _j !== void 0 ? _j : hash_node_1.Hash.bind(null, "sha256"),
streamCollector: (_k = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _k !== void 0 ? _k : node_http_handler_1.streamCollector,
useDualstackEndpoint: (_l = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _l !== void 0 ? _l : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
useFipsEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.fromUtf8,
utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 44809:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const url_parser_1 = __nccwpck_require__(2992);
const endpoints_1 = __nccwpck_require__(33546);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e;
return ({
apiVersion: "2019-06-10",
disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,
serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "SSO",
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
});
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 32605:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STS = void 0;
const AssumeRoleCommand_1 = __nccwpck_require__(59802);
const AssumeRoleWithSAMLCommand_1 = __nccwpck_require__(72865);
const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(37451);
const DecodeAuthorizationMessageCommand_1 = __nccwpck_require__(74150);
const GetAccessKeyInfoCommand_1 = __nccwpck_require__(49804);
const GetCallerIdentityCommand_1 = __nccwpck_require__(24278);
const GetFederationTokenCommand_1 = __nccwpck_require__(57552);
const GetSessionTokenCommand_1 = __nccwpck_require__(43285);
const STSClient_1 = __nccwpck_require__(64195);
class STS extends STSClient_1.STSClient {
assumeRole(args, optionsOrCb, cb) {
const command = new AssumeRoleCommand_1.AssumeRoleCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
assumeRoleWithSAML(args, optionsOrCb, cb) {
const command = new AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
assumeRoleWithWebIdentity(args, optionsOrCb, cb) {
const command = new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
decodeAuthorizationMessage(args, optionsOrCb, cb) {
const command = new DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getAccessKeyInfo(args, optionsOrCb, cb) {
const command = new GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getCallerIdentity(args, optionsOrCb, cb) {
const command = new GetCallerIdentityCommand_1.GetCallerIdentityCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getFederationToken(args, optionsOrCb, cb) {
const command = new GetFederationTokenCommand_1.GetFederationTokenCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
getSessionToken(args, optionsOrCb, cb) {
const command = new GetSessionTokenCommand_1.GetSessionTokenCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
}
}
exports.STS = STS;
/***/ }),
/***/ 64195:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STSClient = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const middleware_content_length_1 = __nccwpck_require__(42245);
const middleware_host_header_1 = __nccwpck_require__(22545);
const middleware_logger_1 = __nccwpck_require__(20014);
const middleware_retry_1 = __nccwpck_require__(96064);
const middleware_sdk_sts_1 = __nccwpck_require__(55959);
const middleware_user_agent_1 = __nccwpck_require__(64688);
const smithy_client_1 = __nccwpck_require__(4963);
const runtimeConfig_1 = __nccwpck_require__(83405);
class STSClient extends smithy_client_1.Client {
constructor(configuration) {
const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
const _config_1 = config_resolver_1.resolveRegionConfig(_config_0);
const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1);
const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2);
const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3);
const _config_5 = middleware_sdk_sts_1.resolveStsAuthConfig(_config_4, { stsClientCtor: STSClient });
const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5);
super(_config_6);
this.config = _config_6;
this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config));
this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config));
this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config));
this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));
this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
}
destroy() {
super.destroy();
}
}
exports.STSClient = STSClient;
/***/ }),
/***/ 59802:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AssumeRoleCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const middleware_signing_1 = __nccwpck_require__(14935);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class AssumeRoleCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "AssumeRoleCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.AssumeRoleRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.AssumeRoleResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryAssumeRoleCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryAssumeRoleCommand(output, context);
}
}
exports.AssumeRoleCommand = AssumeRoleCommand;
/***/ }),
/***/ 72865:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AssumeRoleWithSAMLCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class AssumeRoleWithSAMLCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "AssumeRoleWithSAMLCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryAssumeRoleWithSAMLCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryAssumeRoleWithSAMLCommand(output, context);
}
}
exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
/***/ }),
/***/ 37451:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AssumeRoleWithWebIdentityCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "AssumeRoleWithWebIdentityCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryAssumeRoleWithWebIdentityCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryAssumeRoleWithWebIdentityCommand(output, context);
}
}
exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
/***/ }),
/***/ 74150:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DecodeAuthorizationMessageCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const middleware_signing_1 = __nccwpck_require__(14935);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class DecodeAuthorizationMessageCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "DecodeAuthorizationMessageCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryDecodeAuthorizationMessageCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryDecodeAuthorizationMessageCommand(output, context);
}
}
exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand;
/***/ }),
/***/ 49804:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetAccessKeyInfoCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const middleware_signing_1 = __nccwpck_require__(14935);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class GetAccessKeyInfoCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "GetAccessKeyInfoCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryGetAccessKeyInfoCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryGetAccessKeyInfoCommand(output, context);
}
}
exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand;
/***/ }),
/***/ 24278:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetCallerIdentityCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const middleware_signing_1 = __nccwpck_require__(14935);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class GetCallerIdentityCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "GetCallerIdentityCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryGetCallerIdentityCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryGetCallerIdentityCommand(output, context);
}
}
exports.GetCallerIdentityCommand = GetCallerIdentityCommand;
/***/ }),
/***/ 57552:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetFederationTokenCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const middleware_signing_1 = __nccwpck_require__(14935);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class GetFederationTokenCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "GetFederationTokenCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetFederationTokenRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetFederationTokenResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryGetFederationTokenCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryGetFederationTokenCommand(output, context);
}
}
exports.GetFederationTokenCommand = GetFederationTokenCommand;
/***/ }),
/***/ 43285:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetSessionTokenCommand = void 0;
const middleware_serde_1 = __nccwpck_require__(93631);
const middleware_signing_1 = __nccwpck_require__(14935);
const smithy_client_1 = __nccwpck_require__(4963);
const models_0_1 = __nccwpck_require__(21780);
const Aws_query_1 = __nccwpck_require__(10740);
class GetSessionTokenCommand extends smithy_client_1.Command {
constructor(input) {
super();
this.input = input;
}
resolveMiddleware(clientStack, configuration, options) {
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "STSClient";
const commandName = "GetSessionTokenCommand";
const handlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: models_0_1.GetSessionTokenRequest.filterSensitiveLog,
outputFilterSensitiveLog: models_0_1.GetSessionTokenResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
serialize(input, context) {
return Aws_query_1.serializeAws_queryGetSessionTokenCommand(input, context);
}
deserialize(output, context) {
return Aws_query_1.deserializeAws_queryGetSessionTokenCommand(output, context);
}
}
exports.GetSessionTokenCommand = GetSessionTokenCommand;
/***/ }),
/***/ 55716:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(59802), exports);
tslib_1.__exportStar(__nccwpck_require__(72865), exports);
tslib_1.__exportStar(__nccwpck_require__(37451), exports);
tslib_1.__exportStar(__nccwpck_require__(74150), exports);
tslib_1.__exportStar(__nccwpck_require__(49804), exports);
tslib_1.__exportStar(__nccwpck_require__(24278), exports);
tslib_1.__exportStar(__nccwpck_require__(57552), exports);
tslib_1.__exportStar(__nccwpck_require__(43285), exports);
/***/ }),
/***/ 88028:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;
const defaultStsRoleAssumers_1 = __nccwpck_require__(90048);
const STSClient_1 = __nccwpck_require__(64195);
const getDefaultRoleAssumer = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumer(stsOptions, STSClient_1.STSClient);
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity(stsOptions, STSClient_1.STSClient);
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
roleAssumer: exports.getDefaultRoleAssumer(input),
roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input),
...input,
});
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
/***/ }),
/***/ 90048:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;
const AssumeRoleCommand_1 = __nccwpck_require__(59802);
const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(37451);
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
const decorateDefaultRegion = (region) => {
if (typeof region !== "function") {
return region === undefined ? ASSUME_ROLE_DEFAULT_REGION : region;
}
return async () => {
try {
return await region();
}
catch (e) {
return ASSUME_ROLE_DEFAULT_REGION;
}
};
};
const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
let stsClient;
let closureSourceCreds;
return async (sourceCreds, params) => {
closureSourceCreds = sourceCreds;
if (!stsClient) {
const { logger, region, requestHandler } = stsOptions;
stsClient = new stsClientCtor({
logger,
credentialDefaultProvider: () => async () => closureSourceCreds,
region: decorateDefaultRegion(region || stsOptions.region),
...(requestHandler ? { requestHandler } : {}),
});
}
const { Credentials } = await stsClient.send(new AssumeRoleCommand_1.AssumeRoleCommand(params));
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
}
return {
accessKeyId: Credentials.AccessKeyId,
secretAccessKey: Credentials.SecretAccessKey,
sessionToken: Credentials.SessionToken,
expiration: Credentials.Expiration,
};
};
};
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
let stsClient;
return async (params) => {
if (!stsClient) {
const { logger, region, requestHandler } = stsOptions;
stsClient = new stsClientCtor({
logger,
region: decorateDefaultRegion(region || stsOptions.region),
...(requestHandler ? { requestHandler } : {}),
});
}
const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(params));
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
}
return {
accessKeyId: Credentials.AccessKeyId,
secretAccessKey: Credentials.SecretAccessKey,
sessionToken: Credentials.SessionToken,
expiration: Credentials.Expiration,
};
};
};
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
const decorateDefaultCredentialProvider = (provider) => (input) => provider({
roleAssumer: exports.getDefaultRoleAssumer(input, input.stsClientCtor),
roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor),
...input,
});
exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
/***/ }),
/***/ 3571:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultRegionInfoProvider = void 0;
const config_resolver_1 = __nccwpck_require__(56153);
const regionHash = {
"aws-global": {
variants: [
{
hostname: "sts.amazonaws.com",
tags: [],
},
],
signingRegion: "us-east-1",
},
"us-east-1": {
variants: [
{
hostname: "sts.us-east-1.amazonaws.com",
tags: [],
},
{
hostname: "sts-fips.us-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-east-2": {
variants: [
{
hostname: "sts.us-east-2.amazonaws.com",
tags: [],
},
{
hostname: "sts-fips.us-east-2.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-east-1": {
variants: [
{
hostname: "sts.us-gov-east-1.amazonaws.com",
tags: [],
},
{
hostname: "sts.us-gov-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-west-1": {
variants: [
{
hostname: "sts.us-gov-west-1.amazonaws.com",
tags: [],
},
{
hostname: "sts.us-gov-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-1": {
variants: [
{
hostname: "sts.us-west-1.amazonaws.com",
tags: [],
},
{
hostname: "sts-fips.us-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-2": {
variants: [
{
hostname: "sts.us-west-2.amazonaws.com",
tags: [],
},
{
hostname: "sts-fips.us-west-2.amazonaws.com",
tags: ["fips"],
},
],
},
};
const partitionHash = {
aws: {
regions: [
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"aws-global",
"ca-central-1",
"eu-central-1",
"eu-north-1",
"eu-south-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"me-south-1",
"sa-east-1",
"us-east-1",
"us-east-1-fips",
"us-east-2",
"us-east-2-fips",
"us-west-1",
"us-west-1-fips",
"us-west-2",
"us-west-2-fips",
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
variants: [
{
hostname: "sts.{region}.amazonaws.com",
tags: [],
},
{
hostname: "sts-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "sts-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "sts.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
variants: [
{
hostname: "sts.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "sts-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "sts-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "sts.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
variants: [
{
hostname: "sts.{region}.c2s.ic.gov",
tags: [],
},
{
hostname: "sts-fips.{region}.c2s.ic.gov",
tags: ["fips"],
},
],
},
"aws-iso-b": {
regions: ["us-isob-east-1"],
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
variants: [
{
hostname: "sts.{region}.sc2s.sgov.gov",
tags: [],
},
{
hostname: "sts-fips.{region}.sc2s.sgov.gov",
tags: ["fips"],
},
],
},
"aws-us-gov": {
regions: ["us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
variants: [
{
hostname: "sts.{region}.amazonaws.com",
tags: [],
},
{
hostname: "sts.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "sts-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "sts.{region}.api.aws",
tags: ["dualstack"],
},
],
},
};
const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
...options,
signingService: "sts",
regionHash,
partitionHash,
});
exports.defaultRegionInfoProvider = defaultRegionInfoProvider;
/***/ }),
/***/ 52209:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(32605), exports);
tslib_1.__exportStar(__nccwpck_require__(64195), exports);
tslib_1.__exportStar(__nccwpck_require__(55716), exports);
tslib_1.__exportStar(__nccwpck_require__(88028), exports);
tslib_1.__exportStar(__nccwpck_require__(20106), exports);
/***/ }),
/***/ 20106:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(21780), exports);
/***/ }),
/***/ 21780:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GetSessionTokenResponse = exports.GetSessionTokenRequest = exports.GetFederationTokenResponse = exports.FederatedUser = exports.GetFederationTokenRequest = exports.GetCallerIdentityResponse = exports.GetCallerIdentityRequest = exports.GetAccessKeyInfoResponse = exports.GetAccessKeyInfoRequest = exports.InvalidAuthorizationMessageException = exports.DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageRequest = exports.IDPCommunicationErrorException = exports.AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityRequest = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLRequest = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = exports.AssumeRoleResponse = exports.Credentials = exports.AssumeRoleRequest = exports.Tag = exports.PolicyDescriptorType = exports.AssumedRoleUser = void 0;
var AssumedRoleUser;
(function (AssumedRoleUser) {
AssumedRoleUser.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumedRoleUser = exports.AssumedRoleUser || (exports.AssumedRoleUser = {}));
var PolicyDescriptorType;
(function (PolicyDescriptorType) {
PolicyDescriptorType.filterSensitiveLog = (obj) => ({
...obj,
});
})(PolicyDescriptorType = exports.PolicyDescriptorType || (exports.PolicyDescriptorType = {}));
var Tag;
(function (Tag) {
Tag.filterSensitiveLog = (obj) => ({
...obj,
});
})(Tag = exports.Tag || (exports.Tag = {}));
var AssumeRoleRequest;
(function (AssumeRoleRequest) {
AssumeRoleRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumeRoleRequest = exports.AssumeRoleRequest || (exports.AssumeRoleRequest = {}));
var Credentials;
(function (Credentials) {
Credentials.filterSensitiveLog = (obj) => ({
...obj,
});
})(Credentials = exports.Credentials || (exports.Credentials = {}));
var AssumeRoleResponse;
(function (AssumeRoleResponse) {
AssumeRoleResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumeRoleResponse = exports.AssumeRoleResponse || (exports.AssumeRoleResponse = {}));
var ExpiredTokenException;
(function (ExpiredTokenException) {
ExpiredTokenException.filterSensitiveLog = (obj) => ({
...obj,
});
})(ExpiredTokenException = exports.ExpiredTokenException || (exports.ExpiredTokenException = {}));
var MalformedPolicyDocumentException;
(function (MalformedPolicyDocumentException) {
MalformedPolicyDocumentException.filterSensitiveLog = (obj) => ({
...obj,
});
})(MalformedPolicyDocumentException = exports.MalformedPolicyDocumentException || (exports.MalformedPolicyDocumentException = {}));
var PackedPolicyTooLargeException;
(function (PackedPolicyTooLargeException) {
PackedPolicyTooLargeException.filterSensitiveLog = (obj) => ({
...obj,
});
})(PackedPolicyTooLargeException = exports.PackedPolicyTooLargeException || (exports.PackedPolicyTooLargeException = {}));
var RegionDisabledException;
(function (RegionDisabledException) {
RegionDisabledException.filterSensitiveLog = (obj) => ({
...obj,
});
})(RegionDisabledException = exports.RegionDisabledException || (exports.RegionDisabledException = {}));
var AssumeRoleWithSAMLRequest;
(function (AssumeRoleWithSAMLRequest) {
AssumeRoleWithSAMLRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumeRoleWithSAMLRequest = exports.AssumeRoleWithSAMLRequest || (exports.AssumeRoleWithSAMLRequest = {}));
var AssumeRoleWithSAMLResponse;
(function (AssumeRoleWithSAMLResponse) {
AssumeRoleWithSAMLResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLResponse || (exports.AssumeRoleWithSAMLResponse = {}));
var IDPRejectedClaimException;
(function (IDPRejectedClaimException) {
IDPRejectedClaimException.filterSensitiveLog = (obj) => ({
...obj,
});
})(IDPRejectedClaimException = exports.IDPRejectedClaimException || (exports.IDPRejectedClaimException = {}));
var InvalidIdentityTokenException;
(function (InvalidIdentityTokenException) {
InvalidIdentityTokenException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidIdentityTokenException = exports.InvalidIdentityTokenException || (exports.InvalidIdentityTokenException = {}));
var AssumeRoleWithWebIdentityRequest;
(function (AssumeRoleWithWebIdentityRequest) {
AssumeRoleWithWebIdentityRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumeRoleWithWebIdentityRequest = exports.AssumeRoleWithWebIdentityRequest || (exports.AssumeRoleWithWebIdentityRequest = {}));
var AssumeRoleWithWebIdentityResponse;
(function (AssumeRoleWithWebIdentityResponse) {
AssumeRoleWithWebIdentityResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityResponse || (exports.AssumeRoleWithWebIdentityResponse = {}));
var IDPCommunicationErrorException;
(function (IDPCommunicationErrorException) {
IDPCommunicationErrorException.filterSensitiveLog = (obj) => ({
...obj,
});
})(IDPCommunicationErrorException = exports.IDPCommunicationErrorException || (exports.IDPCommunicationErrorException = {}));
var DecodeAuthorizationMessageRequest;
(function (DecodeAuthorizationMessageRequest) {
DecodeAuthorizationMessageRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(DecodeAuthorizationMessageRequest = exports.DecodeAuthorizationMessageRequest || (exports.DecodeAuthorizationMessageRequest = {}));
var DecodeAuthorizationMessageResponse;
(function (DecodeAuthorizationMessageResponse) {
DecodeAuthorizationMessageResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageResponse || (exports.DecodeAuthorizationMessageResponse = {}));
var InvalidAuthorizationMessageException;
(function (InvalidAuthorizationMessageException) {
InvalidAuthorizationMessageException.filterSensitiveLog = (obj) => ({
...obj,
});
})(InvalidAuthorizationMessageException = exports.InvalidAuthorizationMessageException || (exports.InvalidAuthorizationMessageException = {}));
var GetAccessKeyInfoRequest;
(function (GetAccessKeyInfoRequest) {
GetAccessKeyInfoRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetAccessKeyInfoRequest = exports.GetAccessKeyInfoRequest || (exports.GetAccessKeyInfoRequest = {}));
var GetAccessKeyInfoResponse;
(function (GetAccessKeyInfoResponse) {
GetAccessKeyInfoResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetAccessKeyInfoResponse = exports.GetAccessKeyInfoResponse || (exports.GetAccessKeyInfoResponse = {}));
var GetCallerIdentityRequest;
(function (GetCallerIdentityRequest) {
GetCallerIdentityRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetCallerIdentityRequest = exports.GetCallerIdentityRequest || (exports.GetCallerIdentityRequest = {}));
var GetCallerIdentityResponse;
(function (GetCallerIdentityResponse) {
GetCallerIdentityResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetCallerIdentityResponse = exports.GetCallerIdentityResponse || (exports.GetCallerIdentityResponse = {}));
var GetFederationTokenRequest;
(function (GetFederationTokenRequest) {
GetFederationTokenRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetFederationTokenRequest = exports.GetFederationTokenRequest || (exports.GetFederationTokenRequest = {}));
var FederatedUser;
(function (FederatedUser) {
FederatedUser.filterSensitiveLog = (obj) => ({
...obj,
});
})(FederatedUser = exports.FederatedUser || (exports.FederatedUser = {}));
var GetFederationTokenResponse;
(function (GetFederationTokenResponse) {
GetFederationTokenResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetFederationTokenResponse = exports.GetFederationTokenResponse || (exports.GetFederationTokenResponse = {}));
var GetSessionTokenRequest;
(function (GetSessionTokenRequest) {
GetSessionTokenRequest.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetSessionTokenRequest = exports.GetSessionTokenRequest || (exports.GetSessionTokenRequest = {}));
var GetSessionTokenResponse;
(function (GetSessionTokenResponse) {
GetSessionTokenResponse.filterSensitiveLog = (obj) => ({
...obj,
});
})(GetSessionTokenResponse = exports.GetSessionTokenResponse || (exports.GetSessionTokenResponse = {}));
/***/ }),
/***/ 10740:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deserializeAws_queryGetSessionTokenCommand = exports.deserializeAws_queryGetFederationTokenCommand = exports.deserializeAws_queryGetCallerIdentityCommand = exports.deserializeAws_queryGetAccessKeyInfoCommand = exports.deserializeAws_queryDecodeAuthorizationMessageCommand = exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = exports.deserializeAws_queryAssumeRoleWithSAMLCommand = exports.deserializeAws_queryAssumeRoleCommand = exports.serializeAws_queryGetSessionTokenCommand = exports.serializeAws_queryGetFederationTokenCommand = exports.serializeAws_queryGetCallerIdentityCommand = exports.serializeAws_queryGetAccessKeyInfoCommand = exports.serializeAws_queryDecodeAuthorizationMessageCommand = exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = exports.serializeAws_queryAssumeRoleWithSAMLCommand = exports.serializeAws_queryAssumeRoleCommand = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const smithy_client_1 = __nccwpck_require__(4963);
const entities_1 = __nccwpck_require__(3000);
const fast_xml_parser_1 = __nccwpck_require__(27448);
const serializeAws_queryAssumeRoleCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryAssumeRoleRequest(input, context),
Action: "AssumeRole",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryAssumeRoleCommand = serializeAws_queryAssumeRoleCommand;
const serializeAws_queryAssumeRoleWithSAMLCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryAssumeRoleWithSAMLRequest(input, context),
Action: "AssumeRoleWithSAML",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryAssumeRoleWithSAMLCommand = serializeAws_queryAssumeRoleWithSAMLCommand;
const serializeAws_queryAssumeRoleWithWebIdentityCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context),
Action: "AssumeRoleWithWebIdentity",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = serializeAws_queryAssumeRoleWithWebIdentityCommand;
const serializeAws_queryDecodeAuthorizationMessageCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryDecodeAuthorizationMessageRequest(input, context),
Action: "DecodeAuthorizationMessage",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryDecodeAuthorizationMessageCommand = serializeAws_queryDecodeAuthorizationMessageCommand;
const serializeAws_queryGetAccessKeyInfoCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryGetAccessKeyInfoRequest(input, context),
Action: "GetAccessKeyInfo",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryGetAccessKeyInfoCommand = serializeAws_queryGetAccessKeyInfoCommand;
const serializeAws_queryGetCallerIdentityCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryGetCallerIdentityRequest(input, context),
Action: "GetCallerIdentity",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryGetCallerIdentityCommand = serializeAws_queryGetCallerIdentityCommand;
const serializeAws_queryGetFederationTokenCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryGetFederationTokenRequest(input, context),
Action: "GetFederationToken",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryGetFederationTokenCommand = serializeAws_queryGetFederationTokenCommand;
const serializeAws_queryGetSessionTokenCommand = async (input, context) => {
const headers = {
"content-type": "application/x-www-form-urlencoded",
};
let body;
body = buildFormUrlencodedString({
...serializeAws_queryGetSessionTokenRequest(input, context),
Action: "GetSessionToken",
Version: "2011-06-15",
});
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
exports.serializeAws_queryGetSessionTokenCommand = serializeAws_queryGetSessionTokenCommand;
const deserializeAws_queryAssumeRoleCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryAssumeRoleCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryAssumeRoleCommand = deserializeAws_queryAssumeRoleCommand;
const deserializeAws_queryAssumeRoleCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ExpiredTokenException":
case "com.amazonaws.sts#ExpiredTokenException":
response = {
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "MalformedPolicyDocumentException":
case "com.amazonaws.sts#MalformedPolicyDocumentException":
response = {
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PackedPolicyTooLargeException":
case "com.amazonaws.sts#PackedPolicyTooLargeException":
response = {
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegionDisabledException":
case "com.amazonaws.sts#RegionDisabledException":
response = {
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryAssumeRoleWithSAMLCommand = deserializeAws_queryAssumeRoleWithSAMLCommand;
const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ExpiredTokenException":
case "com.amazonaws.sts#ExpiredTokenException":
response = {
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "IDPRejectedClaimException":
case "com.amazonaws.sts#IDPRejectedClaimException":
response = {
...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidIdentityTokenException":
case "com.amazonaws.sts#InvalidIdentityTokenException":
response = {
...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "MalformedPolicyDocumentException":
case "com.amazonaws.sts#MalformedPolicyDocumentException":
response = {
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PackedPolicyTooLargeException":
case "com.amazonaws.sts#PackedPolicyTooLargeException":
response = {
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegionDisabledException":
case "com.amazonaws.sts#RegionDisabledException":
response = {
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = deserializeAws_queryAssumeRoleWithWebIdentityCommand;
const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "ExpiredTokenException":
case "com.amazonaws.sts#ExpiredTokenException":
response = {
...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "IDPCommunicationErrorException":
case "com.amazonaws.sts#IDPCommunicationErrorException":
response = {
...(await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "IDPRejectedClaimException":
case "com.amazonaws.sts#IDPRejectedClaimException":
response = {
...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "InvalidIdentityTokenException":
case "com.amazonaws.sts#InvalidIdentityTokenException":
response = {
...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "MalformedPolicyDocumentException":
case "com.amazonaws.sts#MalformedPolicyDocumentException":
response = {
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PackedPolicyTooLargeException":
case "com.amazonaws.sts#PackedPolicyTooLargeException":
response = {
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegionDisabledException":
case "com.amazonaws.sts#RegionDisabledException":
response = {
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryDecodeAuthorizationMessageCommand = deserializeAws_queryDecodeAuthorizationMessageCommand;
const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidAuthorizationMessageException":
case "com.amazonaws.sts#InvalidAuthorizationMessageException":
response = {
...(await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryGetAccessKeyInfoCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryGetAccessKeyInfoCommand = deserializeAws_queryGetAccessKeyInfoCommand;
const deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryGetCallerIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryGetCallerIdentityCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryGetCallerIdentityCommand = deserializeAws_queryGetCallerIdentityCommand;
const deserializeAws_queryGetCallerIdentityCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryGetFederationTokenCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryGetFederationTokenCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryGetFederationTokenCommand = deserializeAws_queryGetFederationTokenCommand;
const deserializeAws_queryGetFederationTokenCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "MalformedPolicyDocumentException":
case "com.amazonaws.sts#MalformedPolicyDocumentException":
response = {
...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "PackedPolicyTooLargeException":
case "com.amazonaws.sts#PackedPolicyTooLargeException":
response = {
...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
case "RegionDisabledException":
case "com.amazonaws.sts#RegionDisabledException":
response = {
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryGetSessionTokenCommand = async (output, context) => {
if (output.statusCode >= 300) {
return deserializeAws_queryGetSessionTokenCommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = deserializeAws_queryGetSessionTokenResponse(data.GetSessionTokenResult, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return Promise.resolve(response);
};
exports.deserializeAws_queryGetSessionTokenCommand = deserializeAws_queryGetSessionTokenCommand;
const deserializeAws_queryGetSessionTokenCommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseBody(output.body, context),
};
let response;
let errorCode = "UnknownError";
errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "RegionDisabledException":
case "com.amazonaws.sts#RegionDisabledException":
response = {
...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)),
name: errorCode,
$metadata: deserializeMetadata(output),
};
break;
default:
const parsedBody = parsedOutput.body;
errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode;
response = {
...parsedBody.Error,
name: `${errorCode}`,
message: parsedBody.Error.message || parsedBody.Error.Message || errorCode,
$fault: "client",
$metadata: deserializeMetadata(output),
};
}
const message = response.message || response.Message || errorCode;
response.message = message;
delete response.Message;
return Promise.reject(Object.assign(new Error(message), response));
};
const deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryExpiredTokenException(body.Error, context);
const contents = {
name: "ExpiredTokenException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryIDPCommunicationErrorException(body.Error, context);
const contents = {
name: "IDPCommunicationErrorException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryIDPRejectedClaimExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryIDPRejectedClaimException(body.Error, context);
const contents = {
name: "IDPRejectedClaimException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context);
const contents = {
name: "InvalidAuthorizationMessageException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryInvalidIdentityTokenException(body.Error, context);
const contents = {
name: "InvalidIdentityTokenException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context);
const contents = {
name: "MalformedPolicyDocumentException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context);
const contents = {
name: "PackedPolicyTooLargeException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const deserializeAws_queryRegionDisabledExceptionResponse = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = deserializeAws_queryRegionDisabledException(body.Error, context);
const contents = {
name: "RegionDisabledException",
$fault: "client",
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
};
return contents;
};
const serializeAws_queryAssumeRoleRequest = (input, context) => {
const entries = {};
if (input.RoleArn !== undefined && input.RoleArn !== null) {
entries["RoleArn"] = input.RoleArn;
}
if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) {
entries["RoleSessionName"] = input.RoleSessionName;
}
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `PolicyArns.${key}`;
entries[loc] = value;
});
}
if (input.Policy !== undefined && input.Policy !== null) {
entries["Policy"] = input.Policy;
}
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
entries["DurationSeconds"] = input.DurationSeconds;
}
if (input.Tags !== undefined && input.Tags !== null) {
const memberEntries = serializeAws_querytagListType(input.Tags, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
if (input.TransitiveTagKeys !== undefined && input.TransitiveTagKeys !== null) {
const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `TransitiveTagKeys.${key}`;
entries[loc] = value;
});
}
if (input.ExternalId !== undefined && input.ExternalId !== null) {
entries["ExternalId"] = input.ExternalId;
}
if (input.SerialNumber !== undefined && input.SerialNumber !== null) {
entries["SerialNumber"] = input.SerialNumber;
}
if (input.TokenCode !== undefined && input.TokenCode !== null) {
entries["TokenCode"] = input.TokenCode;
}
if (input.SourceIdentity !== undefined && input.SourceIdentity !== null) {
entries["SourceIdentity"] = input.SourceIdentity;
}
return entries;
};
const serializeAws_queryAssumeRoleWithSAMLRequest = (input, context) => {
const entries = {};
if (input.RoleArn !== undefined && input.RoleArn !== null) {
entries["RoleArn"] = input.RoleArn;
}
if (input.PrincipalArn !== undefined && input.PrincipalArn !== null) {
entries["PrincipalArn"] = input.PrincipalArn;
}
if (input.SAMLAssertion !== undefined && input.SAMLAssertion !== null) {
entries["SAMLAssertion"] = input.SAMLAssertion;
}
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `PolicyArns.${key}`;
entries[loc] = value;
});
}
if (input.Policy !== undefined && input.Policy !== null) {
entries["Policy"] = input.Policy;
}
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
entries["DurationSeconds"] = input.DurationSeconds;
}
return entries;
};
const serializeAws_queryAssumeRoleWithWebIdentityRequest = (input, context) => {
const entries = {};
if (input.RoleArn !== undefined && input.RoleArn !== null) {
entries["RoleArn"] = input.RoleArn;
}
if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) {
entries["RoleSessionName"] = input.RoleSessionName;
}
if (input.WebIdentityToken !== undefined && input.WebIdentityToken !== null) {
entries["WebIdentityToken"] = input.WebIdentityToken;
}
if (input.ProviderId !== undefined && input.ProviderId !== null) {
entries["ProviderId"] = input.ProviderId;
}
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `PolicyArns.${key}`;
entries[loc] = value;
});
}
if (input.Policy !== undefined && input.Policy !== null) {
entries["Policy"] = input.Policy;
}
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
entries["DurationSeconds"] = input.DurationSeconds;
}
return entries;
};
const serializeAws_queryDecodeAuthorizationMessageRequest = (input, context) => {
const entries = {};
if (input.EncodedMessage !== undefined && input.EncodedMessage !== null) {
entries["EncodedMessage"] = input.EncodedMessage;
}
return entries;
};
const serializeAws_queryGetAccessKeyInfoRequest = (input, context) => {
const entries = {};
if (input.AccessKeyId !== undefined && input.AccessKeyId !== null) {
entries["AccessKeyId"] = input.AccessKeyId;
}
return entries;
};
const serializeAws_queryGetCallerIdentityRequest = (input, context) => {
const entries = {};
return entries;
};
const serializeAws_queryGetFederationTokenRequest = (input, context) => {
const entries = {};
if (input.Name !== undefined && input.Name !== null) {
entries["Name"] = input.Name;
}
if (input.Policy !== undefined && input.Policy !== null) {
entries["Policy"] = input.Policy;
}
if (input.PolicyArns !== undefined && input.PolicyArns !== null) {
const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `PolicyArns.${key}`;
entries[loc] = value;
});
}
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
entries["DurationSeconds"] = input.DurationSeconds;
}
if (input.Tags !== undefined && input.Tags !== null) {
const memberEntries = serializeAws_querytagListType(input.Tags, context);
Object.entries(memberEntries).forEach(([key, value]) => {
const loc = `Tags.${key}`;
entries[loc] = value;
});
}
return entries;
};
const serializeAws_queryGetSessionTokenRequest = (input, context) => {
const entries = {};
if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) {
entries["DurationSeconds"] = input.DurationSeconds;
}
if (input.SerialNumber !== undefined && input.SerialNumber !== null) {
entries["SerialNumber"] = input.SerialNumber;
}
if (input.TokenCode !== undefined && input.TokenCode !== null) {
entries["TokenCode"] = input.TokenCode;
}
return entries;
};
const serializeAws_querypolicyDescriptorListType = (input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = serializeAws_queryPolicyDescriptorType(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
};
const serializeAws_queryPolicyDescriptorType = (input, context) => {
const entries = {};
if (input.arn !== undefined && input.arn !== null) {
entries["arn"] = input.arn;
}
return entries;
};
const serializeAws_queryTag = (input, context) => {
const entries = {};
if (input.Key !== undefined && input.Key !== null) {
entries["Key"] = input.Key;
}
if (input.Value !== undefined && input.Value !== null) {
entries["Value"] = input.Value;
}
return entries;
};
const serializeAws_querytagKeyListType = (input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
entries[`member.${counter}`] = entry;
counter++;
}
return entries;
};
const serializeAws_querytagListType = (input, context) => {
const entries = {};
let counter = 1;
for (const entry of input) {
if (entry === null) {
continue;
}
const memberEntries = serializeAws_queryTag(entry, context);
Object.entries(memberEntries).forEach(([key, value]) => {
entries[`member.${counter}.${key}`] = value;
});
counter++;
}
return entries;
};
const deserializeAws_queryAssumedRoleUser = (output, context) => {
const contents = {
AssumedRoleId: undefined,
Arn: undefined,
};
if (output["AssumedRoleId"] !== undefined) {
contents.AssumedRoleId = smithy_client_1.expectString(output["AssumedRoleId"]);
}
if (output["Arn"] !== undefined) {
contents.Arn = smithy_client_1.expectString(output["Arn"]);
}
return contents;
};
const deserializeAws_queryAssumeRoleResponse = (output, context) => {
const contents = {
Credentials: undefined,
AssumedRoleUser: undefined,
PackedPolicySize: undefined,
SourceIdentity: undefined,
};
if (output["Credentials"] !== undefined) {
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
}
if (output["AssumedRoleUser"] !== undefined) {
contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context);
}
if (output["PackedPolicySize"] !== undefined) {
contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]);
}
if (output["SourceIdentity"] !== undefined) {
contents.SourceIdentity = smithy_client_1.expectString(output["SourceIdentity"]);
}
return contents;
};
const deserializeAws_queryAssumeRoleWithSAMLResponse = (output, context) => {
const contents = {
Credentials: undefined,
AssumedRoleUser: undefined,
PackedPolicySize: undefined,
Subject: undefined,
SubjectType: undefined,
Issuer: undefined,
Audience: undefined,
NameQualifier: undefined,
SourceIdentity: undefined,
};
if (output["Credentials"] !== undefined) {
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
}
if (output["AssumedRoleUser"] !== undefined) {
contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context);
}
if (output["PackedPolicySize"] !== undefined) {
contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]);
}
if (output["Subject"] !== undefined) {
contents.Subject = smithy_client_1.expectString(output["Subject"]);
}
if (output["SubjectType"] !== undefined) {
contents.SubjectType = smithy_client_1.expectString(output["SubjectType"]);
}
if (output["Issuer"] !== undefined) {
contents.Issuer = smithy_client_1.expectString(output["Issuer"]);
}
if (output["Audience"] !== undefined) {
contents.Audience = smithy_client_1.expectString(output["Audience"]);
}
if (output["NameQualifier"] !== undefined) {
contents.NameQualifier = smithy_client_1.expectString(output["NameQualifier"]);
}
if (output["SourceIdentity"] !== undefined) {
contents.SourceIdentity = smithy_client_1.expectString(output["SourceIdentity"]);
}
return contents;
};
const deserializeAws_queryAssumeRoleWithWebIdentityResponse = (output, context) => {
const contents = {
Credentials: undefined,
SubjectFromWebIdentityToken: undefined,
AssumedRoleUser: undefined,
PackedPolicySize: undefined,
Provider: undefined,
Audience: undefined,
SourceIdentity: undefined,
};
if (output["Credentials"] !== undefined) {
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
}
if (output["SubjectFromWebIdentityToken"] !== undefined) {
contents.SubjectFromWebIdentityToken = smithy_client_1.expectString(output["SubjectFromWebIdentityToken"]);
}
if (output["AssumedRoleUser"] !== undefined) {
contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context);
}
if (output["PackedPolicySize"] !== undefined) {
contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]);
}
if (output["Provider"] !== undefined) {
contents.Provider = smithy_client_1.expectString(output["Provider"]);
}
if (output["Audience"] !== undefined) {
contents.Audience = smithy_client_1.expectString(output["Audience"]);
}
if (output["SourceIdentity"] !== undefined) {
contents.SourceIdentity = smithy_client_1.expectString(output["SourceIdentity"]);
}
return contents;
};
const deserializeAws_queryCredentials = (output, context) => {
const contents = {
AccessKeyId: undefined,
SecretAccessKey: undefined,
SessionToken: undefined,
Expiration: undefined,
};
if (output["AccessKeyId"] !== undefined) {
contents.AccessKeyId = smithy_client_1.expectString(output["AccessKeyId"]);
}
if (output["SecretAccessKey"] !== undefined) {
contents.SecretAccessKey = smithy_client_1.expectString(output["SecretAccessKey"]);
}
if (output["SessionToken"] !== undefined) {
contents.SessionToken = smithy_client_1.expectString(output["SessionToken"]);
}
if (output["Expiration"] !== undefined) {
contents.Expiration = smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output["Expiration"]));
}
return contents;
};
const deserializeAws_queryDecodeAuthorizationMessageResponse = (output, context) => {
const contents = {
DecodedMessage: undefined,
};
if (output["DecodedMessage"] !== undefined) {
contents.DecodedMessage = smithy_client_1.expectString(output["DecodedMessage"]);
}
return contents;
};
const deserializeAws_queryExpiredTokenException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryFederatedUser = (output, context) => {
const contents = {
FederatedUserId: undefined,
Arn: undefined,
};
if (output["FederatedUserId"] !== undefined) {
contents.FederatedUserId = smithy_client_1.expectString(output["FederatedUserId"]);
}
if (output["Arn"] !== undefined) {
contents.Arn = smithy_client_1.expectString(output["Arn"]);
}
return contents;
};
const deserializeAws_queryGetAccessKeyInfoResponse = (output, context) => {
const contents = {
Account: undefined,
};
if (output["Account"] !== undefined) {
contents.Account = smithy_client_1.expectString(output["Account"]);
}
return contents;
};
const deserializeAws_queryGetCallerIdentityResponse = (output, context) => {
const contents = {
UserId: undefined,
Account: undefined,
Arn: undefined,
};
if (output["UserId"] !== undefined) {
contents.UserId = smithy_client_1.expectString(output["UserId"]);
}
if (output["Account"] !== undefined) {
contents.Account = smithy_client_1.expectString(output["Account"]);
}
if (output["Arn"] !== undefined) {
contents.Arn = smithy_client_1.expectString(output["Arn"]);
}
return contents;
};
const deserializeAws_queryGetFederationTokenResponse = (output, context) => {
const contents = {
Credentials: undefined,
FederatedUser: undefined,
PackedPolicySize: undefined,
};
if (output["Credentials"] !== undefined) {
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
}
if (output["FederatedUser"] !== undefined) {
contents.FederatedUser = deserializeAws_queryFederatedUser(output["FederatedUser"], context);
}
if (output["PackedPolicySize"] !== undefined) {
contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]);
}
return contents;
};
const deserializeAws_queryGetSessionTokenResponse = (output, context) => {
const contents = {
Credentials: undefined,
};
if (output["Credentials"] !== undefined) {
contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context);
}
return contents;
};
const deserializeAws_queryIDPCommunicationErrorException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryIDPRejectedClaimException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryInvalidAuthorizationMessageException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryInvalidIdentityTokenException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryMalformedPolicyDocumentException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryPackedPolicyTooLargeException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeAws_queryRegionDisabledException = (output, context) => {
const contents = {
message: undefined,
};
if (output["message"] !== undefined) {
contents.message = smithy_client_1.expectString(output["message"]);
}
return contents;
};
const deserializeMetadata = (output) => {
var _a;
return ({
httpStatusCode: output.statusCode,
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
};
const collectBody = (streamBody = new Uint8Array(), context) => {
if (streamBody instanceof Uint8Array) {
return Promise.resolve(streamBody);
}
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
};
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
}
if (body !== undefined) {
contents.body = body;
}
return new protocol_http_1.HttpRequest(contents);
};
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
const parsedObj = fast_xml_parser_1.parse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false,
trimValues: false,
tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : entities_1.decodeHTML(val)),
});
const textNodeName = "#text";
const key = Object.keys(parsedObj)[0];
const parsedObjToReturn = parsedObj[key];
if (parsedObjToReturn[textNodeName]) {
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
return smithy_client_1.getValueFromTextNode(parsedObjToReturn);
}
return {};
});
const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries)
.map(([key, value]) => smithy_client_1.extendedEncodeURIComponent(key) + "=" + smithy_client_1.extendedEncodeURIComponent(value))
.join("&");
const loadQueryErrorCode = (output, data) => {
if (data.Error.Code !== undefined) {
return data.Error.Code;
}
if (output.statusCode == 404) {
return "NotFound";
}
return "";
};
/***/ }),
/***/ 83405:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const tslib_1 = __nccwpck_require__(4351);
const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(1121));
const defaultStsRoleAssumers_1 = __nccwpck_require__(90048);
const config_resolver_1 = __nccwpck_require__(56153);
const credential_provider_node_1 = __nccwpck_require__(75531);
const hash_node_1 = __nccwpck_require__(97442);
const middleware_retry_1 = __nccwpck_require__(96064);
const node_config_provider_1 = __nccwpck_require__(87684);
const node_http_handler_1 = __nccwpck_require__(68805);
const util_base64_node_1 = __nccwpck_require__(18588);
const util_body_length_node_1 = __nccwpck_require__(74147);
const util_user_agent_node_1 = __nccwpck_require__(98095);
const util_utf8_node_1 = __nccwpck_require__(66278);
const runtimeConfig_shared_1 = __nccwpck_require__(52642);
const smithy_client_1 = __nccwpck_require__(4963);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "node",
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : defaultStsRoleAssumers_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 52642:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRuntimeConfig = void 0;
const url_parser_1 = __nccwpck_require__(2992);
const endpoints_1 = __nccwpck_require__(3571);
const getRuntimeConfig = (config) => {
var _a, _b, _c, _d, _e;
return ({
apiVersion: "2011-06-15",
disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,
serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "STS",
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
});
};
exports.getRuntimeConfig = getRuntimeConfig;
/***/ }),
/***/ 14723:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_DUALSTACK_ENDPOINT = exports.CONFIG_USE_DUALSTACK_ENDPOINT = exports.ENV_USE_DUALSTACK_ENDPOINT = void 0;
const util_config_provider_1 = __nccwpck_require__(6168);
exports.ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
exports.CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
exports.DEFAULT_USE_DUALSTACK_ENDPOINT = false;
exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => util_config_provider_1.booleanSelector(env, exports.ENV_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.ENV),
configFileSelector: (profile) => util_config_provider_1.booleanSelector(profile, exports.CONFIG_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.CONFIG),
default: false,
};
/***/ }),
/***/ 42478:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_FIPS_ENDPOINT = exports.CONFIG_USE_FIPS_ENDPOINT = exports.ENV_USE_FIPS_ENDPOINT = void 0;
const util_config_provider_1 = __nccwpck_require__(6168);
exports.ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
exports.CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
exports.DEFAULT_USE_FIPS_ENDPOINT = false;
exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => util_config_provider_1.booleanSelector(env, exports.ENV_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.ENV),
configFileSelector: (profile) => util_config_provider_1.booleanSelector(profile, exports.CONFIG_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.CONFIG),
default: false,
};
/***/ }),
/***/ 47392:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(14723), exports);
tslib_1.__exportStar(__nccwpck_require__(42478), exports);
tslib_1.__exportStar(__nccwpck_require__(92108), exports);
tslib_1.__exportStar(__nccwpck_require__(92327), exports);
/***/ }),
/***/ 92108:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveCustomEndpointsConfig = void 0;
const normalizeBoolean_1 = __nccwpck_require__(52164);
const normalizeEndpoint_1 = __nccwpck_require__(9815);
const resolveCustomEndpointsConfig = (input) => {
var _a;
return ({
...input,
tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true,
endpoint: normalizeEndpoint_1.normalizeEndpoint(input),
isCustomEndpoint: true,
useDualstackEndpoint: normalizeBoolean_1.normalizeBoolean(input.useDualstackEndpoint),
});
};
exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
/***/ }),
/***/ 92327:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveEndpointsConfig = void 0;
const getEndpointFromRegion_1 = __nccwpck_require__(94159);
const normalizeBoolean_1 = __nccwpck_require__(52164);
const normalizeEndpoint_1 = __nccwpck_require__(9815);
const resolveEndpointsConfig = (input) => {
var _a;
const useDualstackEndpoint = normalizeBoolean_1.normalizeBoolean(input.useDualstackEndpoint);
const { endpoint, useFipsEndpoint } = input;
return {
...input,
tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true,
endpoint: endpoint
? normalizeEndpoint_1.normalizeEndpoint({ ...input, endpoint })
: () => getEndpointFromRegion_1.getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
isCustomEndpoint: endpoint ? true : false,
useDualstackEndpoint,
};
};
exports.resolveEndpointsConfig = resolveEndpointsConfig;
/***/ }),
/***/ 94159:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getEndpointFromRegion = void 0;
const getEndpointFromRegion = async (input) => {
var _a;
const { tls = true } = input;
const region = await input.region();
const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
if (!dnsHostRegex.test(region)) {
throw new Error("Invalid region in client config");
}
const useDualstackEndpoint = await input.useDualstackEndpoint();
const useFipsEndpoint = await input.useFipsEndpoint();
const { hostname } = (_a = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }))) !== null && _a !== void 0 ? _a : {};
if (!hostname) {
throw new Error("Cannot resolve hostname from client config");
}
return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`);
};
exports.getEndpointFromRegion = getEndpointFromRegion;
/***/ }),
/***/ 52164:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.normalizeBoolean = void 0;
const normalizeBoolean = (value) => {
if (typeof value === "boolean") {
const promisified = Promise.resolve(value);
return () => promisified;
}
return value;
};
exports.normalizeBoolean = normalizeBoolean;
/***/ }),
/***/ 9815:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.normalizeEndpoint = void 0;
const normalizeEndpoint = ({ endpoint, urlParser }) => {
if (typeof endpoint === "string") {
const promisified = Promise.resolve(urlParser(endpoint));
return () => promisified;
}
else if (typeof endpoint === "object") {
const promisified = Promise.resolve(endpoint);
return () => promisified;
}
return endpoint;
};
exports.normalizeEndpoint = normalizeEndpoint;
/***/ }),
/***/ 56153:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(47392), exports);
tslib_1.__exportStar(__nccwpck_require__(85441), exports);
tslib_1.__exportStar(__nccwpck_require__(86258), exports);
/***/ }),
/***/ 70422:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NODE_REGION_CONFIG_FILE_OPTIONS = exports.NODE_REGION_CONFIG_OPTIONS = exports.REGION_INI_NAME = exports.REGION_ENV_NAME = void 0;
exports.REGION_ENV_NAME = "AWS_REGION";
exports.REGION_INI_NAME = "region";
exports.NODE_REGION_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => env[exports.REGION_ENV_NAME],
configFileSelector: (profile) => profile[exports.REGION_INI_NAME],
default: () => {
throw new Error("Region is missing");
},
};
exports.NODE_REGION_CONFIG_FILE_OPTIONS = {
preferredFile: "credentials",
};
/***/ }),
/***/ 52844:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRealRegion = void 0;
const isFipsRegion_1 = __nccwpck_require__(82440);
const getRealRegion = (region) => isFipsRegion_1.isFipsRegion(region)
? ["fips-aws-global", "aws-fips"].includes(region)
? "us-east-1"
: region.replace(/fips-(dkr-|prod-)?|-fips/, "")
: region;
exports.getRealRegion = getRealRegion;
/***/ }),
/***/ 85441:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(70422), exports);
tslib_1.__exportStar(__nccwpck_require__(81595), exports);
/***/ }),
/***/ 82440:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isFipsRegion = void 0;
const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
exports.isFipsRegion = isFipsRegion;
/***/ }),
/***/ 81595:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveRegionConfig = void 0;
const getRealRegion_1 = __nccwpck_require__(52844);
const isFipsRegion_1 = __nccwpck_require__(82440);
const resolveRegionConfig = (input) => {
const { region, useFipsEndpoint } = input;
if (!region) {
throw new Error("Region is missing");
}
return {
...input,
region: async () => {
if (typeof region === "string") {
return getRealRegion_1.getRealRegion(region);
}
const providedRegion = await region();
return getRealRegion_1.getRealRegion(providedRegion);
},
useFipsEndpoint: async () => {
const providedRegion = typeof region === "string" ? region : await region();
if (isFipsRegion_1.isFipsRegion(providedRegion)) {
return true;
}
return typeof useFipsEndpoint === "boolean" ? Promise.resolve(useFipsEndpoint) : useFipsEndpoint();
},
};
};
exports.resolveRegionConfig = resolveRegionConfig;
/***/ }),
/***/ 3566:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 56057:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 15280:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getHostnameFromVariants = void 0;
const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => {
var _a;
return (_a = variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))) === null || _a === void 0 ? void 0 : _a.hostname;
};
exports.getHostnameFromVariants = getHostnameFromVariants;
/***/ }),
/***/ 26167:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRegionInfo = void 0;
const getHostnameFromVariants_1 = __nccwpck_require__(15280);
const getResolvedHostname_1 = __nccwpck_require__(63877);
const getResolvedPartition_1 = __nccwpck_require__(37642);
const getResolvedSigningRegion_1 = __nccwpck_require__(53517);
const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => {
var _a, _b, _c, _d, _e, _f;
const partition = getResolvedPartition_1.getResolvedPartition(region, { partitionHash });
const resolvedRegion = region in regionHash ? region : (_b = (_a = partitionHash[partition]) === null || _a === void 0 ? void 0 : _a.endpoint) !== null && _b !== void 0 ? _b : region;
const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
const regionHostname = getHostnameFromVariants_1.getHostnameFromVariants((_c = regionHash[resolvedRegion]) === null || _c === void 0 ? void 0 : _c.variants, hostnameOptions);
const partitionHostname = getHostnameFromVariants_1.getHostnameFromVariants((_d = partitionHash[partition]) === null || _d === void 0 ? void 0 : _d.variants, hostnameOptions);
const hostname = getResolvedHostname_1.getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
if (hostname === undefined) {
throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
}
const signingRegion = getResolvedSigningRegion_1.getResolvedSigningRegion(hostname, {
signingRegion: (_e = regionHash[resolvedRegion]) === null || _e === void 0 ? void 0 : _e.signingRegion,
regionRegex: partitionHash[partition].regionRegex,
useFipsEndpoint,
});
return {
partition,
signingService,
hostname,
...(signingRegion && { signingRegion }),
...(((_f = regionHash[resolvedRegion]) === null || _f === void 0 ? void 0 : _f.signingService) && {
signingService: regionHash[resolvedRegion].signingService,
}),
};
};
exports.getRegionInfo = getRegionInfo;
/***/ }),
/***/ 63877:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getResolvedHostname = void 0;
const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname
? regionHostname
: partitionHostname
? partitionHostname.replace("{region}", resolvedRegion)
: undefined;
exports.getResolvedHostname = getResolvedHostname;
/***/ }),
/***/ 37642:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getResolvedPartition = void 0;
const getResolvedPartition = (region, { partitionHash }) => { var _a; return (_a = Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region))) !== null && _a !== void 0 ? _a : "aws"; };
exports.getResolvedPartition = getResolvedPartition;
/***/ }),
/***/ 53517:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getResolvedSigningRegion = void 0;
const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
if (signingRegion) {
return signingRegion;
}
else if (useFipsEndpoint) {
const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
const regionRegexmatchArray = hostname.match(regionRegexJs);
if (regionRegexmatchArray) {
return regionRegexmatchArray[0].slice(1, -1);
}
}
};
exports.getResolvedSigningRegion = getResolvedSigningRegion;
/***/ }),
/***/ 86258:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(3566), exports);
tslib_1.__exportStar(__nccwpck_require__(56057), exports);
tslib_1.__exportStar(__nccwpck_require__(26167), exports);
/***/ }),
/***/ 15972:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromEnv = exports.ENV_EXPIRATION = exports.ENV_SESSION = exports.ENV_SECRET = exports.ENV_KEY = void 0;
const property_provider_1 = __nccwpck_require__(74462);
exports.ENV_KEY = "AWS_ACCESS_KEY_ID";
exports.ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
exports.ENV_SESSION = "AWS_SESSION_TOKEN";
exports.ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
function fromEnv() {
return () => {
const accessKeyId = process.env[exports.ENV_KEY];
const secretAccessKey = process.env[exports.ENV_SECRET];
const expiry = process.env[exports.ENV_EXPIRATION];
if (accessKeyId && secretAccessKey) {
return Promise.resolve({
accessKeyId,
secretAccessKey,
sessionToken: process.env[exports.ENV_SESSION],
expiration: expiry ? new Date(expiry) : undefined,
});
}
return Promise.reject(new property_provider_1.CredentialsProviderError("Unable to find environment variable credentials."));
};
}
exports.fromEnv = fromEnv;
/***/ }),
/***/ 3736:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Endpoint = void 0;
var Endpoint;
(function (Endpoint) {
Endpoint["IPv4"] = "http://169.254.169.254";
Endpoint["IPv6"] = "http://[fd00:ec2::254]";
})(Endpoint = exports.Endpoint || (exports.Endpoint = {}));
/***/ }),
/***/ 18438:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ENDPOINT_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_NAME = exports.ENV_ENDPOINT_NAME = void 0;
exports.ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
exports.CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
exports.ENDPOINT_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_NAME],
configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_NAME],
default: undefined,
};
/***/ }),
/***/ 21695:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.EndpointMode = void 0;
var EndpointMode;
(function (EndpointMode) {
EndpointMode["IPv4"] = "IPv4";
EndpointMode["IPv6"] = "IPv6";
})(EndpointMode = exports.EndpointMode || (exports.EndpointMode = {}));
/***/ }),
/***/ 97824:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ENDPOINT_MODE_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_MODE_NAME = exports.ENV_ENDPOINT_MODE_NAME = void 0;
const EndpointMode_1 = __nccwpck_require__(21695);
exports.ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
exports.CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
exports.ENDPOINT_MODE_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_MODE_NAME],
configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_MODE_NAME],
default: EndpointMode_1.EndpointMode.IPv4,
};
/***/ }),
/***/ 75232:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromContainerMetadata = exports.ENV_CMDS_AUTH_TOKEN = exports.ENV_CMDS_RELATIVE_URI = exports.ENV_CMDS_FULL_URI = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const url_1 = __nccwpck_require__(78835);
const httpRequest_1 = __nccwpck_require__(81303);
const ImdsCredentials_1 = __nccwpck_require__(91467);
const RemoteProviderInit_1 = __nccwpck_require__(72314);
const retry_1 = __nccwpck_require__(49912);
exports.ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
exports.ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
exports.ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
const fromContainerMetadata = (init = {}) => {
const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init);
return () => retry_1.retry(async () => {
const requestOptions = await getCmdsUri();
const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) {
throw new property_provider_1.CredentialsProviderError("Invalid response received from instance metadata service.");
}
return ImdsCredentials_1.fromImdsCredentials(credsResponse);
}, maxRetries);
};
exports.fromContainerMetadata = fromContainerMetadata;
const requestFromEcsImds = async (timeout, options) => {
if (process.env[exports.ENV_CMDS_AUTH_TOKEN]) {
options.headers = {
...options.headers,
Authorization: process.env[exports.ENV_CMDS_AUTH_TOKEN],
};
}
const buffer = await httpRequest_1.httpRequest({
...options,
timeout,
});
return buffer.toString();
};
const CMDS_IP = "169.254.170.2";
const GREENGRASS_HOSTS = {
localhost: true,
"127.0.0.1": true,
};
const GREENGRASS_PROTOCOLS = {
"http:": true,
"https:": true,
};
const getCmdsUri = async () => {
if (process.env[exports.ENV_CMDS_RELATIVE_URI]) {
return {
hostname: CMDS_IP,
path: process.env[exports.ENV_CMDS_RELATIVE_URI],
};
}
if (process.env[exports.ENV_CMDS_FULL_URI]) {
const parsed = url_1.parse(process.env[exports.ENV_CMDS_FULL_URI]);
if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
throw new property_provider_1.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false);
}
if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
throw new property_provider_1.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false);
}
return {
...parsed,
port: parsed.port ? parseInt(parsed.port, 10) : undefined,
};
}
throw new property_provider_1.CredentialsProviderError("The container metadata credential provider cannot be used unless" +
` the ${exports.ENV_CMDS_RELATIVE_URI} or ${exports.ENV_CMDS_FULL_URI} environment` +
" variable is set", false);
};
/***/ }),
/***/ 35813:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromInstanceMetadata = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const httpRequest_1 = __nccwpck_require__(81303);
const ImdsCredentials_1 = __nccwpck_require__(91467);
const RemoteProviderInit_1 = __nccwpck_require__(72314);
const retry_1 = __nccwpck_require__(49912);
const getInstanceMetadataEndpoint_1 = __nccwpck_require__(41206);
const IMDS_PATH = "/latest/meta-data/iam/security-credentials/";
const IMDS_TOKEN_PATH = "/latest/api/token";
const fromInstanceMetadata = (init = {}) => {
let disableFetchToken = false;
const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init);
const getCredentials = async (maxRetries, options) => {
const profile = (await retry_1.retry(async () => {
let profile;
try {
profile = await getProfile(options);
}
catch (err) {
if (err.statusCode === 401) {
disableFetchToken = false;
}
throw err;
}
return profile;
}, maxRetries)).trim();
return retry_1.retry(async () => {
let creds;
try {
creds = await getCredentialsFromProfile(profile, options);
}
catch (err) {
if (err.statusCode === 401) {
disableFetchToken = false;
}
throw err;
}
return creds;
}, maxRetries);
};
return async () => {
const endpoint = await getInstanceMetadataEndpoint_1.getInstanceMetadataEndpoint();
if (disableFetchToken) {
return getCredentials(maxRetries, { ...endpoint, timeout });
}
else {
let token;
try {
token = (await getMetadataToken({ ...endpoint, timeout })).toString();
}
catch (error) {
if ((error === null || error === void 0 ? void 0 : error.statusCode) === 400) {
throw Object.assign(error, {
message: "EC2 Metadata token request returned error",
});
}
else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) {
disableFetchToken = true;
}
return getCredentials(maxRetries, { ...endpoint, timeout });
}
return getCredentials(maxRetries, {
...endpoint,
headers: {
"x-aws-ec2-metadata-token": token,
},
timeout,
});
}
};
};
exports.fromInstanceMetadata = fromInstanceMetadata;
const getMetadataToken = async (options) => httpRequest_1.httpRequest({
...options,
path: IMDS_TOKEN_PATH,
method: "PUT",
headers: {
"x-aws-ec2-metadata-token-ttl-seconds": "21600",
},
});
const getProfile = async (options) => (await httpRequest_1.httpRequest({ ...options, path: IMDS_PATH })).toString();
const getCredentialsFromProfile = async (profile, options) => {
const credsResponse = JSON.parse((await httpRequest_1.httpRequest({
...options,
path: IMDS_PATH + profile,
})).toString());
if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) {
throw new property_provider_1.CredentialsProviderError("Invalid response received from instance metadata service.");
}
return ImdsCredentials_1.fromImdsCredentials(credsResponse);
};
/***/ }),
/***/ 25898:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(75232), exports);
tslib_1.__exportStar(__nccwpck_require__(35813), exports);
tslib_1.__exportStar(__nccwpck_require__(72314), exports);
/***/ }),
/***/ 91467:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromImdsCredentials = exports.isImdsCredentials = void 0;
const isImdsCredentials = (arg) => Boolean(arg) &&
typeof arg === "object" &&
typeof arg.AccessKeyId === "string" &&
typeof arg.SecretAccessKey === "string" &&
typeof arg.Token === "string" &&
typeof arg.Expiration === "string";
exports.isImdsCredentials = isImdsCredentials;
const fromImdsCredentials = (creds) => ({
accessKeyId: creds.AccessKeyId,
secretAccessKey: creds.SecretAccessKey,
sessionToken: creds.Token,
expiration: new Date(creds.Expiration),
});
exports.fromImdsCredentials = fromImdsCredentials;
/***/ }),
/***/ 72314:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.providerConfigFromInit = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_TIMEOUT = void 0;
exports.DEFAULT_TIMEOUT = 1000;
exports.DEFAULT_MAX_RETRIES = 0;
const providerConfigFromInit = ({ maxRetries = exports.DEFAULT_MAX_RETRIES, timeout = exports.DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });
exports.providerConfigFromInit = providerConfigFromInit;
/***/ }),
/***/ 81303:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.httpRequest = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const buffer_1 = __nccwpck_require__(64293);
const http_1 = __nccwpck_require__(98605);
function httpRequest(options) {
return new Promise((resolve, reject) => {
var _a;
const req = http_1.request({
method: "GET",
...options,
hostname: (_a = options.hostname) === null || _a === void 0 ? void 0 : _a.replace(/^\[(.+)\]$/, "$1"),
});
req.on("error", (err) => {
reject(Object.assign(new property_provider_1.ProviderError("Unable to connect to instance metadata service"), err));
req.destroy();
});
req.on("timeout", () => {
reject(new property_provider_1.ProviderError("TimeoutError from instance metadata service"));
req.destroy();
});
req.on("response", (res) => {
const { statusCode = 400 } = res;
if (statusCode < 200 || 300 <= statusCode) {
reject(Object.assign(new property_provider_1.ProviderError("Error response received from instance metadata service"), { statusCode }));
req.destroy();
}
const chunks = [];
res.on("data", (chunk) => {
chunks.push(chunk);
});
res.on("end", () => {
resolve(buffer_1.Buffer.concat(chunks));
req.destroy();
});
});
req.end();
});
}
exports.httpRequest = httpRequest;
/***/ }),
/***/ 49912:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.retry = void 0;
const retry = (toRetry, maxRetries) => {
let promise = toRetry();
for (let i = 0; i < maxRetries; i++) {
promise = promise.catch(toRetry);
}
return promise;
};
exports.retry = retry;
/***/ }),
/***/ 41206:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getInstanceMetadataEndpoint = void 0;
const node_config_provider_1 = __nccwpck_require__(87684);
const url_parser_1 = __nccwpck_require__(2992);
const Endpoint_1 = __nccwpck_require__(3736);
const EndpointConfigOptions_1 = __nccwpck_require__(18438);
const EndpointMode_1 = __nccwpck_require__(21695);
const EndpointModeConfigOptions_1 = __nccwpck_require__(97824);
const getInstanceMetadataEndpoint = async () => url_parser_1.parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));
exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;
const getFromEndpointConfig = async () => node_config_provider_1.loadConfig(EndpointConfigOptions_1.ENDPOINT_CONFIG_OPTIONS)();
const getFromEndpointModeConfig = async () => {
const endpointMode = await node_config_provider_1.loadConfig(EndpointModeConfigOptions_1.ENDPOINT_MODE_CONFIG_OPTIONS)();
switch (endpointMode) {
case EndpointMode_1.EndpointMode.IPv4:
return Endpoint_1.Endpoint.IPv4;
case EndpointMode_1.EndpointMode.IPv6:
return Endpoint_1.Endpoint.IPv6;
default:
throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode_1.EndpointMode)}`);
}
};
/***/ }),
/***/ 74203:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromIni = void 0;
const credential_provider_env_1 = __nccwpck_require__(15972);
const credential_provider_imds_1 = __nccwpck_require__(25898);
const credential_provider_sso_1 = __nccwpck_require__(26414);
const credential_provider_web_identity_1 = __nccwpck_require__(15646);
const property_provider_1 = __nccwpck_require__(74462);
const util_credentials_1 = __nccwpck_require__(98598);
const isStaticCredsProfile = (arg) => Boolean(arg) &&
typeof arg === "object" &&
typeof arg.aws_access_key_id === "string" &&
typeof arg.aws_secret_access_key === "string" &&
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1;
const isWebIdentityProfile = (arg) => Boolean(arg) &&
typeof arg === "object" &&
typeof arg.web_identity_token_file === "string" &&
typeof arg.role_arn === "string" &&
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
const isAssumeRoleProfile = (arg) => Boolean(arg) &&
typeof arg === "object" &&
typeof arg.role_arn === "string" &&
["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 &&
["undefined", "string"].indexOf(typeof arg.external_id) > -1 &&
["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1;
const isAssumeRoleWithSourceProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
const isAssumeRoleWithProviderProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
const fromIni = (init = {}) => async () => {
const profiles = await util_credentials_1.parseKnownFiles(init);
return resolveProfileData(util_credentials_1.getMasterProfileName(init), profiles, init);
};
exports.fromIni = fromIni;
const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}) => {
const data = profiles[profileName];
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
return resolveStaticCredentials(data);
}
if (isAssumeRoleWithSourceProfile(data) || isAssumeRoleWithProviderProfile(data)) {
const { external_id: ExternalId, mfa_serial, role_arn: RoleArn, role_session_name: RoleSessionName = "aws-sdk-js-" + Date.now(), source_profile, credential_source, } = data;
if (!options.roleAssumer) {
throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires a role to be assumed, but no` + ` role assumption callback was provided.`, false);
}
if (source_profile && source_profile in visitedProfiles) {
throw new property_provider_1.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +
` ${util_credentials_1.getMasterProfileName(options)}. Profiles visited: ` +
Object.keys(visitedProfiles).join(", "), false);
}
const sourceCreds = source_profile
? resolveProfileData(source_profile, profiles, options, {
...visitedProfiles,
[source_profile]: true,
})
: resolveCredentialSource(credential_source, profileName)();
const params = { RoleArn, RoleSessionName, ExternalId };
if (mfa_serial) {
if (!options.mfaCodeProvider) {
throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication,` + ` but no MFA code callback was provided.`, false);
}
params.SerialNumber = mfa_serial;
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
}
return options.roleAssumer(await sourceCreds, params);
}
if (isStaticCredsProfile(data)) {
return resolveStaticCredentials(data);
}
if (isWebIdentityProfile(data)) {
return resolveWebIdentityCredentials(data, options);
}
if (credential_provider_sso_1.isSsoProfile(data)) {
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = credential_provider_sso_1.validateSsoProfile(data);
return credential_provider_sso_1.fromSSO({
ssoStartUrl: sso_start_url,
ssoAccountId: sso_account_id,
ssoRegion: sso_region,
ssoRoleName: sso_role_name,
})();
}
throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared` + ` credentials file.`);
};
const resolveCredentialSource = (credentialSource, profileName) => {
const sourceProvidersMap = {
EcsContainer: credential_provider_imds_1.fromContainerMetadata,
Ec2InstanceMetadata: credential_provider_imds_1.fromInstanceMetadata,
Environment: credential_provider_env_1.fromEnv,
};
if (credentialSource in sourceProvidersMap) {
return sourceProvidersMap[credentialSource]();
}
else {
throw new property_provider_1.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +
`expected EcsContainer or Ec2InstanceMetadata or Environment.`);
}
};
const resolveStaticCredentials = (profile) => Promise.resolve({
accessKeyId: profile.aws_access_key_id,
secretAccessKey: profile.aws_secret_access_key,
sessionToken: profile.aws_session_token,
});
const resolveWebIdentityCredentials = async (profile, options) => credential_provider_web_identity_1.fromTokenFile({
webIdentityTokenFile: profile.web_identity_token_file,
roleArn: profile.role_arn,
roleSessionName: profile.role_session_name,
roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
})();
/***/ }),
/***/ 75531:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultProvider = exports.ENV_IMDS_DISABLED = void 0;
const credential_provider_env_1 = __nccwpck_require__(15972);
const credential_provider_imds_1 = __nccwpck_require__(25898);
const credential_provider_ini_1 = __nccwpck_require__(74203);
const credential_provider_process_1 = __nccwpck_require__(89969);
const credential_provider_sso_1 = __nccwpck_require__(26414);
const credential_provider_web_identity_1 = __nccwpck_require__(15646);
const property_provider_1 = __nccwpck_require__(74462);
const shared_ini_file_loader_1 = __nccwpck_require__(67387);
const util_credentials_1 = __nccwpck_require__(98598);
exports.ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
const defaultProvider = (init = {}) => {
const options = { profile: process.env[util_credentials_1.ENV_PROFILE], ...init };
if (!options.loadedConfig)
options.loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init);
const providers = [
credential_provider_sso_1.fromSSO(options),
credential_provider_ini_1.fromIni(options),
credential_provider_process_1.fromProcess(options),
credential_provider_web_identity_1.fromTokenFile(options),
remoteProvider(options),
async () => {
throw new property_provider_1.CredentialsProviderError("Could not load credentials from any providers", false);
},
];
if (!options.profile)
providers.unshift(credential_provider_env_1.fromEnv());
const providerChain = property_provider_1.chain(...providers);
return property_provider_1.memoize(providerChain, (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, (credentials) => credentials.expiration !== undefined);
};
exports.defaultProvider = defaultProvider;
const remoteProvider = (init) => {
if (process.env[credential_provider_imds_1.ENV_CMDS_RELATIVE_URI] || process.env[credential_provider_imds_1.ENV_CMDS_FULL_URI]) {
return credential_provider_imds_1.fromContainerMetadata(init);
}
if (process.env[exports.ENV_IMDS_DISABLED]) {
return () => Promise.reject(new property_provider_1.CredentialsProviderError("EC2 Instance Metadata Service access disabled"));
}
return credential_provider_imds_1.fromInstanceMetadata(init);
};
/***/ }),
/***/ 89969:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromProcess = exports.ENV_PROFILE = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const util_credentials_1 = __nccwpck_require__(98598);
const child_process_1 = __nccwpck_require__(63129);
exports.ENV_PROFILE = "AWS_PROFILE";
const fromProcess = (init = {}) => async () => {
const profiles = await util_credentials_1.parseKnownFiles(init);
return resolveProcessCredentials(util_credentials_1.getMasterProfileName(init), profiles);
};
exports.fromProcess = fromProcess;
const resolveProcessCredentials = async (profileName, profiles) => {
const profile = profiles[profileName];
if (profiles[profileName]) {
const credentialProcess = profile["credential_process"];
if (credentialProcess !== undefined) {
return await execPromise(credentialProcess)
.then((processResult) => {
let data;
try {
data = JSON.parse(processResult);
}
catch (_a) {
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
}
const { Version: version, AccessKeyId: accessKeyId, SecretAccessKey: secretAccessKey, SessionToken: sessionToken, Expiration: expiration, } = data;
if (version !== 1) {
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
}
if (accessKeyId === undefined || secretAccessKey === undefined) {
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
}
let expirationUnix;
if (expiration) {
const currentTime = new Date();
const expireTime = new Date(expiration);
if (expireTime < currentTime) {
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
}
expirationUnix = Math.floor(new Date(expiration).valueOf() / 1000);
}
return {
accessKeyId,
secretAccessKey,
sessionToken,
expirationUnix,
};
})
.catch((error) => {
throw new property_provider_1.CredentialsProviderError(error.message);
});
}
else {
throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
}
}
else {
throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);
}
};
const execPromise = (command) => new Promise(function (resolve, reject) {
child_process_1.exec(command, (error, stdout) => {
if (error) {
reject(error);
return;
}
resolve(stdout.trim());
});
});
/***/ }),
/***/ 26414:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isSsoProfile = exports.validateSsoProfile = exports.fromSSO = exports.EXPIRE_WINDOW_MS = void 0;
const client_sso_1 = __nccwpck_require__(82666);
const property_provider_1 = __nccwpck_require__(74462);
const shared_ini_file_loader_1 = __nccwpck_require__(67387);
const util_credentials_1 = __nccwpck_require__(98598);
const crypto_1 = __nccwpck_require__(76417);
const fs_1 = __nccwpck_require__(35747);
const path_1 = __nccwpck_require__(85622);
exports.EXPIRE_WINDOW_MS = 15 * 60 * 1000;
const SHOULD_FAIL_CREDENTIAL_CHAIN = false;
const fromSSO = (init = {}) => async () => {
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient } = init;
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName) {
const profiles = await util_credentials_1.parseKnownFiles(init);
const profileName = util_credentials_1.getMasterProfileName(init);
const profile = profiles[profileName];
if (!exports.isSsoProfile(profile)) {
throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);
}
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = exports.validateSsoProfile(profile);
return resolveSSOCredentials({
ssoStartUrl: sso_start_url,
ssoAccountId: sso_account_id,
ssoRegion: sso_region,
ssoRoleName: sso_role_name,
ssoClient: ssoClient,
});
}
else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
throw new property_provider_1.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl",' +
' "ssoAccountId", "ssoRegion", "ssoRoleName"');
}
else {
return resolveSSOCredentials({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient });
}
};
exports.fromSSO = fromSSO;
const resolveSSOCredentials = async ({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, }) => {
const hasher = crypto_1.createHash("sha1");
const cacheName = hasher.update(ssoStartUrl).digest("hex");
const tokenFile = path_1.join(shared_ini_file_loader_1.getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
let token;
try {
token = JSON.parse(fs_1.readFileSync(tokenFile, { encoding: "utf-8" }));
if (new Date(token.expiresAt).getTime() - Date.now() <= exports.EXPIRE_WINDOW_MS) {
throw new Error("SSO token is expired.");
}
}
catch (e) {
throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session ` +
`run aws sso login with the corresponding profile.`, SHOULD_FAIL_CREDENTIAL_CHAIN);
}
const { accessToken } = token;
const sso = ssoClient || new client_sso_1.SSOClient({ region: ssoRegion });
let ssoResp;
try {
ssoResp = await sso.send(new client_sso_1.GetRoleCredentialsCommand({
accountId: ssoAccountId,
roleName: ssoRoleName,
accessToken,
}));
}
catch (e) {
throw property_provider_1.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN);
}
const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp;
if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
throw new property_provider_1.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN);
}
return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration) };
};
const validateSsoProfile = (profile) => {
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
throw new property_provider_1.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", ` +
`"sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, SHOULD_FAIL_CREDENTIAL_CHAIN);
}
return profile;
};
exports.validateSsoProfile = validateSsoProfile;
const isSsoProfile = (arg) => arg &&
(typeof arg.sso_start_url === "string" ||
typeof arg.sso_account_id === "string" ||
typeof arg.sso_region === "string" ||
typeof arg.sso_role_name === "string");
exports.isSsoProfile = isSsoProfile;
/***/ }),
/***/ 35614:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromTokenFile = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const fs_1 = __nccwpck_require__(35747);
const fromWebToken_1 = __nccwpck_require__(47905);
const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
const ENV_ROLE_ARN = "AWS_ROLE_ARN";
const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
const fromTokenFile = (init = {}) => async () => {
return resolveTokenFile(init);
};
exports.fromTokenFile = fromTokenFile;
const resolveTokenFile = (init) => {
var _a, _b, _c;
const webIdentityTokenFile = (_a = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _a !== void 0 ? _a : process.env[ENV_TOKEN_FILE];
const roleArn = (_b = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _b !== void 0 ? _b : process.env[ENV_ROLE_ARN];
const roleSessionName = (_c = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_SESSION_NAME];
if (!webIdentityTokenFile || !roleArn) {
throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified");
}
return fromWebToken_1.fromWebToken({
...init,
webIdentityToken: fs_1.readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
roleArn,
roleSessionName,
})();
};
/***/ }),
/***/ 47905:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromWebToken = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const fromWebToken = (init) => () => {
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds, roleAssumerWithWebIdentity, } = init;
if (!roleAssumerWithWebIdentity) {
throw new property_provider_1.CredentialsProviderError(`Role Arn '${roleArn}' needs to be assumed with web identity,` +
` but no role assumption callback was provided.`, false);
}
return roleAssumerWithWebIdentity({
RoleArn: roleArn,
RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`,
WebIdentityToken: webIdentityToken,
ProviderId: providerId,
PolicyArns: policyArns,
Policy: policy,
DurationSeconds: durationSeconds,
});
};
exports.fromWebToken = fromWebToken;
/***/ }),
/***/ 15646:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(35614), exports);
tslib_1.__exportStar(__nccwpck_require__(47905), exports);
/***/ }),
/***/ 97442:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Hash = void 0;
const util_buffer_from_1 = __nccwpck_require__(36010);
const buffer_1 = __nccwpck_require__(64293);
const crypto_1 = __nccwpck_require__(76417);
class Hash {
constructor(algorithmIdentifier, secret) {
this.hash = secret ? crypto_1.createHmac(algorithmIdentifier, castSourceData(secret)) : crypto_1.createHash(algorithmIdentifier);
}
update(toHash, encoding) {
this.hash.update(castSourceData(toHash, encoding));
}
digest() {
return Promise.resolve(this.hash.digest());
}
}
exports.Hash = Hash;
function castSourceData(toCast, encoding) {
if (buffer_1.Buffer.isBuffer(toCast)) {
return toCast;
}
if (typeof toCast === "string") {
return util_buffer_from_1.fromString(toCast, encoding);
}
if (ArrayBuffer.isView(toCast)) {
return util_buffer_from_1.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
}
return util_buffer_from_1.fromArrayBuffer(toCast);
}
/***/ }),
/***/ 69126:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isArrayBuffer = void 0;
const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) ||
Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
exports.isArrayBuffer = isArrayBuffer;
/***/ }),
/***/ 42245:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getContentLengthPlugin = exports.contentLengthMiddlewareOptions = exports.contentLengthMiddleware = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const CONTENT_LENGTH_HEADER = "content-length";
function contentLengthMiddleware(bodyLengthChecker) {
return (next) => async (args) => {
const request = args.request;
if (protocol_http_1.HttpRequest.isInstance(request)) {
const { body, headers } = request;
if (body &&
Object.keys(headers)
.map((str) => str.toLowerCase())
.indexOf(CONTENT_LENGTH_HEADER) === -1) {
const length = bodyLengthChecker(body);
if (length !== undefined) {
request.headers = {
...request.headers,
[CONTENT_LENGTH_HEADER]: String(length),
};
}
}
}
return next({
...args,
request,
});
};
}
exports.contentLengthMiddleware = contentLengthMiddleware;
exports.contentLengthMiddlewareOptions = {
step: "build",
tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
name: "contentLengthMiddleware",
override: true,
};
const getContentLengthPlugin = (options) => ({
applyToStack: (clientStack) => {
clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), exports.contentLengthMiddlewareOptions);
},
});
exports.getContentLengthPlugin = getContentLengthPlugin;
/***/ }),
/***/ 22545:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getHostHeaderPlugin = exports.hostHeaderMiddlewareOptions = exports.hostHeaderMiddleware = exports.resolveHostHeaderConfig = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
function resolveHostHeaderConfig(input) {
return input;
}
exports.resolveHostHeaderConfig = resolveHostHeaderConfig;
const hostHeaderMiddleware = (options) => (next) => async (args) => {
if (!protocol_http_1.HttpRequest.isInstance(args.request))
return next(args);
const { request } = args;
const { handlerProtocol = "" } = options.requestHandler.metadata || {};
if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
delete request.headers["host"];
request.headers[":authority"] = "";
}
else if (!request.headers["host"]) {
request.headers["host"] = request.hostname;
}
return next(args);
};
exports.hostHeaderMiddleware = hostHeaderMiddleware;
exports.hostHeaderMiddlewareOptions = {
name: "hostHeaderMiddleware",
step: "build",
priority: "low",
tags: ["HOST"],
override: true,
};
const getHostHeaderPlugin = (options) => ({
applyToStack: (clientStack) => {
clientStack.add(exports.hostHeaderMiddleware(options), exports.hostHeaderMiddlewareOptions);
},
});
exports.getHostHeaderPlugin = getHostHeaderPlugin;
/***/ }),
/***/ 20014:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(9754), exports);
/***/ }),
/***/ 9754:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getLoggerPlugin = exports.loggerMiddlewareOptions = exports.loggerMiddleware = void 0;
const loggerMiddleware = () => (next, context) => async (args) => {
const { clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog } = context;
const response = await next(args);
if (!logger) {
return response;
}
if (typeof logger.info === "function") {
const { $metadata, ...outputWithoutMetadata } = response.output;
logger.info({
clientName,
commandName,
input: inputFilterSensitiveLog(args.input),
output: outputFilterSensitiveLog(outputWithoutMetadata),
metadata: $metadata,
});
}
return response;
};
exports.loggerMiddleware = loggerMiddleware;
exports.loggerMiddlewareOptions = {
name: "loggerMiddleware",
tags: ["LOGGER"],
step: "initialize",
override: true,
};
const getLoggerPlugin = (options) => ({
applyToStack: (clientStack) => {
clientStack.add(exports.loggerMiddleware(), exports.loggerMiddlewareOptions);
},
});
exports.getLoggerPlugin = getLoggerPlugin;
/***/ }),
/***/ 47328:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AdaptiveRetryStrategy = void 0;
const config_1 = __nccwpck_require__(55192);
const DefaultRateLimiter_1 = __nccwpck_require__(6402);
const StandardRetryStrategy_1 = __nccwpck_require__(533);
class AdaptiveRetryStrategy extends StandardRetryStrategy_1.StandardRetryStrategy {
constructor(maxAttemptsProvider, options) {
const { rateLimiter, ...superOptions } = options !== null && options !== void 0 ? options : {};
super(maxAttemptsProvider, superOptions);
this.rateLimiter = rateLimiter !== null && rateLimiter !== void 0 ? rateLimiter : new DefaultRateLimiter_1.DefaultRateLimiter();
this.mode = config_1.RETRY_MODES.ADAPTIVE;
}
async retry(next, args) {
return super.retry(next, args, {
beforeRequest: async () => {
return this.rateLimiter.getSendToken();
},
afterRequest: (response) => {
this.rateLimiter.updateClientSendingRate(response);
},
});
}
}
exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
/***/ }),
/***/ 6402:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DefaultRateLimiter = void 0;
const service_error_classification_1 = __nccwpck_require__(61921);
class DefaultRateLimiter {
constructor(options) {
var _a, _b, _c, _d, _e;
this.currentCapacity = 0;
this.enabled = false;
this.lastMaxRate = 0;
this.measuredTxRate = 0;
this.requestCount = 0;
this.lastTimestamp = 0;
this.timeWindow = 0;
this.beta = (_a = options === null || options === void 0 ? void 0 : options.beta) !== null && _a !== void 0 ? _a : 0.7;
this.minCapacity = (_b = options === null || options === void 0 ? void 0 : options.minCapacity) !== null && _b !== void 0 ? _b : 1;
this.minFillRate = (_c = options === null || options === void 0 ? void 0 : options.minFillRate) !== null && _c !== void 0 ? _c : 0.5;
this.scaleConstant = (_d = options === null || options === void 0 ? void 0 : options.scaleConstant) !== null && _d !== void 0 ? _d : 0.4;
this.smooth = (_e = options === null || options === void 0 ? void 0 : options.smooth) !== null && _e !== void 0 ? _e : 0.8;
const currentTimeInSeconds = this.getCurrentTimeInSeconds();
this.lastThrottleTime = currentTimeInSeconds;
this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
this.fillRate = this.minFillRate;
this.maxCapacity = this.minCapacity;
}
getCurrentTimeInSeconds() {
return Date.now() / 1000;
}
async getSendToken() {
return this.acquireTokenBucket(1);
}
async acquireTokenBucket(amount) {
if (!this.enabled) {
return;
}
this.refillTokenBucket();
if (amount > this.currentCapacity) {
const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;
await new Promise((resolve) => setTimeout(resolve, delay));
}
this.currentCapacity = this.currentCapacity - amount;
}
refillTokenBucket() {
const timestamp = this.getCurrentTimeInSeconds();
if (!this.lastTimestamp) {
this.lastTimestamp = timestamp;
return;
}
const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);
this.lastTimestamp = timestamp;
}
updateClientSendingRate(response) {
let calculatedRate;
this.updateMeasuredRate();
if (service_error_classification_1.isThrottlingError(response)) {
const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
this.lastMaxRate = rateToUse;
this.calculateTimeWindow();
this.lastThrottleTime = this.getCurrentTimeInSeconds();
calculatedRate = this.cubicThrottle(rateToUse);
this.enableTokenBucket();
}
else {
this.calculateTimeWindow();
calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
}
const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
this.updateTokenBucketRate(newRate);
}
calculateTimeWindow() {
this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));
}
cubicThrottle(rateToUse) {
return this.getPrecise(rateToUse * this.beta);
}
cubicSuccess(timestamp) {
return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
}
enableTokenBucket() {
this.enabled = true;
}
updateTokenBucketRate(newRate) {
this.refillTokenBucket();
this.fillRate = Math.max(newRate, this.minFillRate);
this.maxCapacity = Math.max(newRate, this.minCapacity);
this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);
}
updateMeasuredRate() {
const t = this.getCurrentTimeInSeconds();
const timeBucket = Math.floor(t * 2) / 2;
this.requestCount++;
if (timeBucket > this.lastTxRateBucket) {
const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
this.requestCount = 0;
this.lastTxRateBucket = timeBucket;
}
}
getPrecise(num) {
return parseFloat(num.toFixed(8));
}
}
exports.DefaultRateLimiter = DefaultRateLimiter;
/***/ }),
/***/ 533:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StandardRetryStrategy = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const service_error_classification_1 = __nccwpck_require__(61921);
const uuid_1 = __nccwpck_require__(75840);
const config_1 = __nccwpck_require__(55192);
const constants_1 = __nccwpck_require__(30041);
const defaultRetryQuota_1 = __nccwpck_require__(12568);
const delayDecider_1 = __nccwpck_require__(55940);
const retryDecider_1 = __nccwpck_require__(19572);
class StandardRetryStrategy {
constructor(maxAttemptsProvider, options) {
var _a, _b, _c;
this.maxAttemptsProvider = maxAttemptsProvider;
this.mode = config_1.RETRY_MODES.STANDARD;
this.retryDecider = (_a = options === null || options === void 0 ? void 0 : options.retryDecider) !== null && _a !== void 0 ? _a : retryDecider_1.defaultRetryDecider;
this.delayDecider = (_b = options === null || options === void 0 ? void 0 : options.delayDecider) !== null && _b !== void 0 ? _b : delayDecider_1.defaultDelayDecider;
this.retryQuota = (_c = options === null || options === void 0 ? void 0 : options.retryQuota) !== null && _c !== void 0 ? _c : defaultRetryQuota_1.getDefaultRetryQuota(constants_1.INITIAL_RETRY_TOKENS);
}
shouldRetry(error, attempts, maxAttempts) {
return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);
}
async getMaxAttempts() {
let maxAttempts;
try {
maxAttempts = await this.maxAttemptsProvider();
}
catch (error) {
maxAttempts = config_1.DEFAULT_MAX_ATTEMPTS;
}
return maxAttempts;
}
async retry(next, args, options) {
let retryTokenAmount;
let attempts = 0;
let totalDelay = 0;
const maxAttempts = await this.getMaxAttempts();
const { request } = args;
if (protocol_http_1.HttpRequest.isInstance(request)) {
request.headers[constants_1.INVOCATION_ID_HEADER] = uuid_1.v4();
}
while (true) {
try {
if (protocol_http_1.HttpRequest.isInstance(request)) {
request.headers[constants_1.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
}
if (options === null || options === void 0 ? void 0 : options.beforeRequest) {
await options.beforeRequest();
}
const { response, output } = await next(args);
if (options === null || options === void 0 ? void 0 : options.afterRequest) {
options.afterRequest(response);
}
this.retryQuota.releaseRetryTokens(retryTokenAmount);
output.$metadata.attempts = attempts + 1;
output.$metadata.totalRetryDelay = totalDelay;
return { response, output };
}
catch (e) {
const err = asSdkError(e);
attempts++;
if (this.shouldRetry(err, attempts, maxAttempts)) {
retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
const delay = this.delayDecider(service_error_classification_1.isThrottlingError(err) ? constants_1.THROTTLING_RETRY_DELAY_BASE : constants_1.DEFAULT_RETRY_DELAY_BASE, attempts);
totalDelay += delay;
await new Promise((resolve) => setTimeout(resolve, delay));
continue;
}
if (!err.$metadata) {
err.$metadata = {};
}
err.$metadata.attempts = attempts;
err.$metadata.totalRetryDelay = totalDelay;
throw err;
}
}
}
}
exports.StandardRetryStrategy = StandardRetryStrategy;
const asSdkError = (error) => {
if (error instanceof Error)
return error;
if (error instanceof Object)
return Object.assign(new Error(), error);
if (typeof error === "string")
return new Error(error);
return new Error(`AWS SDK error wrapper for ${error}`);
};
/***/ }),
/***/ 55192:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DEFAULT_RETRY_MODE = exports.DEFAULT_MAX_ATTEMPTS = exports.RETRY_MODES = void 0;
var RETRY_MODES;
(function (RETRY_MODES) {
RETRY_MODES["STANDARD"] = "standard";
RETRY_MODES["ADAPTIVE"] = "adaptive";
})(RETRY_MODES = exports.RETRY_MODES || (exports.RETRY_MODES = {}));
exports.DEFAULT_MAX_ATTEMPTS = 3;
exports.DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;
/***/ }),
/***/ 76160:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NODE_RETRY_MODE_CONFIG_OPTIONS = exports.CONFIG_RETRY_MODE = exports.ENV_RETRY_MODE = exports.resolveRetryConfig = exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = exports.CONFIG_MAX_ATTEMPTS = exports.ENV_MAX_ATTEMPTS = void 0;
const AdaptiveRetryStrategy_1 = __nccwpck_require__(47328);
const config_1 = __nccwpck_require__(55192);
const StandardRetryStrategy_1 = __nccwpck_require__(533);
exports.ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
exports.CONFIG_MAX_ATTEMPTS = "max_attempts";
exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => {
const value = env[exports.ENV_MAX_ATTEMPTS];
if (!value)
return undefined;
const maxAttempt = parseInt(value);
if (Number.isNaN(maxAttempt)) {
throw new Error(`Environment variable ${exports.ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
}
return maxAttempt;
},
configFileSelector: (profile) => {
const value = profile[exports.CONFIG_MAX_ATTEMPTS];
if (!value)
return undefined;
const maxAttempt = parseInt(value);
if (Number.isNaN(maxAttempt)) {
throw new Error(`Shared config file entry ${exports.CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
}
return maxAttempt;
},
default: config_1.DEFAULT_MAX_ATTEMPTS,
};
const resolveRetryConfig = (input) => {
const maxAttempts = normalizeMaxAttempts(input.maxAttempts);
return {
...input,
maxAttempts,
retryStrategy: async () => {
if (input.retryStrategy) {
return input.retryStrategy;
}
const retryMode = await getRetryMode(input.retryMode);
if (retryMode === config_1.RETRY_MODES.ADAPTIVE) {
return new AdaptiveRetryStrategy_1.AdaptiveRetryStrategy(maxAttempts);
}
return new StandardRetryStrategy_1.StandardRetryStrategy(maxAttempts);
},
};
};
exports.resolveRetryConfig = resolveRetryConfig;
const getRetryMode = async (retryMode) => {
if (typeof retryMode === "string") {
return retryMode;
}
return await retryMode();
};
const normalizeMaxAttempts = (maxAttempts = config_1.DEFAULT_MAX_ATTEMPTS) => {
if (typeof maxAttempts === "number") {
const promisified = Promise.resolve(maxAttempts);
return () => promisified;
}
return maxAttempts;
};
exports.ENV_RETRY_MODE = "AWS_RETRY_MODE";
exports.CONFIG_RETRY_MODE = "retry_mode";
exports.NODE_RETRY_MODE_CONFIG_OPTIONS = {
environmentVariableSelector: (env) => env[exports.ENV_RETRY_MODE],
configFileSelector: (profile) => profile[exports.CONFIG_RETRY_MODE],
default: config_1.DEFAULT_RETRY_MODE,
};
/***/ }),
/***/ 30041:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.REQUEST_HEADER = exports.INVOCATION_ID_HEADER = exports.NO_RETRY_INCREMENT = exports.TIMEOUT_RETRY_COST = exports.RETRY_COST = exports.INITIAL_RETRY_TOKENS = exports.THROTTLING_RETRY_DELAY_BASE = exports.MAXIMUM_RETRY_DELAY = exports.DEFAULT_RETRY_DELAY_BASE = void 0;
exports.DEFAULT_RETRY_DELAY_BASE = 100;
exports.MAXIMUM_RETRY_DELAY = 20 * 1000;
exports.THROTTLING_RETRY_DELAY_BASE = 500;
exports.INITIAL_RETRY_TOKENS = 500;
exports.RETRY_COST = 5;
exports.TIMEOUT_RETRY_COST = 10;
exports.NO_RETRY_INCREMENT = 1;
exports.INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
exports.REQUEST_HEADER = "amz-sdk-request";
/***/ }),
/***/ 12568:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getDefaultRetryQuota = void 0;
const constants_1 = __nccwpck_require__(30041);
const getDefaultRetryQuota = (initialRetryTokens, options) => {
var _a, _b, _c;
const MAX_CAPACITY = initialRetryTokens;
const noRetryIncrement = (_a = options === null || options === void 0 ? void 0 : options.noRetryIncrement) !== null && _a !== void 0 ? _a : constants_1.NO_RETRY_INCREMENT;
const retryCost = (_b = options === null || options === void 0 ? void 0 : options.retryCost) !== null && _b !== void 0 ? _b : constants_1.RETRY_COST;
const timeoutRetryCost = (_c = options === null || options === void 0 ? void 0 : options.timeoutRetryCost) !== null && _c !== void 0 ? _c : constants_1.TIMEOUT_RETRY_COST;
let availableCapacity = initialRetryTokens;
const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost);
const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity;
const retrieveRetryTokens = (error) => {
if (!hasRetryTokens(error)) {
throw new Error("No retry token available");
}
const capacityAmount = getCapacityAmount(error);
availableCapacity -= capacityAmount;
return capacityAmount;
};
const releaseRetryTokens = (capacityReleaseAmount) => {
availableCapacity += capacityReleaseAmount !== null && capacityReleaseAmount !== void 0 ? capacityReleaseAmount : noRetryIncrement;
availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
};
return Object.freeze({
hasRetryTokens,
retrieveRetryTokens,
releaseRetryTokens,
});
};
exports.getDefaultRetryQuota = getDefaultRetryQuota;
/***/ }),
/***/ 55940:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultDelayDecider = void 0;
const constants_1 = __nccwpck_require__(30041);
const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(constants_1.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
exports.defaultDelayDecider = defaultDelayDecider;
/***/ }),
/***/ 96064:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(47328), exports);
tslib_1.__exportStar(__nccwpck_require__(6402), exports);
tslib_1.__exportStar(__nccwpck_require__(533), exports);
tslib_1.__exportStar(__nccwpck_require__(55192), exports);
tslib_1.__exportStar(__nccwpck_require__(76160), exports);
tslib_1.__exportStar(__nccwpck_require__(55940), exports);
tslib_1.__exportStar(__nccwpck_require__(43521), exports);
tslib_1.__exportStar(__nccwpck_require__(19572), exports);
tslib_1.__exportStar(__nccwpck_require__(11806), exports);
tslib_1.__exportStar(__nccwpck_require__(48580), exports);
/***/ }),
/***/ 43521:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOmitRetryHeadersPlugin = exports.omitRetryHeadersMiddlewareOptions = exports.omitRetryHeadersMiddleware = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const constants_1 = __nccwpck_require__(30041);
const omitRetryHeadersMiddleware = () => (next) => async (args) => {
const { request } = args;
if (protocol_http_1.HttpRequest.isInstance(request)) {
delete request.headers[constants_1.INVOCATION_ID_HEADER];
delete request.headers[constants_1.REQUEST_HEADER];
}
return next(args);
};
exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;
exports.omitRetryHeadersMiddlewareOptions = {
name: "omitRetryHeadersMiddleware",
tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
relation: "before",
toMiddleware: "awsAuthMiddleware",
override: true,
};
const getOmitRetryHeadersPlugin = (options) => ({
applyToStack: (clientStack) => {
clientStack.addRelativeTo(exports.omitRetryHeadersMiddleware(), exports.omitRetryHeadersMiddlewareOptions);
},
});
exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;
/***/ }),
/***/ 19572:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultRetryDecider = void 0;
const service_error_classification_1 = __nccwpck_require__(61921);
const defaultRetryDecider = (error) => {
if (!error) {
return false;
}
return service_error_classification_1.isRetryableByTrait(error) || service_error_classification_1.isClockSkewError(error) || service_error_classification_1.isThrottlingError(error) || service_error_classification_1.isTransientError(error);
};
exports.defaultRetryDecider = defaultRetryDecider;
/***/ }),
/***/ 11806:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getRetryPlugin = exports.retryMiddlewareOptions = exports.retryMiddleware = void 0;
const retryMiddleware = (options) => (next, context) => async (args) => {
const retryStrategy = await options.retryStrategy();
if (retryStrategy === null || retryStrategy === void 0 ? void 0 : retryStrategy.mode)
context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]];
return retryStrategy.retry(next, args);
};
exports.retryMiddleware = retryMiddleware;
exports.retryMiddlewareOptions = {
name: "retryMiddleware",
tags: ["RETRY"],
step: "finalizeRequest",
priority: "high",
override: true,
};
const getRetryPlugin = (options) => ({
applyToStack: (clientStack) => {
clientStack.add(exports.retryMiddleware(options), exports.retryMiddlewareOptions);
},
});
exports.getRetryPlugin = getRetryPlugin;
/***/ }),
/***/ 48580:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 55959:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveStsAuthConfig = void 0;
const middleware_signing_1 = __nccwpck_require__(14935);
const resolveStsAuthConfig = (input, { stsClientCtor }) => middleware_signing_1.resolveAwsAuthConfig({
...input,
stsClientCtor,
});
exports.resolveStsAuthConfig = resolveStsAuthConfig;
/***/ }),
/***/ 65648:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deserializerMiddleware = void 0;
const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
const { response } = await next(args);
const parsed = await deserializer(response, options);
return {
response,
output: parsed,
};
};
exports.deserializerMiddleware = deserializerMiddleware;
/***/ }),
/***/ 93631:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(65648), exports);
tslib_1.__exportStar(__nccwpck_require__(99328), exports);
tslib_1.__exportStar(__nccwpck_require__(19511), exports);
/***/ }),
/***/ 99328:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getSerdePlugin = exports.serializerMiddlewareOption = exports.deserializerMiddlewareOption = void 0;
const deserializerMiddleware_1 = __nccwpck_require__(65648);
const serializerMiddleware_1 = __nccwpck_require__(19511);
exports.deserializerMiddlewareOption = {
name: "deserializerMiddleware",
step: "deserialize",
tags: ["DESERIALIZER"],
override: true,
};
exports.serializerMiddlewareOption = {
name: "serializerMiddleware",
step: "serialize",
tags: ["SERIALIZER"],
override: true,
};
function getSerdePlugin(config, serializer, deserializer) {
return {
applyToStack: (commandStack) => {
commandStack.add(deserializerMiddleware_1.deserializerMiddleware(config, deserializer), exports.deserializerMiddlewareOption);
commandStack.add(serializerMiddleware_1.serializerMiddleware(config, serializer), exports.serializerMiddlewareOption);
},
};
}
exports.getSerdePlugin = getSerdePlugin;
/***/ }),
/***/ 19511:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.serializerMiddleware = void 0;
const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
const request = await serializer(args.input, options);
return next({
...args,
request,
});
};
exports.serializerMiddleware = serializerMiddleware;
/***/ }),
/***/ 63061:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveSigV4AuthConfig = exports.resolveAwsAuthConfig = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const signature_v4_1 = __nccwpck_require__(37776);
const CREDENTIAL_EXPIRE_WINDOW = 300000;
const resolveAwsAuthConfig = (input) => {
const normalizedCreds = input.credentials
? normalizeCredentialProvider(input.credentials)
: input.credentialDefaultProvider(input);
const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
let signer;
if (input.signer) {
signer = normalizeProvider(input.signer);
}
else {
signer = () => normalizeProvider(input.region)()
.then(async (region) => [
(await input.regionInfoProvider(region, {
useFipsEndpoint: await input.useFipsEndpoint(),
useDualstackEndpoint: await input.useDualstackEndpoint(),
})) || {},
region,
])
.then(([regionInfo, region]) => {
const { signingRegion, signingService } = regionInfo;
input.signingRegion = input.signingRegion || signingRegion || region;
input.signingName = input.signingName || signingService || input.serviceId;
const params = {
...input,
credentials: normalizedCreds,
region: input.signingRegion,
service: input.signingName,
sha256,
uriEscapePath: signingEscapePath,
};
const signerConstructor = input.signerConstructor || signature_v4_1.SignatureV4;
return new signerConstructor(params);
});
}
return {
...input,
systemClockOffset,
signingEscapePath,
credentials: normalizedCreds,
signer,
};
};
exports.resolveAwsAuthConfig = resolveAwsAuthConfig;
const resolveSigV4AuthConfig = (input) => {
const normalizedCreds = input.credentials
? normalizeCredentialProvider(input.credentials)
: input.credentialDefaultProvider(input);
const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
let signer;
if (input.signer) {
signer = normalizeProvider(input.signer);
}
else {
signer = normalizeProvider(new signature_v4_1.SignatureV4({
credentials: normalizedCreds,
region: input.region,
service: input.signingName,
sha256,
uriEscapePath: signingEscapePath,
}));
}
return {
...input,
systemClockOffset,
signingEscapePath,
credentials: normalizedCreds,
signer,
};
};
exports.resolveSigV4AuthConfig = resolveSigV4AuthConfig;
const normalizeProvider = (input) => {
if (typeof input === "object") {
const promisified = Promise.resolve(input);
return () => promisified;
}
return input;
};
const normalizeCredentialProvider = (credentials) => {
if (typeof credentials === "function") {
return property_provider_1.memoize(credentials, (credentials) => credentials.expiration !== undefined &&
credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials) => credentials.expiration !== undefined);
}
return normalizeProvider(credentials);
};
/***/ }),
/***/ 14935:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(63061), exports);
tslib_1.__exportStar(__nccwpck_require__(42509), exports);
/***/ }),
/***/ 42509:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin = exports.awsAuthMiddlewareOptions = exports.awsAuthMiddleware = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const getSkewCorrectedDate_1 = __nccwpck_require__(68253);
const getUpdatedSystemClockOffset_1 = __nccwpck_require__(35863);
const awsAuthMiddleware = (options) => (next, context) => async function (args) {
if (!protocol_http_1.HttpRequest.isInstance(args.request))
return next(args);
const signer = await options.signer();
const output = await next({
...args,
request: await signer.sign(args.request, {
signingDate: getSkewCorrectedDate_1.getSkewCorrectedDate(options.systemClockOffset),
signingRegion: context["signing_region"],
signingService: context["signing_service"],
}),
}).catch((error) => {
if (error.ServerTime) {
options.systemClockOffset = getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset(error.ServerTime, options.systemClockOffset);
}
throw error;
});
const { headers } = output.response;
const dateHeader = headers && (headers.date || headers.Date);
if (dateHeader) {
options.systemClockOffset = getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset);
}
return output;
};
exports.awsAuthMiddleware = awsAuthMiddleware;
exports.awsAuthMiddlewareOptions = {
name: "awsAuthMiddleware",
tags: ["SIGNATURE", "AWSAUTH"],
relation: "after",
toMiddleware: "retryMiddleware",
override: true,
};
const getAwsAuthPlugin = (options) => ({
applyToStack: (clientStack) => {
clientStack.addRelativeTo(exports.awsAuthMiddleware(options), exports.awsAuthMiddlewareOptions);
},
});
exports.getAwsAuthPlugin = getAwsAuthPlugin;
exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin;
/***/ }),
/***/ 68253:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getSkewCorrectedDate = void 0;
const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
exports.getSkewCorrectedDate = getSkewCorrectedDate;
/***/ }),
/***/ 35863:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getUpdatedSystemClockOffset = void 0;
const isClockSkewed_1 = __nccwpck_require__(85301);
const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
const clockTimeInMs = Date.parse(clockTime);
if (isClockSkewed_1.isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
return clockTimeInMs - Date.now();
}
return currentSystemClockOffset;
};
exports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset;
/***/ }),
/***/ 85301:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isClockSkewed = void 0;
const getSkewCorrectedDate_1 = __nccwpck_require__(68253);
const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate_1.getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
exports.isClockSkewed = isClockSkewed;
/***/ }),
/***/ 38399:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.constructStack = void 0;
const constructStack = () => {
let absoluteEntries = [];
let relativeEntries = [];
const entriesNameSet = new Set();
const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||
priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]);
const removeByName = (toRemove) => {
let isRemoved = false;
const filterCb = (entry) => {
if (entry.name && entry.name === toRemove) {
isRemoved = true;
entriesNameSet.delete(toRemove);
return false;
}
return true;
};
absoluteEntries = absoluteEntries.filter(filterCb);
relativeEntries = relativeEntries.filter(filterCb);
return isRemoved;
};
const removeByReference = (toRemove) => {
let isRemoved = false;
const filterCb = (entry) => {
if (entry.middleware === toRemove) {
isRemoved = true;
if (entry.name)
entriesNameSet.delete(entry.name);
return false;
}
return true;
};
absoluteEntries = absoluteEntries.filter(filterCb);
relativeEntries = relativeEntries.filter(filterCb);
return isRemoved;
};
const cloneTo = (toStack) => {
absoluteEntries.forEach((entry) => {
toStack.add(entry.middleware, { ...entry });
});
relativeEntries.forEach((entry) => {
toStack.addRelativeTo(entry.middleware, { ...entry });
});
return toStack;
};
const expandRelativeMiddlewareList = (from) => {
const expandedMiddlewareList = [];
from.before.forEach((entry) => {
if (entry.before.length === 0 && entry.after.length === 0) {
expandedMiddlewareList.push(entry);
}
else {
expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
}
});
expandedMiddlewareList.push(from);
from.after.reverse().forEach((entry) => {
if (entry.before.length === 0 && entry.after.length === 0) {
expandedMiddlewareList.push(entry);
}
else {
expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
}
});
return expandedMiddlewareList;
};
const getMiddlewareList = () => {
const normalizedAbsoluteEntries = [];
const normalizedRelativeEntries = [];
const normalizedEntriesNameMap = {};
absoluteEntries.forEach((entry) => {
const normalizedEntry = {
...entry,
before: [],
after: [],
};
if (normalizedEntry.name)
normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;
normalizedAbsoluteEntries.push(normalizedEntry);
});
relativeEntries.forEach((entry) => {
const normalizedEntry = {
...entry,
before: [],
after: [],
};
if (normalizedEntry.name)
normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry;
normalizedRelativeEntries.push(normalizedEntry);
});
normalizedRelativeEntries.forEach((entry) => {
if (entry.toMiddleware) {
const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
if (toMiddleware === undefined) {
throw new Error(`${entry.toMiddleware} is not found when adding ${entry.name || "anonymous"} middleware ${entry.relation} ${entry.toMiddleware}`);
}
if (entry.relation === "after") {
toMiddleware.after.push(entry);
}
if (entry.relation === "before") {
toMiddleware.before.push(entry);
}
}
});
const mainChain = sort(normalizedAbsoluteEntries)
.map(expandRelativeMiddlewareList)
.reduce((wholeList, expendedMiddlewareList) => {
wholeList.push(...expendedMiddlewareList);
return wholeList;
}, []);
return mainChain.map((entry) => entry.middleware);
};
const stack = {
add: (middleware, options = {}) => {
const { name, override } = options;
const entry = {
step: "initialize",
priority: "normal",
middleware,
...options,
};
if (name) {
if (entriesNameSet.has(name)) {
if (!override)
throw new Error(`Duplicate middleware name '${name}'`);
const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === name);
const toOverride = absoluteEntries[toOverrideIndex];
if (toOverride.step !== entry.step || toOverride.priority !== entry.priority) {
throw new Error(`"${name}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be ` +
`overridden by same-name middleware with ${entry.priority} priority in ${entry.step} step.`);
}
absoluteEntries.splice(toOverrideIndex, 1);
}
entriesNameSet.add(name);
}
absoluteEntries.push(entry);
},
addRelativeTo: (middleware, options) => {
const { name, override } = options;
const entry = {
middleware,
...options,
};
if (name) {
if (entriesNameSet.has(name)) {
if (!override)
throw new Error(`Duplicate middleware name '${name}'`);
const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === name);
const toOverride = relativeEntries[toOverrideIndex];
if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
throw new Error(`"${name}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` +
`by same-name middleware ${entry.relation} "${entry.toMiddleware}" middleware.`);
}
relativeEntries.splice(toOverrideIndex, 1);
}
entriesNameSet.add(name);
}
relativeEntries.push(entry);
},
clone: () => cloneTo(exports.constructStack()),
use: (plugin) => {
plugin.applyToStack(stack);
},
remove: (toRemove) => {
if (typeof toRemove === "string")
return removeByName(toRemove);
else
return removeByReference(toRemove);
},
removeByTag: (toRemove) => {
let isRemoved = false;
const filterCb = (entry) => {
const { tags, name } = entry;
if (tags && tags.includes(toRemove)) {
if (name)
entriesNameSet.delete(name);
isRemoved = true;
return false;
}
return true;
};
absoluteEntries = absoluteEntries.filter(filterCb);
relativeEntries = relativeEntries.filter(filterCb);
return isRemoved;
},
concat: (from) => {
const cloned = cloneTo(exports.constructStack());
cloned.use(from);
return cloned;
},
applyToStack: cloneTo,
resolve: (handler, context) => {
for (const middleware of getMiddlewareList().reverse()) {
handler = middleware(handler, context);
}
return handler;
},
};
return stack;
};
exports.constructStack = constructStack;
const stepWeights = {
initialize: 5,
serialize: 4,
build: 3,
finalizeRequest: 2,
deserialize: 1,
};
const priorityWeights = {
high: 3,
normal: 2,
low: 1,
};
/***/ }),
/***/ 11461:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(38399), exports);
/***/ }),
/***/ 36546:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveUserAgentConfig = void 0;
function resolveUserAgentConfig(input) {
return {
...input,
customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent,
};
}
exports.resolveUserAgentConfig = resolveUserAgentConfig;
/***/ }),
/***/ 28025:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UA_ESCAPE_REGEX = exports.SPACE = exports.X_AMZ_USER_AGENT = exports.USER_AGENT = void 0;
exports.USER_AGENT = "user-agent";
exports.X_AMZ_USER_AGENT = "x-amz-user-agent";
exports.SPACE = " ";
exports.UA_ESCAPE_REGEX = /[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
/***/ }),
/***/ 64688:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(36546), exports);
tslib_1.__exportStar(__nccwpck_require__(76236), exports);
/***/ }),
/***/ 76236:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getUserAgentPlugin = exports.getUserAgentMiddlewareOptions = exports.userAgentMiddleware = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const constants_1 = __nccwpck_require__(28025);
const userAgentMiddleware = (options) => (next, context) => async (args) => {
var _a, _b;
const { request } = args;
if (!protocol_http_1.HttpRequest.isInstance(request))
return next(args);
const { headers } = request;
const userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || [];
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
const customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || [];
const sdkUserAgentValue = [...defaultUserAgent, ...userAgent, ...customUserAgent].join(constants_1.SPACE);
const normalUAValue = [
...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
...customUserAgent,
].join(constants_1.SPACE);
if (options.runtime !== "browser") {
if (normalUAValue) {
headers[constants_1.X_AMZ_USER_AGENT] = headers[constants_1.X_AMZ_USER_AGENT]
? `${headers[constants_1.USER_AGENT]} ${normalUAValue}`
: normalUAValue;
}
headers[constants_1.USER_AGENT] = sdkUserAgentValue;
}
else {
headers[constants_1.X_AMZ_USER_AGENT] = sdkUserAgentValue;
}
return next({
...args,
request,
});
};
exports.userAgentMiddleware = userAgentMiddleware;
const escapeUserAgent = ([name, version]) => {
const prefixSeparatorIndex = name.indexOf("/");
const prefix = name.substring(0, prefixSeparatorIndex);
let uaName = name.substring(prefixSeparatorIndex + 1);
if (prefix === "api") {
uaName = uaName.toLowerCase();
}
return [prefix, uaName, version]
.filter((item) => item && item.length > 0)
.map((item) => item === null || item === void 0 ? void 0 : item.replace(constants_1.UA_ESCAPE_REGEX, "_"))
.join("/");
};
exports.getUserAgentMiddlewareOptions = {
name: "getUserAgentMiddleware",
step: "build",
priority: "low",
tags: ["SET_USER_AGENT", "USER_AGENT"],
override: true,
};
const getUserAgentPlugin = (config) => ({
applyToStack: (clientStack) => {
clientStack.add(exports.userAgentMiddleware(config), exports.getUserAgentMiddlewareOptions);
},
});
exports.getUserAgentPlugin = getUserAgentPlugin;
/***/ }),
/***/ 52175:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.loadConfig = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const fromEnv_1 = __nccwpck_require__(46161);
const fromSharedConfigFiles_1 = __nccwpck_require__(63905);
const fromStatic_1 = __nccwpck_require__(5881);
const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => property_provider_1.memoize(property_provider_1.chain(fromEnv_1.fromEnv(environmentVariableSelector), fromSharedConfigFiles_1.fromSharedConfigFiles(configFileSelector, configuration), fromStatic_1.fromStatic(defaultValue)));
exports.loadConfig = loadConfig;
/***/ }),
/***/ 46161:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromEnv = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const fromEnv = (envVarSelector) => async () => {
try {
const config = envVarSelector(process.env);
if (config === undefined) {
throw new Error();
}
return config;
}
catch (e) {
throw new property_provider_1.CredentialsProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`);
}
};
exports.fromEnv = fromEnv;
/***/ }),
/***/ 63905:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromSharedConfigFiles = exports.ENV_PROFILE = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const shared_ini_file_loader_1 = __nccwpck_require__(67387);
const DEFAULT_PROFILE = "default";
exports.ENV_PROFILE = "AWS_PROFILE";
const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init), profile = process.env[exports.ENV_PROFILE] || DEFAULT_PROFILE } = init;
const { configFile, credentialsFile } = await loadedConfig;
const profileFromCredentials = credentialsFile[profile] || {};
const profileFromConfig = configFile[profile] || {};
const mergedProfile = preferredFile === "config"
? { ...profileFromCredentials, ...profileFromConfig }
: { ...profileFromConfig, ...profileFromCredentials };
try {
const configValue = configSelector(mergedProfile);
if (configValue === undefined) {
throw new Error();
}
return configValue;
}
catch (e) {
throw new property_provider_1.CredentialsProviderError(e.message ||
`Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`);
}
};
exports.fromSharedConfigFiles = fromSharedConfigFiles;
/***/ }),
/***/ 5881:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromStatic = void 0;
const property_provider_1 = __nccwpck_require__(74462);
const isFunction = (func) => typeof func === "function";
const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => defaultValue() : property_provider_1.fromStatic(defaultValue);
exports.fromStatic = fromStatic;
/***/ }),
/***/ 87684:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(52175), exports);
/***/ }),
/***/ 33647:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NODEJS_TIMEOUT_ERROR_CODES = void 0;
exports.NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
/***/ }),
/***/ 96225:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getTransformedHeaders = void 0;
const getTransformedHeaders = (headers) => {
const transformedHeaders = {};
for (const name of Object.keys(headers)) {
const headerValues = headers[name];
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
}
return transformedHeaders;
};
exports.getTransformedHeaders = getTransformedHeaders;
/***/ }),
/***/ 68805:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(2298), exports);
tslib_1.__exportStar(__nccwpck_require__(92533), exports);
tslib_1.__exportStar(__nccwpck_require__(72198), exports);
/***/ }),
/***/ 2298:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeHttpHandler = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const querystring_builder_1 = __nccwpck_require__(43402);
const http_1 = __nccwpck_require__(98605);
const https_1 = __nccwpck_require__(57211);
const constants_1 = __nccwpck_require__(33647);
const get_transformed_headers_1 = __nccwpck_require__(96225);
const set_connection_timeout_1 = __nccwpck_require__(63598);
const set_socket_timeout_1 = __nccwpck_require__(44751);
const write_request_body_1 = __nccwpck_require__(5248);
class NodeHttpHandler {
constructor({ connectionTimeout, socketTimeout, httpAgent, httpsAgent } = {}) {
this.metadata = { handlerProtocol: "http/1.1" };
this.connectionTimeout = connectionTimeout;
this.socketTimeout = socketTimeout;
const keepAlive = true;
const maxSockets = 50;
this.httpAgent = httpAgent || new http_1.Agent({ keepAlive, maxSockets });
this.httpsAgent = httpsAgent || new https_1.Agent({ keepAlive, maxSockets });
}
destroy() {
this.httpAgent.destroy();
this.httpsAgent.destroy();
}
handle(request, { abortSignal } = {}) {
return new Promise((resolve, reject) => {
if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
reject(abortError);
return;
}
const isSSL = request.protocol === "https:";
const queryString = querystring_builder_1.buildQueryString(request.query || {});
const nodeHttpsOptions = {
headers: request.headers,
host: request.hostname,
method: request.method,
path: queryString ? `${request.path}?${queryString}` : request.path,
port: request.port,
agent: isSSL ? this.httpsAgent : this.httpAgent,
};
const requestFunc = isSSL ? https_1.request : http_1.request;
const req = requestFunc(nodeHttpsOptions, (res) => {
const httpResponse = new protocol_http_1.HttpResponse({
statusCode: res.statusCode || -1,
headers: get_transformed_headers_1.getTransformedHeaders(res.headers),
body: res,
});
resolve({ response: httpResponse });
});
req.on("error", (err) => {
if (constants_1.NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
reject(Object.assign(err, { name: "TimeoutError" }));
}
else {
reject(err);
}
});
set_connection_timeout_1.setConnectionTimeout(req, reject, this.connectionTimeout);
set_socket_timeout_1.setSocketTimeout(req, reject, this.socketTimeout);
if (abortSignal) {
abortSignal.onabort = () => {
req.abort();
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
reject(abortError);
};
}
write_request_body_1.writeRequestBody(req, request);
});
}
}
exports.NodeHttpHandler = NodeHttpHandler;
/***/ }),
/***/ 92533:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NodeHttp2Handler = void 0;
const protocol_http_1 = __nccwpck_require__(70223);
const querystring_builder_1 = __nccwpck_require__(43402);
const http2_1 = __nccwpck_require__(97565);
const get_transformed_headers_1 = __nccwpck_require__(96225);
const write_request_body_1 = __nccwpck_require__(5248);
class NodeHttp2Handler {
constructor({ requestTimeout, sessionTimeout, disableConcurrentStreams } = {}) {
this.metadata = { handlerProtocol: "h2" };
this.requestTimeout = requestTimeout;
this.sessionTimeout = sessionTimeout;
this.disableConcurrentStreams = disableConcurrentStreams;
this.sessionCache = new Map();
}
destroy() {
for (const sessions of this.sessionCache.values()) {
sessions.forEach((session) => this.destroySession(session));
}
this.sessionCache.clear();
}
handle(request, { abortSignal } = {}) {
return new Promise((resolve, rejectOriginal) => {
let fulfilled = false;
if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {
fulfilled = true;
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
rejectOriginal(abortError);
return;
}
const { hostname, method, port, protocol, path, query } = request;
const authority = `${protocol}//${hostname}${port ? `:${port}` : ""}`;
const session = this.getSession(authority, this.disableConcurrentStreams || false);
const reject = (err) => {
if (this.disableConcurrentStreams) {
this.destroySession(session);
}
fulfilled = true;
rejectOriginal(err);
};
const queryString = querystring_builder_1.buildQueryString(query || {});
const req = session.request({
...request.headers,
[http2_1.constants.HTTP2_HEADER_PATH]: queryString ? `${path}?${queryString}` : path,
[http2_1.constants.HTTP2_HEADER_METHOD]: method,
});
req.on("response", (headers) => {
const httpResponse = new protocol_http_1.HttpResponse({
statusCode: headers[":status"] || -1,
headers: get_transformed_headers_1.getTransformedHeaders(headers),
body: req,
});
fulfilled = true;
resolve({ response: httpResponse });
if (this.disableConcurrentStreams) {
session.close();
this.deleteSessionFromCache(authority, session);
}
});
const requestTimeout = this.requestTimeout;
if (requestTimeout) {
req.setTimeout(requestTimeout, () => {
req.close();
const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);
timeoutError.name = "TimeoutError";
reject(timeoutError);
});
}
if (abortSignal) {
abortSignal.onabort = () => {
req.close();
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
reject(abortError);
};
}
req.on("frameError", (type, code, id) => {
reject(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
});
req.on("error", reject);
req.on("aborted", () => {
reject(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`));
});
req.on("close", () => {
if (this.disableConcurrentStreams) {
session.destroy();
}
if (!fulfilled) {
reject(new Error("Unexpected error: http2 request did not get a response"));
}
});
write_request_body_1.writeRequestBody(req, request);
});
}
getSession(authority, disableConcurrentStreams) {
const sessionCache = this.sessionCache;
const existingSessions = sessionCache.get(authority) || [];
if (existingSessions.length > 0 && !disableConcurrentStreams)
return existingSessions[0];
const newSession = http2_1.connect(authority);
const destroySessionCb = () => {
this.destroySession(newSession);
this.deleteSessionFromCache(authority, newSession);
};
newSession.on("goaway", destroySessionCb);
newSession.on("error", destroySessionCb);
newSession.on("frameError", destroySessionCb);
const sessionTimeout = this.sessionTimeout;
if (sessionTimeout) {
newSession.setTimeout(sessionTimeout, destroySessionCb);
}
existingSessions.push(newSession);
sessionCache.set(authority, existingSessions);
return newSession;
}
destroySession(session) {
if (!session.destroyed) {
session.destroy();
}
}
deleteSessionFromCache(authority, session) {
const existingSessions = this.sessionCache.get(authority) || [];
if (!existingSessions.includes(session)) {
return;
}
this.sessionCache.set(authority, existingSessions.filter((s) => s !== session));
}
}
exports.NodeHttp2Handler = NodeHttp2Handler;
/***/ }),
/***/ 63598:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setConnectionTimeout = void 0;
const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
if (!timeoutInMs) {
return;
}
request.on("socket", (socket) => {
if (socket.connecting) {
const timeoutId = setTimeout(() => {
request.destroy();
reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
name: "TimeoutError",
}));
}, timeoutInMs);
socket.on("connect", () => {
clearTimeout(timeoutId);
});
}
});
};
exports.setConnectionTimeout = setConnectionTimeout;
/***/ }),
/***/ 44751:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setSocketTimeout = void 0;
const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
request.setTimeout(timeoutInMs, () => {
request.destroy();
reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
});
};
exports.setSocketTimeout = setSocketTimeout;
/***/ }),
/***/ 84362:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Collector = void 0;
const stream_1 = __nccwpck_require__(92413);
class Collector extends stream_1.Writable {
constructor() {
super(...arguments);
this.bufferedBytes = [];
}
_write(chunk, encoding, callback) {
this.bufferedBytes.push(chunk);
callback();
}
}
exports.Collector = Collector;
/***/ }),
/***/ 72198:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.streamCollector = void 0;
const collector_1 = __nccwpck_require__(84362);
const streamCollector = (stream) => new Promise((resolve, reject) => {
const collector = new collector_1.Collector();
stream.pipe(collector);
stream.on("error", (err) => {
collector.end();
reject(err);
});
collector.on("error", reject);
collector.on("finish", function () {
const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
resolve(bytes);
});
});
exports.streamCollector = streamCollector;
/***/ }),
/***/ 5248:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.writeRequestBody = void 0;
const stream_1 = __nccwpck_require__(92413);
function writeRequestBody(httpRequest, request) {
const expect = request.headers["Expect"] || request.headers["expect"];
if (expect === "100-continue") {
httpRequest.on("continue", () => {
writeBody(httpRequest, request.body);
});
}
else {
writeBody(httpRequest, request.body);
}
}
exports.writeRequestBody = writeRequestBody;
function writeBody(httpRequest, body) {
if (body instanceof stream_1.Readable) {
body.pipe(httpRequest);
}
else if (body) {
httpRequest.end(Buffer.from(body));
}
else {
httpRequest.end();
}
}
/***/ }),
/***/ 81786:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CredentialsProviderError = exports.ProviderError = void 0;
class ProviderError extends Error {
constructor(message, tryNextLink = true) {
super(message);
this.tryNextLink = tryNextLink;
}
static from(error, tryNextLink = true) {
Object.defineProperty(error, "tryNextLink", {
value: tryNextLink,
configurable: false,
enumerable: false,
writable: false,
});
return error;
}
}
exports.ProviderError = ProviderError;
class CredentialsProviderError extends Error {
constructor(message, tryNextLink = true) {
super(message);
this.tryNextLink = tryNextLink;
this.name = "CredentialsProviderError";
}
static from(error, tryNextLink = true) {
Object.defineProperty(error, "tryNextLink", {
value: tryNextLink,
configurable: false,
enumerable: false,
writable: false,
});
return error;
}
}
exports.CredentialsProviderError = CredentialsProviderError;
/***/ }),
/***/ 51444:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.chain = void 0;
const ProviderError_1 = __nccwpck_require__(81786);
function chain(...providers) {
return () => {
let promise = Promise.reject(new ProviderError_1.ProviderError("No providers in chain"));
for (const provider of providers) {
promise = promise.catch((err) => {
if (err === null || err === void 0 ? void 0 : err.tryNextLink) {
return provider();
}
throw err;
});
}
return promise;
};
}
exports.chain = chain;
/***/ }),
/***/ 10529:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromStatic = void 0;
const fromStatic = (staticValue) => () => Promise.resolve(staticValue);
exports.fromStatic = fromStatic;
/***/ }),
/***/ 74462:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(81786), exports);
tslib_1.__exportStar(__nccwpck_require__(51444), exports);
tslib_1.__exportStar(__nccwpck_require__(10529), exports);
tslib_1.__exportStar(__nccwpck_require__(714), exports);
/***/ }),
/***/ 714:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.memoize = void 0;
const memoize = (provider, isExpired, requiresRefresh) => {
let resolved;
let pending;
let hasResult;
const coalesceProvider = async () => {
if (!pending) {
pending = provider();
}
try {
resolved = await pending;
hasResult = true;
}
finally {
pending = undefined;
}
return resolved;
};
if (isExpired === undefined) {
return async () => {
if (!hasResult) {
resolved = await coalesceProvider();
}
return resolved;
};
}
let isConstant = false;
return async () => {
if (!hasResult) {
resolved = await coalesceProvider();
}
if (isConstant) {
return resolved;
}
if (requiresRefresh && !requiresRefresh(resolved)) {
isConstant = true;
return resolved;
}
if (isExpired(resolved)) {
await coalesceProvider();
return resolved;
}
return resolved;
};
};
exports.memoize = memoize;
/***/ }),
/***/ 56779:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/***/ }),
/***/ 52872:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HttpRequest = void 0;
class HttpRequest {
constructor(options) {
this.method = options.method || "GET";
this.hostname = options.hostname || "localhost";
this.port = options.port;
this.query = options.query || {};
this.headers = options.headers || {};
this.body = options.body;
this.protocol = options.protocol
? options.protocol.substr(-1) !== ":"
? `${options.protocol}:`
: options.protocol
: "https:";
this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/";
}
static isInstance(request) {
if (!request)
return false;
const req = request;
return ("method" in req &&
"protocol" in req &&
"hostname" in req &&
"path" in req &&
typeof req["query"] === "object" &&
typeof req["headers"] === "object");
}
clone() {
const cloned = new HttpRequest({
...this,
headers: { ...this.headers },
});
if (cloned.query)
cloned.query = cloneQuery(cloned.query);
return cloned;
}
}
exports.HttpRequest = HttpRequest;
function cloneQuery(query) {
return Object.keys(query).reduce((carry, paramName) => {
const param = query[paramName];
return {
...carry,
[paramName]: Array.isArray(param) ? [...param] : param,
};
}, {});
}
/***/ }),
/***/ 92348:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HttpResponse = void 0;
class HttpResponse {
constructor(options) {
this.statusCode = options.statusCode;
this.headers = options.headers || {};
this.body = options.body;
}
static isInstance(response) {
if (!response)
return false;
const resp = response;
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
}
}
exports.HttpResponse = HttpResponse;
/***/ }),
/***/ 70223:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(56779), exports);
tslib_1.__exportStar(__nccwpck_require__(52872), exports);
tslib_1.__exportStar(__nccwpck_require__(92348), exports);
tslib_1.__exportStar(__nccwpck_require__(85694), exports);
/***/ }),
/***/ 85694:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isValidHostname = void 0;
function isValidHostname(hostname) {
const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
return hostPattern.test(hostname);
}
exports.isValidHostname = isValidHostname;
/***/ }),
/***/ 43402:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.buildQueryString = void 0;
const util_uri_escape_1 = __nccwpck_require__(57952);
function buildQueryString(query) {
const parts = [];
for (let key of Object.keys(query).sort()) {
const value = query[key];
key = util_uri_escape_1.escapeUri(key);
if (Array.isArray(value)) {
for (let i = 0, iLen = value.length; i < iLen; i++) {
parts.push(`${key}=${util_uri_escape_1.escapeUri(value[i])}`);
}
}
else {
let qsEntry = key;
if (value || typeof value === "string") {
qsEntry += `=${util_uri_escape_1.escapeUri(value)}`;
}
parts.push(qsEntry);
}
}
return parts.join("&");
}
exports.buildQueryString = buildQueryString;
/***/ }),
/***/ 47424:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.parseQueryString = void 0;
function parseQueryString(querystring) {
const query = {};
querystring = querystring.replace(/^\?/, "");
if (querystring) {
for (const pair of querystring.split("&")) {
let [key, value = null] = pair.split("=");
key = decodeURIComponent(key);
if (value) {
value = decodeURIComponent(value);
}
if (!(key in query)) {
query[key] = value;
}
else if (Array.isArray(query[key])) {
query[key].push(value);
}
else {
query[key] = [query[key], value];
}
}
}
return query;
}
exports.parseQueryString = parseQueryString;
/***/ }),
/***/ 7352:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TRANSIENT_ERROR_STATUS_CODES = exports.TRANSIENT_ERROR_CODES = exports.THROTTLING_ERROR_CODES = exports.CLOCK_SKEW_ERROR_CODES = void 0;
exports.CLOCK_SKEW_ERROR_CODES = [
"AuthFailure",
"InvalidSignatureException",
"RequestExpired",
"RequestInTheFuture",
"RequestTimeTooSkewed",
"SignatureDoesNotMatch",
];
exports.THROTTLING_ERROR_CODES = [
"BandwidthLimitExceeded",
"EC2ThrottledException",
"LimitExceededException",
"PriorRequestNotComplete",
"ProvisionedThroughputExceededException",
"RequestLimitExceeded",
"RequestThrottled",
"RequestThrottledException",
"SlowDown",
"ThrottledException",
"Throttling",
"ThrottlingException",
"TooManyRequestsException",
"TransactionInProgressException",
];
exports.TRANSIENT_ERROR_CODES = ["AbortError", "TimeoutError", "RequestTimeout", "RequestTimeoutException"];
exports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
/***/ }),
/***/ 61921:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isTransientError = exports.isThrottlingError = exports.isClockSkewError = exports.isRetryableByTrait = void 0;
const constants_1 = __nccwpck_require__(7352);
const isRetryableByTrait = (error) => error.$retryable !== undefined;
exports.isRetryableByTrait = isRetryableByTrait;
const isClockSkewError = (error) => constants_1.CLOCK_SKEW_ERROR_CODES.includes(error.name);
exports.isClockSkewError = isClockSkewError;
const isThrottlingError = (error) => {
var _a, _b;
return ((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 429 ||
constants_1.THROTTLING_ERROR_CODES.includes(error.name) ||
((_b = error.$retryable) === null || _b === void 0 ? void 0 : _b.throttling) == true;
};
exports.isThrottlingError = isThrottlingError;
const isTransientError = (error) => {
var _a;
return constants_1.TRANSIENT_ERROR_CODES.includes(error.name) ||
constants_1.TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0);
};
exports.isTransientError = isTransientError;
/***/ }),
/***/ 67387:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getHomeDir = exports.loadSharedConfigFiles = exports.ENV_CONFIG_PATH = exports.ENV_CREDENTIALS_PATH = void 0;
const fs_1 = __nccwpck_require__(35747);
const os_1 = __nccwpck_require__(12087);
const path_1 = __nccwpck_require__(85622);
exports.ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
exports.ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
const swallowError = () => ({});
const loadSharedConfigFiles = (init = {}) => {
const { filepath = process.env[exports.ENV_CREDENTIALS_PATH] || path_1.join(exports.getHomeDir(), ".aws", "credentials"), configFilepath = process.env[exports.ENV_CONFIG_PATH] || path_1.join(exports.getHomeDir(), ".aws", "config"), } = init;
return Promise.all([
slurpFile(configFilepath).then(parseIni).then(normalizeConfigFile).catch(swallowError),
slurpFile(filepath).then(parseIni).catch(swallowError),
]).then((parsedFiles) => {
const [configFile, credentialsFile] = parsedFiles;
return {
configFile,
credentialsFile,
};
});
};
exports.loadSharedConfigFiles = loadSharedConfigFiles;
const profileKeyRegex = /^profile\s(["'])?([^\1]+)\1$/;
const normalizeConfigFile = (data) => {
const map = {};
for (const key of Object.keys(data)) {
let matches;
if (key === "default") {
map.default = data.default;
}
else if ((matches = profileKeyRegex.exec(key))) {
const [_1, _2, normalizedKey] = matches;
if (normalizedKey) {
map[normalizedKey] = data[key];
}
}
}
return map;
};
const profileNameBlockList = ["__proto__", "profile __proto__"];
const parseIni = (iniData) => {
const map = {};
let currentSection;
for (let line of iniData.split(/\r?\n/)) {
line = line.split(/(^|\s)[;#]/)[0];
const section = line.match(/^\s*\[([^\[\]]+)]\s*$/);
if (section) {
currentSection = section[1];
if (profileNameBlockList.includes(currentSection)) {
throw new Error(`Found invalid profile name "${currentSection}"`);
}
}
else if (currentSection) {
const item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);
if (item) {
map[currentSection] = map[currentSection] || {};
map[currentSection][item[1]] = item[2];
}
}
}
return map;
};
const slurpFile = (path) => new Promise((resolve, reject) => {
fs_1.readFile(path, "utf8", (err, data) => {
if (err) {
reject(err);
}
else {
resolve(data);
}
});
});
const getHomeDir = () => {
const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
if (HOME)
return HOME;
if (USERPROFILE)
return USERPROFILE;
if (HOMEPATH)
return `${HOMEDRIVE}${HOMEPATH}`;
return os_1.homedir();
};
exports.getHomeDir = getHomeDir;
/***/ }),
/***/ 75086:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SignatureV4 = void 0;
const util_hex_encoding_1 = __nccwpck_require__(1968);
const constants_1 = __nccwpck_require__(30342);
const credentialDerivation_1 = __nccwpck_require__(11424);
const getCanonicalHeaders_1 = __nccwpck_require__(93590);
const getCanonicalQuery_1 = __nccwpck_require__(92019);
const getPayloadHash_1 = __nccwpck_require__(47080);
const headerUtil_1 = __nccwpck_require__(34120);
const moveHeadersToQuery_1 = __nccwpck_require__(98201);
const normalizeProvider_1 = __nccwpck_require__(57027);
const prepareRequest_1 = __nccwpck_require__(75772);
const utilDate_1 = __nccwpck_require__(94799);
class SignatureV4 {
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {
this.service = service;
this.sha256 = sha256;
this.uriEscapePath = uriEscapePath;
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
this.regionProvider = normalizeProvider_1.normalizeRegionProvider(region);
this.credentialProvider = normalizeProvider_1.normalizeCredentialsProvider(credentials);
}
async presign(originalRequest, options = {}) {
const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, } = options;
const credentials = await this.credentialProvider();
const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());
const { longDate, shortDate } = formatDate(signingDate);
if (expiresIn > constants_1.MAX_PRESIGNED_TTL) {
return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future");
}
const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);
const request = moveHeadersToQuery_1.moveHeadersToQuery(prepareRequest_1.prepareRequest(originalRequest), { unhoistableHeaders });
if (credentials.sessionToken) {
request.query[constants_1.TOKEN_QUERY_PARAM] = credentials.sessionToken;
}
request.query[constants_1.ALGORITHM_QUERY_PARAM] = constants_1.ALGORITHM_IDENTIFIER;
request.query[constants_1.CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
request.query[constants_1.AMZ_DATE_QUERY_PARAM] = longDate;
request.query[constants_1.EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
const canonicalHeaders = getCanonicalHeaders_1.getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
request.query[constants_1.SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);
request.query[constants_1.SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash_1.getPayloadHash(originalRequest, this.sha256)));
return request;
}
async sign(toSign, options) {
if (typeof toSign === "string") {
return this.signString(toSign, options);
}
else if (toSign.headers && toSign.payload) {
return this.signEvent(toSign, options);
}
else {
return this.signRequest(toSign, options);
}
}
async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) {
const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());
const { shortDate, longDate } = formatDate(signingDate);
const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);
const hashedPayload = await getPayloadHash_1.getPayloadHash({ headers: {}, body: payload }, this.sha256);
const hash = new this.sha256();
hash.update(headers);
const hashedHeaders = util_hex_encoding_1.toHex(await hash.digest());
const stringToSign = [
constants_1.EVENT_ALGORITHM_IDENTIFIER,
longDate,
scope,
priorSignature,
hashedHeaders,
hashedPayload,
].join("\n");
return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });
}
async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {
const credentials = await this.credentialProvider();
const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());
const { shortDate } = formatDate(signingDate);
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
hash.update(stringToSign);
return util_hex_encoding_1.toHex(await hash.digest());
}
async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {
const credentials = await this.credentialProvider();
const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider());
const request = prepareRequest_1.prepareRequest(requestToSign);
const { longDate, shortDate } = formatDate(signingDate);
const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service);
request.headers[constants_1.AMZ_DATE_HEADER] = longDate;
if (credentials.sessionToken) {
request.headers[constants_1.TOKEN_HEADER] = credentials.sessionToken;
}
const payloadHash = await getPayloadHash_1.getPayloadHash(request, this.sha256);
if (!headerUtil_1.hasHeader(constants_1.SHA256_HEADER, request.headers) && this.applyChecksum) {
request.headers[constants_1.SHA256_HEADER] = payloadHash;
}
const canonicalHeaders = getCanonicalHeaders_1.getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
request.headers[constants_1.AUTH_HEADER] =
`${constants_1.ALGORITHM_IDENTIFIER} ` +
`Credential=${credentials.accessKeyId}/${scope}, ` +
`SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, ` +
`Signature=${signature}`;
return request;
}
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
const sortedHeaders = Object.keys(canonicalHeaders).sort();
return `${request.method}
${this.getCanonicalPath(request)}
${getCanonicalQuery_1.getCanonicalQuery(request)}
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")}
${sortedHeaders.join(";")}
${payloadHash}`;
}
async createStringToSign(longDate, credentialScope, canonicalRequest) {
const hash = new this.sha256();
hash.update(canonicalRequest);
const hashedRequest = await hash.digest();
return `${constants_1.ALGORITHM_IDENTIFIER}
${longDate}
${credentialScope}
${util_hex_encoding_1.toHex(hashedRequest)}`;
}
getCanonicalPath({ path }) {
if (this.uriEscapePath) {
const doubleEncoded = encodeURIComponent(path.replace(/^\//, ""));
return `/${doubleEncoded.replace(/%2F/g, "/")}`;
}
return path;
}
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
const hash = new this.sha256(await keyPromise);
hash.update(stringToSign);
return util_hex_encoding_1.toHex(await hash.digest());
}
getSigningKey(credentials, region, shortDate, service) {
return credentialDerivation_1.getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
}
}
exports.SignatureV4 = SignatureV4;
const formatDate = (now) => {
const longDate = utilDate_1.iso8601(now).replace(/[\-:]/g, "");
return {
longDate,
shortDate: longDate.substr(0, 8),
};
};
const getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(";");
/***/ }),
/***/ 53141:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.cloneQuery = exports.cloneRequest = void 0;
const cloneRequest = ({ headers, query, ...rest }) => ({
...rest,
headers: { ...headers },
query: query ? exports.cloneQuery(query) : undefined,
});
exports.cloneRequest = cloneRequest;
const cloneQuery = (query) => Object.keys(query).reduce((carry, paramName) => {
const param = query[paramName];
return {
...carry,
[paramName]: Array.isArray(param) ? [...param] : param,
};
}, {});
exports.cloneQuery = cloneQuery;
/***/ }),
/***/ 30342:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.MAX_PRESIGNED_TTL = exports.KEY_TYPE_IDENTIFIER = exports.MAX_CACHE_SIZE = exports.UNSIGNED_PAYLOAD = exports.EVENT_ALGORITHM_IDENTIFIER = exports.ALGORITHM_IDENTIFIER_V4A = exports.ALGORITHM_IDENTIFIER = exports.UNSIGNABLE_PATTERNS = exports.SEC_HEADER_PATTERN = exports.PROXY_HEADER_PATTERN = exports.ALWAYS_UNSIGNABLE_HEADERS = exports.HOST_HEADER = exports.TOKEN_HEADER = exports.SHA256_HEADER = exports.SIGNATURE_HEADER = exports.GENERATED_HEADERS = exports.DATE_HEADER = exports.AMZ_DATE_HEADER = exports.AUTH_HEADER = exports.REGION_SET_PARAM = exports.TOKEN_QUERY_PARAM = exports.SIGNATURE_QUERY_PARAM = exports.EXPIRES_QUERY_PARAM = exports.SIGNED_HEADERS_QUERY_PARAM = exports.AMZ_DATE_QUERY_PARAM = exports.CREDENTIAL_QUERY_PARAM = exports.ALGORITHM_QUERY_PARAM = void 0;
exports.ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
exports.CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
exports.AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
exports.SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
exports.EXPIRES_QUERY_PARAM = "X-Amz-Expires";
exports.SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
exports.TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
exports.REGION_SET_PARAM = "X-Amz-Region-Set";
exports.AUTH_HEADER = "authorization";
exports.AMZ_DATE_HEADER = exports.AMZ_DATE_QUERY_PARAM.toLowerCase();
exports.DATE_HEADER = "date";
exports.GENERATED_HEADERS = [exports.AUTH_HEADER, exports.AMZ_DATE_HEADER, exports.DATE_HEADER];
exports.SIGNATURE_HEADER = exports.SIGNATURE_QUERY_PARAM.toLowerCase();
exports.SHA256_HEADER = "x-amz-content-sha256";
exports.TOKEN_HEADER = exports.TOKEN_QUERY_PARAM.toLowerCase();
exports.HOST_HEADER = "host";
exports.ALWAYS_UNSIGNABLE_HEADERS = {
authorization: true,
"cache-control": true,
connection: true,
expect: true,
from: true,
"keep-alive": true,
"max-forwards": true,
pragma: true,
referer: true,
te: true,
trailer: true,
"transfer-encoding": true,
upgrade: true,
"user-agent": true,
"x-amzn-trace-id": true,
};
exports.PROXY_HEADER_PATTERN = /^proxy-/;
exports.SEC_HEADER_PATTERN = /^sec-/;
exports.UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];
exports.ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
exports.ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256";
exports.EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
exports.UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
exports.MAX_CACHE_SIZE = 50;
exports.KEY_TYPE_IDENTIFIER = "aws4_request";
exports.MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
/***/ }),
/***/ 11424:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.clearCredentialCache = exports.getSigningKey = exports.createScope = void 0;
const util_hex_encoding_1 = __nccwpck_require__(1968);
const constants_1 = __nccwpck_require__(30342);
const signingKeyCache = {};
const cacheQueue = [];
const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${constants_1.KEY_TYPE_IDENTIFIER}`;
exports.createScope = createScope;
const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
const cacheKey = `${shortDate}:${region}:${service}:${util_hex_encoding_1.toHex(credsHash)}:${credentials.sessionToken}`;
if (cacheKey in signingKeyCache) {
return signingKeyCache[cacheKey];
}
cacheQueue.push(cacheKey);
while (cacheQueue.length > constants_1.MAX_CACHE_SIZE) {
delete signingKeyCache[cacheQueue.shift()];
}
let key = `AWS4${credentials.secretAccessKey}`;
for (const signable of [shortDate, region, service, constants_1.KEY_TYPE_IDENTIFIER]) {
key = await hmac(sha256Constructor, key, signable);
}
return (signingKeyCache[cacheKey] = key);
};
exports.getSigningKey = getSigningKey;
const clearCredentialCache = () => {
cacheQueue.length = 0;
Object.keys(signingKeyCache).forEach((cacheKey) => {
delete signingKeyCache[cacheKey];
});
};
exports.clearCredentialCache = clearCredentialCache;
const hmac = (ctor, secret, data) => {
const hash = new ctor(secret);
hash.update(data);
return hash.digest();
};
/***/ }),
/***/ 93590:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCanonicalHeaders = void 0;
const constants_1 = __nccwpck_require__(30342);
const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
const canonical = {};
for (const headerName of Object.keys(headers).sort()) {
const canonicalHeaderName = headerName.toLowerCase();
if (canonicalHeaderName in constants_1.ALWAYS_UNSIGNABLE_HEADERS ||
(unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) ||
constants_1.PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||
constants_1.SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {
continue;
}
}
canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
}
return canonical;
};
exports.getCanonicalHeaders = getCanonicalHeaders;
/***/ }),
/***/ 92019:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCanonicalQuery = void 0;
const util_uri_escape_1 = __nccwpck_require__(57952);
const constants_1 = __nccwpck_require__(30342);
const getCanonicalQuery = ({ query = {} }) => {
const keys = [];
const serialized = {};
for (const key of Object.keys(query).sort()) {
if (key.toLowerCase() === constants_1.SIGNATURE_HEADER) {
continue;
}
keys.push(key);
const value = query[key];
if (typeof value === "string") {
serialized[key] = `${util_uri_escape_1.escapeUri(key)}=${util_uri_escape_1.escapeUri(value)}`;
}
else if (Array.isArray(value)) {
serialized[key] = value
.slice(0)
.sort()
.reduce((encoded, value) => encoded.concat([`${util_uri_escape_1.escapeUri(key)}=${util_uri_escape_1.escapeUri(value)}`]), [])
.join("&");
}
}
return keys
.map((key) => serialized[key])
.filter((serialized) => serialized)
.join("&");
};
exports.getCanonicalQuery = getCanonicalQuery;
/***/ }),
/***/ 47080:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getPayloadHash = void 0;
const is_array_buffer_1 = __nccwpck_require__(69126);
const util_hex_encoding_1 = __nccwpck_require__(1968);
const constants_1 = __nccwpck_require__(30342);
const getPayloadHash = async ({ headers, body }, hashConstructor) => {
for (const headerName of Object.keys(headers)) {
if (headerName.toLowerCase() === constants_1.SHA256_HEADER) {
return headers[headerName];
}
}
if (body == undefined) {
return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
}
else if (typeof body === "string" || ArrayBuffer.isView(body) || is_array_buffer_1.isArrayBuffer(body)) {
const hashCtor = new hashConstructor();
hashCtor.update(body);
return util_hex_encoding_1.toHex(await hashCtor.digest());
}
return constants_1.UNSIGNED_PAYLOAD;
};
exports.getPayloadHash = getPayloadHash;
/***/ }),
/***/ 34120:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.deleteHeader = exports.getHeaderValue = exports.hasHeader = void 0;
const hasHeader = (soughtHeader, headers) => {
soughtHeader = soughtHeader.toLowerCase();
for (const headerName of Object.keys(headers)) {
if (soughtHeader === headerName.toLowerCase()) {
return true;
}
}
return false;
};
exports.hasHeader = hasHeader;
const getHeaderValue = (soughtHeader, headers) => {
soughtHeader = soughtHeader.toLowerCase();
for (const headerName of Object.keys(headers)) {
if (soughtHeader === headerName.toLowerCase()) {
return headers[headerName];
}
}
return undefined;
};
exports.getHeaderValue = getHeaderValue;
const deleteHeader = (soughtHeader, headers) => {
soughtHeader = soughtHeader.toLowerCase();
for (const headerName of Object.keys(headers)) {
if (soughtHeader === headerName.toLowerCase()) {
delete headers[headerName];
}
}
};
exports.deleteHeader = deleteHeader;
/***/ }),
/***/ 37776:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.normalizeRegionProvider = exports.normalizeCredentialsProvider = exports.prepareRequest = exports.moveHeadersToQuery = exports.getPayloadHash = exports.getCanonicalQuery = exports.getCanonicalHeaders = void 0;
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(75086), exports);
var getCanonicalHeaders_1 = __nccwpck_require__(93590);
Object.defineProperty(exports, "getCanonicalHeaders", ({ enumerable: true, get: function () { return getCanonicalHeaders_1.getCanonicalHeaders; } }));
var getCanonicalQuery_1 = __nccwpck_require__(92019);
Object.defineProperty(exports, "getCanonicalQuery", ({ enumerable: true, get: function () { return getCanonicalQuery_1.getCanonicalQuery; } }));
var getPayloadHash_1 = __nccwpck_require__(47080);
Object.defineProperty(exports, "getPayloadHash", ({ enumerable: true, get: function () { return getPayloadHash_1.getPayloadHash; } }));
var moveHeadersToQuery_1 = __nccwpck_require__(98201);
Object.defineProperty(exports, "moveHeadersToQuery", ({ enumerable: true, get: function () { return moveHeadersToQuery_1.moveHeadersToQuery; } }));
var prepareRequest_1 = __nccwpck_require__(75772);
Object.defineProperty(exports, "prepareRequest", ({ enumerable: true, get: function () { return prepareRequest_1.prepareRequest; } }));
var normalizeProvider_1 = __nccwpck_require__(57027);
Object.defineProperty(exports, "normalizeCredentialsProvider", ({ enumerable: true, get: function () { return normalizeProvider_1.normalizeCredentialsProvider; } }));
Object.defineProperty(exports, "normalizeRegionProvider", ({ enumerable: true, get: function () { return normalizeProvider_1.normalizeRegionProvider; } }));
tslib_1.__exportStar(__nccwpck_require__(11424), exports);
/***/ }),
/***/ 98201:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.moveHeadersToQuery = void 0;
const cloneRequest_1 = __nccwpck_require__(53141);
const moveHeadersToQuery = (request, options = {}) => {
var _a;
const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest_1.cloneRequest(request);
for (const name of Object.keys(headers)) {
const lname = name.toLowerCase();
if (lname.substr(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) === null || _a === void 0 ? void 0 : _a.has(lname))) {
query[name] = headers[name];
delete headers[name];
}
}
return {
...request,
headers,
query,
};
};
exports.moveHeadersToQuery = moveHeadersToQuery;
/***/ }),
/***/ 57027:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.normalizeCredentialsProvider = exports.normalizeRegionProvider = void 0;
const normalizeRegionProvider = (region) => {
if (typeof region === "string") {
const promisified = Promise.resolve(region);
return () => promisified;
}
else {
return region;
}
};
exports.normalizeRegionProvider = normalizeRegionProvider;
const normalizeCredentialsProvider = (credentials) => {
if (typeof credentials === "object") {
const promisified = Promise.resolve(credentials);
return () => promisified;
}
else {
return credentials;
}
};
exports.normalizeCredentialsProvider = normalizeCredentialsProvider;
/***/ }),
/***/ 75772:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.prepareRequest = void 0;
const cloneRequest_1 = __nccwpck_require__(53141);
const constants_1 = __nccwpck_require__(30342);
const prepareRequest = (request) => {
request = typeof request.clone === "function" ? request.clone() : cloneRequest_1.cloneRequest(request);
for (const headerName of Object.keys(request.headers)) {
if (constants_1.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
delete request.headers[headerName];
}
}
return request;
};
exports.prepareRequest = prepareRequest;
/***/ }),
/***/ 94799:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toDate = exports.iso8601 = void 0;
const iso8601 = (time) => exports.toDate(time)
.toISOString()
.replace(/\.\d{3}Z$/, "Z");
exports.iso8601 = iso8601;
const toDate = (time) => {
if (typeof time === "number") {
return new Date(time * 1000);
}
if (typeof time === "string") {
if (Number(time)) {
return new Date(Number(time) * 1000);
}
return new Date(time);
}
return time;
};
exports.toDate = toDate;
/***/ }),
/***/ 36034:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Client = void 0;
const middleware_stack_1 = __nccwpck_require__(11461);
class Client {
constructor(config) {
this.middlewareStack = middleware_stack_1.constructStack();
this.config = config;
}
send(command, optionsOrCb, cb) {
const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined;
const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
const handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
if (callback) {
handler(command)
.then((result) => callback(null, result.output), (err) => callback(err))
.catch(() => { });
}
else {
return handler(command).then((result) => result.output);
}
}
destroy() {
if (this.config.requestHandler.destroy)
this.config.requestHandler.destroy();
}
}
exports.Client = Client;
/***/ }),
/***/ 4014:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Command = void 0;
const middleware_stack_1 = __nccwpck_require__(11461);
class Command {
constructor() {
this.middlewareStack = middleware_stack_1.constructStack();
}
}
exports.Command = Command;
/***/ }),
/***/ 78392:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SENSITIVE_STRING = void 0;
exports.SENSITIVE_STRING = "***SensitiveInformation***";
/***/ }),
/***/ 24695:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.parseEpochTimestamp = exports.parseRfc7231DateTime = exports.parseRfc3339DateTime = exports.dateToUtcString = void 0;
const parse_utils_1 = __nccwpck_require__(34014);
const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
function dateToUtcString(date) {
const year = date.getUTCFullYear();
const month = date.getUTCMonth();
const dayOfWeek = date.getUTCDay();
const dayOfMonthInt = date.getUTCDate();
const hoursInt = date.getUTCHours();
const minutesInt = date.getUTCMinutes();
const secondsInt = date.getUTCSeconds();
const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
}
exports.dateToUtcString = dateToUtcString;
const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
const parseRfc3339DateTime = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (typeof value !== "string") {
throw new TypeError("RFC-3339 date-times must be expressed as strings");
}
const match = RFC3339.exec(value);
if (!match) {
throw new TypeError("Invalid RFC-3339 date-time value");
}
const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
const year = parse_utils_1.strictParseShort(stripLeadingZeroes(yearStr));
const month = parseDateValue(monthStr, "month", 1, 12);
const day = parseDateValue(dayStr, "day", 1, 31);
return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
};
exports.parseRfc3339DateTime = parseRfc3339DateTime;
const IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
const RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
const ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
const parseRfc7231DateTime = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (typeof value !== "string") {
throw new TypeError("RFC-7231 date-times must be expressed as strings");
}
let match = IMF_FIXDATE.exec(value);
if (match) {
const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
return buildDate(parse_utils_1.strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
}
match = RFC_850_DATE.exec(value);
if (match) {
const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
hours,
minutes,
seconds,
fractionalMilliseconds,
}));
}
match = ASC_TIME.exec(value);
if (match) {
const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
return buildDate(parse_utils_1.strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
}
throw new TypeError("Invalid RFC-7231 date-time value");
};
exports.parseRfc7231DateTime = parseRfc7231DateTime;
const parseEpochTimestamp = (value) => {
if (value === null || value === undefined) {
return undefined;
}
let valueAsDouble;
if (typeof value === "number") {
valueAsDouble = value;
}
else if (typeof value === "string") {
valueAsDouble = parse_utils_1.strictParseDouble(value);
}
else {
throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
}
if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
}
return new Date(Math.round(valueAsDouble * 1000));
};
exports.parseEpochTimestamp = parseEpochTimestamp;
const buildDate = (year, month, day, time) => {
const adjustedMonth = month - 1;
validateDayOfMonth(year, adjustedMonth, day);
return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));
};
const parseTwoDigitYear = (value) => {
const thisYear = new Date().getUTCFullYear();
const valueInThisCentury = Math.floor(thisYear / 100) * 100 + parse_utils_1.strictParseShort(stripLeadingZeroes(value));
if (valueInThisCentury < thisYear) {
return valueInThisCentury + 100;
}
return valueInThisCentury;
};
const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;
const adjustRfc850Year = (input) => {
if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {
return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
}
return input;
};
const parseMonthByShortName = (value) => {
const monthIdx = MONTHS.indexOf(value);
if (monthIdx < 0) {
throw new TypeError(`Invalid month: ${value}`);
}
return monthIdx + 1;
};
const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const validateDayOfMonth = (year, month, day) => {
let maxDays = DAYS_IN_MONTH[month];
if (month === 1 && isLeapYear(year)) {
maxDays = 29;
}
if (day > maxDays) {
throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
}
};
const isLeapYear = (year) => {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
};
const parseDateValue = (value, type, lower, upper) => {
const dateVal = parse_utils_1.strictParseByte(stripLeadingZeroes(value));
if (dateVal < lower || dateVal > upper) {
throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
}
return dateVal;
};
const parseMilliseconds = (value) => {
if (value === null || value === undefined) {
return 0;
}
return parse_utils_1.strictParseFloat32("0." + value) * 1000;
};
const stripLeadingZeroes = (value) => {
let idx = 0;
while (idx < value.length - 1 && value.charAt(idx) === "0") {
idx++;
}
if (idx === 0) {
return value;
}
return value.slice(idx);
};
/***/ }),
/***/ 12363:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.emitWarningIfUnsupportedVersion = void 0;
let warningEmitted = false;
const emitWarningIfUnsupportedVersion = (version) => {
if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 12) {
warningEmitted = true;
process.emitWarning(`The AWS SDK for JavaScript (v3) will\n` +
`no longer support Node.js ${version} as of January 1, 2022.\n` +
`To continue receiving updates to AWS services, bug fixes, and security\n` +
`updates please upgrade to Node.js 12.x or later.\n\n` +
`More information can be found at: https://a.co/1l6FLnu`, `NodeDeprecationWarning`);
}
};
exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
/***/ }),
/***/ 91927:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.extendedEncodeURIComponent = void 0;
function extendedEncodeURIComponent(str) {
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
});
}
exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
/***/ }),
/***/ 86457:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getArrayIfSingleItem = void 0;
const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
exports.getArrayIfSingleItem = getArrayIfSingleItem;
/***/ }),
/***/ 95830:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getValueFromTextNode = void 0;
const getValueFromTextNode = (obj) => {
const textNodeName = "#text";
for (const key in obj) {
if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {
obj[key] = obj[key][textNodeName];
}
else if (typeof obj[key] === "object" && obj[key] !== null) {
obj[key] = exports.getValueFromTextNode(obj[key]);
}
}
return obj;
};
exports.getValueFromTextNode = getValueFromTextNode;
/***/ }),
/***/ 4963:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(36034), exports);
tslib_1.__exportStar(__nccwpck_require__(4014), exports);
tslib_1.__exportStar(__nccwpck_require__(78392), exports);
tslib_1.__exportStar(__nccwpck_require__(24695), exports);
tslib_1.__exportStar(__nccwpck_require__(12363), exports);
tslib_1.__exportStar(__nccwpck_require__(91927), exports);
tslib_1.__exportStar(__nccwpck_require__(86457), exports);
tslib_1.__exportStar(__nccwpck_require__(95830), exports);
tslib_1.__exportStar(__nccwpck_require__(93613), exports);
tslib_1.__exportStar(__nccwpck_require__(34014), exports);
tslib_1.__exportStar(__nccwpck_require__(38000), exports);
tslib_1.__exportStar(__nccwpck_require__(48730), exports);
/***/ }),
/***/ 93613:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LazyJsonString = exports.StringWrapper = void 0;
const StringWrapper = function () {
const Class = Object.getPrototypeOf(this).constructor;
const Constructor = Function.bind.apply(String, [null, ...arguments]);
const instance = new Constructor();
Object.setPrototypeOf(instance, Class.prototype);
return instance;
};
exports.StringWrapper = StringWrapper;
exports.StringWrapper.prototype = Object.create(String.prototype, {
constructor: {
value: exports.StringWrapper,
enumerable: false,
writable: true,
configurable: true,
},
});
Object.setPrototypeOf(exports.StringWrapper, String);
class LazyJsonString extends exports.StringWrapper {
deserializeJSON() {
return JSON.parse(super.toString());
}
toJSON() {
return super.toString();
}
static fromObject(object) {
if (object instanceof LazyJsonString) {
return object;
}
else if (object instanceof String || typeof object === "string") {
return new LazyJsonString(object);
}
return new LazyJsonString(JSON.stringify(object));
}
}
exports.LazyJsonString = LazyJsonString;
/***/ }),
/***/ 34014:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.strictParseByte = exports.strictParseShort = exports.strictParseInt32 = exports.strictParseInt = exports.strictParseLong = exports.limitedParseFloat32 = exports.limitedParseFloat = exports.handleFloat = exports.limitedParseDouble = exports.strictParseFloat32 = exports.strictParseFloat = exports.strictParseDouble = exports.expectUnion = exports.expectString = exports.expectObject = exports.expectNonNull = exports.expectByte = exports.expectShort = exports.expectInt32 = exports.expectInt = exports.expectLong = exports.expectFloat32 = exports.expectNumber = exports.expectBoolean = exports.parseBoolean = void 0;
const parseBoolean = (value) => {
switch (value) {
case "true":
return true;
case "false":
return false;
default:
throw new Error(`Unable to parse boolean value "${value}"`);
}
};
exports.parseBoolean = parseBoolean;
const expectBoolean = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (typeof value === "boolean") {
return value;
}
throw new TypeError(`Expected boolean, got ${typeof value}`);
};
exports.expectBoolean = expectBoolean;
const expectNumber = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (typeof value === "number") {
return value;
}
throw new TypeError(`Expected number, got ${typeof value}`);
};
exports.expectNumber = expectNumber;
const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
const expectFloat32 = (value) => {
const expected = exports.expectNumber(value);
if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
if (Math.abs(expected) > MAX_FLOAT) {
throw new TypeError(`Expected 32-bit float, got ${value}`);
}
}
return expected;
};
exports.expectFloat32 = expectFloat32;
const expectLong = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (Number.isInteger(value) && !Number.isNaN(value)) {
return value;
}
throw new TypeError(`Expected integer, got ${typeof value}`);
};
exports.expectLong = expectLong;
exports.expectInt = exports.expectLong;
const expectInt32 = (value) => expectSizedInt(value, 32);
exports.expectInt32 = expectInt32;
const expectShort = (value) => expectSizedInt(value, 16);
exports.expectShort = expectShort;
const expectByte = (value) => expectSizedInt(value, 8);
exports.expectByte = expectByte;
const expectSizedInt = (value, size) => {
const expected = exports.expectLong(value);
if (expected !== undefined && castInt(expected, size) !== expected) {
throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
}
return expected;
};
const castInt = (value, size) => {
switch (size) {
case 32:
return Int32Array.of(value)[0];
case 16:
return Int16Array.of(value)[0];
case 8:
return Int8Array.of(value)[0];
}
};
const expectNonNull = (value, location) => {
if (value === null || value === undefined) {
if (location) {
throw new TypeError(`Expected a non-null value for ${location}`);
}
throw new TypeError("Expected a non-null value");
}
return value;
};
exports.expectNonNull = expectNonNull;
const expectObject = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (typeof value === "object" && !Array.isArray(value)) {
return value;
}
throw new TypeError(`Expected object, got ${typeof value}`);
};
exports.expectObject = expectObject;
const expectString = (value) => {
if (value === null || value === undefined) {
return undefined;
}
if (typeof value === "string") {
return value;
}
throw new TypeError(`Expected string, got ${typeof value}`);
};
exports.expectString = expectString;
const expectUnion = (value) => {
if (value === null || value === undefined) {
return undefined;
}
const asObject = exports.expectObject(value);
const setKeys = Object.entries(asObject)
.filter(([_, v]) => v !== null && v !== undefined)
.map(([k, _]) => k);
if (setKeys.length === 0) {
throw new TypeError(`Unions must have exactly one non-null member`);
}
if (setKeys.length > 1) {
throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
}
return asObject;
};
exports.expectUnion = expectUnion;
const strictParseDouble = (value) => {
if (typeof value == "string") {
return exports.expectNumber(parseNumber(value));
}
return exports.expectNumber(value);
};
exports.strictParseDouble = strictParseDouble;
exports.strictParseFloat = exports.strictParseDouble;
const strictParseFloat32 = (value) => {
if (typeof value == "string") {
return exports.expectFloat32(parseNumber(value));
}
return exports.expectFloat32(value);
};
exports.strictParseFloat32 = strictParseFloat32;
const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
const parseNumber = (value) => {
const matches = value.match(NUMBER_REGEX);
if (matches === null || matches[0].length !== value.length) {
throw new TypeError(`Expected real number, got implicit NaN`);
}
return parseFloat(value);
};
const limitedParseDouble = (value) => {
if (typeof value == "string") {
return parseFloatString(value);
}
return exports.expectNumber(value);
};
exports.limitedParseDouble = limitedParseDouble;
exports.handleFloat = exports.limitedParseDouble;
exports.limitedParseFloat = exports.limitedParseDouble;
const limitedParseFloat32 = (value) => {
if (typeof value == "string") {
return parseFloatString(value);
}
return exports.expectFloat32(value);
};
exports.limitedParseFloat32 = limitedParseFloat32;
const parseFloatString = (value) => {
switch (value) {
case "NaN":
return NaN;
case "Infinity":
return Infinity;
case "-Infinity":
return -Infinity;
default:
throw new Error(`Unable to parse float value: ${value}`);
}
};
const strictParseLong = (value) => {
if (typeof value === "string") {
return exports.expectLong(parseNumber(value));
}
return exports.expectLong(value);
};
exports.strictParseLong = strictParseLong;
exports.strictParseInt = exports.strictParseLong;
const strictParseInt32 = (value) => {
if (typeof value === "string") {
return exports.expectInt32(parseNumber(value));
}
return exports.expectInt32(value);
};
exports.strictParseInt32 = strictParseInt32;
const strictParseShort = (value) => {
if (typeof value === "string") {
return exports.expectShort(parseNumber(value));
}
return exports.expectShort(value);
};
exports.strictParseShort = strictParseShort;
const strictParseByte = (value) => {
if (typeof value === "string") {
return exports.expectByte(parseNumber(value));
}
return exports.expectByte(value);
};
exports.strictParseByte = strictParseByte;
/***/ }),
/***/ 38000:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.serializeFloat = void 0;
const serializeFloat = (value) => {
if (value !== value) {
return "NaN";
}
switch (value) {
case Infinity:
return "Infinity";
case -Infinity:
return "-Infinity";
default:
return value;
}
};
exports.serializeFloat = serializeFloat;
/***/ }),
/***/ 48730:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.splitEvery = void 0;
function splitEvery(value, delimiter, numDelimiters) {
if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
}
const segments = value.split(delimiter);
if (numDelimiters === 1) {
return segments;
}
const compoundSegments = [];
let currentSegment = "";
for (let i = 0; i < segments.length; i++) {
if (currentSegment === "") {
currentSegment = segments[i];
}
else {
currentSegment += delimiter + segments[i];
}
if ((i + 1) % numDelimiters === 0) {
compoundSegments.push(currentSegment);
currentSegment = "";
}
}
if (currentSegment !== "") {
compoundSegments.push(currentSegment);
}
return compoundSegments;
}
exports.splitEvery = splitEvery;
/***/ }),
/***/ 2992:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.parseUrl = void 0;
const querystring_parser_1 = __nccwpck_require__(47424);
const parseUrl = (url) => {
const { hostname, pathname, port, protocol, search } = new URL(url);
let query;
if (search) {
query = querystring_parser_1.parseQueryString(search);
}
return {
hostname,
port: port ? parseInt(port) : undefined,
protocol,
path: pathname,
query,
};
};
exports.parseUrl = parseUrl;
/***/ }),
/***/ 18588:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toBase64 = exports.fromBase64 = void 0;
const util_buffer_from_1 = __nccwpck_require__(36010);
const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
function fromBase64(input) {
if ((input.length * 3) % 4 !== 0) {
throw new TypeError(`Incorrect padding on base64 string.`);
}
if (!BASE64_REGEX.exec(input)) {
throw new TypeError(`Invalid base64 string.`);
}
const buffer = util_buffer_from_1.fromString(input, "base64");
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
}
exports.fromBase64 = fromBase64;
function toBase64(input) {
return util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
}
exports.toBase64 = toBase64;
/***/ }),
/***/ 74147:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.calculateBodyLength = void 0;
const fs_1 = __nccwpck_require__(35747);
function calculateBodyLength(body) {
if (!body) {
return 0;
}
if (typeof body === "string") {
return Buffer.from(body).length;
}
else if (typeof body.byteLength === "number") {
return body.byteLength;
}
else if (typeof body.size === "number") {
return body.size;
}
else if (typeof body.path === "string") {
return fs_1.lstatSync(body.path).size;
}
}
exports.calculateBodyLength = calculateBodyLength;
/***/ }),
/***/ 36010:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.fromString = exports.fromArrayBuffer = void 0;
const is_array_buffer_1 = __nccwpck_require__(69126);
const buffer_1 = __nccwpck_require__(64293);
const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
if (!is_array_buffer_1.isArrayBuffer(input)) {
throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
}
return buffer_1.Buffer.from(input, offset, length);
};
exports.fromArrayBuffer = fromArrayBuffer;
const fromString = (input, encoding) => {
if (typeof input !== "string") {
throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
}
return encoding ? buffer_1.Buffer.from(input, encoding) : buffer_1.Buffer.from(input);
};
exports.fromString = fromString;
/***/ }),
/***/ 79509:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.booleanSelector = exports.SelectorType = void 0;
var SelectorType;
(function (SelectorType) {
SelectorType["ENV"] = "env";
SelectorType["CONFIG"] = "shared config entry";
})(SelectorType = exports.SelectorType || (exports.SelectorType = {}));
const booleanSelector = (obj, key, type) => {
if (!(key in obj))
return undefined;
if (obj[key] === "true")
return true;
if (obj[key] === "false")
return false;
throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
};
exports.booleanSelector = booleanSelector;
/***/ }),
/***/ 6168:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(79509), exports);
/***/ }),
/***/ 98598:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getMasterProfileName = exports.parseKnownFiles = exports.DEFAULT_PROFILE = exports.ENV_PROFILE = void 0;
const shared_ini_file_loader_1 = __nccwpck_require__(67387);
exports.ENV_PROFILE = "AWS_PROFILE";
exports.DEFAULT_PROFILE = "default";
const parseKnownFiles = async (init) => {
const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init) } = init;
const parsedFiles = await loadedConfig;
return {
...parsedFiles.configFile,
...parsedFiles.credentialsFile,
};
};
exports.parseKnownFiles = parseKnownFiles;
const getMasterProfileName = (init) => init.profile || process.env[exports.ENV_PROFILE] || exports.DEFAULT_PROFILE;
exports.getMasterProfileName = getMasterProfileName;
/***/ }),
/***/ 1968:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toHex = exports.fromHex = void 0;
const SHORT_TO_HEX = {};
const HEX_TO_SHORT = {};
for (let i = 0; i < 256; i++) {
let encodedByte = i.toString(16).toLowerCase();
if (encodedByte.length === 1) {
encodedByte = `0${encodedByte}`;
}
SHORT_TO_HEX[i] = encodedByte;
HEX_TO_SHORT[encodedByte] = i;
}
function fromHex(encoded) {
if (encoded.length % 2 !== 0) {
throw new Error("Hex encoded strings must have an even number length");
}
const out = new Uint8Array(encoded.length / 2);
for (let i = 0; i < encoded.length; i += 2) {
const encodedByte = encoded.substr(i, 2).toLowerCase();
if (encodedByte in HEX_TO_SHORT) {
out[i / 2] = HEX_TO_SHORT[encodedByte];
}
else {
throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
}
}
return out;
}
exports.fromHex = fromHex;
function toHex(bytes) {
let out = "";
for (let i = 0; i < bytes.byteLength; i++) {
out += SHORT_TO_HEX[bytes[i]];
}
return out;
}
exports.toHex = toHex;
/***/ }),
/***/ 15774:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.escapeUriPath = void 0;
const escape_uri_1 = __nccwpck_require__(24652);
const escapeUriPath = (uri) => uri.split("/").map(escape_uri_1.escapeUri).join("/");
exports.escapeUriPath = escapeUriPath;
/***/ }),
/***/ 24652:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.escapeUri = void 0;
const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
exports.escapeUri = escapeUri;
const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
/***/ }),
/***/ 57952:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(24652), exports);
tslib_1.__exportStar(__nccwpck_require__(15774), exports);
/***/ }),
/***/ 98095:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = void 0;
const node_config_provider_1 = __nccwpck_require__(87684);
const os_1 = __nccwpck_require__(12087);
const process_1 = __nccwpck_require__(61765);
const is_crt_available_1 = __nccwpck_require__(68390);
exports.UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
exports.UA_APP_ID_INI_NAME = "sdk-ua-app-id";
const defaultUserAgent = ({ serviceId, clientVersion }) => {
const sections = [
["aws-sdk-js", clientVersion],
[`os/${os_1.platform()}`, os_1.release()],
["lang/js"],
["md/nodejs", `${process_1.versions.node}`],
];
const crtAvailable = is_crt_available_1.isCrtAvailable();
if (crtAvailable) {
sections.push(crtAvailable);
}
if (serviceId) {
sections.push([`api/${serviceId}`, clientVersion]);
}
if (process_1.env.AWS_EXECUTION_ENV) {
sections.push([`exec-env/${process_1.env.AWS_EXECUTION_ENV}`]);
}
const appIdPromise = node_config_provider_1.loadConfig({
environmentVariableSelector: (env) => env[exports.UA_APP_ID_ENV_NAME],
configFileSelector: (profile) => profile[exports.UA_APP_ID_INI_NAME],
default: undefined,
})();
let resolvedUserAgent = undefined;
return async () => {
if (!resolvedUserAgent) {
const appId = await appIdPromise;
resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
}
return resolvedUserAgent;
};
};
exports.defaultUserAgent = defaultUserAgent;
/***/ }),
/***/ 68390:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isCrtAvailable = void 0;
const isCrtAvailable = () => {
try {
if ( true && __nccwpck_require__(87578)) {
return ["md/crt-avail"];
}
return null;
}
catch (e) {
return null;
}
};
exports.isCrtAvailable = isCrtAvailable;
/***/ }),
/***/ 66278:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toUtf8 = exports.fromUtf8 = void 0;
const util_buffer_from_1 = __nccwpck_require__(36010);
const fromUtf8 = (input) => {
const buf = util_buffer_from_1.fromString(input, "utf8");
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
};
exports.fromUtf8 = fromUtf8;
const toUtf8 = (input) => util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
exports.toUtf8 = toUtf8;
/***/ }),
/***/ 38880:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.createWaiter = void 0;
const poller_1 = __nccwpck_require__(92105);
const utils_1 = __nccwpck_require__(36001);
const waiter_1 = __nccwpck_require__(4996);
const abortTimeout = async (abortSignal) => {
return new Promise((resolve) => {
abortSignal.onabort = () => resolve({ state: waiter_1.WaiterState.ABORTED });
});
};
const createWaiter = async (options, input, acceptorChecks) => {
const params = {
...waiter_1.waiterServiceDefaults,
...options,
};
utils_1.validateWaiterOptions(params);
const exitConditions = [poller_1.runPolling(params, input, acceptorChecks)];
if (options.abortController) {
exitConditions.push(abortTimeout(options.abortController.signal));
}
if (options.abortSignal) {
exitConditions.push(abortTimeout(options.abortSignal));
}
return Promise.race(exitConditions);
};
exports.createWaiter = createWaiter;
/***/ }),
/***/ 21627:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(38880), exports);
tslib_1.__exportStar(__nccwpck_require__(4996), exports);
/***/ }),
/***/ 92105:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.runPolling = void 0;
const sleep_1 = __nccwpck_require__(17397);
const waiter_1 = __nccwpck_require__(4996);
const exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => {
if (attempt > attemptCeiling)
return maxDelay;
const delay = minDelay * 2 ** (attempt - 1);
return randomInRange(minDelay, delay);
};
const randomInRange = (min, max) => min + Math.random() * (max - min);
const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {
var _a;
const { state } = await acceptorChecks(client, input);
if (state !== waiter_1.WaiterState.RETRY) {
return { state };
}
let currentAttempt = 1;
const waitUntil = Date.now() + maxWaitTime * 1000;
const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;
while (true) {
if (((_a = abortController === null || abortController === void 0 ? void 0 : abortController.signal) === null || _a === void 0 ? void 0 : _a.aborted) || (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) {
return { state: waiter_1.WaiterState.ABORTED };
}
const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);
if (Date.now() + delay * 1000 > waitUntil) {
return { state: waiter_1.WaiterState.TIMEOUT };
}
await sleep_1.sleep(delay);
const { state } = await acceptorChecks(client, input);
if (state !== waiter_1.WaiterState.RETRY) {
return { state };
}
currentAttempt += 1;
}
};
exports.runPolling = runPolling;
/***/ }),
/***/ 36001:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tslib_1 = __nccwpck_require__(4351);
tslib_1.__exportStar(__nccwpck_require__(17397), exports);
tslib_1.__exportStar(__nccwpck_require__(23931), exports);
/***/ }),
/***/ 17397:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.sleep = void 0;
const sleep = (seconds) => {
return new Promise((resolve) => setTimeout(resolve, seconds * 1000));
};
exports.sleep = sleep;
/***/ }),
/***/ 23931:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.validateWaiterOptions = void 0;
const validateWaiterOptions = (options) => {
if (options.maxWaitTime < 1) {
throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);
}
else if (options.minDelay < 1) {
throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);
}
else if (options.maxDelay < 1) {
throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);
}
else if (options.maxWaitTime <= options.minDelay) {
throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);
}
else if (options.maxDelay < options.minDelay) {
throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);
}
};
exports.validateWaiterOptions = validateWaiterOptions;
/***/ }),
/***/ 4996:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkExceptions = exports.WaiterState = exports.waiterServiceDefaults = void 0;
exports.waiterServiceDefaults = {
minDelay: 2,
maxDelay: 120,
};
var WaiterState;
(function (WaiterState) {
WaiterState["ABORTED"] = "ABORTED";
WaiterState["FAILURE"] = "FAILURE";
WaiterState["SUCCESS"] = "SUCCESS";
WaiterState["RETRY"] = "RETRY";
WaiterState["TIMEOUT"] = "TIMEOUT";
})(WaiterState = exports.WaiterState || (exports.WaiterState = {}));
const checkExceptions = (result) => {
if (result.state === WaiterState.ABORTED) {
const abortError = new Error(`${JSON.stringify({
...result,
reason: "Request was aborted",
})}`);
abortError.name = "AbortError";
throw abortError;
}
else if (result.state === WaiterState.TIMEOUT) {
const timeoutError = new Error(`${JSON.stringify({
...result,
reason: "Waiter has timed out",
})}`);
timeoutError.name = "TimeoutError";
throw timeoutError;
}
else if (result.state !== WaiterState.SUCCESS) {
throw new Error(`${JSON.stringify({ result })}`);
}
return result;
};
exports.checkExceptions = checkExceptions;
/***/ }),
/***/ 81040:
/***/ ((module) => {
"use strict";
function noop() { }
function once(emitter, name) {
const o = once.spread(emitter, name);
const r = o.then((args) => args[0]);
r.cancel = o.cancel;
return r;
}
(function (once) {
function spread(emitter, name) {
let c = null;
const p = new Promise((resolve, reject) => {
function cancel() {
emitter.removeListener(name, onEvent);
emitter.removeListener('error', onError);
p.cancel = noop;
}
function onEvent(...args) {
cancel();
resolve(args);
}
function onError(err) {
cancel();
reject(err);
}
c = cancel;
emitter.on(name, onEvent);
emitter.on('error', onError);
});
if (!c) {
throw new TypeError('Could not get `cancel()` function');
}
p.cancel = c;
return p;
}
once.spread = spread;
})(once || (once = {}));
module.exports = once;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 49690:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const events_1 = __nccwpck_require__(28614);
const debug_1 = __importDefault(__nccwpck_require__(38237));
const promisify_1 = __importDefault(__nccwpck_require__(66570));
const debug = debug_1.default('agent-base');
function isAgent(v) {
return Boolean(v) && typeof v.addRequest === 'function';
}
function isSecureEndpoint() {
const { stack } = new Error();
if (typeof stack !== 'string')
return false;
return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
}
function createAgent(callback, opts) {
return new createAgent.Agent(callback, opts);
}
(function (createAgent) {
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
*
* @param {Function} callback
* @api public
*/
class Agent extends events_1.EventEmitter {
constructor(callback, _opts) {
super();
let opts = _opts;
if (typeof callback === 'function') {
this.callback = callback;
}
else if (callback) {
opts = callback;
}
// Timeout for the socket to be returned from the callback
this.timeout = null;
if (opts && typeof opts.timeout === 'number') {
this.timeout = opts.timeout;
}
// These aren't actually used by `agent-base`, but are required
// for the TypeScript definition files in `@types/node` :/
this.maxFreeSockets = 1;
this.maxSockets = 1;
this.maxTotalSockets = Infinity;
this.sockets = {};
this.freeSockets = {};
this.requests = {};
this.options = {};
}
get defaultPort() {
if (typeof this.explicitDefaultPort === 'number') {
return this.explicitDefaultPort;
}
return isSecureEndpoint() ? 443 : 80;
}
set defaultPort(v) {
this.explicitDefaultPort = v;
}
get protocol() {
if (typeof this.explicitProtocol === 'string') {
return this.explicitProtocol;
}
return isSecureEndpoint() ? 'https:' : 'http:';
}
set protocol(v) {
this.explicitProtocol = v;
}
callback(req, opts, fn) {
throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`');
}
/**
* Called by node-core's "_http_client.js" module when creating
* a new HTTP request with this Agent instance.
*
* @api public
*/
addRequest(req, _opts) {
const opts = Object.assign({}, _opts);
if (typeof opts.secureEndpoint !== 'boolean') {
opts.secureEndpoint = isSecureEndpoint();
}
if (opts.host == null) {
opts.host = 'localhost';
}
if (opts.port == null) {
opts.port = opts.secureEndpoint ? 443 : 80;
}
if (opts.protocol == null) {
opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
}
if (opts.host && opts.path) {
// If both a `host` and `path` are specified then it's most
// likely the result of a `url.parse()` call... we need to
// remove the `path` portion so that `net.connect()` doesn't
// attempt to open that as a unix socket file.
delete opts.path;
}
delete opts.agent;
delete opts.hostname;
delete opts._defaultAgent;
delete opts.defaultPort;
delete opts.createConnection;
// Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
let timedOut = false;
let timeoutId = null;
const timeoutMs = opts.timeout || this.timeout;
const onerror = (err) => {
if (req._hadError)
return;
req.emit('error', err);
// For Safety. Some additional errors might fire later on
// and we need to make sure we don't double-fire the error event.
req._hadError = true;
};
const ontimeout = () => {
timeoutId = null;
timedOut = true;
const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
err.code = 'ETIMEOUT';
onerror(err);
};
const callbackError = (err) => {
if (timedOut)
return;
if (timeoutId !== null) {
clearTimeout(timeoutId);
timeoutId = null;
}
onerror(err);
};
const onsocket = (socket) => {
if (timedOut)
return;
if (timeoutId != null) {
clearTimeout(timeoutId);
timeoutId = null;
}
if (isAgent(socket)) {
// `socket` is actually an `http.Agent` instance, so
// relinquish responsibility for this `req` to the Agent
// from here on
debug('Callback returned another Agent instance %o', socket.constructor.name);
socket.addRequest(req, opts);
return;
}
if (socket) {
socket.once('free', () => {
this.freeSocket(socket, opts);
});
req.onSocket(socket);
return;
}
const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
onerror(err);
};
if (typeof this.callback !== 'function') {
onerror(new Error('`callback` is not defined'));
return;
}
if (!this.promisifiedCallback) {
if (this.callback.length >= 3) {
debug('Converting legacy callback function to promise');
this.promisifiedCallback = promisify_1.default(this.callback);
}
else {
this.promisifiedCallback = this.callback;
}
}
if (typeof timeoutMs === 'number' && timeoutMs > 0) {
timeoutId = setTimeout(ontimeout, timeoutMs);
}
if ('port' in opts && typeof opts.port !== 'number') {
opts.port = Number(opts.port);
}
try {
debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`);
Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError);
}
catch (err) {
Promise.reject(err).catch(callbackError);
}
}
freeSocket(socket, opts) {
debug('Freeing socket %o %o', socket.constructor.name, opts);
socket.destroy();
}
destroy() {
debug('Destroying agent %o', this.constructor.name);
}
}
createAgent.Agent = Agent;
// So that `instanceof` works correctly
createAgent.prototype = createAgent.Agent.prototype;
})(createAgent || (createAgent = {}));
module.exports = createAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 66570:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
function promisify(fn) {
return function (req, opts) {
return new Promise((resolve, reject) => {
fn.call(this, req, opts, (err, rtn) => {
if (err) {
reject(err);
}
else {
resolve(rtn);
}
});
});
};
}
exports.default = promisify;
//# sourceMappingURL=promisify.js.map
/***/ }),
/***/ 55382:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
var es7_1 = tslib_1.__importDefault(__nccwpck_require__(75351));
function default_1(fork) {
fork.use(es7_1.default);
var types = fork.use(types_1.default);
var defaults = fork.use(shared_1.default).defaults;
var def = types.Type.def;
var or = types.Type.or;
def("Noop")
.bases("Statement")
.build();
def("DoExpression")
.bases("Expression")
.build("body")
.field("body", [def("Statement")]);
def("Super")
.bases("Expression")
.build();
def("BindExpression")
.bases("Expression")
.build("object", "callee")
.field("object", or(def("Expression"), null))
.field("callee", def("Expression"));
def("Decorator")
.bases("Node")
.build("expression")
.field("expression", def("Expression"));
def("Property")
.field("decorators", or([def("Decorator")], null), defaults["null"]);
def("MethodDefinition")
.field("decorators", or([def("Decorator")], null), defaults["null"]);
def("MetaProperty")
.bases("Expression")
.build("meta", "property")
.field("meta", def("Identifier"))
.field("property", def("Identifier"));
def("ParenthesizedExpression")
.bases("Expression")
.build("expression")
.field("expression", def("Expression"));
def("ImportSpecifier")
.bases("ModuleSpecifier")
.build("imported", "local")
.field("imported", def("Identifier"));
def("ImportDefaultSpecifier")
.bases("ModuleSpecifier")
.build("local");
def("ImportNamespaceSpecifier")
.bases("ModuleSpecifier")
.build("local");
def("ExportDefaultDeclaration")
.bases("Declaration")
.build("declaration")
.field("declaration", or(def("Declaration"), def("Expression")));
def("ExportNamedDeclaration")
.bases("Declaration")
.build("declaration", "specifiers", "source")
.field("declaration", or(def("Declaration"), null))
.field("specifiers", [def("ExportSpecifier")], defaults.emptyArray)
.field("source", or(def("Literal"), null), defaults["null"]);
def("ExportSpecifier")
.bases("ModuleSpecifier")
.build("local", "exported")
.field("exported", def("Identifier"));
def("ExportNamespaceSpecifier")
.bases("Specifier")
.build("exported")
.field("exported", def("Identifier"));
def("ExportDefaultSpecifier")
.bases("Specifier")
.build("exported")
.field("exported", def("Identifier"));
def("ExportAllDeclaration")
.bases("Declaration")
.build("exported", "source")
.field("exported", or(def("Identifier"), null))
.field("source", def("Literal"));
def("CommentBlock")
.bases("Comment")
.build("value", /*optional:*/ "leading", "trailing");
def("CommentLine")
.bases("Comment")
.build("value", /*optional:*/ "leading", "trailing");
def("Directive")
.bases("Node")
.build("value")
.field("value", def("DirectiveLiteral"));
def("DirectiveLiteral")
.bases("Node", "Expression")
.build("value")
.field("value", String, defaults["use strict"]);
def("InterpreterDirective")
.bases("Node")
.build("value")
.field("value", String);
def("BlockStatement")
.bases("Statement")
.build("body")
.field("body", [def("Statement")])
.field("directives", [def("Directive")], defaults.emptyArray);
def("Program")
.bases("Node")
.build("body")
.field("body", [def("Statement")])
.field("directives", [def("Directive")], defaults.emptyArray)
.field("interpreter", or(def("InterpreterDirective"), null), defaults["null"]);
// Split Literal
def("StringLiteral")
.bases("Literal")
.build("value")
.field("value", String);
def("NumericLiteral")
.bases("Literal")
.build("value")
.field("value", Number)
.field("raw", or(String, null), defaults["null"])
.field("extra", {
rawValue: Number,
raw: String
}, function getDefault() {
return {
rawValue: this.value,
raw: this.value + ""
};
});
def("BigIntLiteral")
.bases("Literal")
.build("value")
// Only String really seems appropriate here, since BigInt values
// often exceed the limits of JS numbers.
.field("value", or(String, Number))
.field("extra", {
rawValue: String,
raw: String
}, function getDefault() {
return {
rawValue: String(this.value),
raw: this.value + "n"
};
});
def("NullLiteral")
.bases("Literal")
.build()
.field("value", null, defaults["null"]);
def("BooleanLiteral")
.bases("Literal")
.build("value")
.field("value", Boolean);
def("RegExpLiteral")
.bases("Literal")
.build("pattern", "flags")
.field("pattern", String)
.field("flags", String)
.field("value", RegExp, function () {
return new RegExp(this.pattern, this.flags);
});
var ObjectExpressionProperty = or(def("Property"), def("ObjectMethod"), def("ObjectProperty"), def("SpreadProperty"), def("SpreadElement"));
// Split Property -> ObjectProperty and ObjectMethod
def("ObjectExpression")
.bases("Expression")
.build("properties")
.field("properties", [ObjectExpressionProperty]);
// ObjectMethod hoist .value properties to own properties
def("ObjectMethod")
.bases("Node", "Function")
.build("kind", "key", "params", "body", "computed")
.field("kind", or("method", "get", "set"))
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
.field("params", [def("Pattern")])
.field("body", def("BlockStatement"))
.field("computed", Boolean, defaults["false"])
.field("generator", Boolean, defaults["false"])
.field("async", Boolean, defaults["false"])
.field("accessibility", // TypeScript
or(def("Literal"), null), defaults["null"])
.field("decorators", or([def("Decorator")], null), defaults["null"]);
def("ObjectProperty")
.bases("Node")
.build("key", "value")
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
.field("value", or(def("Expression"), def("Pattern")))
.field("accessibility", // TypeScript
or(def("Literal"), null), defaults["null"])
.field("computed", Boolean, defaults["false"]);
var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"));
// MethodDefinition -> ClassMethod
def("ClassBody")
.bases("Declaration")
.build("body")
.field("body", [ClassBodyElement]);
def("ClassMethod")
.bases("Declaration", "Function")
.build("kind", "key", "params", "body", "computed", "static")
.field("key", or(def("Literal"), def("Identifier"), def("Expression")));
def("ClassPrivateMethod")
.bases("Declaration", "Function")
.build("key", "params", "body", "kind", "computed", "static")
.field("key", def("PrivateName"));
["ClassMethod",
"ClassPrivateMethod",
].forEach(function (typeName) {
def(typeName)
.field("kind", or("get", "set", "method", "constructor"), function () { return "method"; })
.field("body", def("BlockStatement"))
.field("computed", Boolean, defaults["false"])
.field("static", or(Boolean, null), defaults["null"])
.field("abstract", or(Boolean, null), defaults["null"])
.field("access", or("public", "private", "protected", null), defaults["null"])
.field("accessibility", or("public", "private", "protected", null), defaults["null"])
.field("decorators", or([def("Decorator")], null), defaults["null"])
.field("optional", or(Boolean, null), defaults["null"]);
});
def("ClassPrivateProperty")
.bases("ClassProperty")
.build("key", "value")
.field("key", def("PrivateName"))
.field("value", or(def("Expression"), null), defaults["null"]);
def("PrivateName")
.bases("Expression", "Pattern")
.build("id")
.field("id", def("Identifier"));
var ObjectPatternProperty = or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty"), // Used by Esprima
def("ObjectProperty"), // Babel 6
def("RestProperty") // Babel 6
);
// Split into RestProperty and SpreadProperty
def("ObjectPattern")
.bases("Pattern")
.build("properties")
.field("properties", [ObjectPatternProperty])
.field("decorators", or([def("Decorator")], null), defaults["null"]);
def("SpreadProperty")
.bases("Node")
.build("argument")
.field("argument", def("Expression"));
def("RestProperty")
.bases("Node")
.build("argument")
.field("argument", def("Expression"));
def("ForAwaitStatement")
.bases("Statement")
.build("left", "right", "body")
.field("left", or(def("VariableDeclaration"), def("Expression")))
.field("right", def("Expression"))
.field("body", def("Statement"));
// The callee node of a dynamic import(...) expression.
def("Import")
.bases("Expression")
.build();
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 92262:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var babel_core_1 = tslib_1.__importDefault(__nccwpck_require__(55382));
var flow_1 = tslib_1.__importDefault(__nccwpck_require__(60368));
function default_1(fork) {
fork.use(babel_core_1.default);
fork.use(flow_1.default);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 66604:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
var types = fork.use(types_1.default);
var Type = types.Type;
var def = Type.def;
var or = Type.or;
var shared = fork.use(shared_1.default);
var defaults = shared.defaults;
var geq = shared.geq;
// Abstract supertype of all syntactic entities that are allowed to have a
// .loc field.
def("Printable")
.field("loc", or(def("SourceLocation"), null), defaults["null"], true);
def("Node")
.bases("Printable")
.field("type", String)
.field("comments", or([def("Comment")], null), defaults["null"], true);
def("SourceLocation")
.field("start", def("Position"))
.field("end", def("Position"))
.field("source", or(String, null), defaults["null"]);
def("Position")
.field("line", geq(1))
.field("column", geq(0));
def("File")
.bases("Node")
.build("program", "name")
.field("program", def("Program"))
.field("name", or(String, null), defaults["null"]);
def("Program")
.bases("Node")
.build("body")
.field("body", [def("Statement")]);
def("Function")
.bases("Node")
.field("id", or(def("Identifier"), null), defaults["null"])
.field("params", [def("Pattern")])
.field("body", def("BlockStatement"))
.field("generator", Boolean, defaults["false"])
.field("async", Boolean, defaults["false"]);
def("Statement").bases("Node");
// The empty .build() here means that an EmptyStatement can be constructed
// (i.e. it's not abstract) but that it needs no arguments.
def("EmptyStatement").bases("Statement").build();
def("BlockStatement")
.bases("Statement")
.build("body")
.field("body", [def("Statement")]);
// TODO Figure out how to silently coerce Expressions to
// ExpressionStatements where a Statement was expected.
def("ExpressionStatement")
.bases("Statement")
.build("expression")
.field("expression", def("Expression"));
def("IfStatement")
.bases("Statement")
.build("test", "consequent", "alternate")
.field("test", def("Expression"))
.field("consequent", def("Statement"))
.field("alternate", or(def("Statement"), null), defaults["null"]);
def("LabeledStatement")
.bases("Statement")
.build("label", "body")
.field("label", def("Identifier"))
.field("body", def("Statement"));
def("BreakStatement")
.bases("Statement")
.build("label")
.field("label", or(def("Identifier"), null), defaults["null"]);
def("ContinueStatement")
.bases("Statement")
.build("label")
.field("label", or(def("Identifier"), null), defaults["null"]);
def("WithStatement")
.bases("Statement")
.build("object", "body")
.field("object", def("Expression"))
.field("body", def("Statement"));
def("SwitchStatement")
.bases("Statement")
.build("discriminant", "cases", "lexical")
.field("discriminant", def("Expression"))
.field("cases", [def("SwitchCase")])
.field("lexical", Boolean, defaults["false"]);
def("ReturnStatement")
.bases("Statement")
.build("argument")
.field("argument", or(def("Expression"), null));
def("ThrowStatement")
.bases("Statement")
.build("argument")
.field("argument", def("Expression"));
def("TryStatement")
.bases("Statement")
.build("block", "handler", "finalizer")
.field("block", def("BlockStatement"))
.field("handler", or(def("CatchClause"), null), function () {
return this.handlers && this.handlers[0] || null;
})
.field("handlers", [def("CatchClause")], function () {
return this.handler ? [this.handler] : [];
}, true) // Indicates this field is hidden from eachField iteration.
.field("guardedHandlers", [def("CatchClause")], defaults.emptyArray)
.field("finalizer", or(def("BlockStatement"), null), defaults["null"]);
def("CatchClause")
.bases("Node")
.build("param", "guard", "body")
// https://github.com/tc39/proposal-optional-catch-binding
.field("param", or(def("Pattern"), null), defaults["null"])
.field("guard", or(def("Expression"), null), defaults["null"])
.field("body", def("BlockStatement"));
def("WhileStatement")
.bases("Statement")
.build("test", "body")
.field("test", def("Expression"))
.field("body", def("Statement"));
def("DoWhileStatement")
.bases("Statement")
.build("body", "test")
.field("body", def("Statement"))
.field("test", def("Expression"));
def("ForStatement")
.bases("Statement")
.build("init", "test", "update", "body")
.field("init", or(def("VariableDeclaration"), def("Expression"), null))
.field("test", or(def("Expression"), null))
.field("update", or(def("Expression"), null))
.field("body", def("Statement"));
def("ForInStatement")
.bases("Statement")
.build("left", "right", "body")
.field("left", or(def("VariableDeclaration"), def("Expression")))
.field("right", def("Expression"))
.field("body", def("Statement"));
def("DebuggerStatement").bases("Statement").build();
def("Declaration").bases("Statement");
def("FunctionDeclaration")
.bases("Function", "Declaration")
.build("id", "params", "body")
.field("id", def("Identifier"));
def("FunctionExpression")
.bases("Function", "Expression")
.build("id", "params", "body");
def("VariableDeclaration")
.bases("Declaration")
.build("kind", "declarations")
.field("kind", or("var", "let", "const"))
.field("declarations", [def("VariableDeclarator")]);
def("VariableDeclarator")
.bases("Node")
.build("id", "init")
.field("id", def("Pattern"))
.field("init", or(def("Expression"), null), defaults["null"]);
def("Expression").bases("Node");
def("ThisExpression").bases("Expression").build();
def("ArrayExpression")
.bases("Expression")
.build("elements")
.field("elements", [or(def("Expression"), null)]);
def("ObjectExpression")
.bases("Expression")
.build("properties")
.field("properties", [def("Property")]);
// TODO Not in the Mozilla Parser API, but used by Esprima.
def("Property")
.bases("Node") // Want to be able to visit Property Nodes.
.build("kind", "key", "value")
.field("kind", or("init", "get", "set"))
.field("key", or(def("Literal"), def("Identifier")))
.field("value", def("Expression"));
def("SequenceExpression")
.bases("Expression")
.build("expressions")
.field("expressions", [def("Expression")]);
var UnaryOperator = or("-", "+", "!", "~", "typeof", "void", "delete");
def("UnaryExpression")
.bases("Expression")
.build("operator", "argument", "prefix")
.field("operator", UnaryOperator)
.field("argument", def("Expression"))
// Esprima doesn't bother with this field, presumably because it's
// always true for unary operators.
.field("prefix", Boolean, defaults["true"]);
var BinaryOperator = or("==", "!=", "===", "!==", "<", "<=", ">", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", "&", // TODO Missing from the Parser API.
"|", "^", "in", "instanceof");
def("BinaryExpression")
.bases("Expression")
.build("operator", "left", "right")
.field("operator", BinaryOperator)
.field("left", def("Expression"))
.field("right", def("Expression"));
var AssignmentOperator = or("=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&=");
def("AssignmentExpression")
.bases("Expression")
.build("operator", "left", "right")
.field("operator", AssignmentOperator)
.field("left", or(def("Pattern"), def("MemberExpression")))
.field("right", def("Expression"));
var UpdateOperator = or("++", "--");
def("UpdateExpression")
.bases("Expression")
.build("operator", "argument", "prefix")
.field("operator", UpdateOperator)
.field("argument", def("Expression"))
.field("prefix", Boolean);
var LogicalOperator = or("||", "&&");
def("LogicalExpression")
.bases("Expression")
.build("operator", "left", "right")
.field("operator", LogicalOperator)
.field("left", def("Expression"))
.field("right", def("Expression"));
def("ConditionalExpression")
.bases("Expression")
.build("test", "consequent", "alternate")
.field("test", def("Expression"))
.field("consequent", def("Expression"))
.field("alternate", def("Expression"));
def("NewExpression")
.bases("Expression")
.build("callee", "arguments")
.field("callee", def("Expression"))
// The Mozilla Parser API gives this type as [or(def("Expression"),
// null)], but null values don't really make sense at the call site.
// TODO Report this nonsense.
.field("arguments", [def("Expression")]);
def("CallExpression")
.bases("Expression")
.build("callee", "arguments")
.field("callee", def("Expression"))
// See comment for NewExpression above.
.field("arguments", [def("Expression")]);
def("MemberExpression")
.bases("Expression")
.build("object", "property", "computed")
.field("object", def("Expression"))
.field("property", or(def("Identifier"), def("Expression")))
.field("computed", Boolean, function () {
var type = this.property.type;
if (type === 'Literal' ||
type === 'MemberExpression' ||
type === 'BinaryExpression') {
return true;
}
return false;
});
def("Pattern").bases("Node");
def("SwitchCase")
.bases("Node")
.build("test", "consequent")
.field("test", or(def("Expression"), null))
.field("consequent", [def("Statement")]);
def("Identifier")
.bases("Expression", "Pattern")
.build("name")
.field("name", String)
.field("optional", Boolean, defaults["false"]);
def("Literal")
.bases("Expression")
.build("value")
.field("value", or(String, Boolean, null, Number, RegExp))
.field("regex", or({
pattern: String,
flags: String
}, null), function () {
if (this.value instanceof RegExp) {
var flags = "";
if (this.value.ignoreCase)
flags += "i";
if (this.value.multiline)
flags += "m";
if (this.value.global)
flags += "g";
return {
pattern: this.value.source,
flags: flags
};
}
return null;
});
// Abstract (non-buildable) comment supertype. Not a Node.
def("Comment")
.bases("Printable")
.field("value", String)
// A .leading comment comes before the node, whereas a .trailing
// comment comes after it. These two fields should not both be true,
// but they might both be false when the comment falls inside a node
// and the node has no children for the comment to lead or trail,
// e.g. { /*dangling*/ }.
.field("leading", Boolean, defaults["true"])
.field("trailing", Boolean, defaults["false"]);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 32207:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
var core_1 = tslib_1.__importDefault(__nccwpck_require__(66604));
function default_1(fork) {
fork.use(core_1.default);
var types = fork.use(types_1.default);
var Type = types.Type;
var def = types.Type.def;
var or = Type.or;
var shared = fork.use(shared_1.default);
var defaults = shared.defaults;
// https://github.com/tc39/proposal-optional-chaining
// `a?.b` as per https://github.com/estree/estree/issues/146
def("OptionalMemberExpression")
.bases("MemberExpression")
.build("object", "property", "computed", "optional")
.field("optional", Boolean, defaults["true"]);
// a?.b()
def("OptionalCallExpression")
.bases("CallExpression")
.build("callee", "arguments", "optional")
.field("optional", Boolean, defaults["true"]);
// https://github.com/tc39/proposal-nullish-coalescing
// `a ?? b` as per https://github.com/babel/babylon/pull/761/files
var LogicalOperator = or("||", "&&", "??");
def("LogicalExpression")
.field("operator", LogicalOperator);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 48975:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var es7_1 = tslib_1.__importDefault(__nccwpck_require__(75351));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
function default_1(fork) {
fork.use(es7_1.default);
var types = fork.use(types_1.default);
var def = types.Type.def;
def("ImportExpression")
.bases("Expression")
.build("source")
.field("source", def("Expression"));
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 68127:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var core_1 = tslib_1.__importDefault(__nccwpck_require__(66604));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
fork.use(core_1.default);
var types = fork.use(types_1.default);
var def = types.Type.def;
var or = types.Type.or;
var defaults = fork.use(shared_1.default).defaults;
def("Function")
.field("generator", Boolean, defaults["false"])
.field("expression", Boolean, defaults["false"])
.field("defaults", [or(def("Expression"), null)], defaults.emptyArray)
// TODO This could be represented as a RestElement in .params.
.field("rest", or(def("Identifier"), null), defaults["null"]);
// The ESTree way of representing a ...rest parameter.
def("RestElement")
.bases("Pattern")
.build("argument")
.field("argument", def("Pattern"))
.field("typeAnnotation", // for Babylon. Flow parser puts it on the identifier
or(def("TypeAnnotation"), def("TSTypeAnnotation"), null), defaults["null"]);
def("SpreadElementPattern")
.bases("Pattern")
.build("argument")
.field("argument", def("Pattern"));
def("FunctionDeclaration")
.build("id", "params", "body", "generator", "expression");
def("FunctionExpression")
.build("id", "params", "body", "generator", "expression");
// The Parser API calls this ArrowExpression, but Esprima and all other
// actual parsers use ArrowFunctionExpression.
def("ArrowFunctionExpression")
.bases("Function", "Expression")
.build("params", "body", "expression")
// The forced null value here is compatible with the overridden
// definition of the "id" field in the Function interface.
.field("id", null, defaults["null"])
// Arrow function bodies are allowed to be expressions.
.field("body", or(def("BlockStatement"), def("Expression")))
// The current spec forbids arrow generators, so I have taken the
// liberty of enforcing that. TODO Report this.
.field("generator", false, defaults["false"]);
def("ForOfStatement")
.bases("Statement")
.build("left", "right", "body")
.field("left", or(def("VariableDeclaration"), def("Pattern")))
.field("right", def("Expression"))
.field("body", def("Statement"));
def("YieldExpression")
.bases("Expression")
.build("argument", "delegate")
.field("argument", or(def("Expression"), null))
.field("delegate", Boolean, defaults["false"]);
def("GeneratorExpression")
.bases("Expression")
.build("body", "blocks", "filter")
.field("body", def("Expression"))
.field("blocks", [def("ComprehensionBlock")])
.field("filter", or(def("Expression"), null));
def("ComprehensionExpression")
.bases("Expression")
.build("body", "blocks", "filter")
.field("body", def("Expression"))
.field("blocks", [def("ComprehensionBlock")])
.field("filter", or(def("Expression"), null));
def("ComprehensionBlock")
.bases("Node")
.build("left", "right", "each")
.field("left", def("Pattern"))
.field("right", def("Expression"))
.field("each", Boolean);
def("Property")
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
.field("value", or(def("Expression"), def("Pattern")))
.field("method", Boolean, defaults["false"])
.field("shorthand", Boolean, defaults["false"])
.field("computed", Boolean, defaults["false"]);
def("ObjectProperty")
.field("shorthand", Boolean, defaults["false"]);
def("PropertyPattern")
.bases("Pattern")
.build("key", "pattern")
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
.field("pattern", def("Pattern"))
.field("computed", Boolean, defaults["false"]);
def("ObjectPattern")
.bases("Pattern")
.build("properties")
.field("properties", [or(def("PropertyPattern"), def("Property"))]);
def("ArrayPattern")
.bases("Pattern")
.build("elements")
.field("elements", [or(def("Pattern"), null)]);
def("MethodDefinition")
.bases("Declaration")
.build("kind", "key", "value", "static")
.field("kind", or("constructor", "method", "get", "set"))
.field("key", def("Expression"))
.field("value", def("Function"))
.field("computed", Boolean, defaults["false"])
.field("static", Boolean, defaults["false"]);
def("SpreadElement")
.bases("Node")
.build("argument")
.field("argument", def("Expression"));
def("ArrayExpression")
.field("elements", [or(def("Expression"), def("SpreadElement"), def("RestElement"), null)]);
def("NewExpression")
.field("arguments", [or(def("Expression"), def("SpreadElement"))]);
def("CallExpression")
.field("arguments", [or(def("Expression"), def("SpreadElement"))]);
// Note: this node type is *not* an AssignmentExpression with a Pattern on
// the left-hand side! The existing AssignmentExpression type already
// supports destructuring assignments. AssignmentPattern nodes may appear
// wherever a Pattern is allowed, and the right-hand side represents a
// default value to be destructured against the left-hand side, if no
// value is otherwise provided. For example: default parameter values.
def("AssignmentPattern")
.bases("Pattern")
.build("left", "right")
.field("left", def("Pattern"))
.field("right", def("Expression"));
var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"));
def("ClassProperty")
.bases("Declaration")
.build("key")
.field("key", or(def("Literal"), def("Identifier"), def("Expression")))
.field("computed", Boolean, defaults["false"]);
def("ClassPropertyDefinition") // static property
.bases("Declaration")
.build("definition")
// Yes, Virginia, circular definitions are permitted.
.field("definition", ClassBodyElement);
def("ClassBody")
.bases("Declaration")
.build("body")
.field("body", [ClassBodyElement]);
def("ClassDeclaration")
.bases("Declaration")
.build("id", "body", "superClass")
.field("id", or(def("Identifier"), null))
.field("body", def("ClassBody"))
.field("superClass", or(def("Expression"), null), defaults["null"]);
def("ClassExpression")
.bases("Expression")
.build("id", "body", "superClass")
.field("id", or(def("Identifier"), null), defaults["null"])
.field("body", def("ClassBody"))
.field("superClass", or(def("Expression"), null), defaults["null"]);
// Specifier and ModuleSpecifier are abstract non-standard types
// introduced for definitional convenience.
def("Specifier").bases("Node");
// This supertype is shared/abused by both def/babel.js and
// def/esprima.js. In the future, it will be possible to load only one set
// of definitions appropriate for a given parser, but until then we must
// rely on default functions to reconcile the conflicting AST formats.
def("ModuleSpecifier")
.bases("Specifier")
// This local field is used by Babel/Acorn. It should not technically
// be optional in the Babel/Acorn AST format, but it must be optional
// in the Esprima AST format.
.field("local", or(def("Identifier"), null), defaults["null"])
// The id and name fields are used by Esprima. The id field should not
// technically be optional in the Esprima AST format, but it must be
// optional in the Babel/Acorn AST format.
.field("id", or(def("Identifier"), null), defaults["null"])
.field("name", or(def("Identifier"), null), defaults["null"]);
// Like ModuleSpecifier, except type:"ImportSpecifier" and buildable.
// import {<id [as name]>} from ...;
def("ImportSpecifier")
.bases("ModuleSpecifier")
.build("id", "name");
// import <* as id> from ...;
def("ImportNamespaceSpecifier")
.bases("ModuleSpecifier")
.build("id");
// import <id> from ...;
def("ImportDefaultSpecifier")
.bases("ModuleSpecifier")
.build("id");
def("ImportDeclaration")
.bases("Declaration")
.build("specifiers", "source", "importKind")
.field("specifiers", [or(def("ImportSpecifier"), def("ImportNamespaceSpecifier"), def("ImportDefaultSpecifier"))], defaults.emptyArray)
.field("source", def("Literal"))
.field("importKind", or("value", "type"), function () {
return "value";
});
def("TaggedTemplateExpression")
.bases("Expression")
.build("tag", "quasi")
.field("tag", def("Expression"))
.field("quasi", def("TemplateLiteral"));
def("TemplateLiteral")
.bases("Expression")
.build("quasis", "expressions")
.field("quasis", [def("TemplateElement")])
.field("expressions", [def("Expression")]);
def("TemplateElement")
.bases("Node")
.build("value", "tail")
.field("value", { "cooked": String, "raw": String })
.field("tail", Boolean);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 75351:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var es6_1 = tslib_1.__importDefault(__nccwpck_require__(68127));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
fork.use(es6_1.default);
var types = fork.use(types_1.default);
var def = types.Type.def;
var or = types.Type.or;
var defaults = fork.use(shared_1.default).defaults;
def("Function")
.field("async", Boolean, defaults["false"]);
def("SpreadProperty")
.bases("Node")
.build("argument")
.field("argument", def("Expression"));
def("ObjectExpression")
.field("properties", [or(def("Property"), def("SpreadProperty"), def("SpreadElement"))]);
def("SpreadPropertyPattern")
.bases("Pattern")
.build("argument")
.field("argument", def("Pattern"));
def("ObjectPattern")
.field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"))]);
def("AwaitExpression")
.bases("Expression")
.build("argument", "all")
.field("argument", or(def("Expression"), null))
.field("all", Boolean, defaults["false"]);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 96817:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var es7_1 = tslib_1.__importDefault(__nccwpck_require__(75351));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
fork.use(es7_1.default);
var types = fork.use(types_1.default);
var defaults = fork.use(shared_1.default).defaults;
var def = types.Type.def;
var or = types.Type.or;
def("VariableDeclaration")
.field("declarations", [or(def("VariableDeclarator"), def("Identifier") // Esprima deviation.
)]);
def("Property")
.field("value", or(def("Expression"), def("Pattern") // Esprima deviation.
));
def("ArrayPattern")
.field("elements", [or(def("Pattern"), def("SpreadElement"), null)]);
def("ObjectPattern")
.field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty") // Used by Esprima.
)]);
// Like ModuleSpecifier, except type:"ExportSpecifier" and buildable.
// export {<id [as name]>} [from ...];
def("ExportSpecifier")
.bases("ModuleSpecifier")
.build("id", "name");
// export <*> from ...;
def("ExportBatchSpecifier")
.bases("Specifier")
.build();
def("ExportDeclaration")
.bases("Declaration")
.build("default", "declaration", "specifiers", "source")
.field("default", Boolean)
.field("declaration", or(def("Declaration"), def("Expression"), // Implies default.
null))
.field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray)
.field("source", or(def("Literal"), null), defaults["null"]);
def("Block")
.bases("Comment")
.build("value", /*optional:*/ "leading", "trailing");
def("Line")
.bases("Comment")
.build("value", /*optional:*/ "leading", "trailing");
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 60368:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var es7_1 = tslib_1.__importDefault(__nccwpck_require__(75351));
var type_annotations_1 = tslib_1.__importDefault(__nccwpck_require__(86278));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
fork.use(es7_1.default);
fork.use(type_annotations_1.default);
var types = fork.use(types_1.default);
var def = types.Type.def;
var or = types.Type.or;
var defaults = fork.use(shared_1.default).defaults;
// Base types
def("Flow").bases("Node");
def("FlowType").bases("Flow");
// Type annotations
def("AnyTypeAnnotation")
.bases("FlowType")
.build();
def("EmptyTypeAnnotation")
.bases("FlowType")
.build();
def("MixedTypeAnnotation")
.bases("FlowType")
.build();
def("VoidTypeAnnotation")
.bases("FlowType")
.build();
def("NumberTypeAnnotation")
.bases("FlowType")
.build();
def("NumberLiteralTypeAnnotation")
.bases("FlowType")
.build("value", "raw")
.field("value", Number)
.field("raw", String);
// Babylon 6 differs in AST from Flow
// same as NumberLiteralTypeAnnotation
def("NumericLiteralTypeAnnotation")
.bases("FlowType")
.build("value", "raw")
.field("value", Number)
.field("raw", String);
def("StringTypeAnnotation")
.bases("FlowType")
.build();
def("StringLiteralTypeAnnotation")
.bases("FlowType")
.build("value", "raw")
.field("value", String)
.field("raw", String);
def("BooleanTypeAnnotation")
.bases("FlowType")
.build();
def("BooleanLiteralTypeAnnotation")
.bases("FlowType")
.build("value", "raw")
.field("value", Boolean)
.field("raw", String);
def("TypeAnnotation")
.bases("Node")
.build("typeAnnotation")
.field("typeAnnotation", def("FlowType"));
def("NullableTypeAnnotation")
.bases("FlowType")
.build("typeAnnotation")
.field("typeAnnotation", def("FlowType"));
def("NullLiteralTypeAnnotation")
.bases("FlowType")
.build();
def("NullTypeAnnotation")
.bases("FlowType")
.build();
def("ThisTypeAnnotation")
.bases("FlowType")
.build();
def("ExistsTypeAnnotation")
.bases("FlowType")
.build();
def("ExistentialTypeParam")
.bases("FlowType")
.build();
def("FunctionTypeAnnotation")
.bases("FlowType")
.build("params", "returnType", "rest", "typeParameters")
.field("params", [def("FunctionTypeParam")])
.field("returnType", def("FlowType"))
.field("rest", or(def("FunctionTypeParam"), null))
.field("typeParameters", or(def("TypeParameterDeclaration"), null));
def("FunctionTypeParam")
.bases("Node")
.build("name", "typeAnnotation", "optional")
.field("name", def("Identifier"))
.field("typeAnnotation", def("FlowType"))
.field("optional", Boolean);
def("ArrayTypeAnnotation")
.bases("FlowType")
.build("elementType")
.field("elementType", def("FlowType"));
def("ObjectTypeAnnotation")
.bases("FlowType")
.build("properties", "indexers", "callProperties")
.field("properties", [
or(def("ObjectTypeProperty"), def("ObjectTypeSpreadProperty"))
])
.field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray)
.field("callProperties", [def("ObjectTypeCallProperty")], defaults.emptyArray)
.field("inexact", or(Boolean, void 0), defaults["undefined"])
.field("exact", Boolean, defaults["false"])
.field("internalSlots", [def("ObjectTypeInternalSlot")], defaults.emptyArray);
def("Variance")
.bases("Node")
.build("kind")
.field("kind", or("plus", "minus"));
var LegacyVariance = or(def("Variance"), "plus", "minus", null);
def("ObjectTypeProperty")
.bases("Node")
.build("key", "value", "optional")
.field("key", or(def("Literal"), def("Identifier")))
.field("value", def("FlowType"))
.field("optional", Boolean)
.field("variance", LegacyVariance, defaults["null"]);
def("ObjectTypeIndexer")
.bases("Node")
.build("id", "key", "value")
.field("id", def("Identifier"))
.field("key", def("FlowType"))
.field("value", def("FlowType"))
.field("variance", LegacyVariance, defaults["null"]);
def("ObjectTypeCallProperty")
.bases("Node")
.build("value")
.field("value", def("FunctionTypeAnnotation"))
.field("static", Boolean, defaults["false"]);
def("QualifiedTypeIdentifier")
.bases("Node")
.build("qualification", "id")
.field("qualification", or(def("Identifier"), def("QualifiedTypeIdentifier")))
.field("id", def("Identifier"));
def("GenericTypeAnnotation")
.bases("FlowType")
.build("id", "typeParameters")
.field("id", or(def("Identifier"), def("QualifiedTypeIdentifier")))
.field("typeParameters", or(def("TypeParameterInstantiation"), null));
def("MemberTypeAnnotation")
.bases("FlowType")
.build("object", "property")
.field("object", def("Identifier"))
.field("property", or(def("MemberTypeAnnotation"), def("GenericTypeAnnotation")));
def("UnionTypeAnnotation")
.bases("FlowType")
.build("types")
.field("types", [def("FlowType")]);
def("IntersectionTypeAnnotation")
.bases("FlowType")
.build("types")
.field("types", [def("FlowType")]);
def("TypeofTypeAnnotation")
.bases("FlowType")
.build("argument")
.field("argument", def("FlowType"));
def("ObjectTypeSpreadProperty")
.bases("Node")
.build("argument")
.field("argument", def("FlowType"));
def("ObjectTypeInternalSlot")
.bases("Node")
.build("id", "value", "optional", "static", "method")
.field("id", def("Identifier"))
.field("value", def("FlowType"))
.field("optional", Boolean)
.field("static", Boolean)
.field("method", Boolean);
def("TypeParameterDeclaration")
.bases("Node")
.build("params")
.field("params", [def("TypeParameter")]);
def("TypeParameterInstantiation")
.bases("Node")
.build("params")
.field("params", [def("FlowType")]);
def("TypeParameter")
.bases("FlowType")
.build("name", "variance", "bound")
.field("name", String)
.field("variance", LegacyVariance, defaults["null"])
.field("bound", or(def("TypeAnnotation"), null), defaults["null"]);
def("ClassProperty")
.field("variance", LegacyVariance, defaults["null"]);
def("ClassImplements")
.bases("Node")
.build("id")
.field("id", def("Identifier"))
.field("superClass", or(def("Expression"), null), defaults["null"])
.field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]);
def("InterfaceTypeAnnotation")
.bases("FlowType")
.build("body", "extends")
.field("body", def("ObjectTypeAnnotation"))
.field("extends", or([def("InterfaceExtends")], null), defaults["null"]);
def("InterfaceDeclaration")
.bases("Declaration")
.build("id", "body", "extends")
.field("id", def("Identifier"))
.field("typeParameters", or(def("TypeParameterDeclaration"), null), defaults["null"])
.field("body", def("ObjectTypeAnnotation"))
.field("extends", [def("InterfaceExtends")]);
def("DeclareInterface")
.bases("InterfaceDeclaration")
.build("id", "body", "extends");
def("InterfaceExtends")
.bases("Node")
.build("id")
.field("id", def("Identifier"))
.field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]);
def("TypeAlias")
.bases("Declaration")
.build("id", "typeParameters", "right")
.field("id", def("Identifier"))
.field("typeParameters", or(def("TypeParameterDeclaration"), null))
.field("right", def("FlowType"));
def("OpaqueType")
.bases("Declaration")
.build("id", "typeParameters", "impltype", "supertype")
.field("id", def("Identifier"))
.field("typeParameters", or(def("TypeParameterDeclaration"), null))
.field("impltype", def("FlowType"))
.field("supertype", def("FlowType"));
def("DeclareTypeAlias")
.bases("TypeAlias")
.build("id", "typeParameters", "right");
def("DeclareOpaqueType")
.bases("TypeAlias")
.build("id", "typeParameters", "supertype");
def("TypeCastExpression")
.bases("Expression")
.build("expression", "typeAnnotation")
.field("expression", def("Expression"))
.field("typeAnnotation", def("TypeAnnotation"));
def("TupleTypeAnnotation")
.bases("FlowType")
.build("types")
.field("types", [def("FlowType")]);
def("DeclareVariable")
.bases("Statement")
.build("id")
.field("id", def("Identifier"));
def("DeclareFunction")
.bases("Statement")
.build("id")
.field("id", def("Identifier"));
def("DeclareClass")
.bases("InterfaceDeclaration")
.build("id");
def("DeclareModule")
.bases("Statement")
.build("id", "body")
.field("id", or(def("Identifier"), def("Literal")))
.field("body", def("BlockStatement"));
def("DeclareModuleExports")
.bases("Statement")
.build("typeAnnotation")
.field("typeAnnotation", def("TypeAnnotation"));
def("DeclareExportDeclaration")
.bases("Declaration")
.build("default", "declaration", "specifiers", "source")
.field("default", Boolean)
.field("declaration", or(def("DeclareVariable"), def("DeclareFunction"), def("DeclareClass"), def("FlowType"), // Implies default.
null))
.field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray)
.field("source", or(def("Literal"), null), defaults["null"]);
def("DeclareExportAllDeclaration")
.bases("Declaration")
.build("source")
.field("source", or(def("Literal"), null), defaults["null"]);
def("FlowPredicate").bases("Flow");
def("InferredPredicate")
.bases("FlowPredicate")
.build();
def("DeclaredPredicate")
.bases("FlowPredicate")
.build("value")
.field("value", def("Expression"));
def("CallExpression")
.field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]);
def("NewExpression")
.field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 27572:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var es7_1 = tslib_1.__importDefault(__nccwpck_require__(75351));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
fork.use(es7_1.default);
var types = fork.use(types_1.default);
var def = types.Type.def;
var or = types.Type.or;
var defaults = fork.use(shared_1.default).defaults;
def("JSXAttribute")
.bases("Node")
.build("name", "value")
.field("name", or(def("JSXIdentifier"), def("JSXNamespacedName")))
.field("value", or(def("Literal"), // attr="value"
def("JSXExpressionContainer"), // attr={value}
null // attr= or just attr
), defaults["null"]);
def("JSXIdentifier")
.bases("Identifier")
.build("name")
.field("name", String);
def("JSXNamespacedName")
.bases("Node")
.build("namespace", "name")
.field("namespace", def("JSXIdentifier"))
.field("name", def("JSXIdentifier"));
def("JSXMemberExpression")
.bases("MemberExpression")
.build("object", "property")
.field("object", or(def("JSXIdentifier"), def("JSXMemberExpression")))
.field("property", def("JSXIdentifier"))
.field("computed", Boolean, defaults.false);
var JSXElementName = or(def("JSXIdentifier"), def("JSXNamespacedName"), def("JSXMemberExpression"));
def("JSXSpreadAttribute")
.bases("Node")
.build("argument")
.field("argument", def("Expression"));
var JSXAttributes = [or(def("JSXAttribute"), def("JSXSpreadAttribute"))];
def("JSXExpressionContainer")
.bases("Expression")
.build("expression")
.field("expression", def("Expression"));
def("JSXElement")
.bases("Expression")
.build("openingElement", "closingElement", "children")
.field("openingElement", def("JSXOpeningElement"))
.field("closingElement", or(def("JSXClosingElement"), null), defaults["null"])
.field("children", [or(def("JSXElement"), def("JSXExpressionContainer"), def("JSXFragment"), def("JSXText"), def("Literal") // TODO Esprima should return JSXText instead.
)], defaults.emptyArray)
.field("name", JSXElementName, function () {
// Little-known fact: the `this` object inside a default function
// is none other than the partially-built object itself, and any
// fields initialized directly from builder function arguments
// (like openingElement, closingElement, and children) are
// guaranteed to be available.
return this.openingElement.name;
}, true) // hidden from traversal
.field("selfClosing", Boolean, function () {
return this.openingElement.selfClosing;
}, true) // hidden from traversal
.field("attributes", JSXAttributes, function () {
return this.openingElement.attributes;
}, true); // hidden from traversal
def("JSXOpeningElement")
.bases("Node") // TODO Does this make sense? Can't really be an JSXElement.
.build("name", "attributes", "selfClosing")
.field("name", JSXElementName)
.field("attributes", JSXAttributes, defaults.emptyArray)
.field("selfClosing", Boolean, defaults["false"]);
def("JSXClosingElement")
.bases("Node") // TODO Same concern.
.build("name")
.field("name", JSXElementName);
def("JSXFragment")
.bases("Expression")
.build("openingElement", "closingElement", "children")
.field("openingElement", def("JSXOpeningFragment"))
.field("closingElement", def("JSXClosingFragment"))
.field("children", [or(def("JSXElement"), def("JSXExpressionContainer"), def("JSXFragment"), def("JSXText"), def("Literal") // TODO Esprima should return JSXText instead.
)], defaults.emptyArray);
def("JSXOpeningFragment")
.bases("Node") // TODO Same concern.
.build();
def("JSXClosingFragment")
.bases("Node") // TODO Same concern.
.build();
def("JSXText")
.bases("Literal")
.build("value")
.field("value", String);
def("JSXEmptyExpression").bases("Expression").build();
// This PR has caused many people issues, but supporting it seems like a
// good idea anyway: https://github.com/babel/babel/pull/4988
def("JSXSpreadChild")
.bases("Expression")
.build("expression")
.field("expression", def("Expression"));
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 86278:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
/**
* Type annotation defs shared between Flow and TypeScript.
* These defs could not be defined in ./flow.ts or ./typescript.ts directly
* because they use the same name.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
var types = fork.use(types_1.default);
var def = types.Type.def;
var or = types.Type.or;
var defaults = fork.use(shared_1.default).defaults;
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
def("Identifier")
.field("typeAnnotation", TypeAnnotation, defaults["null"]);
def("ObjectPattern")
.field("typeAnnotation", TypeAnnotation, defaults["null"]);
def("Function")
.field("returnType", TypeAnnotation, defaults["null"])
.field("typeParameters", TypeParamDecl, defaults["null"]);
def("ClassProperty")
.build("key", "value", "typeAnnotation", "static")
.field("value", or(def("Expression"), null))
.field("static", Boolean, defaults["false"])
.field("typeAnnotation", TypeAnnotation, defaults["null"]);
["ClassDeclaration",
"ClassExpression",
].forEach(function (typeName) {
def(typeName)
.field("typeParameters", TypeParamDecl, defaults["null"])
.field("superTypeParameters", or(def("TypeParameterInstantiation"), def("TSTypeParameterInstantiation"), null), defaults["null"])
.field("implements", or([def("ClassImplements")], [def("TSExpressionWithTypeArguments")]), defaults.emptyArray);
});
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 16743:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var babel_core_1 = tslib_1.__importDefault(__nccwpck_require__(55382));
var type_annotations_1 = tslib_1.__importDefault(__nccwpck_require__(86278));
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var shared_1 = tslib_1.__importDefault(__nccwpck_require__(34631));
function default_1(fork) {
// Since TypeScript is parsed by Babylon, include the core Babylon types
// but omit the Flow-related types.
fork.use(babel_core_1.default);
fork.use(type_annotations_1.default);
var types = fork.use(types_1.default);
var n = types.namedTypes;
var def = types.Type.def;
var or = types.Type.or;
var defaults = fork.use(shared_1.default).defaults;
var StringLiteral = types.Type.from(function (value, deep) {
if (n.StringLiteral &&
n.StringLiteral.check(value, deep)) {
return true;
}
if (n.Literal &&
n.Literal.check(value, deep) &&
typeof value.value === "string") {
return true;
}
return false;
}, "StringLiteral");
def("TSType")
.bases("Node");
var TSEntityName = or(def("Identifier"), def("TSQualifiedName"));
def("TSTypeReference")
.bases("TSType", "TSHasOptionalTypeParameterInstantiation")
.build("typeName", "typeParameters")
.field("typeName", TSEntityName);
// An abstract (non-buildable) base type that provide a commonly-needed
// optional .typeParameters field.
def("TSHasOptionalTypeParameterInstantiation")
.field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]);
// An abstract (non-buildable) base type that provide a commonly-needed
// optional .typeParameters field.
def("TSHasOptionalTypeParameters")
.field("typeParameters", or(def("TSTypeParameterDeclaration"), null, void 0), defaults["null"]);
// An abstract (non-buildable) base type that provide a commonly-needed
// optional .typeAnnotation field.
def("TSHasOptionalTypeAnnotation")
.field("typeAnnotation", or(def("TSTypeAnnotation"), null), defaults["null"]);
def("TSQualifiedName")
.bases("Node")
.build("left", "right")
.field("left", TSEntityName)
.field("right", TSEntityName);
def("TSAsExpression")
.bases("Expression", "Pattern")
.build("expression", "typeAnnotation")
.field("expression", def("Expression"))
.field("typeAnnotation", def("TSType"))
.field("extra", or({ parenthesized: Boolean }, null), defaults["null"]);
def("TSNonNullExpression")
.bases("Expression", "Pattern")
.build("expression")
.field("expression", def("Expression"));
[
"TSAnyKeyword",
"TSBigIntKeyword",
"TSBooleanKeyword",
"TSNeverKeyword",
"TSNullKeyword",
"TSNumberKeyword",
"TSObjectKeyword",
"TSStringKeyword",
"TSSymbolKeyword",
"TSUndefinedKeyword",
"TSUnknownKeyword",
"TSVoidKeyword",
"TSThisType",
].forEach(function (keywordType) {
def(keywordType)
.bases("TSType")
.build();
});
def("TSArrayType")
.bases("TSType")
.build("elementType")
.field("elementType", def("TSType"));
def("TSLiteralType")
.bases("TSType")
.build("literal")
.field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral"), def("TemplateLiteral"), def("UnaryExpression")));
["TSUnionType",
"TSIntersectionType",
].forEach(function (typeName) {
def(typeName)
.bases("TSType")
.build("types")
.field("types", [def("TSType")]);
});
def("TSConditionalType")
.bases("TSType")
.build("checkType", "extendsType", "trueType", "falseType")
.field("checkType", def("TSType"))
.field("extendsType", def("TSType"))
.field("trueType", def("TSType"))
.field("falseType", def("TSType"));
def("TSInferType")
.bases("TSType")
.build("typeParameter")
.field("typeParameter", def("TSTypeParameter"));
def("TSParenthesizedType")
.bases("TSType")
.build("typeAnnotation")
.field("typeAnnotation", def("TSType"));
var ParametersType = [or(def("Identifier"), def("RestElement"), def("ArrayPattern"), def("ObjectPattern"))];
["TSFunctionType",
"TSConstructorType",
].forEach(function (typeName) {
def(typeName)
.bases("TSType", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation")
.build("parameters")
.field("parameters", ParametersType);
});
def("TSDeclareFunction")
.bases("Declaration", "TSHasOptionalTypeParameters")
.build("id", "params", "returnType")
.field("declare", Boolean, defaults["false"])
.field("async", Boolean, defaults["false"])
.field("generator", Boolean, defaults["false"])
.field("id", or(def("Identifier"), null), defaults["null"])
.field("params", [def("Pattern")])
// tSFunctionTypeAnnotationCommon
.field("returnType", or(def("TSTypeAnnotation"), def("Noop"), // Still used?
null), defaults["null"]);
def("TSDeclareMethod")
.bases("Declaration", "TSHasOptionalTypeParameters")
.build("key", "params", "returnType")
.field("async", Boolean, defaults["false"])
.field("generator", Boolean, defaults["false"])
.field("params", [def("Pattern")])
// classMethodOrPropertyCommon
.field("abstract", Boolean, defaults["false"])
.field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"])
.field("static", Boolean, defaults["false"])
.field("computed", Boolean, defaults["false"])
.field("optional", Boolean, defaults["false"])
.field("key", or(def("Identifier"), def("StringLiteral"), def("NumericLiteral"),
// Only allowed if .computed is true.
def("Expression")))
// classMethodOrDeclareMethodCommon
.field("kind", or("get", "set", "method", "constructor"), function getDefault() { return "method"; })
.field("access", // Not "accessibility"?
or("public", "private", "protected", void 0), defaults["undefined"])
.field("decorators", or([def("Decorator")], null), defaults["null"])
// tSFunctionTypeAnnotationCommon
.field("returnType", or(def("TSTypeAnnotation"), def("Noop"), // Still used?
null), defaults["null"]);
def("TSMappedType")
.bases("TSType")
.build("typeParameter", "typeAnnotation")
.field("readonly", or(Boolean, "+", "-"), defaults["false"])
.field("typeParameter", def("TSTypeParameter"))
.field("optional", or(Boolean, "+", "-"), defaults["false"])
.field("typeAnnotation", or(def("TSType"), null), defaults["null"]);
def("TSTupleType")
.bases("TSType")
.build("elementTypes")
.field("elementTypes", [or(def("TSType"), def("TSNamedTupleMember"))]);
def("TSNamedTupleMember")
.bases("TSType")
.build("label", "elementType", "optional")
.field("label", def("Identifier"))
.field("optional", Boolean, defaults["false"])
.field("elementType", def("TSType"));
def("TSRestType")
.bases("TSType")
.build("typeAnnotation")
.field("typeAnnotation", def("TSType"));
def("TSOptionalType")
.bases("TSType")
.build("typeAnnotation")
.field("typeAnnotation", def("TSType"));
def("TSIndexedAccessType")
.bases("TSType")
.build("objectType", "indexType")
.field("objectType", def("TSType"))
.field("indexType", def("TSType"));
def("TSTypeOperator")
.bases("TSType")
.build("operator")
.field("operator", String)
.field("typeAnnotation", def("TSType"));
def("TSTypeAnnotation")
.bases("Node")
.build("typeAnnotation")
.field("typeAnnotation", or(def("TSType"), def("TSTypeAnnotation")));
def("TSIndexSignature")
.bases("Declaration", "TSHasOptionalTypeAnnotation")
.build("parameters", "typeAnnotation")
.field("parameters", [def("Identifier")]) // Length === 1
.field("readonly", Boolean, defaults["false"]);
def("TSPropertySignature")
.bases("Declaration", "TSHasOptionalTypeAnnotation")
.build("key", "typeAnnotation", "optional")
.field("key", def("Expression"))
.field("computed", Boolean, defaults["false"])
.field("readonly", Boolean, defaults["false"])
.field("optional", Boolean, defaults["false"])
.field("initializer", or(def("Expression"), null), defaults["null"]);
def("TSMethodSignature")
.bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation")
.build("key", "parameters", "typeAnnotation")
.field("key", def("Expression"))
.field("computed", Boolean, defaults["false"])
.field("optional", Boolean, defaults["false"])
.field("parameters", ParametersType);
def("TSTypePredicate")
.bases("TSTypeAnnotation", "TSType")
.build("parameterName", "typeAnnotation", "asserts")
.field("parameterName", or(def("Identifier"), def("TSThisType")))
.field("typeAnnotation", or(def("TSTypeAnnotation"), null), defaults["null"])
.field("asserts", Boolean, defaults["false"]);
["TSCallSignatureDeclaration",
"TSConstructSignatureDeclaration",
].forEach(function (typeName) {
def(typeName)
.bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation")
.build("parameters", "typeAnnotation")
.field("parameters", ParametersType);
});
def("TSEnumMember")
.bases("Node")
.build("id", "initializer")
.field("id", or(def("Identifier"), StringLiteral))
.field("initializer", or(def("Expression"), null), defaults["null"]);
def("TSTypeQuery")
.bases("TSType")
.build("exprName")
.field("exprName", or(TSEntityName, def("TSImportType")));
// Inferred from Babylon's tsParseTypeMember method.
var TSTypeMember = or(def("TSCallSignatureDeclaration"), def("TSConstructSignatureDeclaration"), def("TSIndexSignature"), def("TSMethodSignature"), def("TSPropertySignature"));
def("TSTypeLiteral")
.bases("TSType")
.build("members")
.field("members", [TSTypeMember]);
def("TSTypeParameter")
.bases("Identifier")
.build("name", "constraint", "default")
.field("name", String)
.field("constraint", or(def("TSType"), void 0), defaults["undefined"])
.field("default", or(def("TSType"), void 0), defaults["undefined"]);
def("TSTypeAssertion")
.bases("Expression", "Pattern")
.build("typeAnnotation", "expression")
.field("typeAnnotation", def("TSType"))
.field("expression", def("Expression"))
.field("extra", or({ parenthesized: Boolean }, null), defaults["null"]);
def("TSTypeParameterDeclaration")
.bases("Declaration")
.build("params")
.field("params", [def("TSTypeParameter")]);
def("TSTypeParameterInstantiation")
.bases("Node")
.build("params")
.field("params", [def("TSType")]);
def("TSEnumDeclaration")
.bases("Declaration")
.build("id", "members")
.field("id", def("Identifier"))
.field("const", Boolean, defaults["false"])
.field("declare", Boolean, defaults["false"])
.field("members", [def("TSEnumMember")])
.field("initializer", or(def("Expression"), null), defaults["null"]);
def("TSTypeAliasDeclaration")
.bases("Declaration", "TSHasOptionalTypeParameters")
.build("id", "typeAnnotation")
.field("id", def("Identifier"))
.field("declare", Boolean, defaults["false"])
.field("typeAnnotation", def("TSType"));
def("TSModuleBlock")
.bases("Node")
.build("body")
.field("body", [def("Statement")]);
def("TSModuleDeclaration")
.bases("Declaration")
.build("id", "body")
.field("id", or(StringLiteral, TSEntityName))
.field("declare", Boolean, defaults["false"])
.field("global", Boolean, defaults["false"])
.field("body", or(def("TSModuleBlock"), def("TSModuleDeclaration"), null), defaults["null"]);
def("TSImportType")
.bases("TSType", "TSHasOptionalTypeParameterInstantiation")
.build("argument", "qualifier", "typeParameters")
.field("argument", StringLiteral)
.field("qualifier", or(TSEntityName, void 0), defaults["undefined"]);
def("TSImportEqualsDeclaration")
.bases("Declaration")
.build("id", "moduleReference")
.field("id", def("Identifier"))
.field("isExport", Boolean, defaults["false"])
.field("moduleReference", or(TSEntityName, def("TSExternalModuleReference")));
def("TSExternalModuleReference")
.bases("Declaration")
.build("expression")
.field("expression", StringLiteral);
def("TSExportAssignment")
.bases("Statement")
.build("expression")
.field("expression", def("Expression"));
def("TSNamespaceExportDeclaration")
.bases("Declaration")
.build("id")
.field("id", def("Identifier"));
def("TSInterfaceBody")
.bases("Node")
.build("body")
.field("body", [TSTypeMember]);
def("TSExpressionWithTypeArguments")
.bases("TSType", "TSHasOptionalTypeParameterInstantiation")
.build("expression", "typeParameters")
.field("expression", TSEntityName);
def("TSInterfaceDeclaration")
.bases("Declaration", "TSHasOptionalTypeParameters")
.build("id", "body")
.field("id", TSEntityName)
.field("declare", Boolean, defaults["false"])
.field("extends", or([def("TSExpressionWithTypeArguments")], null), defaults["null"])
.field("body", def("TSInterfaceBody"));
def("TSParameterProperty")
.bases("Pattern")
.build("parameter")
.field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"])
.field("readonly", Boolean, defaults["false"])
.field("parameter", or(def("Identifier"), def("AssignmentPattern")));
def("ClassProperty")
.field("access", // Not "accessibility"?
or("public", "private", "protected", void 0), defaults["undefined"]);
// Defined already in es6 and babel-core.
def("ClassBody")
.field("body", [or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"),
// Just need to add these types:
def("TSDeclareMethod"), TSTypeMember)]);
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 20253:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var path_visitor_1 = tslib_1.__importDefault(__nccwpck_require__(56525));
var equiv_1 = tslib_1.__importDefault(__nccwpck_require__(38636));
var path_1 = tslib_1.__importDefault(__nccwpck_require__(58770));
var node_path_1 = tslib_1.__importDefault(__nccwpck_require__(35694));
function default_1(defs) {
var fork = createFork();
var types = fork.use(types_1.default);
defs.forEach(fork.use);
types.finalize();
var PathVisitor = fork.use(path_visitor_1.default);
return {
Type: types.Type,
builtInTypes: types.builtInTypes,
namedTypes: types.namedTypes,
builders: types.builders,
defineMethod: types.defineMethod,
getFieldNames: types.getFieldNames,
getFieldValue: types.getFieldValue,
eachField: types.eachField,
someField: types.someField,
getSupertypeNames: types.getSupertypeNames,
getBuilderName: types.getBuilderName,
astNodesAreEquivalent: fork.use(equiv_1.default),
finalize: types.finalize,
Path: fork.use(path_1.default),
NodePath: fork.use(node_path_1.default),
PathVisitor: PathVisitor,
use: fork.use,
visit: PathVisitor.visit,
};
}
exports.default = default_1;
function createFork() {
var used = [];
var usedResult = [];
function use(plugin) {
var idx = used.indexOf(plugin);
if (idx === -1) {
idx = used.length;
used.push(plugin);
usedResult[idx] = plugin(fork);
}
return usedResult[idx];
}
var fork = { use: use };
return fork;
}
module.exports = exports["default"];
/***/ }),
/***/ 24143:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.namedTypes = void 0;
var namedTypes;
(function (namedTypes) {
})(namedTypes = exports.namedTypes || (exports.namedTypes = {}));
/***/ }),
/***/ 38636:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
function default_1(fork) {
var types = fork.use(types_1.default);
var getFieldNames = types.getFieldNames;
var getFieldValue = types.getFieldValue;
var isArray = types.builtInTypes.array;
var isObject = types.builtInTypes.object;
var isDate = types.builtInTypes.Date;
var isRegExp = types.builtInTypes.RegExp;
var hasOwn = Object.prototype.hasOwnProperty;
function astNodesAreEquivalent(a, b, problemPath) {
if (isArray.check(problemPath)) {
problemPath.length = 0;
}
else {
problemPath = null;
}
return areEquivalent(a, b, problemPath);
}
astNodesAreEquivalent.assert = function (a, b) {
var problemPath = [];
if (!astNodesAreEquivalent(a, b, problemPath)) {
if (problemPath.length === 0) {
if (a !== b) {
throw new Error("Nodes must be equal");
}
}
else {
throw new Error("Nodes differ in the following path: " +
problemPath.map(subscriptForProperty).join(""));
}
}
};
function subscriptForProperty(property) {
if (/[_$a-z][_$a-z0-9]*/i.test(property)) {
return "." + property;
}
return "[" + JSON.stringify(property) + "]";
}
function areEquivalent(a, b, problemPath) {
if (a === b) {
return true;
}
if (isArray.check(a)) {
return arraysAreEquivalent(a, b, problemPath);
}
if (isObject.check(a)) {
return objectsAreEquivalent(a, b, problemPath);
}
if (isDate.check(a)) {
return isDate.check(b) && (+a === +b);
}
if (isRegExp.check(a)) {
return isRegExp.check(b) && (a.source === b.source &&
a.global === b.global &&
a.multiline === b.multiline &&
a.ignoreCase === b.ignoreCase);
}
return a == b;
}
function arraysAreEquivalent(a, b, problemPath) {
isArray.assert(a);
var aLength = a.length;
if (!isArray.check(b) || b.length !== aLength) {
if (problemPath) {
problemPath.push("length");
}
return false;
}
for (var i = 0; i < aLength; ++i) {
if (problemPath) {
problemPath.push(i);
}
if (i in a !== i in b) {
return false;
}
if (!areEquivalent(a[i], b[i], problemPath)) {
return false;
}
if (problemPath) {
var problemPathTail = problemPath.pop();
if (problemPathTail !== i) {
throw new Error("" + problemPathTail);
}
}
}
return true;
}
function objectsAreEquivalent(a, b, problemPath) {
isObject.assert(a);
if (!isObject.check(b)) {
return false;
}
// Fast path for a common property of AST nodes.
if (a.type !== b.type) {
if (problemPath) {
problemPath.push("type");
}
return false;
}
var aNames = getFieldNames(a);
var aNameCount = aNames.length;
var bNames = getFieldNames(b);
var bNameCount = bNames.length;
if (aNameCount === bNameCount) {
for (var i = 0; i < aNameCount; ++i) {
var name = aNames[i];
var aChild = getFieldValue(a, name);
var bChild = getFieldValue(b, name);
if (problemPath) {
problemPath.push(name);
}
if (!areEquivalent(aChild, bChild, problemPath)) {
return false;
}
if (problemPath) {
var problemPathTail = problemPath.pop();
if (problemPathTail !== name) {
throw new Error("" + problemPathTail);
}
}
}
return true;
}
if (!problemPath) {
return false;
}
// Since aNameCount !== bNameCount, we need to find some name that's
// missing in aNames but present in bNames, or vice-versa.
var seenNames = Object.create(null);
for (i = 0; i < aNameCount; ++i) {
seenNames[aNames[i]] = true;
}
for (i = 0; i < bNameCount; ++i) {
name = bNames[i];
if (!hasOwn.call(seenNames, name)) {
problemPath.push(name);
return false;
}
delete seenNames[name];
}
for (name in seenNames) {
problemPath.push(name);
break;
}
return false;
}
return astNodesAreEquivalent;
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 35694:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var path_1 = tslib_1.__importDefault(__nccwpck_require__(58770));
var scope_1 = tslib_1.__importDefault(__nccwpck_require__(89733));
function nodePathPlugin(fork) {
var types = fork.use(types_1.default);
var n = types.namedTypes;
var b = types.builders;
var isNumber = types.builtInTypes.number;
var isArray = types.builtInTypes.array;
var Path = fork.use(path_1.default);
var Scope = fork.use(scope_1.default);
var NodePath = function NodePath(value, parentPath, name) {
if (!(this instanceof NodePath)) {
throw new Error("NodePath constructor cannot be invoked without 'new'");
}
Path.call(this, value, parentPath, name);
};
var NPp = NodePath.prototype = Object.create(Path.prototype, {
constructor: {
value: NodePath,
enumerable: false,
writable: true,
configurable: true
}
});
Object.defineProperties(NPp, {
node: {
get: function () {
Object.defineProperty(this, "node", {
configurable: true,
value: this._computeNode()
});
return this.node;
}
},
parent: {
get: function () {
Object.defineProperty(this, "parent", {
configurable: true,
value: this._computeParent()
});
return this.parent;
}
},
scope: {
get: function () {
Object.defineProperty(this, "scope", {
configurable: true,
value: this._computeScope()
});
return this.scope;
}
}
});
NPp.replace = function () {
delete this.node;
delete this.parent;
delete this.scope;
return Path.prototype.replace.apply(this, arguments);
};
NPp.prune = function () {
var remainingNodePath = this.parent;
this.replace();
return cleanUpNodesAfterPrune(remainingNodePath);
};
// The value of the first ancestor Path whose value is a Node.
NPp._computeNode = function () {
var value = this.value;
if (n.Node.check(value)) {
return value;
}
var pp = this.parentPath;
return pp && pp.node || null;
};
// The first ancestor Path whose value is a Node distinct from this.node.
NPp._computeParent = function () {
var value = this.value;
var pp = this.parentPath;
if (!n.Node.check(value)) {
while (pp && !n.Node.check(pp.value)) {
pp = pp.parentPath;
}
if (pp) {
pp = pp.parentPath;
}
}
while (pp && !n.Node.check(pp.value)) {
pp = pp.parentPath;
}
return pp || null;
};
// The closest enclosing scope that governs this node.
NPp._computeScope = function () {
var value = this.value;
var pp = this.parentPath;
var scope = pp && pp.scope;
if (n.Node.check(value) &&
Scope.isEstablishedBy(value)) {
scope = new Scope(this, scope);
}
return scope || null;
};
NPp.getValueProperty = function (name) {
return types.getFieldValue(this.value, name);
};
/**
* Determine whether this.node needs to be wrapped in parentheses in order
* for a parser to reproduce the same local AST structure.
*
* For instance, in the expression `(1 + 2) * 3`, the BinaryExpression
* whose operator is "+" needs parentheses, because `1 + 2 * 3` would
* parse differently.
*
* If assumeExpressionContext === true, we don't worry about edge cases
* like an anonymous FunctionExpression appearing lexically first in its
* enclosing statement and thus needing parentheses to avoid being parsed
* as a FunctionDeclaration with a missing name.
*/
NPp.needsParens = function (assumeExpressionContext) {
var pp = this.parentPath;
if (!pp) {
return false;
}
var node = this.value;
// Only expressions need parentheses.
if (!n.Expression.check(node)) {
return false;
}
// Identifiers never need parentheses.
if (node.type === "Identifier") {
return false;
}
while (!n.Node.check(pp.value)) {
pp = pp.parentPath;
if (!pp) {
return false;
}
}
var parent = pp.value;
switch (node.type) {
case "UnaryExpression":
case "SpreadElement":
case "SpreadProperty":
return parent.type === "MemberExpression"
&& this.name === "object"
&& parent.object === node;
case "BinaryExpression":
case "LogicalExpression":
switch (parent.type) {
case "CallExpression":
return this.name === "callee"
&& parent.callee === node;
case "UnaryExpression":
case "SpreadElement":
case "SpreadProperty":
return true;
case "MemberExpression":
return this.name === "object"
&& parent.object === node;
case "BinaryExpression":
case "LogicalExpression": {
var n_1 = node;
var po = parent.operator;
var pp_1 = PRECEDENCE[po];
var no = n_1.operator;
var np = PRECEDENCE[no];
if (pp_1 > np) {
return true;
}
if (pp_1 === np && this.name === "right") {
if (parent.right !== n_1) {
throw new Error("Nodes must be equal");
}
return true;
}
}
default:
return false;
}
case "SequenceExpression":
switch (parent.type) {
case "ForStatement":
// Although parentheses wouldn't hurt around sequence
// expressions in the head of for loops, traditional style
// dictates that e.g. i++, j++ should not be wrapped with
// parentheses.
return false;
case "ExpressionStatement":
return this.name !== "expression";
default:
// Otherwise err on the side of overparenthesization, adding
// explicit exceptions above if this proves overzealous.
return true;
}
case "YieldExpression":
switch (parent.type) {
case "BinaryExpression":
case "LogicalExpression":
case "UnaryExpression":
case "SpreadElement":
case "SpreadProperty":
case "CallExpression":
case "MemberExpression":
case "NewExpression":
case "ConditionalExpression":
case "YieldExpression":
return true;
default:
return false;
}
case "Literal":
return parent.type === "MemberExpression"
&& isNumber.check(node.value)
&& this.name === "object"
&& parent.object === node;
case "AssignmentExpression":
case "ConditionalExpression":
switch (parent.type) {
case "UnaryExpression":
case "SpreadElement":
case "SpreadProperty":
case "BinaryExpression":
case "LogicalExpression":
return true;
case "CallExpression":
return this.name === "callee"
&& parent.callee === node;
case "ConditionalExpression":
return this.name === "test"
&& parent.test === node;
case "MemberExpression":
return this.name === "object"
&& parent.object === node;
default:
return false;
}
default:
if (parent.type === "NewExpression" &&
this.name === "callee" &&
parent.callee === node) {
return containsCallExpression(node);
}
}
if (assumeExpressionContext !== true &&
!this.canBeFirstInStatement() &&
this.firstInStatement())
return true;
return false;
};
function isBinary(node) {
return n.BinaryExpression.check(node)
|| n.LogicalExpression.check(node);
}
// @ts-ignore 'isUnaryLike' is declared but its value is never read. [6133]
function isUnaryLike(node) {
return n.UnaryExpression.check(node)
// I considered making SpreadElement and SpreadProperty subtypes
// of UnaryExpression, but they're not really Expression nodes.
|| (n.SpreadElement && n.SpreadElement.check(node))
|| (n.SpreadProperty && n.SpreadProperty.check(node));
}
var PRECEDENCE = {};
[["||"],
["&&"],
["|"],
["^"],
["&"],
["==", "===", "!=", "!=="],
["<", ">", "<=", ">=", "in", "instanceof"],
[">>", "<<", ">>>"],
["+", "-"],
["*", "/", "%"]
].forEach(function (tier, i) {
tier.forEach(function (op) {
PRECEDENCE[op] = i;
});
});
function containsCallExpression(node) {
if (n.CallExpression.check(node)) {
return true;
}
if (isArray.check(node)) {
return node.some(containsCallExpression);
}
if (n.Node.check(node)) {
return types.someField(node, function (_name, child) {
return containsCallExpression(child);
});
}
return false;
}
NPp.canBeFirstInStatement = function () {
var node = this.node;
return !n.FunctionExpression.check(node)
&& !n.ObjectExpression.check(node);
};
NPp.firstInStatement = function () {
return firstInStatement(this);
};
function firstInStatement(path) {
for (var node, parent; path.parent; path = path.parent) {
node = path.node;
parent = path.parent.node;
if (n.BlockStatement.check(parent) &&
path.parent.name === "body" &&
path.name === 0) {
if (parent.body[0] !== node) {
throw new Error("Nodes must be equal");
}
return true;
}
if (n.ExpressionStatement.check(parent) &&
path.name === "expression") {
if (parent.expression !== node) {
throw new Error("Nodes must be equal");
}
return true;
}
if (n.SequenceExpression.check(parent) &&
path.parent.name === "expressions" &&
path.name === 0) {
if (parent.expressions[0] !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
if (n.CallExpression.check(parent) &&
path.name === "callee") {
if (parent.callee !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
if (n.MemberExpression.check(parent) &&
path.name === "object") {
if (parent.object !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
if (n.ConditionalExpression.check(parent) &&
path.name === "test") {
if (parent.test !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
if (isBinary(parent) &&
path.name === "left") {
if (parent.left !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
if (n.UnaryExpression.check(parent) &&
!parent.prefix &&
path.name === "argument") {
if (parent.argument !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
return false;
}
return true;
}
/**
* Pruning certain nodes will result in empty or incomplete nodes, here we clean those nodes up.
*/
function cleanUpNodesAfterPrune(remainingNodePath) {
if (n.VariableDeclaration.check(remainingNodePath.node)) {
var declarations = remainingNodePath.get('declarations').value;
if (!declarations || declarations.length === 0) {
return remainingNodePath.prune();
}
}
else if (n.ExpressionStatement.check(remainingNodePath.node)) {
if (!remainingNodePath.get('expression').value) {
return remainingNodePath.prune();
}
}
else if (n.IfStatement.check(remainingNodePath.node)) {
cleanUpIfStatementAfterPrune(remainingNodePath);
}
return remainingNodePath;
}
function cleanUpIfStatementAfterPrune(ifStatement) {
var testExpression = ifStatement.get('test').value;
var alternate = ifStatement.get('alternate').value;
var consequent = ifStatement.get('consequent').value;
if (!consequent && !alternate) {
var testExpressionStatement = b.expressionStatement(testExpression);
ifStatement.replace(testExpressionStatement);
}
else if (!consequent && alternate) {
var negatedTestExpression = b.unaryExpression('!', testExpression, true);
if (n.UnaryExpression.check(testExpression) && testExpression.operator === '!') {
negatedTestExpression = testExpression.argument;
}
ifStatement.get("test").replace(negatedTestExpression);
ifStatement.get("consequent").replace(alternate);
ifStatement.get("alternate").replace();
}
}
return NodePath;
}
exports.default = nodePathPlugin;
module.exports = exports["default"];
/***/ }),
/***/ 56525:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var node_path_1 = tslib_1.__importDefault(__nccwpck_require__(35694));
var hasOwn = Object.prototype.hasOwnProperty;
function pathVisitorPlugin(fork) {
var types = fork.use(types_1.default);
var NodePath = fork.use(node_path_1.default);
var isArray = types.builtInTypes.array;
var isObject = types.builtInTypes.object;
var isFunction = types.builtInTypes.function;
var undefined;
var PathVisitor = function PathVisitor() {
if (!(this instanceof PathVisitor)) {
throw new Error("PathVisitor constructor cannot be invoked without 'new'");
}
// Permanent state.
this._reusableContextStack = [];
this._methodNameTable = computeMethodNameTable(this);
this._shouldVisitComments =
hasOwn.call(this._methodNameTable, "Block") ||
hasOwn.call(this._methodNameTable, "Line");
this.Context = makeContextConstructor(this);
// State reset every time PathVisitor.prototype.visit is called.
this._visiting = false;
this._changeReported = false;
};
function computeMethodNameTable(visitor) {
var typeNames = Object.create(null);
for (var methodName in visitor) {
if (/^visit[A-Z]/.test(methodName)) {
typeNames[methodName.slice("visit".length)] = true;
}
}
var supertypeTable = types.computeSupertypeLookupTable(typeNames);
var methodNameTable = Object.create(null);
var typeNameKeys = Object.keys(supertypeTable);
var typeNameCount = typeNameKeys.length;
for (var i = 0; i < typeNameCount; ++i) {
var typeName = typeNameKeys[i];
methodName = "visit" + supertypeTable[typeName];
if (isFunction.check(visitor[methodName])) {
methodNameTable[typeName] = methodName;
}
}
return methodNameTable;
}
PathVisitor.fromMethodsObject = function fromMethodsObject(methods) {
if (methods instanceof PathVisitor) {
return methods;
}
if (!isObject.check(methods)) {
// An empty visitor?
return new PathVisitor;
}
var Visitor = function Visitor() {
if (!(this instanceof Visitor)) {
throw new Error("Visitor constructor cannot be invoked without 'new'");
}
PathVisitor.call(this);
};
var Vp = Visitor.prototype = Object.create(PVp);
Vp.constructor = Visitor;
extend(Vp, methods);
extend(Visitor, PathVisitor);
isFunction.assert(Visitor.fromMethodsObject);
isFunction.assert(Visitor.visit);
return new Visitor;
};
function extend(target, source) {
for (var property in source) {
if (hasOwn.call(source, property)) {
target[property] = source[property];
}
}
return target;
}
PathVisitor.visit = function visit(node, methods) {
return PathVisitor.fromMethodsObject(methods).visit(node);
};
var PVp = PathVisitor.prototype;
PVp.visit = function () {
if (this._visiting) {
throw new Error("Recursively calling visitor.visit(path) resets visitor state. " +
"Try this.visit(path) or this.traverse(path) instead.");
}
// Private state that needs to be reset before every traversal.
this._visiting = true;
this._changeReported = false;
this._abortRequested = false;
var argc = arguments.length;
var args = new Array(argc);
for (var i = 0; i < argc; ++i) {
args[i] = arguments[i];
}
if (!(args[0] instanceof NodePath)) {
args[0] = new NodePath({ root: args[0] }).get("root");
}
// Called with the same arguments as .visit.
this.reset.apply(this, args);
var didNotThrow;
try {
var root = this.visitWithoutReset(args[0]);
didNotThrow = true;
}
finally {
this._visiting = false;
if (!didNotThrow && this._abortRequested) {
// If this.visitWithoutReset threw an exception and
// this._abortRequested was set to true, return the root of
// the AST instead of letting the exception propagate, so that
// client code does not have to provide a try-catch block to
// intercept the AbortRequest exception. Other kinds of
// exceptions will propagate without being intercepted and
// rethrown by a catch block, so their stacks will accurately
// reflect the original throwing context.
return args[0].value;
}
}
return root;
};
PVp.AbortRequest = function AbortRequest() { };
PVp.abort = function () {
var visitor = this;
visitor._abortRequested = true;
var request = new visitor.AbortRequest();
// If you decide to catch this exception and stop it from propagating,
// make sure to call its cancel method to avoid silencing other
// exceptions that might be thrown later in the traversal.
request.cancel = function () {
visitor._abortRequested = false;
};
throw request;
};
PVp.reset = function (_path /*, additional arguments */) {
// Empty stub; may be reassigned or overridden by subclasses.
};
PVp.visitWithoutReset = function (path) {
if (this instanceof this.Context) {
// Since this.Context.prototype === this, there's a chance we
// might accidentally call context.visitWithoutReset. If that
// happens, re-invoke the method against context.visitor.
return this.visitor.visitWithoutReset(path);
}
if (!(path instanceof NodePath)) {
throw new Error("");
}
var value = path.value;
var methodName = value &&
typeof value === "object" &&
typeof value.type === "string" &&
this._methodNameTable[value.type];
if (methodName) {
var context = this.acquireContext(path);
try {
return context.invokeVisitorMethod(methodName);
}
finally {
this.releaseContext(context);
}
}
else {
// If there was no visitor method to call, visit the children of
// this node generically.
return visitChildren(path, this);
}
};
function visitChildren(path, visitor) {
if (!(path instanceof NodePath)) {
throw new Error("");
}
if (!(visitor instanceof PathVisitor)) {
throw new Error("");
}
var value = path.value;
if (isArray.check(value)) {
path.each(visitor.visitWithoutReset, visitor);
}
else if (!isObject.check(value)) {
// No children to visit.
}
else {
var childNames = types.getFieldNames(value);
// The .comments field of the Node type is hidden, so we only
// visit it if the visitor defines visitBlock or visitLine, and
// value.comments is defined.
if (visitor._shouldVisitComments &&
value.comments &&
childNames.indexOf("comments") < 0) {
childNames.push("comments");
}
var childCount = childNames.length;
var childPaths = [];
for (var i = 0; i < childCount; ++i) {
var childName = childNames[i];
if (!hasOwn.call(value, childName)) {
value[childName] = types.getFieldValue(value, childName);
}
childPaths.push(path.get(childName));
}
for (var i = 0; i < childCount; ++i) {
visitor.visitWithoutReset(childPaths[i]);
}
}
return path.value;
}
PVp.acquireContext = function (path) {
if (this._reusableContextStack.length === 0) {
return new this.Context(path);
}
return this._reusableContextStack.pop().reset(path);
};
PVp.releaseContext = function (context) {
if (!(context instanceof this.Context)) {
throw new Error("");
}
this._reusableContextStack.push(context);
context.currentPath = null;
};
PVp.reportChanged = function () {
this._changeReported = true;
};
PVp.wasChangeReported = function () {
return this._changeReported;
};
function makeContextConstructor(visitor) {
function Context(path) {
if (!(this instanceof Context)) {
throw new Error("");
}
if (!(this instanceof PathVisitor)) {
throw new Error("");
}
if (!(path instanceof NodePath)) {
throw new Error("");
}
Object.defineProperty(this, "visitor", {
value: visitor,
writable: false,
enumerable: true,
configurable: false
});
this.currentPath = path;
this.needToCallTraverse = true;
Object.seal(this);
}
if (!(visitor instanceof PathVisitor)) {
throw new Error("");
}
// Note that the visitor object is the prototype of Context.prototype,
// so all visitor methods are inherited by context objects.
var Cp = Context.prototype = Object.create(visitor);
Cp.constructor = Context;
extend(Cp, sharedContextProtoMethods);
return Context;
}
// Every PathVisitor has a different this.Context constructor and
// this.Context.prototype object, but those prototypes can all use the
// same reset, invokeVisitorMethod, and traverse function objects.
var sharedContextProtoMethods = Object.create(null);
sharedContextProtoMethods.reset =
function reset(path) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
if (!(path instanceof NodePath)) {
throw new Error("");
}
this.currentPath = path;
this.needToCallTraverse = true;
return this;
};
sharedContextProtoMethods.invokeVisitorMethod =
function invokeVisitorMethod(methodName) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
if (!(this.currentPath instanceof NodePath)) {
throw new Error("");
}
var result = this.visitor[methodName].call(this, this.currentPath);
if (result === false) {
// Visitor methods return false to indicate that they have handled
// their own traversal needs, and we should not complain if
// this.needToCallTraverse is still true.
this.needToCallTraverse = false;
}
else if (result !== undefined) {
// Any other non-undefined value returned from the visitor method
// is interpreted as a replacement value.
this.currentPath = this.currentPath.replace(result)[0];
if (this.needToCallTraverse) {
// If this.traverse still hasn't been called, visit the
// children of the replacement node.
this.traverse(this.currentPath);
}
}
if (this.needToCallTraverse !== false) {
throw new Error("Must either call this.traverse or return false in " + methodName);
}
var path = this.currentPath;
return path && path.value;
};
sharedContextProtoMethods.traverse =
function traverse(path, newVisitor) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
if (!(path instanceof NodePath)) {
throw new Error("");
}
if (!(this.currentPath instanceof NodePath)) {
throw new Error("");
}
this.needToCallTraverse = false;
return visitChildren(path, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
};
sharedContextProtoMethods.visit =
function visit(path, newVisitor) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
if (!(path instanceof NodePath)) {
throw new Error("");
}
if (!(this.currentPath instanceof NodePath)) {
throw new Error("");
}
this.needToCallTraverse = false;
return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path);
};
sharedContextProtoMethods.reportChanged = function reportChanged() {
this.visitor.reportChanged();
};
sharedContextProtoMethods.abort = function abort() {
this.needToCallTraverse = false;
this.visitor.abort();
};
return PathVisitor;
}
exports.default = pathVisitorPlugin;
module.exports = exports["default"];
/***/ }),
/***/ 58770:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
function pathPlugin(fork) {
var types = fork.use(types_1.default);
var isArray = types.builtInTypes.array;
var isNumber = types.builtInTypes.number;
var Path = function Path(value, parentPath, name) {
if (!(this instanceof Path)) {
throw new Error("Path constructor cannot be invoked without 'new'");
}
if (parentPath) {
if (!(parentPath instanceof Path)) {
throw new Error("");
}
}
else {
parentPath = null;
name = null;
}
// The value encapsulated by this Path, generally equal to
// parentPath.value[name] if we have a parentPath.
this.value = value;
// The immediate parent Path of this Path.
this.parentPath = parentPath;
// The name of the property of parentPath.value through which this
// Path's value was reached.
this.name = name;
// Calling path.get("child") multiple times always returns the same
// child Path object, for both performance and consistency reasons.
this.__childCache = null;
};
var Pp = Path.prototype;
function getChildCache(path) {
// Lazily create the child cache. This also cheapens cache
// invalidation, since you can just reset path.__childCache to null.
return path.__childCache || (path.__childCache = Object.create(null));
}
function getChildPath(path, name) {
var cache = getChildCache(path);
var actualChildValue = path.getValueProperty(name);
var childPath = cache[name];
if (!hasOwn.call(cache, name) ||
// Ensure consistency between cache and reality.
childPath.value !== actualChildValue) {
childPath = cache[name] = new path.constructor(actualChildValue, path, name);
}
return childPath;
}
// This method is designed to be overridden by subclasses that need to
// handle missing properties, etc.
Pp.getValueProperty = function getValueProperty(name) {
return this.value[name];
};
Pp.get = function get() {
var names = [];
for (var _i = 0; _i < arguments.length; _i++) {
names[_i] = arguments[_i];
}
var path = this;
var count = names.length;
for (var i = 0; i < count; ++i) {
path = getChildPath(path, names[i]);
}
return path;
};
Pp.each = function each(callback, context) {
var childPaths = [];
var len = this.value.length;
var i = 0;
// Collect all the original child paths before invoking the callback.
for (var i = 0; i < len; ++i) {
if (hasOwn.call(this.value, i)) {
childPaths[i] = this.get(i);
}
}
// Invoke the callback on just the original child paths, regardless of
// any modifications made to the array by the callback. I chose these
// semantics over cleverly invoking the callback on new elements because
// this way is much easier to reason about.
context = context || this;
for (i = 0; i < len; ++i) {
if (hasOwn.call(childPaths, i)) {
callback.call(context, childPaths[i]);
}
}
};
Pp.map = function map(callback, context) {
var result = [];
this.each(function (childPath) {
result.push(callback.call(this, childPath));
}, context);
return result;
};
Pp.filter = function filter(callback, context) {
var result = [];
this.each(function (childPath) {
if (callback.call(this, childPath)) {
result.push(childPath);
}
}, context);
return result;
};
function emptyMoves() { }
function getMoves(path, offset, start, end) {
isArray.assert(path.value);
if (offset === 0) {
return emptyMoves;
}
var length = path.value.length;
if (length < 1) {
return emptyMoves;
}
var argc = arguments.length;
if (argc === 2) {
start = 0;
end = length;
}
else if (argc === 3) {
start = Math.max(start, 0);
end = length;
}
else {
start = Math.max(start, 0);
end = Math.min(end, length);
}
isNumber.assert(start);
isNumber.assert(end);
var moves = Object.create(null);
var cache = getChildCache(path);
for (var i = start; i < end; ++i) {
if (hasOwn.call(path.value, i)) {
var childPath = path.get(i);
if (childPath.name !== i) {
throw new Error("");
}
var newIndex = i + offset;
childPath.name = newIndex;
moves[newIndex] = childPath;
delete cache[i];
}
}
delete cache.length;
return function () {
for (var newIndex in moves) {
var childPath = moves[newIndex];
if (childPath.name !== +newIndex) {
throw new Error("");
}
cache[newIndex] = childPath;
path.value[newIndex] = childPath.value;
}
};
}
Pp.shift = function shift() {
var move = getMoves(this, -1);
var result = this.value.shift();
move();
return result;
};
Pp.unshift = function unshift() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var move = getMoves(this, args.length);
var result = this.value.unshift.apply(this.value, args);
move();
return result;
};
Pp.push = function push() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isArray.assert(this.value);
delete getChildCache(this).length;
return this.value.push.apply(this.value, args);
};
Pp.pop = function pop() {
isArray.assert(this.value);
var cache = getChildCache(this);
delete cache[this.value.length - 1];
delete cache.length;
return this.value.pop();
};
Pp.insertAt = function insertAt(index) {
var argc = arguments.length;
var move = getMoves(this, argc - 1, index);
if (move === emptyMoves && argc <= 1) {
return this;
}
index = Math.max(index, 0);
for (var i = 1; i < argc; ++i) {
this.value[index + i - 1] = arguments[i];
}
move();
return this;
};
Pp.insertBefore = function insertBefore() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var pp = this.parentPath;
var argc = args.length;
var insertAtArgs = [this.name];
for (var i = 0; i < argc; ++i) {
insertAtArgs.push(args[i]);
}
return pp.insertAt.apply(pp, insertAtArgs);
};
Pp.insertAfter = function insertAfter() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var pp = this.parentPath;
var argc = args.length;
var insertAtArgs = [this.name + 1];
for (var i = 0; i < argc; ++i) {
insertAtArgs.push(args[i]);
}
return pp.insertAt.apply(pp, insertAtArgs);
};
function repairRelationshipWithParent(path) {
if (!(path instanceof Path)) {
throw new Error("");
}
var pp = path.parentPath;
if (!pp) {
// Orphan paths have no relationship to repair.
return path;
}
var parentValue = pp.value;
var parentCache = getChildCache(pp);
// Make sure parentCache[path.name] is populated.
if (parentValue[path.name] === path.value) {
parentCache[path.name] = path;
}
else if (isArray.check(parentValue)) {
// Something caused path.name to become out of date, so attempt to
// recover by searching for path.value in parentValue.
var i = parentValue.indexOf(path.value);
if (i >= 0) {
parentCache[path.name = i] = path;
}
}
else {
// If path.value disagrees with parentValue[path.name], and
// path.name is not an array index, let path.value become the new
// parentValue[path.name] and update parentCache accordingly.
parentValue[path.name] = path.value;
parentCache[path.name] = path;
}
if (parentValue[path.name] !== path.value) {
throw new Error("");
}
if (path.parentPath.get(path.name) !== path) {
throw new Error("");
}
return path;
}
Pp.replace = function replace(replacement) {
var results = [];
var parentValue = this.parentPath.value;
var parentCache = getChildCache(this.parentPath);
var count = arguments.length;
repairRelationshipWithParent(this);
if (isArray.check(parentValue)) {
var originalLength = parentValue.length;
var move = getMoves(this.parentPath, count - 1, this.name + 1);
var spliceArgs = [this.name, 1];
for (var i = 0; i < count; ++i) {
spliceArgs.push(arguments[i]);
}
var splicedOut = parentValue.splice.apply(parentValue, spliceArgs);
if (splicedOut[0] !== this.value) {
throw new Error("");
}
if (parentValue.length !== (originalLength - 1 + count)) {
throw new Error("");
}
move();
if (count === 0) {
delete this.value;
delete parentCache[this.name];
this.__childCache = null;
}
else {
if (parentValue[this.name] !== replacement) {
throw new Error("");
}
if (this.value !== replacement) {
this.value = replacement;
this.__childCache = null;
}
for (i = 0; i < count; ++i) {
results.push(this.parentPath.get(this.name + i));
}
if (results[0] !== this) {
throw new Error("");
}
}
}
else if (count === 1) {
if (this.value !== replacement) {
this.__childCache = null;
}
this.value = parentValue[this.name] = replacement;
results.push(this);
}
else if (count === 0) {
delete parentValue[this.name];
delete this.value;
this.__childCache = null;
// Leave this path cached as parentCache[this.name], even though
// it no longer has a value defined.
}
else {
throw new Error("Could not replace path");
}
return results;
};
return Path;
}
exports.default = pathPlugin;
module.exports = exports["default"];
/***/ }),
/***/ 89733:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
var hasOwn = Object.prototype.hasOwnProperty;
function scopePlugin(fork) {
var types = fork.use(types_1.default);
var Type = types.Type;
var namedTypes = types.namedTypes;
var Node = namedTypes.Node;
var Expression = namedTypes.Expression;
var isArray = types.builtInTypes.array;
var b = types.builders;
var Scope = function Scope(path, parentScope) {
if (!(this instanceof Scope)) {
throw new Error("Scope constructor cannot be invoked without 'new'");
}
ScopeType.assert(path.value);
var depth;
if (parentScope) {
if (!(parentScope instanceof Scope)) {
throw new Error("");
}
depth = parentScope.depth + 1;
}
else {
parentScope = null;
depth = 0;
}
Object.defineProperties(this, {
path: { value: path },
node: { value: path.value },
isGlobal: { value: !parentScope, enumerable: true },
depth: { value: depth },
parent: { value: parentScope },
bindings: { value: {} },
types: { value: {} },
});
};
var scopeTypes = [
// Program nodes introduce global scopes.
namedTypes.Program,
// Function is the supertype of FunctionExpression,
// FunctionDeclaration, ArrowExpression, etc.
namedTypes.Function,
// In case you didn't know, the caught parameter shadows any variable
// of the same name in an outer scope.
namedTypes.CatchClause
];
var ScopeType = Type.or.apply(Type, scopeTypes);
Scope.isEstablishedBy = function (node) {
return ScopeType.check(node);
};
var Sp = Scope.prototype;
// Will be overridden after an instance lazily calls scanScope.
Sp.didScan = false;
Sp.declares = function (name) {
this.scan();
return hasOwn.call(this.bindings, name);
};
Sp.declaresType = function (name) {
this.scan();
return hasOwn.call(this.types, name);
};
Sp.declareTemporary = function (prefix) {
if (prefix) {
if (!/^[a-z$_]/i.test(prefix)) {
throw new Error("");
}
}
else {
prefix = "t$";
}
// Include this.depth in the name to make sure the name does not
// collide with any variables in nested/enclosing scopes.
prefix += this.depth.toString(36) + "$";
this.scan();
var index = 0;
while (this.declares(prefix + index)) {
++index;
}
var name = prefix + index;
return this.bindings[name] = types.builders.identifier(name);
};
Sp.injectTemporary = function (identifier, init) {
identifier || (identifier = this.declareTemporary());
var bodyPath = this.path.get("body");
if (namedTypes.BlockStatement.check(bodyPath.value)) {
bodyPath = bodyPath.get("body");
}
bodyPath.unshift(b.variableDeclaration("var", [b.variableDeclarator(identifier, init || null)]));
return identifier;
};
Sp.scan = function (force) {
if (force || !this.didScan) {
for (var name in this.bindings) {
// Empty out this.bindings, just in cases.
delete this.bindings[name];
}
scanScope(this.path, this.bindings, this.types);
this.didScan = true;
}
};
Sp.getBindings = function () {
this.scan();
return this.bindings;
};
Sp.getTypes = function () {
this.scan();
return this.types;
};
function scanScope(path, bindings, scopeTypes) {
var node = path.value;
ScopeType.assert(node);
if (namedTypes.CatchClause.check(node)) {
// A catch clause establishes a new scope but the only variable
// bound in that scope is the catch parameter. Any other
// declarations create bindings in the outer scope.
var param = path.get("param");
if (param.value) {
addPattern(param, bindings);
}
}
else {
recursiveScanScope(path, bindings, scopeTypes);
}
}
function recursiveScanScope(path, bindings, scopeTypes) {
var node = path.value;
if (path.parent &&
namedTypes.FunctionExpression.check(path.parent.node) &&
path.parent.node.id) {
addPattern(path.parent.get("id"), bindings);
}
if (!node) {
// None of the remaining cases matter if node is falsy.
}
else if (isArray.check(node)) {
path.each(function (childPath) {
recursiveScanChild(childPath, bindings, scopeTypes);
});
}
else if (namedTypes.Function.check(node)) {
path.get("params").each(function (paramPath) {
addPattern(paramPath, bindings);
});
recursiveScanChild(path.get("body"), bindings, scopeTypes);
}
else if ((namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) ||
(namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node)) ||
(namedTypes.TSTypeAliasDeclaration && namedTypes.TSTypeAliasDeclaration.check(node)) ||
(namedTypes.TSInterfaceDeclaration && namedTypes.TSInterfaceDeclaration.check(node))) {
addTypePattern(path.get("id"), scopeTypes);
}
else if (namedTypes.VariableDeclarator.check(node)) {
addPattern(path.get("id"), bindings);
recursiveScanChild(path.get("init"), bindings, scopeTypes);
}
else if (node.type === "ImportSpecifier" ||
node.type === "ImportNamespaceSpecifier" ||
node.type === "ImportDefaultSpecifier") {
addPattern(
// Esprima used to use the .name field to refer to the local
// binding identifier for ImportSpecifier nodes, but .id for
// ImportNamespaceSpecifier and ImportDefaultSpecifier nodes.
// ESTree/Acorn/ESpree use .local for all three node types.
path.get(node.local ? "local" :
node.name ? "name" : "id"), bindings);
}
else if (Node.check(node) && !Expression.check(node)) {
types.eachField(node, function (name, child) {
var childPath = path.get(name);
if (!pathHasValue(childPath, child)) {
throw new Error("");
}
recursiveScanChild(childPath, bindings, scopeTypes);
});
}
}
function pathHasValue(path, value) {
if (path.value === value) {
return true;
}
// Empty arrays are probably produced by defaults.emptyArray, in which
// case is makes sense to regard them as equivalent, if not ===.
if (Array.isArray(path.value) &&
path.value.length === 0 &&
Array.isArray(value) &&
value.length === 0) {
return true;
}
return false;
}
function recursiveScanChild(path, bindings, scopeTypes) {
var node = path.value;
if (!node || Expression.check(node)) {
// Ignore falsy values and Expressions.
}
else if (namedTypes.FunctionDeclaration.check(node) &&
node.id !== null) {
addPattern(path.get("id"), bindings);
}
else if (namedTypes.ClassDeclaration &&
namedTypes.ClassDeclaration.check(node)) {
addPattern(path.get("id"), bindings);
}
else if (ScopeType.check(node)) {
if (namedTypes.CatchClause.check(node) &&
// TODO Broaden this to accept any pattern.
namedTypes.Identifier.check(node.param)) {
var catchParamName = node.param.name;
var hadBinding = hasOwn.call(bindings, catchParamName);
// Any declarations that occur inside the catch body that do
// not have the same name as the catch parameter should count
// as bindings in the outer scope.
recursiveScanScope(path.get("body"), bindings, scopeTypes);
// If a new binding matching the catch parameter name was
// created while scanning the catch body, ignore it because it
// actually refers to the catch parameter and not the outer
// scope that we're currently scanning.
if (!hadBinding) {
delete bindings[catchParamName];
}
}
}
else {
recursiveScanScope(path, bindings, scopeTypes);
}
}
function addPattern(patternPath, bindings) {
var pattern = patternPath.value;
namedTypes.Pattern.assert(pattern);
if (namedTypes.Identifier.check(pattern)) {
if (hasOwn.call(bindings, pattern.name)) {
bindings[pattern.name].push(patternPath);
}
else {
bindings[pattern.name] = [patternPath];
}
}
else if (namedTypes.AssignmentPattern &&
namedTypes.AssignmentPattern.check(pattern)) {
addPattern(patternPath.get('left'), bindings);
}
else if (namedTypes.ObjectPattern &&
namedTypes.ObjectPattern.check(pattern)) {
patternPath.get('properties').each(function (propertyPath) {
var property = propertyPath.value;
if (namedTypes.Pattern.check(property)) {
addPattern(propertyPath, bindings);
}
else if (namedTypes.Property.check(property)) {
addPattern(propertyPath.get('value'), bindings);
}
else if (namedTypes.SpreadProperty &&
namedTypes.SpreadProperty.check(property)) {
addPattern(propertyPath.get('argument'), bindings);
}
});
}
else if (namedTypes.ArrayPattern &&
namedTypes.ArrayPattern.check(pattern)) {
patternPath.get('elements').each(function (elementPath) {
var element = elementPath.value;
if (namedTypes.Pattern.check(element)) {
addPattern(elementPath, bindings);
}
else if (namedTypes.SpreadElement &&
namedTypes.SpreadElement.check(element)) {
addPattern(elementPath.get("argument"), bindings);
}
});
}
else if (namedTypes.PropertyPattern &&
namedTypes.PropertyPattern.check(pattern)) {
addPattern(patternPath.get('pattern'), bindings);
}
else if ((namedTypes.SpreadElementPattern &&
namedTypes.SpreadElementPattern.check(pattern)) ||
(namedTypes.SpreadPropertyPattern &&
namedTypes.SpreadPropertyPattern.check(pattern))) {
addPattern(patternPath.get('argument'), bindings);
}
}
function addTypePattern(patternPath, types) {
var pattern = patternPath.value;
namedTypes.Pattern.assert(pattern);
if (namedTypes.Identifier.check(pattern)) {
if (hasOwn.call(types, pattern.name)) {
types[pattern.name].push(patternPath);
}
else {
types[pattern.name] = [patternPath];
}
}
}
Sp.lookup = function (name) {
for (var scope = this; scope; scope = scope.parent)
if (scope.declares(name))
break;
return scope;
};
Sp.lookupType = function (name) {
for (var scope = this; scope; scope = scope.parent)
if (scope.declaresType(name))
break;
return scope;
};
Sp.getGlobalScope = function () {
var scope = this;
while (!scope.isGlobal)
scope = scope.parent;
return scope;
};
return Scope;
}
exports.default = scopePlugin;
module.exports = exports["default"];
/***/ }),
/***/ 34631:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var tslib_1 = __nccwpck_require__(4351);
var types_1 = tslib_1.__importDefault(__nccwpck_require__(52619));
function default_1(fork) {
var types = fork.use(types_1.default);
var Type = types.Type;
var builtin = types.builtInTypes;
var isNumber = builtin.number;
// An example of constructing a new type with arbitrary constraints from
// an existing type.
function geq(than) {
return Type.from(function (value) { return isNumber.check(value) && value >= than; }, isNumber + " >= " + than);
}
;
// Default value-returning functions that may optionally be passed as a
// third argument to Def.prototype.field.
var defaults = {
// Functions were used because (among other reasons) that's the most
// elegant way to allow for the emptyArray one always to give a new
// array instance.
"null": function () { return null; },
"emptyArray": function () { return []; },
"false": function () { return false; },
"true": function () { return true; },
"undefined": function () { },
"use strict": function () { return "use strict"; }
};
var naiveIsPrimitive = Type.or(builtin.string, builtin.number, builtin.boolean, builtin.null, builtin.undefined);
var isPrimitive = Type.from(function (value) {
if (value === null)
return true;
var type = typeof value;
if (type === "object" ||
type === "function") {
return false;
}
return true;
}, naiveIsPrimitive.toString());
return {
geq: geq,
defaults: defaults,
isPrimitive: isPrimitive,
};
}
exports.default = default_1;
module.exports = exports["default"];
/***/ }),
/***/ 52619:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Def = void 0;
var tslib_1 = __nccwpck_require__(4351);
var Op = Object.prototype;
var objToStr = Op.toString;
var hasOwn = Op.hasOwnProperty;
var BaseType = /** @class */ (function () {
function BaseType() {
}
BaseType.prototype.assert = function (value, deep) {
if (!this.check(value, deep)) {
var str = shallowStringify(value);
throw new Error(str + " does not match type " + this);
}
return true;
};
BaseType.prototype.arrayOf = function () {
var elemType = this;
return new ArrayType(elemType);
};
return BaseType;
}());
var ArrayType = /** @class */ (function (_super) {
tslib_1.__extends(ArrayType, _super);
function ArrayType(elemType) {
var _this = _super.call(this) || this;
_this.elemType = elemType;
_this.kind = "ArrayType";
return _this;
}
ArrayType.prototype.toString = function () {
return "[" + this.elemType + "]";
};
ArrayType.prototype.check = function (value, deep) {
var _this = this;
return Array.isArray(value) && value.every(function (elem) { return _this.elemType.check(elem, deep); });
};
return ArrayType;
}(BaseType));
var IdentityType = /** @class */ (function (_super) {
tslib_1.__extends(IdentityType, _super);
function IdentityType(value) {
var _this = _super.call(this) || this;
_this.value = value;
_this.kind = "IdentityType";
return _this;
}
IdentityType.prototype.toString = function () {
return String(this.value);
};
IdentityType.prototype.check = function (value, deep) {
var result = value === this.value;
if (!result && typeof deep === "function") {
deep(this, value);
}
return result;
};
return IdentityType;
}(BaseType));
var ObjectType = /** @class */ (function (_super) {
tslib_1.__extends(ObjectType, _super);
function ObjectType(fields) {
var _this = _super.call(this) || this;
_this.fields = fields;
_this.kind = "ObjectType";
return _this;
}
ObjectType.prototype.toString = function () {
return "{ " + this.fields.join(", ") + " }";
};
ObjectType.prototype.check = function (value, deep) {
return (objToStr.call(value) === objToStr.call({}) &&
this.fields.every(function (field) {
return field.type.check(value[field.name], deep);
}));
};
return ObjectType;
}(BaseType));
var OrType = /** @class */ (function (_super) {
tslib_1.__extends(OrType, _super);
function OrType(types) {
var _this = _super.call(this) || this;
_this.types = types;
_this.kind = "OrType";
return _this;
}
OrType.prototype.toString = function () {
return this.types.join(" | ");
};
OrType.prototype.check = function (value, deep) {
return this.types.some(function (type) {
return type.check(value, deep);
});
};
return OrType;
}(BaseType));
var PredicateType = /** @class */ (function (_super) {
tslib_1.__extends(PredicateType, _super);
function PredicateType(name, predicate) {
var _this = _super.call(this) || this;
_this.name = name;
_this.predicate = predicate;
_this.kind = "PredicateType";
return _this;
}
PredicateType.prototype.toString = function () {
return this.name;
};
PredicateType.prototype.check = function (value, deep) {
var result = this.predicate(value, deep);
if (!result && typeof deep === "function") {
deep(this, value);
}
return result;
};
return PredicateType;
}(BaseType));
var Def = /** @class */ (function () {
function Def(type, typeName) {
this.type = type;
this.typeName = typeName;
this.baseNames = [];
this.ownFields = Object.create(null);
// Includes own typeName. Populated during finalization.
this.allSupertypes = Object.create(null);
// Linear inheritance hierarchy. Populated during finalization.
this.supertypeList = [];
// Includes inherited fields.
this.allFields = Object.create(null);
// Non-hidden keys of allFields.
this.fieldNames = [];
// This property will be overridden as true by individual Def instances
// when they are finalized.
this.finalized = false;
// False by default until .build(...) is called on an instance.
this.buildable = false;
this.buildParams = [];
}
Def.prototype.isSupertypeOf = function (that) {
if (that instanceof Def) {
if (this.finalized !== true ||
that.finalized !== true) {
throw new Error("");
}
return hasOwn.call(that.allSupertypes, this.typeName);
}
else {
throw new Error(that + " is not a Def");
}
};
Def.prototype.checkAllFields = function (value, deep) {
var allFields = this.allFields;
if (this.finalized !== true) {
throw new Error("" + this.typeName);
}
function checkFieldByName(name) {
var field = allFields[name];
var type = field.type;
var child = field.getValue(value);
return type.check(child, deep);
}
return value !== null &&
typeof value === "object" &&
Object.keys(allFields).every(checkFieldByName);
};
Def.prototype.bases = function () {
var supertypeNames = [];
for (var _i = 0; _i < arguments.length; _i++) {
supertypeNames[_i] = arguments[_i];
}
var bases = this.baseNames;
if (this.finalized) {
if (supertypeNames.length !== bases.length) {
throw new Error("");
}
for (var i = 0; i < supertypeNames.length; i++) {
if (supertypeNames[i] !== bases[i]) {
throw new Error("");
}
}
return this;
}
supertypeNames.forEach(function (baseName) {
// This indexOf lookup may be O(n), but the typical number of base
// names is very small, and indexOf is a native Array method.
if (bases.indexOf(baseName) < 0) {
bases.push(baseName);
}
});
return this; // For chaining.
};
return Def;
}());
exports.Def = Def;
var Field = /** @class */ (function () {
function Field(name, type, defaultFn, hidden) {
this.name = name;
this.type = type;
this.defaultFn = defaultFn;
this.hidden = !!hidden;
}
Field.prototype.toString = function () {
return JSON.stringify(this.name) + ": " + this.type;
};
Field.prototype.getValue = function (obj) {
var value = obj[this.name];
if (typeof value !== "undefined") {
return value;
}
if (typeof this.defaultFn === "function") {
value = this.defaultFn.call(obj);
}
return value;
};
return Field;
}());
function shallowStringify(value) {
if (Array.isArray(value)) {
return "[" + value.map(shallowStringify).join(", ") + "]";
}
if (value && typeof value === "object") {
return "{ " + Object.keys(value).map(function (key) {
return key + ": " + value[key];
}).join(", ") + " }";
}
return JSON.stringify(value);
}
function typesPlugin(_fork) {
var Type = {
or: function () {
var types = [];
for (var _i = 0; _i < arguments.length; _i++) {
types[_i] = arguments[_i];
}
return new OrType(types.map(function (type) { return Type.from(type); }));
},
from: function (value, name) {
if (value instanceof ArrayType ||
value instanceof IdentityType ||
value instanceof ObjectType ||
value instanceof OrType ||
value instanceof PredicateType) {
return value;
}
// The Def type is used as a helper for constructing compound
// interface types for AST nodes.
if (value instanceof Def) {
return value.type;
}
// Support [ElemType] syntax.
if (isArray.check(value)) {
if (value.length !== 1) {
throw new Error("only one element type is permitted for typed arrays");
}
return new ArrayType(Type.from(value[0]));
}
// Support { someField: FieldType, ... } syntax.
if (isObject.check(value)) {
return new ObjectType(Object.keys(value).map(function (name) {
return new Field(name, Type.from(value[name], name));
}));
}
if (typeof value === "function") {
var bicfIndex = builtInCtorFns.indexOf(value);
if (bicfIndex >= 0) {
return builtInCtorTypes[bicfIndex];
}
if (typeof name !== "string") {
throw new Error("missing name");
}
return new PredicateType(name, value);
}
// As a last resort, toType returns a type that matches any value that
// is === from. This is primarily useful for literal values like
// toType(null), but it has the additional advantage of allowing
// toType to be a total function.
return new IdentityType(value);
},
// Define a type whose name is registered in a namespace (the defCache) so
// that future definitions will return the same type given the same name.
// In particular, this system allows for circular and forward definitions.
// The Def object d returned from Type.def may be used to configure the
// type d.type by calling methods such as d.bases, d.build, and d.field.
def: function (typeName) {
return hasOwn.call(defCache, typeName)
? defCache[typeName]
: defCache[typeName] = new DefImpl(typeName);
},
hasDef: function (typeName) {
return hasOwn.call(defCache, typeName);
}
};
var builtInCtorFns = [];
var builtInCtorTypes = [];
function defBuiltInType(name, example) {
var objStr = objToStr.call(example);
var type = new PredicateType(name, function (value) { return objToStr.call(value) === objStr; });
if (example && typeof example.constructor === "function") {
builtInCtorFns.push(example.constructor);
builtInCtorTypes.push(type);
}
return type;
}
// These types check the underlying [[Class]] attribute of the given
// value, rather than using the problematic typeof operator. Note however
// that no subtyping is considered; so, for instance, isObject.check
// returns false for [], /./, new Date, and null.
var isString = defBuiltInType("string", "truthy");
var isFunction = defBuiltInType("function", function () { });
var isArray = defBuiltInType("array", []);
var isObject = defBuiltInType("object", {});
var isRegExp = defBuiltInType("RegExp", /./);
var isDate = defBuiltInType("Date", new Date());
var isNumber = defBuiltInType("number", 3);
var isBoolean = defBuiltInType("boolean", true);
var isNull = defBuiltInType("null", null);
var isUndefined = defBuiltInType("undefined", undefined);
var builtInTypes = {
string: isString,
function: isFunction,
array: isArray,
object: isObject,
RegExp: isRegExp,
Date: isDate,
number: isNumber,
boolean: isBoolean,
null: isNull,
undefined: isUndefined,
};
// In order to return the same Def instance every time Type.def is called
// with a particular name, those instances need to be stored in a cache.
var defCache = Object.create(null);
function defFromValue(value) {
if (value && typeof value === "object") {
var type = value.type;
if (typeof type === "string" &&
hasOwn.call(defCache, type)) {
var d = defCache[type];
if (d.finalized) {
return d;
}
}
}
return null;
}
var DefImpl = /** @class */ (function (_super) {
tslib_1.__extends(DefImpl, _super);
function DefImpl(typeName) {
var _this = _super.call(this, new PredicateType(typeName, function (value, deep) { return _this.check(value, deep); }), typeName) || this;
return _this;
}
DefImpl.prototype.check = function (value, deep) {
if (this.finalized !== true) {
throw new Error("prematurely checking unfinalized type " + this.typeName);
}
// A Def type can only match an object value.
if (value === null || typeof value !== "object") {
return false;
}
var vDef = defFromValue(value);
if (!vDef) {
// If we couldn't infer the Def associated with the given value,
// and we expected it to be a SourceLocation or a Position, it was
// probably just missing a "type" field (because Esprima does not
// assign a type property to such nodes). Be optimistic and let
// this.checkAllFields make the final decision.
if (this.typeName === "SourceLocation" ||
this.typeName === "Position") {
return this.checkAllFields(value, deep);
}
// Calling this.checkAllFields for any other type of node is both
// bad for performance and way too forgiving.
return false;
}
// If checking deeply and vDef === this, then we only need to call
// checkAllFields once. Calling checkAllFields is too strict when deep
// is false, because then we only care about this.isSupertypeOf(vDef).
if (deep && vDef === this) {
return this.checkAllFields(value, deep);
}
// In most cases we rely exclusively on isSupertypeOf to make O(1)
// subtyping determinations. This suffices in most situations outside
// of unit tests, since interface conformance is checked whenever new
// instances are created using builder functions.
if (!this.isSupertypeOf(vDef)) {
return false;
}
// The exception is when deep is true; then, we recursively check all
// fields.
if (!deep) {
return true;
}
// Use the more specific Def (vDef) to perform the deep check, but
// shallow-check fields defined by the less specific Def (this).
return vDef.checkAllFields(value, deep)
&& this.checkAllFields(value, false);
};
DefImpl.prototype.build = function () {
var _this = this;
var buildParams = [];
for (var _i = 0; _i < arguments.length; _i++) {
buildParams[_i] = arguments[_i];
}
// Calling Def.prototype.build multiple times has the effect of merely
// redefining this property.
this.buildParams = buildParams;
if (this.buildable) {
// If this Def is already buildable, update self.buildParams and
// continue using the old builder function.
return this;
}
// Every buildable type will have its "type" field filled in
// automatically. This includes types that are not subtypes of Node,
// like SourceLocation, but that seems harmless (TODO?).
this.field("type", String, function () { return _this.typeName; });
// Override Dp.buildable for this Def instance.
this.buildable = true;
var addParam = function (built, param, arg, isArgAvailable) {
if (hasOwn.call(built, param))
return;
var all = _this.allFields;
if (!hasOwn.call(all, param)) {
throw new Error("" + param);
}
var field = all[param];
var type = field.type;
var value;
if (isArgAvailable) {
value = arg;
}
else if (field.defaultFn) {
// Expose the partially-built object to the default
// function as its `this` object.
value = field.defaultFn.call(built);
}
else {
var message = "no value or default function given for field " +
JSON.stringify(param) + " of " + _this.typeName + "(" +
_this.buildParams.map(function (name) {
return all[name];
}).join(", ") + ")";
throw new Error(message);
}
if (!type.check(value)) {
throw new Error(shallowStringify(value) +
" does not match field " + field +
" of type " + _this.typeName);
}
built[param] = value;
};
// Calling the builder function will construct an instance of the Def,
// with positional arguments mapped to the fields original passed to .build.
// If not enough arguments are provided, the default value for the remaining fields
// will be used.
var builder = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var argc = args.length;
if (!_this.finalized) {
throw new Error("attempting to instantiate unfinalized type " +
_this.typeName);
}
var built = Object.create(nodePrototype);
_this.buildParams.forEach(function (param, i) {
if (i < argc) {
addParam(built, param, args[i], true);
}
else {
addParam(built, param, null, false);
}
});
Object.keys(_this.allFields).forEach(function (param) {
// Use the default value.
addParam(built, param, null, false);
});
// Make sure that the "type" field was filled automatically.
if (built.type !== _this.typeName) {
throw new Error("");
}
return built;
};
// Calling .from on the builder function will construct an instance of the Def,
// using field values from the passed object. For fields missing from the passed object,
// their default value will be used.
builder.from = function (obj) {
if (!_this.finalized) {
throw new Error("attempting to instantiate unfinalized type " +
_this.typeName);
}
var built = Object.create(nodePrototype);
Object.keys(_this.allFields).forEach(function (param) {
if (hasOwn.call(obj, param)) {
addParam(built, param, obj[param], true);
}
else {
addParam(built, param, null, false);
}
});
// Make sure that the "type" field was filled automatically.
if (built.type !== _this.typeName) {
throw new Error("");
}
return built;
};
Object.defineProperty(builders, getBuilderName(this.typeName), {
enumerable: true,
value: builder
});
return this;
};
// The reason fields are specified using .field(...) instead of an object
// literal syntax is somewhat subtle: the object literal syntax would
// support only one key and one value, but with .field(...) we can pass
// any number of arguments to specify the field.
DefImpl.prototype.field = function (name, type, defaultFn, hidden) {
if (this.finalized) {
console.error("Ignoring attempt to redefine field " +
JSON.stringify(name) + " of finalized type " +
JSON.stringify(this.typeName));
return this;
}
this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden);
return this; // For chaining.
};
DefImpl.prototype.finalize = function () {
var _this = this;
// It's not an error to finalize a type more than once, but only the
// first call to .finalize does anything.
if (!this.finalized) {
var allFields = this.allFields;
var allSupertypes = this.allSupertypes;
this.baseNames.forEach(function (name) {
var def = defCache[name];
if (def instanceof Def) {
def.finalize();
extend(allFields, def.allFields);
extend(allSupertypes, def.allSupertypes);
}
else {
var message = "unknown supertype name " +
JSON.stringify(name) +
" for subtype " +
JSON.stringify(_this.typeName);
throw new Error(message);
}
});
// TODO Warn if fields are overridden with incompatible types.
extend(allFields, this.ownFields);
allSupertypes[this.typeName] = this;
this.fieldNames.length = 0;
for (var fieldName in allFields) {
if (hasOwn.call(allFields, fieldName) &&
!allFields[fieldName].hidden) {
this.fieldNames.push(fieldName);
}
}
// Types are exported only once they have been finalized.
Object.defineProperty(namedTypes, this.typeName, {
enumerable: true,
value: this.type
});
this.finalized = true;
// A linearization of the inheritance hierarchy.
populateSupertypeList(this.typeName, this.supertypeList);
if (this.buildable &&
this.supertypeList.lastIndexOf("Expression") >= 0) {
wrapExpressionBuilderWithStatement(this.typeName);
}
}
};
return DefImpl;
}(Def));
// Note that the list returned by this function is a copy of the internal
// supertypeList, *without* the typeName itself as the first element.
function getSupertypeNames(typeName) {
if (!hasOwn.call(defCache, typeName)) {
throw new Error("");
}
var d = defCache[typeName];
if (d.finalized !== true) {
throw new Error("");
}
return d.supertypeList.slice(1);
}
// Returns an object mapping from every known type in the defCache to the
// most specific supertype whose name is an own property of the candidates
// object.
function computeSupertypeLookupTable(candidates) {
var table = {};
var typeNames = Object.keys(defCache);
var typeNameCount = typeNames.length;
for (var i = 0; i < typeNameCount; ++i) {
var typeName = typeNames[i];
var d = defCache[typeName];
if (d.finalized !== true) {
throw new Error("" + typeName);
}
for (var j = 0; j < d.supertypeList.length; ++j) {
var superTypeName = d.supertypeList[j];
if (hasOwn.call(candidates, superTypeName)) {
table[typeName] = superTypeName;
break;
}
}
}
return table;
}
var builders = Object.create(null);
// This object is used as prototype for any node created by a builder.
var nodePrototype = {};
// Call this function to define a new method to be shared by all AST
// nodes. The replaced method (if any) is returned for easy wrapping.
function defineMethod(name, func) {
var old = nodePrototype[name];
// Pass undefined as func to delete nodePrototype[name].
if (isUndefined.check(func)) {
delete nodePrototype[name];
}
else {
isFunction.assert(func);
Object.defineProperty(nodePrototype, name, {
enumerable: true,
configurable: true,
value: func
});
}
return old;
}
function getBuilderName(typeName) {
return typeName.replace(/^[A-Z]+/, function (upperCasePrefix) {
var len = upperCasePrefix.length;
switch (len) {
case 0: return "";
// If there's only one initial capital letter, just lower-case it.
case 1: return upperCasePrefix.toLowerCase();
default:
// If there's more than one initial capital letter, lower-case
// all but the last one, so that XMLDefaultDeclaration (for
// example) becomes xmlDefaultDeclaration.
return upperCasePrefix.slice(0, len - 1).toLowerCase() +
upperCasePrefix.charAt(len - 1);
}
});
}
function getStatementBuilderName(typeName) {
typeName = getBuilderName(typeName);
return typeName.replace(/(Expression)?$/, "Statement");
}
var namedTypes = {};
// Like Object.keys, but aware of what fields each AST type should have.
function getFieldNames(object) {
var d = defFromValue(object);
if (d) {
return d.fieldNames.slice(0);
}
if ("type" in object) {
throw new Error("did not recognize object of type " +
JSON.stringify(object.type));
}
return Object.keys(object);
}
// Get the value of an object property, taking object.type and default
// functions into account.
function getFieldValue(object, fieldName) {
var d = defFromValue(object);
if (d) {
var field = d.allFields[fieldName];
if (field) {
return field.getValue(object);
}
}
return object && object[fieldName];
}
// Iterate over all defined fields of an object, including those missing
// or undefined, passing each field name and effective value (as returned
// by getFieldValue) to the callback. If the object has no corresponding
// Def, the callback will never be called.
function eachField(object, callback, context) {
getFieldNames(object).forEach(function (name) {
callback.call(this, name, getFieldValue(object, name));
}, context);
}
// Similar to eachField, except that iteration stops as soon as the
// callback returns a truthy value. Like Array.prototype.some, the final
// result is either true or false to indicates whether the callback
// returned true for any element or not.
function someField(object, callback, context) {
return getFieldNames(object).some(function (name) {
return callback.call(this, name, getFieldValue(object, name));
}, context);
}
// Adds an additional builder for Expression subtypes
// that wraps the built Expression in an ExpressionStatements.
function wrapExpressionBuilderWithStatement(typeName) {
var wrapperName = getStatementBuilderName(typeName);
// skip if the builder already exists
if (builders[wrapperName])
return;
// the builder function to wrap with builders.ExpressionStatement
var wrapped = builders[getBuilderName(typeName)];
// skip if there is nothing to wrap
if (!wrapped)
return;
var builder = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return builders.expressionStatement(wrapped.apply(builders, args));
};
builder.from = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return builders.expressionStatement(wrapped.from.apply(builders, args));
};
builders[wrapperName] = builder;
}
function populateSupertypeList(typeName, list) {
list.length = 0;
list.push(typeName);
var lastSeen = Object.create(null);
for (var pos = 0; pos < list.length; ++pos) {
typeName = list[pos];
var d = defCache[typeName];
if (d.finalized !== true) {
throw new Error("");
}
// If we saw typeName earlier in the breadth-first traversal,
// delete the last-seen occurrence.
if (hasOwn.call(lastSeen, typeName)) {
delete list[lastSeen[typeName]];
}
// Record the new index of the last-seen occurrence of typeName.
lastSeen[typeName] = pos;
// Enqueue the base names of this type.
list.push.apply(list, d.baseNames);
}
// Compaction loop to remove array holes.
for (var to = 0, from = to, len = list.length; from < len; ++from) {
if (hasOwn.call(list, from)) {
list[to++] = list[from];
}
}
list.length = to;
}
function extend(into, from) {
Object.keys(from).forEach(function (name) {
into[name] = from[name];
});
return into;
}
function finalize() {
Object.keys(defCache).forEach(function (name) {
defCache[name].finalize();
});
}
return {
Type: Type,
builtInTypes: builtInTypes,
getSupertypeNames: getSupertypeNames,
computeSupertypeLookupTable: computeSupertypeLookupTable,
builders: builders,
defineMethod: defineMethod,
getBuilderName: getBuilderName,
getStatementBuilderName: getStatementBuilderName,
namedTypes: namedTypes,
getFieldNames: getFieldNames,
getFieldValue: getFieldValue,
eachField: eachField,
someField: someField,
finalize: finalize,
};
}
exports.default = typesPlugin;
;
/***/ }),
/***/ 27012:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.visit = exports.use = exports.Type = exports.someField = exports.PathVisitor = exports.Path = exports.NodePath = exports.namedTypes = exports.getSupertypeNames = exports.getFieldValue = exports.getFieldNames = exports.getBuilderName = exports.finalize = exports.eachField = exports.defineMethod = exports.builtInTypes = exports.builders = exports.astNodesAreEquivalent = void 0;
var tslib_1 = __nccwpck_require__(4351);
var fork_1 = tslib_1.__importDefault(__nccwpck_require__(20253));
var core_1 = tslib_1.__importDefault(__nccwpck_require__(66604));
var es6_1 = tslib_1.__importDefault(__nccwpck_require__(68127));
var es7_1 = tslib_1.__importDefault(__nccwpck_require__(75351));
var es2020_1 = tslib_1.__importDefault(__nccwpck_require__(48975));
var jsx_1 = tslib_1.__importDefault(__nccwpck_require__(27572));
var flow_1 = tslib_1.__importDefault(__nccwpck_require__(60368));
var esprima_1 = tslib_1.__importDefault(__nccwpck_require__(96817));
var babel_1 = tslib_1.__importDefault(__nccwpck_require__(92262));
var typescript_1 = tslib_1.__importDefault(__nccwpck_require__(16743));
var es_proposals_1 = tslib_1.__importDefault(__nccwpck_require__(32207));
var namedTypes_1 = __nccwpck_require__(24143);
Object.defineProperty(exports, "namedTypes", ({ enumerable: true, get: function () { return namedTypes_1.namedTypes; } }));
var _a = fork_1.default([
// This core module of AST types captures ES5 as it is parsed today by
// git://github.com/ariya/esprima.git#master.
core_1.default,
// Feel free to add to or remove from this list of extension modules to
// configure the precise type hierarchy that you need.
es6_1.default,
es7_1.default,
es2020_1.default,
jsx_1.default,
flow_1.default,
esprima_1.default,
babel_1.default,
typescript_1.default,
es_proposals_1.default,
]), astNodesAreEquivalent = _a.astNodesAreEquivalent, builders = _a.builders, builtInTypes = _a.builtInTypes, defineMethod = _a.defineMethod, eachField = _a.eachField, finalize = _a.finalize, getBuilderName = _a.getBuilderName, getFieldNames = _a.getFieldNames, getFieldValue = _a.getFieldValue, getSupertypeNames = _a.getSupertypeNames, n = _a.namedTypes, NodePath = _a.NodePath, Path = _a.Path, PathVisitor = _a.PathVisitor, someField = _a.someField, Type = _a.Type, use = _a.use, visit = _a.visit;
exports.astNodesAreEquivalent = astNodesAreEquivalent;
exports.builders = builders;
exports.builtInTypes = builtInTypes;
exports.defineMethod = defineMethod;
exports.eachField = eachField;
exports.finalize = finalize;
exports.getBuilderName = getBuilderName;
exports.getFieldNames = getFieldNames;
exports.getFieldValue = getFieldValue;
exports.getSupertypeNames = getSupertypeNames;
exports.NodePath = NodePath;
exports.Path = Path;
exports.PathVisitor = PathVisitor;
exports.someField = someField;
exports.Type = Type;
exports.use = use;
exports.visit = visit;
// Populate the exported fields of the namedTypes namespace, while still
// retaining its member types.
Object.assign(namedTypes_1.namedTypes, n);
/***/ }),
/***/ 86966:
/***/ ((module) => {
"use strict";
/*!
* bytes
* Copyright(c) 2012-2014 TJ Holowaychuk
* Copyright(c) 2015 Jed Watson
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = bytes;
module.exports.format = format;
module.exports.parse = parse;
/**
* Module variables.
* @private
*/
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
var map = {
b: 1,
kb: 1 << 10,
mb: 1 << 20,
gb: 1 << 30,
tb: Math.pow(1024, 4),
pb: Math.pow(1024, 5),
};
var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
/**
* Convert the given value in bytes into a string or parse to string to an integer in bytes.
*
* @param {string|number} value
* @param {{
* case: [string],
* decimalPlaces: [number]
* fixedDecimals: [boolean]
* thousandsSeparator: [string]
* unitSeparator: [string]
* }} [options] bytes options.
*
* @returns {string|number|null}
*/
function bytes(value, options) {
if (typeof value === 'string') {
return parse(value);
}
if (typeof value === 'number') {
return format(value, options);
}
return null;
}
/**
* Format the given value in bytes into a string.
*
* If the value is negative, it is kept as such. If it is a float,
* it is rounded.
*
* @param {number} value
* @param {object} [options]
* @param {number} [options.decimalPlaces=2]
* @param {number} [options.fixedDecimals=false]
* @param {string} [options.thousandsSeparator=]
* @param {string} [options.unit=]
* @param {string} [options.unitSeparator=]
*
* @returns {string|null}
* @public
*/
function format(value, options) {
if (!Number.isFinite(value)) {
return null;
}
var mag = Math.abs(value);
var thousandsSeparator = (options && options.thousandsSeparator) || '';
var unitSeparator = (options && options.unitSeparator) || '';
var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
var fixedDecimals = Boolean(options && options.fixedDecimals);
var unit = (options && options.unit) || '';
if (!unit || !map[unit.toLowerCase()]) {
if (mag >= map.pb) {
unit = 'PB';
} else if (mag >= map.tb) {
unit = 'TB';
} else if (mag >= map.gb) {
unit = 'GB';
} else if (mag >= map.mb) {
unit = 'MB';
} else if (mag >= map.kb) {
unit = 'KB';
} else {
unit = 'B';
}
}
var val = value / map[unit.toLowerCase()];
var str = val.toFixed(decimalPlaces);
if (!fixedDecimals) {
str = str.replace(formatDecimalsRegExp, '$1');
}
if (thousandsSeparator) {
str = str.split('.').map(function (s, i) {
return i === 0
? s.replace(formatThousandsRegExp, thousandsSeparator)
: s
}).join('.');
}
return str + unitSeparator + unit;
}
/**
* Parse the string value into an integer in bytes.
*
* If no unit is given, it is assumed the value is in bytes.
*
* @param {number|string} val
*
* @returns {number|null}
* @public
*/
function parse(val) {
if (typeof val === 'number' && !isNaN(val)) {
return val;
}
if (typeof val !== 'string') {
return null;
}
// Test if the string passed is valid
var results = parseRegExp.exec(val);
var floatValue;
var unit = 'b';
if (!results) {
// Nothing could be extracted from the given string
floatValue = parseInt(val, 10);
unit = 'b'
} else {
// Retrieve the value and the unit
floatValue = parseFloat(results[1]);
unit = results[4].toLowerCase();
}
if (isNaN(floatValue)) {
return null;
}
return Math.floor(map[unit] * floatValue);
}
/***/ }),
/***/ 95898:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(arg) {
if (Array.isArray) {
return Array.isArray(arg);
}
return objectToString(arg) === '[object Array]';
}
exports.isArray = isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
function isNull(arg) {
return arg === null;
}
exports.isNull = isNull;
function isNullOrUndefined(arg) {
return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
function isNumber(arg) {
return typeof arg === 'number';
}
exports.isNumber = isNumber;
function isString(arg) {
return typeof arg === 'string';
}
exports.isString = isString;
function isSymbol(arg) {
return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
function isUndefined(arg) {
return arg === void 0;
}
exports.isUndefined = isUndefined;
function isRegExp(re) {
return objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
function isDate(d) {
return objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
return (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
function isFunction(arg) {
return typeof arg === 'function';
}
exports.isFunction = isFunction;
function isPrimitive(arg) {
return arg === null ||
typeof arg === 'boolean' ||
typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'symbol' || // ES6 symbol
typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
exports.isBuffer = __nccwpck_require__(64293).Buffer.isBuffer;
function objectToString(o) {
return Object.prototype.toString.call(o);
}
/***/ }),
/***/ 92371:
/***/ ((module) => {
"use strict";
/**
* Returns a `Buffer` instance from the given data URI `uri`.
*
* @param {String} uri Data URI to turn into a Buffer instance
* @return {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;
}
module.exports = dataUriToBuffer;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 28222:
/***/ ((module, exports, __nccwpck_require__) => {
/* eslint-env browser */
/**
* This is the web browser implementation of `debug()`.
*/
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
exports.destroy = (() => {
let warned = false;
return () => {
if (!warned) {
warned = true;
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
}
};
})();
/**
* Colors.
*/
exports.colors = [
'#0000CC',
'#0000FF',
'#0033CC',
'#0033FF',
'#0066CC',
'#0066FF',
'#0099CC',
'#0099FF',
'#00CC00',
'#00CC33',
'#00CC66',
'#00CC99',
'#00CCCC',
'#00CCFF',
'#3300CC',
'#3300FF',
'#3333CC',
'#3333FF',
'#3366CC',
'#3366FF',
'#3399CC',
'#3399FF',
'#33CC00',
'#33CC33',
'#33CC66',
'#33CC99',
'#33CCCC',
'#33CCFF',
'#6600CC',
'#6600FF',
'#6633CC',
'#6633FF',
'#66CC00',
'#66CC33',
'#9900CC',
'#9900FF',
'#9933CC',
'#9933FF',
'#99CC00',
'#99CC33',
'#CC0000',
'#CC0033',
'#CC0066',
'#CC0099',
'#CC00CC',
'#CC00FF',
'#CC3300',
'#CC3333',
'#CC3366',
'#CC3399',
'#CC33CC',
'#CC33FF',
'#CC6600',
'#CC6633',
'#CC9900',
'#CC9933',
'#CCCC00',
'#CCCC33',
'#FF0000',
'#FF0033',
'#FF0066',
'#FF0099',
'#FF00CC',
'#FF00FF',
'#FF3300',
'#FF3333',
'#FF3366',
'#FF3399',
'#FF33CC',
'#FF33FF',
'#FF6600',
'#FF6633',
'#FF9900',
'#FF9933',
'#FFCC00',
'#FFCC33'
];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
}
// Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
}
// Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
// Is firebug? http://stackoverflow.com/a/398120/376773
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
// Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
// Double check webkit in userAgent just in case we are in a worker
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
function formatArgs(args) {
args[0] = (this.useColors ? '%c' : '') +
this.namespace +
(this.useColors ? ' %c' : ' ') +
args[0] +
(this.useColors ? '%c ' : ' ') +
'+' + module.exports.humanize(this.diff);
if (!this.useColors) {
return;
}
const c = 'color: ' + this.color;
args.splice(1, 0, c, 'color: inherit');
// The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
let index = 0;
let lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, match => {
if (match === '%%') {
return;
}
index++;
if (match === '%c') {
// We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
args.splice(lastC, 0, c);
}
/**
* Invokes `console.debug()` when available.
* No-op when `console.debug` is not a "function".
* If `console.debug` is not available, falls back
* to `console.log`.
*
* @api public
*/
exports.log = console.debug || console.log || (() => {});
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
try {
if (namespaces) {
exports.storage.setItem('debug', namespaces);
} else {
exports.storage.removeItem('debug');
}
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
let r;
try {
r = exports.storage.getItem('debug');
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
/**
* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
// The Browser also has localStorage in the global context.
return localStorage;
} catch (error) {
// Swallow
// XXX (@Qix-) should we be logging these?
}
}
module.exports = __nccwpck_require__(46243)(exports);
const {formatters} = module.exports;
/**
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/
formatters.j = function (v) {
try {
return JSON.stringify(v);
} catch (error) {
return '[UnexpectedJSONParseError]: ' + error.message;
}
};
/***/ }),
/***/ 46243:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = __nccwpck_require__(80900);
createDebug.destroy = destroy;
Object.keys(env).forEach(key => {
createDebug[key] = env[key];
});
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
let hash = 0;
for (let i = 0; i < namespace.length; i++) {
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
let prevTime;
let enableOverride = null;
let namespacesCache;
let enabledCache;
function debug(...args) {
// Disabled?
if (!debug.enabled) {
return;
}
const self = debug;
// Set `diff` timestamp
const curr = Number(new Date());
const ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
}
// Apply any `formatters` transformations
let index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return '%';
}
index++;
const formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
const val = args[index];
match = formatter.call(self, val);
// Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
});
// Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
const logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.useColors = createDebug.useColors();
debug.color = createDebug.selectColor(namespace);
debug.extend = extend;
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
Object.defineProperty(debug, 'enabled', {
enumerable: true,
configurable: false,
get: () => {
if (enableOverride !== null) {
return enableOverride;
}
if (namespacesCache !== createDebug.namespaces) {
namespacesCache = createDebug.namespaces;
enabledCache = createDebug.enabled(namespace);
}
return enabledCache;
},
set: v => {
enableOverride = v;
}
});
// Env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
return debug;
}
function extend(namespace, delimiter) {
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
newDebug.log = this.log;
return newDebug;
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
let i;
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
const len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
}
/**
* Disable debug output.
*
* @return {String} namespaces
* @api public
*/
function disable() {
const namespaces = [
...createDebug.names.map(toNamespace),
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
].join(',');
createDebug.enable('');
return namespaces;
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
let i;
let len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Convert regexp to namespace
*
* @param {RegExp} regxep
* @return {String} namespace
* @api private
*/
function toNamespace(regexp) {
return regexp.toString()
.substring(2, regexp.toString().length - 2)
.replace(/\.\*\?$/, '*');
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
/**
* XXX DO NOT USE. This is a temporary stub function.
* XXX It WILL be removed in the next major release.
*/
function destroy() {
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;
/***/ }),
/***/ 38237:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/**
* Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
module.exports = __nccwpck_require__(28222);
} else {
module.exports = __nccwpck_require__(35332);
}
/***/ }),
/***/ 35332:
/***/ ((module, exports, __nccwpck_require__) => {
/**
* Module dependencies.
*/
const tty = __nccwpck_require__(33867);
const util = __nccwpck_require__(31669);
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.destroy = util.deprecate(
() => {},
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
);
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
const supportsColor = __nccwpck_require__(59318);
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error) {
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
}
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(key => {
return /^debug_/i.test(key);
}).reduce((obj, key) => {
// Camel-case
const prop = key
.substring(6)
.toLowerCase()
.replace(/_([a-z])/g, (_, k) => {
return k.toUpperCase();
});
// Coerce string value into JS value
let val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ?
Boolean(exports.inspectOpts.colors) :
tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
const {namespace: name, useColors} = this;
if (useColors) {
const c = this.color;
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log(...args) {
return process.stderr.write(util.format(...args) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
const keys = Object.keys(exports.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = __nccwpck_require__(46243)(exports);
const {formatters} = module.exports;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(str => str.trim())
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};
/***/ }),
/***/ 64033:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const util_1 = __nccwpck_require__(31669);
const escodegen_1 = __nccwpck_require__(7991);
const esprima_1 = __nccwpck_require__(78823);
const ast_types_1 = __nccwpck_require__(27012);
const vm2_1 = __nccwpck_require__(69440);
/**
* Compiles sync JavaScript code into JavaScript with async Functions.
*
* @param {String} code JavaScript string to convert
* @param {Array} names Array of function names to add `await` operators to
* @return {String} Converted JavaScript string with async/await injected
* @api public
*/
function degenerator(code, _names) {
if (!Array.isArray(_names)) {
throw new TypeError('an array of async function "names" is required');
}
// Duplicate the `names` array since it's rude to augment the user args
const names = _names.slice(0);
const ast = esprima_1.parseScript(code);
// First pass is to find the `function` nodes and turn them into async or
// generator functions only if their body includes `CallExpressions` to
// function in `names`. We also add the names of the functions to the `names`
// array. We'll iterate several time, as every iteration might add new items
// to the `names` array, until no new names were added in the iteration.
let lastNamesLength = 0;
do {
lastNamesLength = names.length;
ast_types_1.visit(ast, {
visitVariableDeclaration(path) {
if (path.node.declarations) {
for (let i = 0; i < path.node.declarations.length; i++) {
const declaration = path.node.declarations[i];
if (ast_types_1.namedTypes.VariableDeclarator.check(declaration) &&
ast_types_1.namedTypes.Identifier.check(declaration.init) &&
ast_types_1.namedTypes.Identifier.check(declaration.id) &&
checkName(declaration.init.name, names) &&
!checkName(declaration.id.name, names)) {
names.push(declaration.id.name);
}
}
}
return false;
},
visitAssignmentExpression(path) {
if (ast_types_1.namedTypes.Identifier.check(path.node.left) &&
ast_types_1.namedTypes.Identifier.check(path.node.right) &&
checkName(path.node.right.name, names) &&
!checkName(path.node.left.name, names)) {
names.push(path.node.left.name);
}
return false;
},
visitFunction(path) {
if (path.node.id) {
let shouldDegenerate = false;
ast_types_1.visit(path.node, {
visitCallExpression(path) {
if (checkNames(path.node, names)) {
shouldDegenerate = true;
}
return false;
},
});
if (!shouldDegenerate) {
return false;
}
// Got a "function" expression/statement,
// convert it into an async function
path.node.async = true;
// Add function name to `names` array
if (!checkName(path.node.id.name, names)) {
names.push(path.node.id.name);
}
}
this.traverse(path);
},
});
} while (lastNamesLength !== names.length);
// Second pass is for adding `await`/`yield` statements to any function
// invocations that match the given `names` array.
ast_types_1.visit(ast, {
visitCallExpression(path) {
if (checkNames(path.node, names)) {
// A "function invocation" expression,
// we need to inject a `AwaitExpression`/`YieldExpression`
const delegate = false;
const { name, parent: { node: pNode }, } = path;
const expr = ast_types_1.builders.awaitExpression(path.node, delegate);
if (ast_types_1.namedTypes.CallExpression.check(pNode)) {
pNode.arguments[name] = expr;
}
else {
pNode[name] = expr;
}
}
this.traverse(path);
},
});
return escodegen_1.generate(ast);
}
(function (degenerator) {
function compile(code, returnName, names, options = {}) {
const compiled = degenerator(code, names);
const vm = new vm2_1.VM(options);
const script = new vm2_1.VMScript(`${compiled};${returnName}`, {
filename: options.filename,
});
const fn = vm.run(script);
if (typeof fn !== 'function') {
throw new Error(`Expected a "function" to be returned for \`${returnName}\`, but got "${typeof fn}"`);
}
const r = function (...args) {
var _a;
try {
const p = fn.apply(this, args);
if (typeof ((_a = p) === null || _a === void 0 ? void 0 : _a.then) === 'function') {
return p;
}
return Promise.resolve(p);
}
catch (err) {
return Promise.reject(err);
}
};
Object.defineProperty(r, 'toString', {
value: fn.toString.bind(fn),
enumerable: false,
});
return r;
}
degenerator.compile = compile;
})(degenerator || (degenerator = {}));
/**
* Returns `true` if `node` has a matching name to one of the entries in the
* `names` array.
*
* @param {types.Node} node
* @param {Array} names Array of function names to return true for
* @return {Boolean}
* @api private
*/
function checkNames({ callee }, names) {
let name;
if (ast_types_1.namedTypes.Identifier.check(callee)) {
name = callee.name;
}
else if (ast_types_1.namedTypes.MemberExpression.check(callee)) {
if (ast_types_1.namedTypes.Identifier.check(callee.object) &&
ast_types_1.namedTypes.Identifier.check(callee.property)) {
name = `${callee.object.name}.${callee.property.name}`;
}
else {
return false;
}
}
else if (ast_types_1.namedTypes.FunctionExpression.check(callee)) {
if (callee.id) {
name = callee.id.name;
}
else {
return false;
}
}
else {
throw new Error(`Don't know how to get name for: ${callee.type}`);
}
return checkName(name, names);
}
function checkName(name, names) {
// now that we have the `name`, check if any entries match in the `names` array
for (let i = 0; i < names.length; i++) {
const n = names[i];
if (util_1.isRegExp(n)) {
if (n.test(name)) {
return true;
}
}
else if (name === n) {
return true;
}
}
return false;
}
module.exports = degenerator;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 18883:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/*!
* depd
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module dependencies.
*/
var callSiteToString = __nccwpck_require__(69829).callSiteToString
var eventListenerCount = __nccwpck_require__(69829).eventListenerCount
var relative = __nccwpck_require__(85622).relative
/**
* Module exports.
*/
module.exports = depd
/**
* Get the path to base files on.
*/
var basePath = process.cwd()
/**
* Determine if namespace is contained in the string.
*/
function containsNamespace (str, namespace) {
var vals = str.split(/[ ,]+/)
var ns = String(namespace).toLowerCase()
for (var i = 0; i < vals.length; i++) {
var val = vals[i]
// namespace contained
if (val && (val === '*' || val.toLowerCase() === ns)) {
return true
}
}
return false
}
/**
* Convert a data descriptor to accessor descriptor.
*/
function convertDataDescriptorToAccessor (obj, prop, message) {
var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
var value = descriptor.value
descriptor.get = function getter () { return value }
if (descriptor.writable) {
descriptor.set = function setter (val) { return (value = val) }
}
delete descriptor.value
delete descriptor.writable
Object.defineProperty(obj, prop, descriptor)
return descriptor
}
/**
* Create arguments string to keep arity.
*/
function createArgumentsString (arity) {
var str = ''
for (var i = 0; i < arity; i++) {
str += ', arg' + i
}
return str.substr(2)
}
/**
* Create stack string from stack.
*/
function createStackString (stack) {
var str = this.name + ': ' + this.namespace
if (this.message) {
str += ' deprecated ' + this.message
}
for (var i = 0; i < stack.length; i++) {
str += '\n at ' + callSiteToString(stack[i])
}
return str
}
/**
* Create deprecate for namespace in caller.
*/
function depd (namespace) {
if (!namespace) {
throw new TypeError('argument namespace is required')
}
var stack = getStack()
var site = callSiteLocation(stack[1])
var file = site[0]
function deprecate (message) {
// call to self as log
log.call(deprecate, message)
}
deprecate._file = file
deprecate._ignored = isignored(namespace)
deprecate._namespace = namespace
deprecate._traced = istraced(namespace)
deprecate._warned = Object.create(null)
deprecate.function = wrapfunction
deprecate.property = wrapproperty
return deprecate
}
/**
* Determine if namespace is ignored.
*/
function isignored (namespace) {
/* istanbul ignore next: tested in a child processs */
if (process.noDeprecation) {
// --no-deprecation support
return true
}
var str = process.env.NO_DEPRECATION || ''
// namespace ignored
return containsNamespace(str, namespace)
}
/**
* Determine if namespace is traced.
*/
function istraced (namespace) {
/* istanbul ignore next: tested in a child processs */
if (process.traceDeprecation) {
// --trace-deprecation support
return true
}
var str = process.env.TRACE_DEPRECATION || ''
// namespace traced
return containsNamespace(str, namespace)
}
/**
* Display deprecation message.
*/
function log (message, site) {
var haslisteners = eventListenerCount(process, 'deprecation') !== 0
// abort early if no destination
if (!haslisteners && this._ignored) {
return
}
var caller
var callFile
var callSite
var depSite
var i = 0
var seen = false
var stack = getStack()
var file = this._file
if (site) {
// provided site
depSite = site
callSite = callSiteLocation(stack[1])
callSite.name = depSite.name
file = callSite[0]
} else {
// get call site
i = 2
depSite = callSiteLocation(stack[i])
callSite = depSite
}
// get caller of deprecated thing in relation to file
for (; i < stack.length; i++) {
caller = callSiteLocation(stack[i])
callFile = caller[0]
if (callFile === file) {
seen = true
} else if (callFile === this._file) {
file = this._file
} else if (seen) {
break
}
}
var key = caller
? depSite.join(':') + '__' + caller.join(':')
: undefined
if (key !== undefined && key in this._warned) {
// already warned
return
}
this._warned[key] = true
// generate automatic message from call site
var msg = message
if (!msg) {
msg = callSite === depSite || !callSite.name
? defaultMessage(depSite)
: defaultMessage(callSite)
}
// emit deprecation if listeners exist
if (haslisteners) {
var err = DeprecationError(this._namespace, msg, stack.slice(i))
process.emit('deprecation', err)
return
}
// format and write message
var format = process.stderr.isTTY
? formatColor
: formatPlain
var output = format.call(this, msg, caller, stack.slice(i))
process.stderr.write(output + '\n', 'utf8')
}
/**
* Get call site location as array.
*/
function callSiteLocation (callSite) {
var file = callSite.getFileName() || '<anonymous>'
var line = callSite.getLineNumber()
var colm = callSite.getColumnNumber()
if (callSite.isEval()) {
file = callSite.getEvalOrigin() + ', ' + file
}
var site = [file, line, colm]
site.callSite = callSite
site.name = callSite.getFunctionName()
return site
}
/**
* Generate a default message from the site.
*/
function defaultMessage (site) {
var callSite = site.callSite
var funcName = site.name
// make useful anonymous name
if (!funcName) {
funcName = '<anonymous@' + formatLocation(site) + '>'
}
var context = callSite.getThis()
var typeName = context && callSite.getTypeName()
// ignore useless type name
if (typeName === 'Object') {
typeName = undefined
}
// make useful type name
if (typeName === 'Function') {
typeName = context.name || typeName
}
return typeName && callSite.getMethodName()
? typeName + '.' + funcName
: funcName
}
/**
* Format deprecation message without color.
*/
function formatPlain (msg, caller, stack) {
var timestamp = new Date().toUTCString()
var formatted = timestamp +
' ' + this._namespace +
' deprecated ' + msg
// add stack trace
if (this._traced) {
for (var i = 0; i < stack.length; i++) {
formatted += '\n at ' + callSiteToString(stack[i])
}
return formatted
}
if (caller) {
formatted += ' at ' + formatLocation(caller)
}
return formatted
}
/**
* Format deprecation message with color.
*/
function formatColor (msg, caller, stack) {
var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan
' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow
' \x1b[0m' + msg + '\x1b[39m' // reset
// add stack trace
if (this._traced) {
for (var i = 0; i < stack.length; i++) {
formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
}
return formatted
}
if (caller) {
formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
}
return formatted
}
/**
* Format call site location.
*/
function formatLocation (callSite) {
return relative(basePath, callSite[0]) +
':' + callSite[1] +
':' + callSite[2]
}
/**
* Get the stack as array of call sites.
*/
function getStack () {
var limit = Error.stackTraceLimit
var obj = {}
var prep = Error.prepareStackTrace
Error.prepareStackTrace = prepareObjectStackTrace
Error.stackTraceLimit = Math.max(10, limit)
// capture the stack
Error.captureStackTrace(obj)
// slice this function off the top
var stack = obj.stack.slice(1)
Error.prepareStackTrace = prep
Error.stackTraceLimit = limit
return stack
}
/**
* Capture call site stack from v8.
*/
function prepareObjectStackTrace (obj, stack) {
return stack
}
/**
* Return a wrapped function in a deprecation message.
*/
function wrapfunction (fn, message) {
if (typeof fn !== 'function') {
throw new TypeError('argument fn must be a function')
}
var args = createArgumentsString(fn.length)
var deprecate = this // eslint-disable-line no-unused-vars
var stack = getStack()
var site = callSiteLocation(stack[1])
site.name = fn.name
// eslint-disable-next-line no-eval
var deprecatedfn = eval('(function (' + args + ') {\n' +
'"use strict"\n' +
'log.call(deprecate, message, site)\n' +
'return fn.apply(this, arguments)\n' +
'})')
return deprecatedfn
}
/**
* Wrap property in a deprecation message.
*/
function wrapproperty (obj, prop, message) {
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
throw new TypeError('argument obj must be object')
}
var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
if (!descriptor) {
throw new TypeError('must call property on owner object')
}
if (!descriptor.configurable) {
throw new TypeError('property must be configurable')
}
var deprecate = this
var stack = getStack()
var site = callSiteLocation(stack[1])
// set site name
site.name = prop
// convert data descriptor
if ('value' in descriptor) {
descriptor = convertDataDescriptorToAccessor(obj, prop, message)
}
var get = descriptor.get
var set = descriptor.set
// wrap getter
if (typeof get === 'function') {
descriptor.get = function getter () {
log.call(deprecate, message, site)
return get.apply(this, arguments)
}
}
// wrap setter
if (typeof set === 'function') {
descriptor.set = function setter () {
log.call(deprecate, message, site)
return set.apply(this, arguments)
}
}
Object.defineProperty(obj, prop, descriptor)
}
/**
* Create DeprecationError for deprecation
*/
function DeprecationError (namespace, message, stack) {
var error = new Error()
var stackString
Object.defineProperty(error, 'constructor', {
value: DeprecationError
})
Object.defineProperty(error, 'message', {
configurable: true,
enumerable: false,
value: message,
writable: true
})
Object.defineProperty(error, 'name', {
enumerable: false,
configurable: true,
value: 'DeprecationError',
writable: true
})
Object.defineProperty(error, 'namespace', {
configurable: true,
enumerable: false,
value: namespace,
writable: true
})
Object.defineProperty(error, 'stack', {
configurable: true,
enumerable: false,
get: function () {
if (stackString !== undefined) {
return stackString
}
// prepare stack trace
return (stackString = createStackString.call(this, stack))
},
set: function setter (val) {
stackString = val
}
})
return error
}
/***/ }),
/***/ 35554:
/***/ ((module) => {
"use strict";
/*!
* depd
* Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module exports.
*/
module.exports = callSiteToString
/**
* Format a CallSite file location to a string.
*/
function callSiteFileLocation (callSite) {
var fileName
var fileLocation = ''
if (callSite.isNative()) {
fileLocation = 'native'
} else if (callSite.isEval()) {
fileName = callSite.getScriptNameOrSourceURL()
if (!fileName) {
fileLocation = callSite.getEvalOrigin()
}
} else {
fileName = callSite.getFileName()
}
if (fileName) {
fileLocation += fileName
var lineNumber = callSite.getLineNumber()
if (lineNumber != null) {
fileLocation += ':' + lineNumber
var columnNumber = callSite.getColumnNumber()
if (columnNumber) {
fileLocation += ':' + columnNumber
}
}
}
return fileLocation || 'unknown source'
}
/**
* Format a CallSite to a string.
*/
function callSiteToString (callSite) {
var addSuffix = true
var fileLocation = callSiteFileLocation(callSite)
var functionName = callSite.getFunctionName()
var isConstructor = callSite.isConstructor()
var isMethodCall = !(callSite.isToplevel() || isConstructor)
var line = ''
if (isMethodCall) {
var methodName = callSite.getMethodName()
var typeName = getConstructorName(callSite)
if (functionName) {
if (typeName && functionName.indexOf(typeName) !== 0) {
line += typeName + '.'
}
line += functionName
if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
line += ' [as ' + methodName + ']'
}
} else {
line += typeName + '.' + (methodName || '<anonymous>')
}
} else if (isConstructor) {
line += 'new ' + (functionName || '<anonymous>')
} else if (functionName) {
line += functionName
} else {
addSuffix = false
line += fileLocation
}
if (addSuffix) {
line += ' (' + fileLocation + ')'
}
return line
}
/**
* Get constructor name of reviver.
*/
function getConstructorName (obj) {
var receiver = obj.receiver
return (receiver.constructor && receiver.constructor.name) || null
}
/***/ }),
/***/ 12078:
/***/ ((module) => {
"use strict";
/*!
* depd
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = eventListenerCount
/**
* Get the count of listeners on an event emitter of a specific type.
*/
function eventListenerCount (emitter, type) {
return emitter.listeners(type).length
}
/***/ }),
/***/ 69829:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
/*!
* depd
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module dependencies.
* @private
*/
var EventEmitter = __nccwpck_require__(28614).EventEmitter
/**
* Module exports.
* @public
*/
lazyProperty(module.exports, 'callSiteToString', function callSiteToString () {
var limit = Error.stackTraceLimit
var obj = {}
var prep = Error.prepareStackTrace
function prepareObjectStackTrace (obj, stack) {
return stack
}
Error.prepareStackTrace = prepareObjectStackTrace
Error.stackTraceLimit = 2
// capture the stack
Error.captureStackTrace(obj)
// slice the stack
var stack = obj.stack.slice()
Error.prepareStackTrace = prep
Error.stackTraceLimit = limit
return stack[0].toString ? toString : __nccwpck_require__(35554)
})
lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () {
return EventEmitter.listenerCount || __nccwpck_require__(12078)
})
/**
* Define a lazy property.
*/
function lazyProperty (obj, prop, getter) {
function get () {
var val = getter()
Object.defineProperty(obj, prop, {
configurable: true,
enumerable: true,
value: val
})
return val
}
Object.defineProperty(obj, prop, {
configurable: true,
enumerable: true,
get: get
})
}
/**
* Call toString() on the obj
*/
function toString (obj) {
return obj.toString()
}
/***/ }),
/***/ 85107:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;
var entities_json_1 = __importDefault(__nccwpck_require__(84007));
var legacy_json_1 = __importDefault(__nccwpck_require__(17802));
var xml_json_1 = __importDefault(__nccwpck_require__(2228));
var decode_codepoint_1 = __importDefault(__nccwpck_require__(31227));
var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
exports.decodeXML = getStrictDecoder(xml_json_1.default);
exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);
function getStrictDecoder(map) {
var replace = getReplacer(map);
return function (str) { return String(str).replace(strictEntityRe, replace); };
}
var sorter = function (a, b) { return (a < b ? 1 : -1); };
exports.decodeHTML = (function () {
var legacy = Object.keys(legacy_json_1.default).sort(sorter);
var keys = Object.keys(entities_json_1.default).sort(sorter);
for (var i = 0, j = 0; i < keys.length; i++) {
if (legacy[j] === keys[i]) {
keys[i] += ";?";
j++;
}
else {
keys[i] += ";";
}
}
var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g");
var replace = getReplacer(entities_json_1.default);
function replacer(str) {
if (str.substr(-1) !== ";")
str += ";";
return replace(str);
}
// TODO consider creating a merged map
return function (str) { return String(str).replace(re, replacer); };
})();
function getReplacer(map) {
return function replace(str) {
if (str.charAt(1) === "#") {
var secondChar = str.charAt(2);
if (secondChar === "X" || secondChar === "x") {
return decode_codepoint_1.default(parseInt(str.substr(3), 16));
}
return decode_codepoint_1.default(parseInt(str.substr(2), 10));
}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
return map[str.slice(1, -1)] || str;
};
}
/***/ }),
/***/ 31227:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var decode_json_1 = __importDefault(__nccwpck_require__(14589));
// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
var fromCodePoint =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
String.fromCodePoint ||
function (codePoint) {
var output = "";
if (codePoint > 0xffff) {
codePoint -= 0x10000;
output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);
codePoint = 0xdc00 | (codePoint & 0x3ff);
}
output += String.fromCharCode(codePoint);
return output;
};
function decodeCodePoint(codePoint) {
if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
return "\uFFFD";
}
if (codePoint in decode_json_1.default) {
codePoint = decode_json_1.default[codePoint];
}
return fromCodePoint(codePoint);
}
exports.default = decodeCodePoint;
/***/ }),
/***/ 2006:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;
var xml_json_1 = __importDefault(__nccwpck_require__(2228));
var inverseXML = getInverseObj(xml_json_1.default);
var xmlReplacer = getInverseReplacer(inverseXML);
/**
* Encodes all non-ASCII characters, as well as characters not valid in XML
* documents using XML entities.
*
* If a character has no equivalent entity, a
* numeric hexadecimal reference (eg. `&#xfc;`) will be used.
*/
exports.encodeXML = getASCIIEncoder(inverseXML);
var entities_json_1 = __importDefault(__nccwpck_require__(84007));
var inverseHTML = getInverseObj(entities_json_1.default);
var htmlReplacer = getInverseReplacer(inverseHTML);
/**
* Encodes all entities and non-ASCII characters in the input.
*
* This includes characters that are valid ASCII characters in HTML documents.
* For example `#` will be encoded as `&num;`. To get a more compact output,
* consider using the `encodeNonAsciiHTML` function.
*
* If a character has no equivalent entity, a
* numeric hexadecimal reference (eg. `&#xfc;`) will be used.
*/
exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities.
*
* If a character has no equivalent entity, a
* numeric hexadecimal reference (eg. `&#xfc;`) will be used.
*/
exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);
function getInverseObj(obj) {
return Object.keys(obj)
.sort()
.reduce(function (inverse, name) {
inverse[obj[name]] = "&" + name + ";";
return inverse;
}, {});
}
function getInverseReplacer(inverse) {
var single = [];
var multiple = [];
for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {
var k = _a[_i];
if (k.length === 1) {
// Add value to single array
single.push("\\" + k);
}
else {
// Add value to multiple array
multiple.push(k);
}
}
// Add ranges to single characters.
single.sort();
for (var start = 0; start < single.length - 1; start++) {
// Find the end of a run of characters
var end = start;
while (end < single.length - 1 &&
single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {
end += 1;
}
var count = 1 + end - start;
// We want to replace at least three characters
if (count < 3)
continue;
single.splice(start, count, single[start] + "-" + single[end]);
}
multiple.unshift("[" + single.join("") + "]");
return new RegExp(multiple.join("|"), "g");
}
// /[^\0-\x7F]/gu
var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g;
var getCodePoint =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
String.prototype.codePointAt != null
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
function (str) { return str.codePointAt(0); }
: // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
function (c) {
return (c.charCodeAt(0) - 0xd800) * 0x400 +
c.charCodeAt(1) -
0xdc00 +
0x10000;
};
function singleCharReplacer(c) {
return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))
.toString(16)
.toUpperCase() + ";";
}
function getInverse(inverse, re) {
return function (data) {
return data
.replace(re, function (name) { return inverse[name]; })
.replace(reNonASCII, singleCharReplacer);
};
}
var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g");
/**
* Encodes all non-ASCII characters, as well as characters not valid in XML
* documents using numeric hexadecimal reference (eg. `&#xfc;`).
*
* Have a look at `escapeUTF8` if you want a more concise output at the expense
* of reduced transportability.
*
* @param data String to escape.
*/
function escape(data) {
return data.replace(reEscapeChars, singleCharReplacer);
}
exports.escape = escape;
/**
* Encodes all characters not valid in XML documents using numeric hexadecimal
* reference (eg. `&#xfc;`).
*
* Note that the output will be character-set dependent.
*
* @param data String to escape.
*/
function escapeUTF8(data) {
return data.replace(xmlReplacer, singleCharReplacer);
}
exports.escapeUTF8 = escapeUTF8;
function getASCIIEncoder(obj) {
return function (data) {
return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });
};
}
/***/ }),
/***/ 3000:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
var decode_1 = __nccwpck_require__(85107);
var encode_1 = __nccwpck_require__(2006);
/**
* Decodes a string with entities.
*
* @param data String to decode.
* @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.
* @deprecated Use `decodeXML` or `decodeHTML` directly.
*/
function decode(data, level) {
return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
}
exports.decode = decode;
/**
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
*
* @param data String to decode.
* @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.
* @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.
*/
function decodeStrict(data, level) {
return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
}
exports.decodeStrict = decodeStrict;
/**
* Encodes a string with entities.
*
* @param data String to encode.
* @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.
* @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.
*/
function encode(data, level) {
return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
}
exports.encode = encode;
var encode_2 = __nccwpck_require__(2006);
Object.defineProperty(exports, "encodeXML", ({ enumerable: true, get: function () { return encode_2.encodeXML; } }));
Object.defineProperty(exports, "encodeHTML", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } }));
Object.defineProperty(exports, "encodeNonAsciiHTML", ({ enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } }));
Object.defineProperty(exports, "escape", ({ enumerable: true, get: function () { return encode_2.escape; } }));
Object.defineProperty(exports, "escapeUTF8", ({ enumerable: true, get: function () { return encode_2.escapeUTF8; } }));
// Legacy aliases (deprecated)
Object.defineProperty(exports, "encodeHTML4", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } }));
Object.defineProperty(exports, "encodeHTML5", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } }));
var decode_2 = __nccwpck_require__(85107);
Object.defineProperty(exports, "decodeXML", ({ enumerable: true, get: function () { return decode_2.decodeXML; } }));
Object.defineProperty(exports, "decodeHTML", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } }));
Object.defineProperty(exports, "decodeHTMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } }));
// Legacy aliases (deprecated)
Object.defineProperty(exports, "decodeHTML4", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } }));
Object.defineProperty(exports, "decodeHTML5", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } }));
Object.defineProperty(exports, "decodeHTML4Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } }));
Object.defineProperty(exports, "decodeHTML5Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } }));
Object.defineProperty(exports, "decodeXMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeXML; } }));
/***/ }),
/***/ 7991:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/*
Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2015 Ingvar Stepanyan <me@rreverser.com>
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
Copyright (C) 2012-2013 Michael Ficarra <escodegen.copyright@michael.ficarra.me>
Copyright (C) 2012-2013 Mathias Bynens <mathias@qiwi.be>
Copyright (C) 2013 Irakli Gozalishvili <rfobic@gmail.com>
Copyright (C) 2012 Robert Gust-Bardon <donate@robert.gust-bardon.org>
Copyright (C) 2012 John Freeman <jfreeman08@gmail.com>
Copyright (C) 2011-2012 Ariya Hidayat <ariya.hidayat@gmail.com>
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*global exports:true, require:true, global:true*/
(function () {
'use strict';
var Syntax,
Precedence,
BinaryPrecedence,
SourceNode,
estraverse,
esutils,
base,
indent,
json,
renumber,
hexadecimal,
quotes,
escapeless,
newline,
space,
parentheses,
semicolons,
safeConcatenation,
directive,
extra,
parse,
sourceMap,
sourceCode,
preserveBlankLines,
FORMAT_MINIFY,
FORMAT_DEFAULTS;
estraverse = __nccwpck_require__(23479);
esutils = __nccwpck_require__(94038);
Syntax = estraverse.Syntax;
// Generation is done by generateExpression.
function isExpression(node) {
return CodeGenerator.Expression.hasOwnProperty(node.type);
}
// Generation is done by generateStatement.
function isStatement(node) {
return CodeGenerator.Statement.hasOwnProperty(node.type);
}
Precedence = {
Sequence: 0,
Yield: 1,
Assignment: 1,
Conditional: 2,
ArrowFunction: 2,
LogicalOR: 3,
LogicalAND: 4,
BitwiseOR: 5,
BitwiseXOR: 6,
BitwiseAND: 7,
Equality: 8,
Relational: 9,
BitwiseSHIFT: 10,
Additive: 11,
Multiplicative: 12,
Exponentiation: 13,
Await: 14,
Unary: 14,
Postfix: 15,
Call: 16,
New: 17,
TaggedTemplate: 18,
Member: 19,
Primary: 20
};
BinaryPrecedence = {
'||': Precedence.LogicalOR,
'&&': Precedence.LogicalAND,
'|': Precedence.BitwiseOR,
'^': Precedence.BitwiseXOR,
'&': Precedence.BitwiseAND,
'==': Precedence.Equality,
'!=': Precedence.Equality,
'===': Precedence.Equality,
'!==': Precedence.Equality,
'is': Precedence.Equality,
'isnt': Precedence.Equality,
'<': Precedence.Relational,
'>': Precedence.Relational,
'<=': Precedence.Relational,
'>=': Precedence.Relational,
'in': Precedence.Relational,
'instanceof': Precedence.Relational,
'<<': Precedence.BitwiseSHIFT,
'>>': Precedence.BitwiseSHIFT,
'>>>': Precedence.BitwiseSHIFT,
'+': Precedence.Additive,
'-': Precedence.Additive,
'*': Precedence.Multiplicative,
'%': Precedence.Multiplicative,
'/': Precedence.Multiplicative,
'**': Precedence.Exponentiation
};
//Flags
var F_ALLOW_IN = 1,
F_ALLOW_CALL = 1 << 1,
F_ALLOW_UNPARATH_NEW = 1 << 2,
F_FUNC_BODY = 1 << 3,
F_DIRECTIVE_CTX = 1 << 4,
F_SEMICOLON_OPT = 1 << 5;
//Expression flag sets
//NOTE: Flag order:
// F_ALLOW_IN
// F_ALLOW_CALL
// F_ALLOW_UNPARATH_NEW
var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW,
E_TTF = F_ALLOW_IN | F_ALLOW_CALL,
E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW,
E_TFF = F_ALLOW_IN,
E_FFT = F_ALLOW_UNPARATH_NEW,
E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW;
//Statement flag sets
//NOTE: Flag order:
// F_ALLOW_IN
// F_FUNC_BODY
// F_DIRECTIVE_CTX
// F_SEMICOLON_OPT
var S_TFFF = F_ALLOW_IN,
S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT,
S_FFFF = 0x00,
S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX,
S_TTFF = F_ALLOW_IN | F_FUNC_BODY;
function getDefaultOptions() {
// default options
return {
indent: null,
base: null,
parse: null,
comment: false,
format: {
indent: {
style: ' ',
base: 0,
adjustMultilineComment: false
},
newline: '\n',
space: ' ',
json: false,
renumber: false,
hexadecimal: false,
quotes: 'single',
escapeless: false,
compact: false,
parentheses: true,
semicolons: true,
safeConcatenation: false,
preserveBlankLines: false
},
moz: {
comprehensionExpressionStartsWithAssignment: false,
starlessGenerator: false
},
sourceMap: null,
sourceMapRoot: null,
sourceMapWithCode: false,
directive: false,
raw: true,
verbatim: null,
sourceCode: null
};
}
function stringRepeat(str, num) {
var result = '';
for (num |= 0; num > 0; num >>>= 1, str += str) {
if (num & 1) {
result += str;
}
}
return result;
}
function hasLineTerminator(str) {
return (/[\r\n]/g).test(str);
}
function endsWithLineTerminator(str) {
var len = str.length;
return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1));
}
function merge(target, override) {
var key;
for (key in override) {
if (override.hasOwnProperty(key)) {
target[key] = override[key];
}
}
return target;
}
function updateDeeply(target, override) {
var key, val;
function isHashObject(target) {
return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp);
}
for (key in override) {
if (override.hasOwnProperty(key)) {
val = override[key];
if (isHashObject(val)) {
if (isHashObject(target[key])) {
updateDeeply(target[key], val);
} else {
target[key] = updateDeeply({}, val);
}
} else {
target[key] = val;
}
}
}
return target;
}
function generateNumber(value) {
var result, point, temp, exponent, pos;
if (value !== value) {
throw new Error('Numeric literal whose value is NaN');
}
if (value < 0 || (value === 0 && 1 / value < 0)) {
throw new Error('Numeric literal whose value is negative');
}
if (value === 1 / 0) {
return json ? 'null' : renumber ? '1e400' : '1e+400';
}
result = '' + value;
if (!renumber || result.length < 3) {
return result;
}
point = result.indexOf('.');
if (!json && result.charCodeAt(0) === 0x30 /* 0 */ && point === 1) {
point = 0;
result = result.slice(1);
}
temp = result;
result = result.replace('e+', 'e');
exponent = 0;
if ((pos = temp.indexOf('e')) > 0) {
exponent = +temp.slice(pos + 1);
temp = temp.slice(0, pos);
}
if (point >= 0) {
exponent -= temp.length - point - 1;
temp = +(temp.slice(0, point) + temp.slice(point + 1)) + '';
}
pos = 0;
while (temp.charCodeAt(temp.length + pos - 1) === 0x30 /* 0 */) {
--pos;
}
if (pos !== 0) {
exponent -= pos;
temp = temp.slice(0, pos);
}
if (exponent !== 0) {
temp += 'e' + exponent;
}
if ((temp.length < result.length ||
(hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) &&
+temp === value) {
result = temp;
}
return result;
}
// Generate valid RegExp expression.
// This function is based on https://github.com/Constellation/iv Engine
function escapeRegExpCharacter(ch, previousIsBackslash) {
// not handling '\' and handling \u2028 or \u2029 to unicode escape sequence
if ((ch & ~1) === 0x2028) {
return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029');
} else if (ch === 10 || ch === 13) { // \n, \r
return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r');
}
return String.fromCharCode(ch);
}
function generateRegExp(reg) {
var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
result = reg.toString();
if (reg.source) {
// extract flag from toString result
match = result.match(/\/([^/]*)$/);
if (!match) {
return result;
}
flags = match[1];
result = '';
characterInBrack = false;
previousIsBackslash = false;
for (i = 0, iz = reg.source.length; i < iz; ++i) {
ch = reg.source.charCodeAt(i);
if (!previousIsBackslash) {
if (characterInBrack) {
if (ch === 93) { // ]
characterInBrack = false;
}
} else {
if (ch === 47) { // /
result += '\\';
} else if (ch === 91) { // [
characterInBrack = true;
}
}
result += escapeRegExpCharacter(ch, previousIsBackslash);
previousIsBackslash = ch === 92; // \
} else {
// if new RegExp("\\\n') is provided, create /\n/
result += escapeRegExpCharacter(ch, previousIsBackslash);
// prevent like /\\[/]/
previousIsBackslash = false;
}
}
return '/' + result + '/' + flags;
}
return result;
}
function escapeAllowedCharacter(code, next) {
var hex;
if (code === 0x08 /* \b */) {
return '\\b';
}
if (code === 0x0C /* \f */) {
return '\\f';
}
if (code === 0x09 /* \t */) {
return '\\t';
}
hex = code.toString(16).toUpperCase();
if (json || code > 0xFF) {
return '\\u' + '0000'.slice(hex.length) + hex;
} else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) {
return '\\0';
} else if (code === 0x000B /* \v */) { // '\v'
return '\\x0B';
} else {
return '\\x' + '00'.slice(hex.length) + hex;
}
}
function escapeDisallowedCharacter(code) {
if (code === 0x5C /* \ */) {
return '\\\\';
}
if (code === 0x0A /* \n */) {
return '\\n';
}
if (code === 0x0D /* \r */) {
return '\\r';
}
if (code === 0x2028) {
return '\\u2028';
}
if (code === 0x2029) {
return '\\u2029';
}
throw new Error('Incorrectly classified character');
}
function escapeDirective(str) {
var i, iz, code, quote;
quote = quotes === 'double' ? '"' : '\'';
for (i = 0, iz = str.length; i < iz; ++i) {
code = str.charCodeAt(i);
if (code === 0x27 /* ' */) {
quote = '"';
break;
} else if (code === 0x22 /* " */) {
quote = '\'';
break;
} else if (code === 0x5C /* \ */) {
++i;
}
}
return quote + str + quote;
}
function escapeString(str) {
var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote;
for (i = 0, len = str.length; i < len; ++i) {
code = str.charCodeAt(i);
if (code === 0x27 /* ' */) {
++singleQuotes;
} else if (code === 0x22 /* " */) {
++doubleQuotes;
} else if (code === 0x2F /* / */ && json) {
result += '\\';
} else if (esutils.code.isLineTerminator(code) || code === 0x5C /* \ */) {
result += escapeDisallowedCharacter(code);
continue;
} else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 0x20 /* SP */ || !json && !escapeless && (code < 0x20 /* SP */ || code > 0x7E /* ~ */))) {
result += escapeAllowedCharacter(code, str.charCodeAt(i + 1));
continue;
}
result += String.fromCharCode(code);
}
single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes));
quote = single ? '\'' : '"';
if (!(single ? singleQuotes : doubleQuotes)) {
return quote + result + quote;
}
str = result;
result = quote;
for (i = 0, len = str.length; i < len; ++i) {
code = str.charCodeAt(i);
if ((code === 0x27 /* ' */ && single) || (code === 0x22 /* " */ && !single)) {
result += '\\';
}
result += String.fromCharCode(code);
}
return result + quote;
}
/**
* flatten an array to a string, where the array can contain
* either strings or nested arrays
*/
function flattenToString(arr) {
var i, iz, elem, result = '';
for (i = 0, iz = arr.length; i < iz; ++i) {
elem = arr[i];
result += Array.isArray(elem) ? flattenToString(elem) : elem;
}
return result;
}
/**
* convert generated to a SourceNode when source maps are enabled.
*/
function toSourceNodeWhenNeeded(generated, node) {
if (!sourceMap) {
// with no source maps, generated is either an
// array or a string. if an array, flatten it.
// if a string, just return it
if (Array.isArray(generated)) {
return flattenToString(generated);
} else {
return generated;
}
}
if (node == null) {
if (generated instanceof SourceNode) {
return generated;
} else {
node = {};
}
}
if (node.loc == null) {
return new SourceNode(null, null, sourceMap, generated, node.name || null);
}
return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated, node.name || null);
}
function noEmptySpace() {
return (space) ? space : ' ';
}
function join(left, right) {
var leftSource,
rightSource,
leftCharCode,
rightCharCode;
leftSource = toSourceNodeWhenNeeded(left).toString();
if (leftSource.length === 0) {
return [right];
}
rightSource = toSourceNodeWhenNeeded(right).toString();
if (rightSource.length === 0) {
return [left];
}
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
rightCharCode = rightSource.charCodeAt(0);
if ((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode ||
esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) ||
leftCharCode === 0x2F /* / */ && rightCharCode === 0x69 /* i */) { // infix word operators all start with `i`
return [left, noEmptySpace(), right];
} else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) ||
esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) {
return [left, right];
}
return [left, space, right];
}
function addIndent(stmt) {
return [base, stmt];
}
function withIndent(fn) {
var previousBase;
previousBase = base;
base += indent;
fn(base);
base = previousBase;
}
function calculateSpaces(str) {
var i;
for (i = str.length - 1; i >= 0; --i) {
if (esutils.code.isLineTerminator(str.charCodeAt(i))) {
break;
}
}
return (str.length - 1) - i;
}
function adjustMultilineComment(value, specialBase) {
var array, i, len, line, j, spaces, previousBase, sn;
array = value.split(/\r\n|[\r\n]/);
spaces = Number.MAX_VALUE;
// first line doesn't have indentation
for (i = 1, len = array.length; i < len; ++i) {
line = array[i];
j = 0;
while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) {
++j;
}
if (spaces > j) {
spaces = j;
}
}
if (typeof specialBase !== 'undefined') {
// pattern like
// {
// var t = 20; /*
// * this is comment
// */
// }
previousBase = base;
if (array[1][spaces] === '*') {
specialBase += ' ';
}
base = specialBase;
} else {
if (spaces & 1) {
// /*
// *
// */
// If spaces are odd number, above pattern is considered.
// We waste 1 space.
--spaces;
}
previousBase = base;
}
for (i = 1, len = array.length; i < len; ++i) {
sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces)));
array[i] = sourceMap ? sn.join('') : sn;
}
base = previousBase;
return array.join('\n');
}
function generateComment(comment, specialBase) {
if (comment.type === 'Line') {
if (endsWithLineTerminator(comment.value)) {
return '//' + comment.value;
} else {
// Always use LineTerminator
var result = '//' + comment.value;
if (!preserveBlankLines) {
result += '\n';
}
return result;
}
}
if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) {
return adjustMultilineComment('/*' + comment.value + '*/', specialBase);
}
return '/*' + comment.value + '*/';
}
function addComments(stmt, result) {
var i, len, comment, save, tailingToStatement, specialBase, fragment,
extRange, range, prevRange, prefix, infix, suffix, count;
if (stmt.leadingComments && stmt.leadingComments.length > 0) {
save = result;
if (preserveBlankLines) {
comment = stmt.leadingComments[0];
result = [];
extRange = comment.extendedRange;
range = comment.range;
prefix = sourceCode.substring(extRange[0], range[0]);
count = (prefix.match(/\n/g) || []).length;
if (count > 0) {
result.push(stringRepeat('\n', count));
result.push(addIndent(generateComment(comment)));
} else {
result.push(prefix);
result.push(generateComment(comment));
}
prevRange = range;
for (i = 1, len = stmt.leadingComments.length; i < len; i++) {
comment = stmt.leadingComments[i];
range = comment.range;
infix = sourceCode.substring(prevRange[1], range[0]);
count = (infix.match(/\n/g) || []).length;
result.push(stringRepeat('\n', count));
result.push(addIndent(generateComment(comment)));
prevRange = range;
}
suffix = sourceCode.substring(range[1], extRange[1]);
count = (suffix.match(/\n/g) || []).length;
result.push(stringRepeat('\n', count));
} else {
comment = stmt.leadingComments[0];
result = [];
if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) {
result.push('\n');
}
result.push(generateComment(comment));
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push('\n');
}
for (i = 1, len = stmt.leadingComments.length; i < len; ++i) {
comment = stmt.leadingComments[i];
fragment = [generateComment(comment)];
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
fragment.push('\n');
}
result.push(addIndent(fragment));
}
}
result.push(addIndent(save));
}
if (stmt.trailingComments) {
if (preserveBlankLines) {
comment = stmt.trailingComments[0];
extRange = comment.extendedRange;
range = comment.range;
prefix = sourceCode.substring(extRange[0], range[0]);
count = (prefix.match(/\n/g) || []).length;
if (count > 0) {
result.push(stringRepeat('\n', count));
result.push(addIndent(generateComment(comment)));
} else {
result.push(prefix);
result.push(generateComment(comment));
}
} else {
tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString()));
for (i = 0, len = stmt.trailingComments.length; i < len; ++i) {
comment = stmt.trailingComments[i];
if (tailingToStatement) {
// We assume target like following script
//
// var t = 20; /**
// * This is comment of t
// */
if (i === 0) {
// first case
result = [result, indent];
} else {
result = [result, specialBase];
}
result.push(generateComment(comment, specialBase));
} else {
result = [result, addIndent(generateComment(comment))];
}
if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result = [result, '\n'];
}
}
}
}
return result;
}
function generateBlankLines(start, end, result) {
var j, newlineCount = 0;
for (j = start; j < end; j++) {
if (sourceCode[j] === '\n') {
newlineCount++;
}
}
for (j = 1; j < newlineCount; j++) {
result.push(newline);
}
}
function parenthesize(text, current, should) {
if (current < should) {
return ['(', text, ')'];
}
return text;
}
function generateVerbatimString(string) {
var i, iz, result;
result = string.split(/\r\n|\n/);
for (i = 1, iz = result.length; i < iz; i++) {
result[i] = newline + base + result[i];
}
return result;
}
function generateVerbatim(expr, precedence) {
var verbatim, result, prec;
verbatim = expr[extra.verbatim];
if (typeof verbatim === 'string') {
result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence);
} else {
// verbatim is object
result = generateVerbatimString(verbatim.content);
prec = (verbatim.precedence != null) ? verbatim.precedence : Precedence.Sequence;
result = parenthesize(result, prec, precedence);
}
return toSourceNodeWhenNeeded(result, expr);
}
function CodeGenerator() {
}
// Helpers.
CodeGenerator.prototype.maybeBlock = function(stmt, flags) {
var result, noLeadingComment, that = this;
noLeadingComment = !extra.comment || !stmt.leadingComments;
if (stmt.type === Syntax.BlockStatement && noLeadingComment) {
return [space, this.generateStatement(stmt, flags)];
}
if (stmt.type === Syntax.EmptyStatement && noLeadingComment) {
return ';';
}
withIndent(function () {
result = [
newline,
addIndent(that.generateStatement(stmt, flags))
];
});
return result;
};
CodeGenerator.prototype.maybeBlockSuffix = function (stmt, result) {
var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) {
return [result, space];
}
if (ends) {
return [result, base];
}
return [result, newline, base];
};
function generateIdentifier(node) {
return toSourceNodeWhenNeeded(node.name, node);
}
function generateAsyncPrefix(node, spaceRequired) {
return node.async ? 'async' + (spaceRequired ? noEmptySpace() : space) : '';
}
function generateStarSuffix(node) {
var isGenerator = node.generator && !extra.moz.starlessGenerator;
return isGenerator ? '*' + space : '';
}
function generateMethodPrefix(prop) {
var func = prop.value, prefix = '';
if (func.async) {
prefix += generateAsyncPrefix(func, !prop.computed);
}
if (func.generator) {
// avoid space before method name
prefix += generateStarSuffix(func) ? '*' : '';
}
return prefix;
}
CodeGenerator.prototype.generatePattern = function (node, precedence, flags) {
if (node.type === Syntax.Identifier) {
return generateIdentifier(node);
}
return this.generateExpression(node, precedence, flags);
};
CodeGenerator.prototype.generateFunctionParams = function (node) {
var i, iz, result, hasDefault;
hasDefault = false;
if (node.type === Syntax.ArrowFunctionExpression &&
!node.rest && (!node.defaults || node.defaults.length === 0) &&
node.params.length === 1 && node.params[0].type === Syntax.Identifier) {
// arg => { } case
result = [generateAsyncPrefix(node, true), generateIdentifier(node.params[0])];
} else {
result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, false)] : [];
result.push('(');
if (node.defaults) {
hasDefault = true;
}
for (i = 0, iz = node.params.length; i < iz; ++i) {
if (hasDefault && node.defaults[i]) {
// Handle default values.
result.push(this.generateAssignment(node.params[i], node.defaults[i], '=', Precedence.Assignment, E_TTT));
} else {
result.push(this.generatePattern(node.params[i], Precedence.Assignment, E_TTT));
}
if (i + 1 < iz) {
result.push(',' + space);
}
}
if (node.rest) {
if (node.params.length) {
result.push(',' + space);
}
result.push('...');
result.push(generateIdentifier(node.rest));
}
result.push(')');
}
return result;
};
CodeGenerator.prototype.generateFunctionBody = function (node) {
var result, expr;
result = this.generateFunctionParams(node);
if (node.type === Syntax.ArrowFunctionExpression) {
result.push(space);
result.push('=>');
}
if (node.expression) {
result.push(space);
expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT);
if (expr.toString().charAt(0) === '{') {
expr = ['(', expr, ')'];
}
result.push(expr);
} else {
result.push(this.maybeBlock(node.body, S_TTFF));
}
return result;
};
CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) {
var result = ['for' + (stmt.await ? noEmptySpace() + 'await' : '') + space + '('], that = this;
withIndent(function () {
if (stmt.left.type === Syntax.VariableDeclaration) {
withIndent(function () {
result.push(stmt.left.kind + noEmptySpace());
result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF));
});
} else {
result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
}
result = join(result, operator);
result = [join(
result,
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
), ')'];
});
result.push(this.maybeBlock(stmt.body, flags));
return result;
};
CodeGenerator.prototype.generatePropertyKey = function (expr, computed) {
var result = [];
if (computed) {
result.push('[');
}
result.push(this.generateExpression(expr, Precedence.Assignment, E_TTT));
if (computed) {
result.push(']');
}
return result;
};
CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) {
if (Precedence.Assignment < precedence) {
flags |= F_ALLOW_IN;
}
return parenthesize(
[
this.generateExpression(left, Precedence.Call, flags),
space + operator + space,
this.generateExpression(right, Precedence.Assignment, flags)
],
Precedence.Assignment,
precedence
);
};
CodeGenerator.prototype.semicolon = function (flags) {
if (!semicolons && flags & F_SEMICOLON_OPT) {
return '';
}
return ';';
};
// Statements.
CodeGenerator.Statement = {
BlockStatement: function (stmt, flags) {
var range, content, result = ['{', newline], that = this;
withIndent(function () {
// handle functions without any code
if (stmt.body.length === 0 && preserveBlankLines) {
range = stmt.range;
if (range[1] - range[0] > 2) {
content = sourceCode.substring(range[0] + 1, range[1] - 1);
if (content[0] === '\n') {
result = ['{'];
}
result.push(content);
}
}
var i, iz, fragment, bodyFlags;
bodyFlags = S_TFFF;
if (flags & F_FUNC_BODY) {
bodyFlags |= F_DIRECTIVE_CTX;
}
for (i = 0, iz = stmt.body.length; i < iz; ++i) {
if (preserveBlankLines) {
// handle spaces before the first line
if (i === 0) {
if (stmt.body[0].leadingComments) {
range = stmt.body[0].leadingComments[0].extendedRange;
content = sourceCode.substring(range[0], range[1]);
if (content[0] === '\n') {
result = ['{'];
}
}
if (!stmt.body[0].leadingComments) {
generateBlankLines(stmt.range[0], stmt.body[0].range[0], result);
}
}
// handle spaces between lines
if (i > 0) {
if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
}
}
}
if (i === iz - 1) {
bodyFlags |= F_SEMICOLON_OPT;
}
if (stmt.body[i].leadingComments && preserveBlankLines) {
fragment = that.generateStatement(stmt.body[i], bodyFlags);
} else {
fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags));
}
result.push(fragment);
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
if (preserveBlankLines && i < iz - 1) {
// don't add a new line if there are leading coments
// in the next statement
if (!stmt.body[i + 1].leadingComments) {
result.push(newline);
}
} else {
result.push(newline);
}
}
if (preserveBlankLines) {
// handle spaces after the last line
if (i === iz - 1) {
if (!stmt.body[i].trailingComments) {
generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
}
}
}
}
});
result.push(addIndent('}'));
return result;
},
BreakStatement: function (stmt, flags) {
if (stmt.label) {
return 'break ' + stmt.label.name + this.semicolon(flags);
}
return 'break' + this.semicolon(flags);
},
ContinueStatement: function (stmt, flags) {
if (stmt.label) {
return 'continue ' + stmt.label.name + this.semicolon(flags);
}
return 'continue' + this.semicolon(flags);
},
ClassBody: function (stmt, flags) {
var result = [ '{', newline], that = this;
withIndent(function (indent) {
var i, iz;
for (i = 0, iz = stmt.body.length; i < iz; ++i) {
result.push(indent);
result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT));
if (i + 1 < iz) {
result.push(newline);
}
}
});
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
result.push(base);
result.push('}');
return result;
},
ClassDeclaration: function (stmt, flags) {
var result, fragment;
result = ['class'];
if (stmt.id) {
result = join(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
}
if (stmt.superClass) {
fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
result = join(result, fragment);
}
result.push(space);
result.push(this.generateStatement(stmt.body, S_TFFT));
return result;
},
DirectiveStatement: function (stmt, flags) {
if (extra.raw && stmt.raw) {
return stmt.raw + this.semicolon(flags);
}
return escapeDirective(stmt.directive) + this.semicolon(flags);
},
DoWhileStatement: function (stmt, flags) {
// Because `do 42 while (cond)` is Syntax Error. We need semicolon.
var result = join('do', this.maybeBlock(stmt.body, S_TFFF));
result = this.maybeBlockSuffix(stmt.body, result);
return join(result, [
'while' + space + '(',
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
')' + this.semicolon(flags)
]);
},
CatchClause: function (stmt, flags) {
var result, that = this;
withIndent(function () {
var guard;
if (stmt.param) {
result = [
'catch' + space + '(',
that.generateExpression(stmt.param, Precedence.Sequence, E_TTT),
')'
];
if (stmt.guard) {
guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT);
result.splice(2, 0, ' if ', guard);
}
} else {
result = ['catch'];
}
});
result.push(this.maybeBlock(stmt.body, S_TFFF));
return result;
},
DebuggerStatement: function (stmt, flags) {
return 'debugger' + this.semicolon(flags);
},
EmptyStatement: function (stmt, flags) {
return ';';
},
ExportDefaultDeclaration: function (stmt, flags) {
var result = [ 'export' ], bodyFlags;
bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF;
// export default HoistableDeclaration[Default]
// export default AssignmentExpression[In] ;
result = join(result, 'default');
if (isStatement(stmt.declaration)) {
result = join(result, this.generateStatement(stmt.declaration, bodyFlags));
} else {
result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
}
return result;
},
ExportNamedDeclaration: function (stmt, flags) {
var result = [ 'export' ], bodyFlags, that = this;
bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF;
// export VariableStatement
// export Declaration[Default]
if (stmt.declaration) {
return join(result, this.generateStatement(stmt.declaration, bodyFlags));
}
// export ExportClause[NoReference] FromClause ;
// export ExportClause ;
if (stmt.specifiers) {
if (stmt.specifiers.length === 0) {
result = join(result, '{' + space + '}');
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
} else {
result = join(result, '{');
withIndent(function (indent) {
var i, iz;
result.push(newline);
for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) {
result.push(indent);
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
if (i + 1 < iz) {
result.push(',' + newline);
}
}
});
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
result.push(base + '}');
}
if (stmt.source) {
result = join(result, [
'from' + space,
// ModuleSpecifier
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
this.semicolon(flags)
]);
} else {
result.push(this.semicolon(flags));
}
}
return result;
},
ExportAllDeclaration: function (stmt, flags) {
// export * FromClause ;
return [
'export' + space,
'*' + space,
'from' + space,
// ModuleSpecifier
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
this.semicolon(flags)
];
},
ExpressionStatement: function (stmt, flags) {
var result, fragment;
function isClassPrefixed(fragment) {
var code;
if (fragment.slice(0, 5) !== 'class') {
return false;
}
code = fragment.charCodeAt(5);
return code === 0x7B /* '{' */ || esutils.code.isWhiteSpace(code) || esutils.code.isLineTerminator(code);
}
function isFunctionPrefixed(fragment) {
var code;
if (fragment.slice(0, 8) !== 'function') {
return false;
}
code = fragment.charCodeAt(8);
return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code);
}
function isAsyncPrefixed(fragment) {
var code, i, iz;
if (fragment.slice(0, 5) !== 'async') {
return false;
}
if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) {
return false;
}
for (i = 6, iz = fragment.length; i < iz; ++i) {
if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) {
break;
}
}
if (i === iz) {
return false;
}
if (fragment.slice(i, i + 8) !== 'function') {
return false;
}
code = fragment.charCodeAt(i + 8);
return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code);
}
result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)];
// 12.4 '{', 'function', 'class' is not allowed in this position.
// wrap expression with parentheses
fragment = toSourceNodeWhenNeeded(result).toString();
if (fragment.charCodeAt(0) === 0x7B /* '{' */ || // ObjectExpression
isClassPrefixed(fragment) ||
isFunctionPrefixed(fragment) ||
isAsyncPrefixed(fragment) ||
(directive && (flags & F_DIRECTIVE_CTX) && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) {
result = ['(', result, ')' + this.semicolon(flags)];
} else {
result.push(this.semicolon(flags));
}
return result;
},
ImportDeclaration: function (stmt, flags) {
// ES6: 15.2.1 valid import declarations:
// - import ImportClause FromClause ;
// - import ModuleSpecifier ;
var result, cursor, that = this;
// If no ImportClause is present,
// this should be `import ModuleSpecifier` so skip `from`
// ModuleSpecifier is StringLiteral.
if (stmt.specifiers.length === 0) {
// import ModuleSpecifier ;
return [
'import',
space,
// ModuleSpecifier
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
this.semicolon(flags)
];
}
// import ImportClause FromClause ;
result = [
'import'
];
cursor = 0;
// ImportedBinding
if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
result = join(result, [
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
]);
++cursor;
}
if (stmt.specifiers[cursor]) {
if (cursor !== 0) {
result.push(',');
}
if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
// NameSpaceImport
result = join(result, [
space,
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
]);
} else {
// NamedImports
result.push(space + '{');
if ((stmt.specifiers.length - cursor) === 1) {
// import { ... } from "...";
result.push(space);
result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT));
result.push(space + '}' + space);
} else {
// import {
// ...,
// ...,
// } from "...";
withIndent(function (indent) {
var i, iz;
result.push(newline);
for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) {
result.push(indent);
result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
if (i + 1 < iz) {
result.push(',' + newline);
}
}
});
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
result.push(base + '}' + space);
}
}
}
result = join(result, [
'from' + space,
// ModuleSpecifier
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
this.semicolon(flags)
]);
return result;
},
VariableDeclarator: function (stmt, flags) {
var itemFlags = (flags & F_ALLOW_IN) ? E_TTT : E_FTT;
if (stmt.init) {
return [
this.generateExpression(stmt.id, Precedence.Assignment, itemFlags),
space,
'=',
space,
this.generateExpression(stmt.init, Precedence.Assignment, itemFlags)
];
}
return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags);
},
VariableDeclaration: function (stmt, flags) {
// VariableDeclarator is typed as Statement,
// but joined with comma (not LineTerminator).
// So if comment is attached to target node, we should specialize.
var result, i, iz, node, bodyFlags, that = this;
result = [ stmt.kind ];
bodyFlags = (flags & F_ALLOW_IN) ? S_TFFF : S_FFFF;
function block() {
node = stmt.declarations[0];
if (extra.comment && node.leadingComments) {
result.push('\n');
result.push(addIndent(that.generateStatement(node, bodyFlags)));
} else {
result.push(noEmptySpace());
result.push(that.generateStatement(node, bodyFlags));
}
for (i = 1, iz = stmt.declarations.length; i < iz; ++i) {
node = stmt.declarations[i];
if (extra.comment && node.leadingComments) {
result.push(',' + newline);
result.push(addIndent(that.generateStatement(node, bodyFlags)));
} else {
result.push(',' + space);
result.push(that.generateStatement(node, bodyFlags));
}
}
}
if (stmt.declarations.length > 1) {
withIndent(block);
} else {
block();
}
result.push(this.semicolon(flags));
return result;
},
ThrowStatement: function (stmt, flags) {
return [join(
'throw',
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
), this.semicolon(flags)];
},
TryStatement: function (stmt, flags) {
var result, i, iz, guardedHandlers;
result = ['try', this.maybeBlock(stmt.block, S_TFFF)];
result = this.maybeBlockSuffix(stmt.block, result);
if (stmt.handlers) {
// old interface
for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF));
if (stmt.finalizer || i + 1 !== iz) {
result = this.maybeBlockSuffix(stmt.handlers[i].body, result);
}
}
} else {
guardedHandlers = stmt.guardedHandlers || [];
for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF));
if (stmt.finalizer || i + 1 !== iz) {
result = this.maybeBlockSuffix(guardedHandlers[i].body, result);
}
}
// new interface
if (stmt.handler) {
if (Array.isArray(stmt.handler)) {
for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
result = join(result, this.generateStatement(stmt.handler[i], S_TFFF));
if (stmt.finalizer || i + 1 !== iz) {
result = this.maybeBlockSuffix(stmt.handler[i].body, result);
}
}
} else {
result = join(result, this.generateStatement(stmt.handler, S_TFFF));
if (stmt.finalizer) {
result = this.maybeBlockSuffix(stmt.handler.body, result);
}
}
}
}
if (stmt.finalizer) {
result = join(result, ['finally', this.maybeBlock(stmt.finalizer, S_TFFF)]);
}
return result;
},
SwitchStatement: function (stmt, flags) {
var result, fragment, i, iz, bodyFlags, that = this;
withIndent(function () {
result = [
'switch' + space + '(',
that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT),
')' + space + '{' + newline
];
});
if (stmt.cases) {
bodyFlags = S_TFFF;
for (i = 0, iz = stmt.cases.length; i < iz; ++i) {
if (i === iz - 1) {
bodyFlags |= F_SEMICOLON_OPT;
}
fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags));
result.push(fragment);
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
result.push(newline);
}
}
}
result.push(addIndent('}'));
return result;
},
SwitchCase: function (stmt, flags) {
var result, fragment, i, iz, bodyFlags, that = this;
withIndent(function () {
if (stmt.test) {
result = [
join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
':'
];
} else {
result = ['default:'];
}
i = 0;
iz = stmt.consequent.length;
if (iz && stmt.consequent[0].type === Syntax.BlockStatement) {
fragment = that.maybeBlock(stmt.consequent[0], S_TFFF);
result.push(fragment);
i = 1;
}
if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
bodyFlags = S_TFFF;
for (; i < iz; ++i) {
if (i === iz - 1 && flags & F_SEMICOLON_OPT) {
bodyFlags |= F_SEMICOLON_OPT;
}
fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags));
result.push(fragment);
if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
result.push(newline);
}
}
});
return result;
},
IfStatement: function (stmt, flags) {
var result, bodyFlags, semicolonOptional, that = this;
withIndent(function () {
result = [
'if' + space + '(',
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
')'
];
});
semicolonOptional = flags & F_SEMICOLON_OPT;
bodyFlags = S_TFFF;
if (semicolonOptional) {
bodyFlags |= F_SEMICOLON_OPT;
}
if (stmt.alternate) {
result.push(this.maybeBlock(stmt.consequent, S_TFFF));
result = this.maybeBlockSuffix(stmt.consequent, result);
if (stmt.alternate.type === Syntax.IfStatement) {
result = join(result, ['else ', this.generateStatement(stmt.alternate, bodyFlags)]);
} else {
result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags)));
}
} else {
result.push(this.maybeBlock(stmt.consequent, bodyFlags));
}
return result;
},
ForStatement: function (stmt, flags) {
var result, that = this;
withIndent(function () {
result = ['for' + space + '('];
if (stmt.init) {
if (stmt.init.type === Syntax.VariableDeclaration) {
result.push(that.generateStatement(stmt.init, S_FFFF));
} else {
// F_ALLOW_IN becomes false.
result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT));
result.push(';');
}
} else {
result.push(';');
}
if (stmt.test) {
result.push(space);
result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT));
result.push(';');
} else {
result.push(';');
}
if (stmt.update) {
result.push(space);
result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT));
result.push(')');
} else {
result.push(')');
}
});
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
return result;
},
ForInStatement: function (stmt, flags) {
return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
},
ForOfStatement: function (stmt, flags) {
return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
},
LabeledStatement: function (stmt, flags) {
return [stmt.label.name + ':', this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)];
},
Program: function (stmt, flags) {
var result, fragment, i, iz, bodyFlags;
iz = stmt.body.length;
result = [safeConcatenation && iz > 0 ? '\n' : ''];
bodyFlags = S_TFTF;
for (i = 0; i < iz; ++i) {
if (!safeConcatenation && i === iz - 1) {
bodyFlags |= F_SEMICOLON_OPT;
}
if (preserveBlankLines) {
// handle spaces before the first line
if (i === 0) {
if (!stmt.body[0].leadingComments) {
generateBlankLines(stmt.range[0], stmt.body[i].range[0], result);
}
}
// handle spaces between lines
if (i > 0) {
if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
}
}
}
fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags));
result.push(fragment);
if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
if (preserveBlankLines) {
if (!stmt.body[i + 1].leadingComments) {
result.push(newline);
}
} else {
result.push(newline);
}
}
if (preserveBlankLines) {
// handle spaces after the last line
if (i === iz - 1) {
if (!stmt.body[i].trailingComments) {
generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
}
}
}
}
return result;
},
FunctionDeclaration: function (stmt, flags) {
return [
generateAsyncPrefix(stmt, true),
'function',
generateStarSuffix(stmt) || noEmptySpace(),
stmt.id ? generateIdentifier(stmt.id) : '',
this.generateFunctionBody(stmt)
];
},
ReturnStatement: function (stmt, flags) {
if (stmt.argument) {
return [join(
'return',
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
), this.semicolon(flags)];
}
return ['return' + this.semicolon(flags)];
},
WhileStatement: function (stmt, flags) {
var result, that = this;
withIndent(function () {
result = [
'while' + space + '(',
that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
')'
];
});
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
return result;
},
WithStatement: function (stmt, flags) {
var result, that = this;
withIndent(function () {
result = [
'with' + space + '(',
that.generateExpression(stmt.object, Precedence.Sequence, E_TTT),
')'
];
});
result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
return result;
}
};
merge(CodeGenerator.prototype, CodeGenerator.Statement);
// Expressions.
CodeGenerator.Expression = {
SequenceExpression: function (expr, precedence, flags) {
var result, i, iz;
if (Precedence.Sequence < precedence) {
flags |= F_ALLOW_IN;
}
result = [];
for (i = 0, iz = expr.expressions.length; i < iz; ++i) {
result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags));
if (i + 1 < iz) {
result.push(',' + space);
}
}
return parenthesize(result, Precedence.Sequence, precedence);
},
AssignmentExpression: function (expr, precedence, flags) {
return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags);
},
ArrowFunctionExpression: function (expr, precedence, flags) {
return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence);
},
ConditionalExpression: function (expr, precedence, flags) {
if (Precedence.Conditional < precedence) {
flags |= F_ALLOW_IN;
}
return parenthesize(
[
this.generateExpression(expr.test, Precedence.LogicalOR, flags),
space + '?' + space,
this.generateExpression(expr.consequent, Precedence.Assignment, flags),
space + ':' + space,
this.generateExpression(expr.alternate, Precedence.Assignment, flags)
],
Precedence.Conditional,
precedence
);
},
LogicalExpression: function (expr, precedence, flags) {
return this.BinaryExpression(expr, precedence, flags);
},
BinaryExpression: function (expr, precedence, flags) {
var result, leftPrecedence, rightPrecedence, currentPrecedence, fragment, leftSource;
currentPrecedence = BinaryPrecedence[expr.operator];
leftPrecedence = expr.operator === '**' ? Precedence.Postfix : currentPrecedence;
rightPrecedence = expr.operator === '**' ? currentPrecedence : currentPrecedence + 1;
if (currentPrecedence < precedence) {
flags |= F_ALLOW_IN;
}
fragment = this.generateExpression(expr.left, leftPrecedence, flags);
leftSource = fragment.toString();
if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
result = [fragment, noEmptySpace(), expr.operator];
} else {
result = join(fragment, expr.operator);
}
fragment = this.generateExpression(expr.right, rightPrecedence, flags);
if (expr.operator === '/' && fragment.toString().charAt(0) === '/' ||
expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') {
// If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start
result.push(noEmptySpace());
result.push(fragment);
} else {
result = join(result, fragment);
}
if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) {
return ['(', result, ')'];
}
return parenthesize(result, currentPrecedence, precedence);
},
CallExpression: function (expr, precedence, flags) {
var result, i, iz;
// F_ALLOW_UNPARATH_NEW becomes false.
result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)];
result.push('(');
for (i = 0, iz = expr['arguments'].length; i < iz; ++i) {
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
if (i + 1 < iz) {
result.push(',' + space);
}
}
result.push(')');
if (!(flags & F_ALLOW_CALL)) {
return ['(', result, ')'];
}
return parenthesize(result, Precedence.Call, precedence);
},
NewExpression: function (expr, precedence, flags) {
var result, length, i, iz, itemFlags;
length = expr['arguments'].length;
// F_ALLOW_CALL becomes false.
// F_ALLOW_UNPARATH_NEW may become false.
itemFlags = (flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0) ? E_TFT : E_TFF;
result = join(
'new',
this.generateExpression(expr.callee, Precedence.New, itemFlags)
);
if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
result.push('(');
for (i = 0, iz = length; i < iz; ++i) {
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
if (i + 1 < iz) {
result.push(',' + space);
}
}
result.push(')');
}
return parenthesize(result, Precedence.New, precedence);
},
MemberExpression: function (expr, precedence, flags) {
var result, fragment;
// F_ALLOW_UNPARATH_NEW becomes false.
result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)];
if (expr.computed) {
result.push('[');
result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT));
result.push(']');
} else {
if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') {
fragment = toSourceNodeWhenNeeded(result).toString();
// When the following conditions are all true,
// 1. No floating point
// 2. Don't have exponents
// 3. The last character is a decimal digit
// 4. Not hexadecimal OR octal number literal
// we should add a floating point.
if (
fragment.indexOf('.') < 0 &&
!/[eExX]/.test(fragment) &&
esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) &&
!(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0'
) {
result.push(' ');
}
}
result.push('.');
result.push(generateIdentifier(expr.property));
}
return parenthesize(result, Precedence.Member, precedence);
},
MetaProperty: function (expr, precedence, flags) {
var result;
result = [];
result.push(typeof expr.meta === "string" ? expr.meta : generateIdentifier(expr.meta));
result.push('.');
result.push(typeof expr.property === "string" ? expr.property : generateIdentifier(expr.property));
return parenthesize(result, Precedence.Member, precedence);
},
UnaryExpression: function (expr, precedence, flags) {
var result, fragment, rightCharCode, leftSource, leftCharCode;
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
if (space === '') {
result = join(expr.operator, fragment);
} else {
result = [expr.operator];
if (expr.operator.length > 2) {
// delete, void, typeof
// get `typeof []`, not `typeof[]`
result = join(result, fragment);
} else {
// Prevent inserting spaces between operator and argument if it is unnecessary
// like, `!cond`
leftSource = toSourceNodeWhenNeeded(result).toString();
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
rightCharCode = fragment.toString().charCodeAt(0);
if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) ||
(esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) {
result.push(noEmptySpace());
result.push(fragment);
} else {
result.push(fragment);
}
}
}
return parenthesize(result, Precedence.Unary, precedence);
},
YieldExpression: function (expr, precedence, flags) {
var result;
if (expr.delegate) {
result = 'yield*';
} else {
result = 'yield';
}
if (expr.argument) {
result = join(
result,
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
);
}
return parenthesize(result, Precedence.Yield, precedence);
},
AwaitExpression: function (expr, precedence, flags) {
var result = join(
expr.all ? 'await*' : 'await',
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
);
return parenthesize(result, Precedence.Await, precedence);
},
UpdateExpression: function (expr, precedence, flags) {
if (expr.prefix) {
return parenthesize(
[
expr.operator,
this.generateExpression(expr.argument, Precedence.Unary, E_TTT)
],
Precedence.Unary,
precedence
);
}
return parenthesize(
[
this.generateExpression(expr.argument, Precedence.Postfix, E_TTT),
expr.operator
],
Precedence.Postfix,
precedence
);
},
FunctionExpression: function (expr, precedence, flags) {
var result = [
generateAsyncPrefix(expr, true),
'function'
];
if (expr.id) {
result.push(generateStarSuffix(expr) || noEmptySpace());
result.push(generateIdentifier(expr.id));
} else {
result.push(generateStarSuffix(expr) || space);
}
result.push(this.generateFunctionBody(expr));
return result;
},
ArrayPattern: function (expr, precedence, flags) {
return this.ArrayExpression(expr, precedence, flags, true);
},
ArrayExpression: function (expr, precedence, flags, isPattern) {
var result, multiline, that = this;
if (!expr.elements.length) {
return '[]';
}
multiline = isPattern ? false : expr.elements.length > 1;
result = ['[', multiline ? newline : ''];
withIndent(function (indent) {
var i, iz;
for (i = 0, iz = expr.elements.length; i < iz; ++i) {
if (!expr.elements[i]) {
if (multiline) {
result.push(indent);
}
if (i + 1 === iz) {
result.push(',');
}
} else {
result.push(multiline ? indent : '');
result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT));
}
if (i + 1 < iz) {
result.push(',' + (multiline ? newline : space));
}
}
});
if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
result.push(multiline ? base : '');
result.push(']');
return result;
},
RestElement: function(expr, precedence, flags) {
return '...' + this.generatePattern(expr.argument);
},
ClassExpression: function (expr, precedence, flags) {
var result, fragment;
result = ['class'];
if (expr.id) {
result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
}
if (expr.superClass) {
fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
result = join(result, fragment);
}
result.push(space);
result.push(this.generateStatement(expr.body, S_TFFT));
return result;
},
MethodDefinition: function (expr, precedence, flags) {
var result, fragment;
if (expr['static']) {
result = ['static' + space];
} else {
result = [];
}
if (expr.kind === 'get' || expr.kind === 'set') {
fragment = [
join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
this.generateFunctionBody(expr.value)
];
} else {
fragment = [
generateMethodPrefix(expr),
this.generatePropertyKey(expr.key, expr.computed),
this.generateFunctionBody(expr.value)
];
}
return join(result, fragment);
},
Property: function (expr, precedence, flags) {
if (expr.kind === 'get' || expr.kind === 'set') {
return [
expr.kind, noEmptySpace(),
this.generatePropertyKey(expr.key, expr.computed),
this.generateFunctionBody(expr.value)
];
}
if (expr.shorthand) {
if (expr.value.type === "AssignmentPattern") {
return this.AssignmentPattern(expr.value, Precedence.Sequence, E_TTT);
}
return this.generatePropertyKey(expr.key, expr.computed);
}
if (expr.method) {
return [
generateMethodPrefix(expr),
this.generatePropertyKey(expr.key, expr.computed),
this.generateFunctionBody(expr.value)
];
}
return [
this.generatePropertyKey(expr.key, expr.computed),
':' + space,
this.generateExpression(expr.value, Precedence.Assignment, E_TTT)
];
},
ObjectExpression: function (expr, precedence, flags) {
var multiline, result, fragment, that = this;
if (!expr.properties.length) {
return '{}';
}
multiline = expr.properties.length > 1;
withIndent(function () {
fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
});
if (!multiline) {
// issues 4
// Do not transform from
// dejavu.Class.declare({
// method2: function () {}
// });
// to
// dejavu.Class.declare({method2: function () {
// }});
if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
return [ '{', space, fragment, space, '}' ];
}
}
withIndent(function (indent) {
var i, iz;
result = [ '{', newline, indent, fragment ];
if (multiline) {
result.push(',' + newline);
for (i = 1, iz = expr.properties.length; i < iz; ++i) {
result.push(indent);
result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
if (i + 1 < iz) {
result.push(',' + newline);
}
}
}
});
if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
result.push(base);
result.push('}');
return result;
},
AssignmentPattern: function(expr, precedence, flags) {
return this.generateAssignment(expr.left, expr.right, '=', precedence, flags);
},
ObjectPattern: function (expr, precedence, flags) {
var result, i, iz, multiline, property, that = this;
if (!expr.properties.length) {
return '{}';
}
multiline = false;
if (expr.properties.length === 1) {
property = expr.properties[0];
if (
property.type === Syntax.Property
&& property.value.type !== Syntax.Identifier
) {
multiline = true;
}
} else {
for (i = 0, iz = expr.properties.length; i < iz; ++i) {
property = expr.properties[i];
if (
property.type === Syntax.Property
&& !property.shorthand
) {
multiline = true;
break;
}
}
}
result = ['{', multiline ? newline : '' ];
withIndent(function (indent) {
var i, iz;
for (i = 0, iz = expr.properties.length; i < iz; ++i) {
result.push(multiline ? indent : '');
result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
if (i + 1 < iz) {
result.push(',' + (multiline ? newline : space));
}
}
});
if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
result.push(newline);
}
result.push(multiline ? base : '');
result.push('}');
return result;
},
ThisExpression: function (expr, precedence, flags) {
return 'this';
},
Super: function (expr, precedence, flags) {
return 'super';
},
Identifier: function (expr, precedence, flags) {
return generateIdentifier(expr);
},
ImportDefaultSpecifier: function (expr, precedence, flags) {
return generateIdentifier(expr.id || expr.local);
},
ImportNamespaceSpecifier: function (expr, precedence, flags) {
var result = ['*'];
var id = expr.id || expr.local;
if (id) {
result.push(space + 'as' + noEmptySpace() + generateIdentifier(id));
}
return result;
},
ImportSpecifier: function (expr, precedence, flags) {
var imported = expr.imported;
var result = [ imported.name ];
var local = expr.local;
if (local && local.name !== imported.name) {
result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(local));
}
return result;
},
ExportSpecifier: function (expr, precedence, flags) {
var local = expr.local;
var result = [ local.name ];
var exported = expr.exported;
if (exported && exported.name !== local.name) {
result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(exported));
}
return result;
},
Literal: function (expr, precedence, flags) {
var raw;
if (expr.hasOwnProperty('raw') && parse && extra.raw) {
try {
raw = parse(expr.raw).body[0].expression;
if (raw.type === Syntax.Literal) {
if (raw.value === expr.value) {
return expr.raw;
}
}
} catch (e) {
// not use raw property
}
}
if (expr.regex) {
return '/' + expr.regex.pattern + '/' + expr.regex.flags;
}
if (expr.value === null) {
return 'null';
}
if (typeof expr.value === 'string') {
return escapeString(expr.value);
}
if (typeof expr.value === 'number') {
return generateNumber(expr.value);
}
if (typeof expr.value === 'boolean') {
return expr.value ? 'true' : 'false';
}
return generateRegExp(expr.value);
},
GeneratorExpression: function (expr, precedence, flags) {
return this.ComprehensionExpression(expr, precedence, flags);
},
ComprehensionExpression: function (expr, precedence, flags) {
// GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...]
// Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6
var result, i, iz, fragment, that = this;
result = (expr.type === Syntax.GeneratorExpression) ? ['('] : ['['];
if (extra.moz.comprehensionExpressionStartsWithAssignment) {
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
result.push(fragment);
}
if (expr.blocks) {
withIndent(function () {
for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
result = join(result, fragment);
} else {
result.push(fragment);
}
}
});
}
if (expr.filter) {
result = join(result, 'if' + space);
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
result = join(result, [ '(', fragment, ')' ]);
}
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
result = join(result, fragment);
}
result.push((expr.type === Syntax.GeneratorExpression) ? ')' : ']');
return result;
},
ComprehensionBlock: function (expr, precedence, flags) {
var fragment;
if (expr.left.type === Syntax.VariableDeclaration) {
fragment = [
expr.left.kind, noEmptySpace(),
this.generateStatement(expr.left.declarations[0], S_FFFF)
];
} else {
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
}
fragment = join(fragment, expr.of ? 'of' : 'in');
fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
return [ 'for' + space + '(', fragment, ')' ];
},
SpreadElement: function (expr, precedence, flags) {
return [
'...',
this.generateExpression(expr.argument, Precedence.Assignment, E_TTT)
];
},
TaggedTemplateExpression: function (expr, precedence, flags) {
var itemFlags = E_TTF;
if (!(flags & F_ALLOW_CALL)) {
itemFlags = E_TFF;
}
var result = [
this.generateExpression(expr.tag, Precedence.Call, itemFlags),
this.generateExpression(expr.quasi, Precedence.Primary, E_FFT)
];
return parenthesize(result, Precedence.TaggedTemplate, precedence);
},
TemplateElement: function (expr, precedence, flags) {
// Don't use "cooked". Since tagged template can use raw template
// representation. So if we do so, it breaks the script semantics.
return expr.value.raw;
},
TemplateLiteral: function (expr, precedence, flags) {
var result, i, iz;
result = [ '`' ];
for (i = 0, iz = expr.quasis.length; i < iz; ++i) {
result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT));
if (i + 1 < iz) {
result.push('${' + space);
result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT));
result.push(space + '}');
}
}
result.push('`');
return result;
},
ModuleSpecifier: function (expr, precedence, flags) {
return this.Literal(expr, precedence, flags);
},
ImportExpression: function(expr, precedence, flag) {
return parenthesize([
'import(',
this.generateExpression(expr.source, Precedence.Assignment, E_TTT),
')'
], Precedence.Call, precedence);
},
};
merge(CodeGenerator.prototype, CodeGenerator.Expression);
CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) {
var result, type;
type = expr.type || Syntax.Property;
if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) {
return generateVerbatim(expr, precedence);
}
result = this[type](expr, precedence, flags);
if (extra.comment) {
result = addComments(expr, result);
}
return toSourceNodeWhenNeeded(result, expr);
};
CodeGenerator.prototype.generateStatement = function (stmt, flags) {
var result,
fragment;
result = this[stmt.type](stmt, flags);
// Attach comments
if (extra.comment) {
result = addComments(stmt, result);
}
fragment = toSourceNodeWhenNeeded(result).toString();
if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') {
result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, '');
}
return toSourceNodeWhenNeeded(result, stmt);
};
function generateInternal(node) {
var codegen;
codegen = new CodeGenerator();
if (isStatement(node)) {
return codegen.generateStatement(node, S_TFFF);
}
if (isExpression(node)) {
return codegen.generateExpression(node, Precedence.Sequence, E_TTT);
}
throw new Error('Unknown node type: ' + node.type);
}
function generate(node, options) {
var defaultOptions = getDefaultOptions(), result, pair;
if (options != null) {
// Obsolete options
//
// `options.indent`
// `options.base`
//
// Instead of them, we can use `option.format.indent`.
if (typeof options.indent === 'string') {
defaultOptions.format.indent.style = options.indent;
}
if (typeof options.base === 'number') {
defaultOptions.format.indent.base = options.base;
}
options = updateDeeply(defaultOptions, options);
indent = options.format.indent.style;
if (typeof options.base === 'string') {
base = options.base;
} else {
base = stringRepeat(indent, options.format.indent.base);
}
} else {
options = defaultOptions;
indent = options.format.indent.style;
base = stringRepeat(indent, options.format.indent.base);
}
json = options.format.json;
renumber = options.format.renumber;
hexadecimal = json ? false : options.format.hexadecimal;
quotes = json ? 'double' : options.format.quotes;
escapeless = options.format.escapeless;
newline = options.format.newline;
space = options.format.space;
if (options.format.compact) {
newline = space = indent = base = '';
}
parentheses = options.format.parentheses;
semicolons = options.format.semicolons;
safeConcatenation = options.format.safeConcatenation;
directive = options.directive;
parse = json ? null : options.parse;
sourceMap = options.sourceMap;
sourceCode = options.sourceCode;
preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null;
extra = options;
if (sourceMap) {
if (!exports.browser) {
// We assume environment is node.js
// And prevent from including source-map by browserify
SourceNode = __nccwpck_require__(56594).SourceNode;
} else {
SourceNode = global.sourceMap.SourceNode;
}
}
result = generateInternal(node);
if (!sourceMap) {
pair = {code: result.toString(), map: null};
return options.sourceMapWithCode ? pair : pair.code;
}
pair = result.toStringWithSourceMap({
file: options.file,
sourceRoot: options.sourceMapRoot
});
if (options.sourceContent) {
pair.map.setSourceContent(options.sourceMap,
options.sourceContent);
}
if (options.sourceMapWithCode) {
return pair;
}
return pair.map.toString();
}
FORMAT_MINIFY = {
indent: {
style: '',
base: 0
},
renumber: true,
hexadecimal: true,
quotes: 'auto',
escapeless: true,
compact: true,
parentheses: false,
semicolons: false
};
FORMAT_DEFAULTS = getDefaultOptions().format;
exports.version = __nccwpck_require__(70149).version;
exports.generate = generate;
exports.attachComments = estraverse.attachComments;
exports.Precedence = updateDeeply({}, Precedence);
exports.browser = false;
exports.FORMAT_MINIFY = FORMAT_MINIFY;
exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS;
}());
/* vim: set sw=4 ts=4 et tw=80 : */
/***/ }),
/***/ 78823:
/***/ (function(module) {
(function webpackUniversalModuleDefinition(root, factory) {
/* istanbul ignore next */
if(true)
module.exports = factory();
else {}
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __nested_webpack_require_583__(moduleId) {
/******/ // Check if module is in cache
/* istanbul ignore if */
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_583__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __nested_webpack_require_583__.m = modules;
/******/ // expose the module cache
/******/ __nested_webpack_require_583__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __nested_webpack_require_583__.p = "";
/******/ // Load entry module and return exports
/******/ return __nested_webpack_require_583__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __nested_webpack_require_1808__) {
"use strict";
/*
Copyright JS Foundation and other contributors, https://js.foundation/
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 <COPYRIGHT HOLDER> 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var comment_handler_1 = __nested_webpack_require_1808__(1);
var jsx_parser_1 = __nested_webpack_require_1808__(3);
var parser_1 = __nested_webpack_require_1808__(8);
var tokenizer_1 = __nested_webpack_require_1808__(15);
function parse(code, options, delegate) {
var commentHandler = null;
var proxyDelegate = function (node, metadata) {
if (delegate) {
delegate(node, metadata);
}
if (commentHandler) {
commentHandler.visit(node, metadata);
}
};
var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null;
var collectComment = false;
if (options) {
collectComment = (typeof options.comment === 'boolean' && options.comment);
var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment);
if (collectComment || attachComment) {
commentHandler = new comment_handler_1.CommentHandler();
commentHandler.attach = attachComment;
options.comment = true;
parserDelegate = proxyDelegate;
}
}
var isModule = false;
if (options && typeof options.sourceType === 'string') {
isModule = (options.sourceType === 'module');
}
var parser;
if (options && typeof options.jsx === 'boolean' && options.jsx) {
parser = new jsx_parser_1.JSXParser(code, options, parserDelegate);
}
else {
parser = new parser_1.Parser(code, options, parserDelegate);
}
var program = isModule ? parser.parseModule() : parser.parseScript();
var ast = program;
if (collectComment && commentHandler) {
ast.comments = commentHandler.comments;
}
if (parser.config.tokens) {
ast.tokens = parser.tokens;
}
if (parser.config.tolerant) {
ast.errors = parser.errorHandler.errors;
}
return ast;
}
exports.parse = parse;
function parseModule(code, options, delegate) {
var parsingOptions = options || {};
parsingOptions.sourceType = 'module';
return parse(code, parsingOptions, delegate);
}
exports.parseModule = parseModule;
function parseScript(code, options, delegate) {
var parsingOptions = options || {};
parsingOptions.sourceType = 'script';
return parse(code, parsingOptions, delegate);
}
exports.parseScript = parseScript;
function tokenize(code, options, delegate) {
var tokenizer = new tokenizer_1.Tokenizer(code, options);
var tokens;
tokens = [];
try {
while (true) {
var token = tokenizer.getNextToken();
if (!token) {
break;
}
if (delegate) {
token = delegate(token);
}
tokens.push(token);
}
}
catch (e) {
tokenizer.errorHandler.tolerate(e);
}
if (tokenizer.errorHandler.tolerant) {
tokens.errors = tokenizer.errors();
}
return tokens;
}
exports.tokenize = tokenize;
var syntax_1 = __nested_webpack_require_1808__(2);
exports.Syntax = syntax_1.Syntax;
// Sync with *.json manifests.
exports.version = '4.0.1';
/***/ },
/* 1 */
/***/ function(module, exports, __nested_webpack_require_6456__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var syntax_1 = __nested_webpack_require_6456__(2);
var CommentHandler = (function () {
function CommentHandler() {
this.attach = false;
this.comments = [];
this.stack = [];
this.leading = [];
this.trailing = [];
}
CommentHandler.prototype.insertInnerComments = function (node, metadata) {
// innnerComments for properties empty block
// `function a() {/** comments **\/}`
if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) {
var innerComments = [];
for (var i = this.leading.length - 1; i >= 0; --i) {
var entry = this.leading[i];
if (metadata.end.offset >= entry.start) {
innerComments.unshift(entry.comment);
this.leading.splice(i, 1);
this.trailing.splice(i, 1);
}
}
if (innerComments.length) {
node.innerComments = innerComments;
}
}
};
CommentHandler.prototype.findTrailingComments = function (metadata) {
var trailingComments = [];
if (this.trailing.length > 0) {
for (var i = this.trailing.length - 1; i >= 0; --i) {
var entry_1 = this.trailing[i];
if (entry_1.start >= metadata.end.offset) {
trailingComments.unshift(entry_1.comment);
}
}
this.trailing.length = 0;
return trailingComments;
}
var entry = this.stack[this.stack.length - 1];
if (entry && entry.node.trailingComments) {
var firstComment = entry.node.trailingComments[0];
if (firstComment && firstComment.range[0] >= metadata.end.offset) {
trailingComments = entry.node.trailingComments;
delete entry.node.trailingComments;
}
}
return trailingComments;
};
CommentHandler.prototype.findLeadingComments = function (metadata) {
var leadingComments = [];
var target;
while (this.stack.length > 0) {
var entry = this.stack[this.stack.length - 1];
if (entry && entry.start >= metadata.start.offset) {
target = entry.node;
this.stack.pop();
}
else {
break;
}
}
if (target) {
var count = target.leadingComments ? target.leadingComments.length : 0;
for (var i = count - 1; i >= 0; --i) {
var comment = target.leadingComments[i];
if (comment.range[1] <= metadata.start.offset) {
leadingComments.unshift(comment);
target.leadingComments.splice(i, 1);
}
}
if (target.leadingComments && target.leadingComments.length === 0) {
delete target.leadingComments;
}
return leadingComments;
}
for (var i = this.leading.length - 1; i >= 0; --i) {
var entry = this.leading[i];
if (entry.start <= metadata.start.offset) {
leadingComments.unshift(entry.comment);
this.leading.splice(i, 1);
}
}
return leadingComments;
};
CommentHandler.prototype.visitNode = function (node, metadata) {
if (node.type === syntax_1.Syntax.Program && node.body.length > 0) {
return;
}
this.insertInnerComments(node, metadata);
var trailingComments = this.findTrailingComments(metadata);
var leadingComments = this.findLeadingComments(metadata);
if (leadingComments.length > 0) {
node.leadingComments = leadingComments;
}
if (trailingComments.length > 0) {
node.trailingComments = trailingComments;
}
this.stack.push({
node: node,
start: metadata.start.offset
});
};
CommentHandler.prototype.visitComment = function (node, metadata) {
var type = (node.type[0] === 'L') ? 'Line' : 'Block';
var comment = {
type: type,
value: node.value
};
if (node.range) {
comment.range = node.range;
}
if (node.loc) {
comment.loc = node.loc;
}
this.comments.push(comment);
if (this.attach) {
var entry = {
comment: {
type: type,
value: node.value,
range: [metadata.start.offset, metadata.end.offset]
},
start: metadata.start.offset
};
if (node.loc) {
entry.comment.loc = node.loc;
}
node.type = type;
this.leading.push(entry);
this.trailing.push(entry);
}
};
CommentHandler.prototype.visit = function (node, metadata) {
if (node.type === 'LineComment') {
this.visitComment(node, metadata);
}
else if (node.type === 'BlockComment') {
this.visitComment(node, metadata);
}
else if (this.attach) {
this.visitNode(node, metadata);
}
};
return CommentHandler;
}());
exports.CommentHandler = CommentHandler;
/***/ },
/* 2 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Syntax = {
AssignmentExpression: 'AssignmentExpression',
AssignmentPattern: 'AssignmentPattern',
ArrayExpression: 'ArrayExpression',
ArrayPattern: 'ArrayPattern',
ArrowFunctionExpression: 'ArrowFunctionExpression',
AwaitExpression: 'AwaitExpression',
BlockStatement: 'BlockStatement',
BinaryExpression: 'BinaryExpression',
BreakStatement: 'BreakStatement',
CallExpression: 'CallExpression',
CatchClause: 'CatchClause',
ClassBody: 'ClassBody',
ClassDeclaration: 'ClassDeclaration',
ClassExpression: 'ClassExpression',
ConditionalExpression: 'ConditionalExpression',
ContinueStatement: 'ContinueStatement',
DoWhileStatement: 'DoWhileStatement',
DebuggerStatement: 'DebuggerStatement',
EmptyStatement: 'EmptyStatement',
ExportAllDeclaration: 'ExportAllDeclaration',
ExportDefaultDeclaration: 'ExportDefaultDeclaration',
ExportNamedDeclaration: 'ExportNamedDeclaration',
ExportSpecifier: 'ExportSpecifier',
ExpressionStatement: 'ExpressionStatement',
ForStatement: 'ForStatement',
ForOfStatement: 'ForOfStatement',
ForInStatement: 'ForInStatement',
FunctionDeclaration: 'FunctionDeclaration',
FunctionExpression: 'FunctionExpression',
Identifier: 'Identifier',
IfStatement: 'IfStatement',
ImportDeclaration: 'ImportDeclaration',
ImportDefaultSpecifier: 'ImportDefaultSpecifier',
ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
ImportSpecifier: 'ImportSpecifier',
Literal: 'Literal',
LabeledStatement: 'LabeledStatement',
LogicalExpression: 'LogicalExpression',
MemberExpression: 'MemberExpression',
MetaProperty: 'MetaProperty',
MethodDefinition: 'MethodDefinition',
NewExpression: 'NewExpression',
ObjectExpression: 'ObjectExpression',
ObjectPattern: 'ObjectPattern',
Program: 'Program',
Property: 'Property',
RestElement: 'RestElement',
ReturnStatement: 'ReturnStatement',
SequenceExpression: 'SequenceExpression',
SpreadElement: 'SpreadElement',
Super: 'Super',
SwitchCase: 'SwitchCase',
SwitchStatement: 'SwitchStatement',
TaggedTemplateExpression: 'TaggedTemplateExpression',
TemplateElement: 'TemplateElement',
TemplateLiteral: 'TemplateLiteral',
ThisExpression: 'ThisExpression',
ThrowStatement: 'ThrowStatement',
TryStatement: 'TryStatement',
UnaryExpression: 'UnaryExpression',
UpdateExpression: 'UpdateExpression',
VariableDeclaration: 'VariableDeclaration',
VariableDeclarator: 'VariableDeclarator',
WhileStatement: 'WhileStatement',
WithStatement: 'WithStatement',
YieldExpression: 'YieldExpression'
};
/***/ },
/* 3 */
/***/ function(module, exports, __nested_webpack_require_15019__) {
"use strict";
/* istanbul ignore next */
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var character_1 = __nested_webpack_require_15019__(4);
var JSXNode = __nested_webpack_require_15019__(5);
var jsx_syntax_1 = __nested_webpack_require_15019__(6);
var Node = __nested_webpack_require_15019__(7);
var parser_1 = __nested_webpack_require_15019__(8);
var token_1 = __nested_webpack_require_15019__(13);
var xhtml_entities_1 = __nested_webpack_require_15019__(14);
token_1.TokenName[100 /* Identifier */] = 'JSXIdentifier';
token_1.TokenName[101 /* Text */] = 'JSXText';
// Fully qualified element name, e.g. <svg:path> returns "svg:path"
function getQualifiedElementName(elementName) {
var qualifiedName;
switch (elementName.type) {
case jsx_syntax_1.JSXSyntax.JSXIdentifier:
var id = elementName;
qualifiedName = id.name;
break;
case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
var ns = elementName;
qualifiedName = getQualifiedElementName(ns.namespace) + ':' +
getQualifiedElementName(ns.name);
break;
case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
var expr = elementName;
qualifiedName = getQualifiedElementName(expr.object) + '.' +
getQualifiedElementName(expr.property);
break;
/* istanbul ignore next */
default:
break;
}
return qualifiedName;
}
var JSXParser = (function (_super) {
__extends(JSXParser, _super);
function JSXParser(code, options, delegate) {
return _super.call(this, code, options, delegate) || this;
}
JSXParser.prototype.parsePrimaryExpression = function () {
return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this);
};
JSXParser.prototype.startJSX = function () {
// Unwind the scanner before the lookahead token.
this.scanner.index = this.startMarker.index;
this.scanner.lineNumber = this.startMarker.line;
this.scanner.lineStart = this.startMarker.index - this.startMarker.column;
};
JSXParser.prototype.finishJSX = function () {
// Prime the next lookahead.
this.nextToken();
};
JSXParser.prototype.reenterJSX = function () {
this.startJSX();
this.expectJSX('}');
// Pop the closing '}' added from the lookahead.
if (this.config.tokens) {
this.tokens.pop();
}
};
JSXParser.prototype.createJSXNode = function () {
this.collectComments();
return {
index: this.scanner.index,
line: this.scanner.lineNumber,
column: this.scanner.index - this.scanner.lineStart
};
};
JSXParser.prototype.createJSXChildNode = function () {
return {
index: this.scanner.index,
line: this.scanner.lineNumber,
column: this.scanner.index - this.scanner.lineStart
};
};
JSXParser.prototype.scanXHTMLEntity = function (quote) {
var result = '&';
var valid = true;
var terminated = false;
var numeric = false;
var hex = false;
while (!this.scanner.eof() && valid && !terminated) {
var ch = this.scanner.source[this.scanner.index];
if (ch === quote) {
break;
}
terminated = (ch === ';');
result += ch;
++this.scanner.index;
if (!terminated) {
switch (result.length) {
case 2:
// e.g. '&#123;'
numeric = (ch === '#');
break;
case 3:
if (numeric) {
// e.g. '&#x41;'
hex = (ch === 'x');
valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0));
numeric = numeric && !hex;
}
break;
default:
valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0)));
valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0)));
break;
}
}
}
if (valid && terminated && result.length > 2) {
// e.g. '&#x41;' becomes just '#x41'
var str = result.substr(1, result.length - 2);
if (numeric && str.length > 1) {
result = String.fromCharCode(parseInt(str.substr(1), 10));
}
else if (hex && str.length > 2) {
result = String.fromCharCode(parseInt('0' + str.substr(1), 16));
}
else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) {
result = xhtml_entities_1.XHTMLEntities[str];
}
}
return result;
};
// Scan the next JSX token. This replaces Scanner#lex when in JSX mode.
JSXParser.prototype.lexJSX = function () {
var cp = this.scanner.source.charCodeAt(this.scanner.index);
// < > / : = { }
if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
var value = this.scanner.source[this.scanner.index++];
return {
type: 7 /* Punctuator */,
value: value,
lineNumber: this.scanner.lineNumber,
lineStart: this.scanner.lineStart,
start: this.scanner.index - 1,
end: this.scanner.index
};
}
// " '
if (cp === 34 || cp === 39) {
var start = this.scanner.index;
var quote = this.scanner.source[this.scanner.index++];
var str = '';
while (!this.scanner.eof()) {
var ch = this.scanner.source[this.scanner.index++];
if (ch === quote) {
break;
}
else if (ch === '&') {
str += this.scanXHTMLEntity(quote);
}
else {
str += ch;
}
}
return {
type: 8 /* StringLiteral */,
value: str,
lineNumber: this.scanner.lineNumber,
lineStart: this.scanner.lineStart,
start: start,
end: this.scanner.index
};
}
// ... or .
if (cp === 46) {
var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);
var value = (n1 === 46 && n2 === 46) ? '...' : '.';
var start = this.scanner.index;
this.scanner.index += value.length;
return {
type: 7 /* Punctuator */,
value: value,
lineNumber: this.scanner.lineNumber,
lineStart: this.scanner.lineStart,
start: start,
end: this.scanner.index
};
}
// `
if (cp === 96) {
// Only placeholder, since it will be rescanned as a real assignment expression.
return {
type: 10 /* Template */,
value: '',
lineNumber: this.scanner.lineNumber,
lineStart: this.scanner.lineStart,
start: this.scanner.index,
end: this.scanner.index
};
}
// Identifer can not contain backslash (char code 92).
if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) {
var start = this.scanner.index;
++this.scanner.index;
while (!this.scanner.eof()) {
var ch = this.scanner.source.charCodeAt(this.scanner.index);
if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) {
++this.scanner.index;
}
else if (ch === 45) {
// Hyphen (char code 45) can be part of an identifier.
++this.scanner.index;
}
else {
break;
}
}
var id = this.scanner.source.slice(start, this.scanner.index);
return {
type: 100 /* Identifier */,
value: id,
lineNumber: this.scanner.lineNumber,
lineStart: this.scanner.lineStart,
start: start,
end: this.scanner.index
};
}
return this.scanner.lex();
};
JSXParser.prototype.nextJSXToken = function () {
this.collectComments();
this.startMarker.index = this.scanner.index;
this.startMarker.line = this.scanner.lineNumber;
this.startMarker.column = this.scanner.index - this.scanner.lineStart;
var token = this.lexJSX();
this.lastMarker.index = this.scanner.index;
this.lastMarker.line = this.scanner.lineNumber;
this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
if (this.config.tokens) {
this.tokens.push(this.convertToken(token));
}
return token;
};
JSXParser.prototype.nextJSXText = function () {
this.startMarker.index = this.scanner.index;
this.startMarker.line = this.scanner.lineNumber;
this.startMarker.column = this.scanner.index - this.scanner.lineStart;
var start = this.scanner.index;
var text = '';
while (!this.scanner.eof()) {
var ch = this.scanner.source[this.scanner.index];
if (ch === '{' || ch === '<') {
break;
}
++this.scanner.index;
text += ch;
if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
++this.scanner.lineNumber;
if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') {
++this.scanner.index;
}
this.scanner.lineStart = this.scanner.index;
}
}
this.lastMarker.index = this.scanner.index;
this.lastMarker.line = this.scanner.lineNumber;
this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
var token = {
type: 101 /* Text */,
value: text,
lineNumber: this.scanner.lineNumber,
lineStart: this.scanner.lineStart,
start: start,
end: this.scanner.index
};
if ((text.length > 0) && this.config.tokens) {
this.tokens.push(this.convertToken(token));
}
return token;
};
JSXParser.prototype.peekJSXToken = function () {
var state = this.scanner.saveState();
this.scanner.scanComments();
var next = this.lexJSX();
this.scanner.restoreState(state);
return next;
};
// Expect the next JSX token to match the specified punctuator.
// If not, an exception will be thrown.
JSXParser.prototype.expectJSX = function (value) {
var token = this.nextJSXToken();
if (token.type !== 7 /* Punctuator */ || token.value !== value) {
this.throwUnexpectedToken(token);
}
};
// Return true if the next JSX token matches the specified punctuator.
JSXParser.prototype.matchJSX = function (value) {
var next = this.peekJSXToken();
return next.type === 7 /* Punctuator */ && next.value === value;
};
JSXParser.prototype.parseJSXIdentifier = function () {
var node = this.createJSXNode();
var token = this.nextJSXToken();
if (token.type !== 100 /* Identifier */) {
this.throwUnexpectedToken(token);
}
return this.finalize(node, new JSXNode.JSXIdentifier(token.value));
};
JSXParser.prototype.parseJSXElementName = function () {
var node = this.createJSXNode();
var elementName = this.parseJSXIdentifier();
if (this.matchJSX(':')) {
var namespace = elementName;
this.expectJSX(':');
var name_1 = this.parseJSXIdentifier();
elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1));
}
else if (this.matchJSX('.')) {
while (this.matchJSX('.')) {
var object = elementName;
this.expectJSX('.');
var property = this.parseJSXIdentifier();
elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property));
}
}
return elementName;
};
JSXParser.prototype.parseJSXAttributeName = function () {
var node = this.createJSXNode();
var attributeName;
var identifier = this.parseJSXIdentifier();
if (this.matchJSX(':')) {
var namespace = identifier;
this.expectJSX(':');
var name_2 = this.parseJSXIdentifier();
attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2));
}
else {
attributeName = identifier;
}
return attributeName;
};
JSXParser.prototype.parseJSXStringLiteralAttribute = function () {
var node = this.createJSXNode();
var token = this.nextJSXToken();
if (token.type !== 8 /* StringLiteral */) {
this.throwUnexpectedToken(token);
}
var raw = this.getTokenRaw(token);
return this.finalize(node, new Node.Literal(token.value, raw));
};
JSXParser.prototype.parseJSXExpressionAttribute = function () {
var node = this.createJSXNode();
this.expectJSX('{');
this.finishJSX();
if (this.match('}')) {
this.tolerateError('JSX attributes must only be assigned a non-empty expression');
}
var expression = this.parseAssignmentExpression();
this.reenterJSX();
return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
};
JSXParser.prototype.parseJSXAttributeValue = function () {
return this.matchJSX('{') ? this.parseJSXExpressionAttribute() :
this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();
};
JSXParser.prototype.parseJSXNameValueAttribute = function () {
var node = this.createJSXNode();
var name = this.parseJSXAttributeName();
var value = null;
if (this.matchJSX('=')) {
this.expectJSX('=');
value = this.parseJSXAttributeValue();
}
return this.finalize(node, new JSXNode.JSXAttribute(name, value));
};
JSXParser.prototype.parseJSXSpreadAttribute = function () {
var node = this.createJSXNode();
this.expectJSX('{');
this.expectJSX('...');
this.finishJSX();
var argument = this.parseAssignmentExpression();
this.reenterJSX();
return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument));
};
JSXParser.prototype.parseJSXAttributes = function () {
var attributes = [];
while (!this.matchJSX('/') && !this.matchJSX('>')) {
var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() :
this.parseJSXNameValueAttribute();
attributes.push(attribute);
}
return attributes;
};
JSXParser.prototype.parseJSXOpeningElement = function () {
var node = this.createJSXNode();
this.expectJSX('<');
var name = this.parseJSXElementName();
var attributes = this.parseJSXAttributes();
var selfClosing = this.matchJSX('/');
if (selfClosing) {
this.expectJSX('/');
}
this.expectJSX('>');
return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
};
JSXParser.prototype.parseJSXBoundaryElement = function () {
var node = this.createJSXNode();
this.expectJSX('<');
if (this.matchJSX('/')) {
this.expectJSX('/');
var name_3 = this.parseJSXElementName();
this.expectJSX('>');
return this.finalize(node, new JSXNode.JSXClosingElement(name_3));
}
var name = this.parseJSXElementName();
var attributes = this.parseJSXAttributes();
var selfClosing = this.matchJSX('/');
if (selfClosing) {
this.expectJSX('/');
}
this.expectJSX('>');
return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
};
JSXParser.prototype.parseJSXEmptyExpression = function () {
var node = this.createJSXChildNode();
this.collectComments();
this.lastMarker.index = this.scanner.index;
this.lastMarker.line = this.scanner.lineNumber;
this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
return this.finalize(node, new JSXNode.JSXEmptyExpression());
};
JSXParser.prototype.parseJSXExpressionContainer = function () {
var node = this.createJSXNode();
this.expectJSX('{');
var expression;
if (this.matchJSX('}')) {
expression = this.parseJSXEmptyExpression();
this.expectJSX('}');
}
else {
this.finishJSX();
expression = this.parseAssignmentExpression();
this.reenterJSX();
}
return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
};
JSXParser.prototype.parseJSXChildren = function () {
var children = [];
while (!this.scanner.eof()) {
var node = this.createJSXChildNode();
var token = this.nextJSXText();
if (token.start < token.end) {
var raw = this.getTokenRaw(token);
var child = this.finalize(node, new JSXNode.JSXText(token.value, raw));
children.push(child);
}
if (this.scanner.source[this.scanner.index] === '{') {
var container = this.parseJSXExpressionContainer();
children.push(container);
}
else {
break;
}
}
return children;
};
JSXParser.prototype.parseComplexJSXElement = function (el) {
var stack = [];
while (!this.scanner.eof()) {
el.children = el.children.concat(this.parseJSXChildren());
var node = this.createJSXChildNode();
var element = this.parseJSXBoundaryElement();
if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {
var opening = element;
if (opening.selfClosing) {
var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null));
el.children.push(child);
}
else {
stack.push(el);
el = { node: node, opening: opening, closing: null, children: [] };
}
}
if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {
el.closing = element;
var open_1 = getQualifiedElementName(el.opening.name);
var close_1 = getQualifiedElementName(el.closing.name);
if (open_1 !== close_1) {
this.tolerateError('Expected corresponding JSX closing tag for %0', open_1);
}
if (stack.length > 0) {
var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
el = stack[stack.length - 1];
el.children.push(child);
stack.pop();
}
else {
break;
}
}
}
return el;
};
JSXParser.prototype.parseJSXElement = function () {
var node = this.createJSXNode();
var opening = this.parseJSXOpeningElement();
var children = [];
var closing = null;
if (!opening.selfClosing) {
var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children });
children = el.children;
closing = el.closing;
}
return this.finalize(node, new JSXNode.JSXElement(opening, children, closing));
};
JSXParser.prototype.parseJSXRoot = function () {
// Pop the opening '<' added from the lookahead.
if (this.config.tokens) {
this.tokens.pop();
}
this.startJSX();
var element = this.parseJSXElement();
this.finishJSX();
return element;
};
JSXParser.prototype.isStartOfExpression = function () {
return _super.prototype.isStartOfExpression.call(this) || this.match('<');
};
return JSXParser;
}(parser_1.Parser));
exports.JSXParser = JSXParser;
/***/ },
/* 4 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// See also tools/generate-unicode-regex.js.
var Regex = {
// Unicode v8.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
// Unicode v8.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
};
exports.Character = {
/* tslint:disable:no-bitwise */
fromCodePoint: function (cp) {
return (cp < 0x10000) ? String.fromCharCode(cp) :
String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
},
// https://tc39.github.io/ecma262/#sec-white-space
isWhiteSpace: function (cp) {
return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) ||
(cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0);
},
// https://tc39.github.io/ecma262/#sec-line-terminators
isLineTerminator: function (cp) {
return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029);
},
// https://tc39.github.io/ecma262/#sec-names-and-keywords
isIdentifierStart: function (cp) {
return (cp === 0x24) || (cp === 0x5F) ||
(cp >= 0x41 && cp <= 0x5A) ||
(cp >= 0x61 && cp <= 0x7A) ||
(cp === 0x5C) ||
((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp)));
},
isIdentifierPart: function (cp) {
return (cp === 0x24) || (cp === 0x5F) ||
(cp >= 0x41 && cp <= 0x5A) ||
(cp >= 0x61 && cp <= 0x7A) ||
(cp >= 0x30 && cp <= 0x39) ||
(cp === 0x5C) ||
((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp)));
},
// https://tc39.github.io/ecma262/#sec-literals-numeric-literals
isDecimalDigit: function (cp) {
return (cp >= 0x30 && cp <= 0x39); // 0..9
},
isHexDigit: function (cp) {
return (cp >= 0x30 && cp <= 0x39) ||
(cp >= 0x41 && cp <= 0x46) ||
(cp >= 0x61 && cp <= 0x66); // a..f
},
isOctalDigit: function (cp) {
return (cp >= 0x30 && cp <= 0x37); // 0..7
}
};
/***/ },
/* 5 */
/***/ function(module, exports, __nested_webpack_require_54354__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_syntax_1 = __nested_webpack_require_54354__(6);
/* tslint:disable:max-classes-per-file */
var JSXClosingElement = (function () {
function JSXClosingElement(name) {
this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;
this.name = name;
}
return JSXClosingElement;
}());
exports.JSXClosingElement = JSXClosingElement;
var JSXElement = (function () {
function JSXElement(openingElement, children, closingElement) {
this.type = jsx_syntax_1.JSXSyntax.JSXElement;
this.openingElement = openingElement;
this.children = children;
this.closingElement = closingElement;
}
return JSXElement;
}());
exports.JSXElement = JSXElement;
var JSXEmptyExpression = (function () {
function JSXEmptyExpression() {
this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
}
return JSXEmptyExpression;
}());
exports.JSXEmptyExpression = JSXEmptyExpression;
var JSXExpressionContainer = (function () {
function JSXExpressionContainer(expression) {
this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
this.expression = expression;
}
return JSXExpressionContainer;
}());
exports.JSXExpressionContainer = JSXExpressionContainer;
var JSXIdentifier = (function () {
function JSXIdentifier(name) {
this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
this.name = name;
}
return JSXIdentifier;
}());
exports.JSXIdentifier = JSXIdentifier;
var JSXMemberExpression = (function () {
function JSXMemberExpression(object, property) {
this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
this.object = object;
this.property = property;
}
return JSXMemberExpression;
}());
exports.JSXMemberExpression = JSXMemberExpression;
var JSXAttribute = (function () {
function JSXAttribute(name, value) {
this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
this.name = name;
this.value = value;
}
return JSXAttribute;
}());
exports.JSXAttribute = JSXAttribute;
var JSXNamespacedName = (function () {
function JSXNamespacedName(namespace, name) {
this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
this.namespace = namespace;
this.name = name;
}
return JSXNamespacedName;
}());
exports.JSXNamespacedName = JSXNamespacedName;
var JSXOpeningElement = (function () {
function JSXOpeningElement(name, selfClosing, attributes) {
this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
this.name = name;
this.selfClosing = selfClosing;
this.attributes = attributes;
}
return JSXOpeningElement;
}());
exports.JSXOpeningElement = JSXOpeningElement;
var JSXSpreadAttribute = (function () {
function JSXSpreadAttribute(argument) {
this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
this.argument = argument;
}
return JSXSpreadAttribute;
}());
exports.JSXSpreadAttribute = JSXSpreadAttribute;
var JSXText = (function () {
function JSXText(value, raw) {
this.type = jsx_syntax_1.JSXSyntax.JSXText;
this.value = value;
this.raw = raw;
}
return JSXText;
}());
exports.JSXText = JSXText;
/***/ },
/* 6 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSXSyntax = {
JSXAttribute: 'JSXAttribute',
JSXClosingElement: 'JSXClosingElement',
JSXElement: 'JSXElement',
JSXEmptyExpression: 'JSXEmptyExpression',
JSXExpressionContainer: 'JSXExpressionContainer',
JSXIdentifier: 'JSXIdentifier',
JSXMemberExpression: 'JSXMemberExpression',
JSXNamespacedName: 'JSXNamespacedName',
JSXOpeningElement: 'JSXOpeningElement',
JSXSpreadAttribute: 'JSXSpreadAttribute',
JSXText: 'JSXText'
};
/***/ },
/* 7 */
/***/ function(module, exports, __nested_webpack_require_58416__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var syntax_1 = __nested_webpack_require_58416__(2);
/* tslint:disable:max-classes-per-file */
var ArrayExpression = (function () {
function ArrayExpression(elements) {
this.type = syntax_1.Syntax.ArrayExpression;
this.elements = elements;
}
return ArrayExpression;
}());
exports.ArrayExpression = ArrayExpression;
var ArrayPattern = (function () {
function ArrayPattern(elements) {
this.type = syntax_1.Syntax.ArrayPattern;
this.elements = elements;
}
return ArrayPattern;
}());
exports.ArrayPattern = ArrayPattern;
var ArrowFunctionExpression = (function () {
function ArrowFunctionExpression(params, body, expression) {
this.type = syntax_1.Syntax.ArrowFunctionExpression;
this.id = null;
this.params = params;
this.body = body;
this.generator = false;
this.expression = expression;
this.async = false;
}
return ArrowFunctionExpression;
}());
exports.ArrowFunctionExpression = ArrowFunctionExpression;
var AssignmentExpression = (function () {
function AssignmentExpression(operator, left, right) {
this.type = syntax_1.Syntax.AssignmentExpression;
this.operator = operator;
this.left = left;
this.right = right;
}
return AssignmentExpression;
}());
exports.AssignmentExpression = AssignmentExpression;
var AssignmentPattern = (function () {
function AssignmentPattern(left, right) {
this.type = syntax_1.Syntax.AssignmentPattern;
this.left = left;
this.right = right;
}
return AssignmentPattern;
}());
exports.AssignmentPattern = AssignmentPattern;
var AsyncArrowFunctionExpression = (function () {
function AsyncArrowFunctionExpression(params, body, expression) {
this.type = syntax_1.Syntax.ArrowFunctionExpression;
this.id = null;
this.params = params;
this.body = body;
this.generator = false;
this.expression = expression;
this.async = true;
}
return AsyncArrowFunctionExpression;
}());
exports.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
var AsyncFunctionDeclaration = (function () {
function AsyncFunctionDeclaration(id, params, body) {
this.type = syntax_1.Syntax.FunctionDeclaration;
this.id = id;
this.params = params;
this.body = body;
this.generator = false;
this.expression = false;
this.async = true;
}
return AsyncFunctionDeclaration;
}());
exports.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
var AsyncFunctionExpression = (function () {
function AsyncFunctionExpression(id, params, body) {
this.type = syntax_1.Syntax.FunctionExpression;
this.id = id;
this.params = params;
this.body = body;
this.generator = false;
this.expression = false;
this.async = true;
}
return AsyncFunctionExpression;
}());
exports.AsyncFunctionExpression = AsyncFunctionExpression;
var AwaitExpression = (function () {
function AwaitExpression(argument) {
this.type = syntax_1.Syntax.AwaitExpression;
this.argument = argument;
}
return AwaitExpression;
}());
exports.AwaitExpression = AwaitExpression;
var BinaryExpression = (function () {
function BinaryExpression(operator, left, right) {
var logical = (operator === '||' || operator === '&&');
this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;
this.operator = operator;
this.left = left;
this.right = right;
}
return BinaryExpression;
}());
exports.BinaryExpression = BinaryExpression;
var BlockStatement = (function () {
function BlockStatement(body) {
this.type = syntax_1.Syntax.BlockStatement;
this.body = body;
}
return BlockStatement;
}());
exports.BlockStatement = BlockStatement;
var BreakStatement = (function () {
function BreakStatement(label) {
this.type = syntax_1.Syntax.BreakStatement;
this.label = label;
}
return BreakStatement;
}());
exports.BreakStatement = BreakStatement;
var CallExpression = (function () {
function CallExpression(callee, args) {
this.type = syntax_1.Syntax.CallExpression;
this.callee = callee;
this.arguments = args;
}
return CallExpression;
}());
exports.CallExpression = CallExpression;
var CatchClause = (function () {
function CatchClause(param, body) {
this.type = syntax_1.Syntax.CatchClause;
this.param = param;
this.body = body;
}
return CatchClause;
}());
exports.CatchClause = CatchClause;
var ClassBody = (function () {
function ClassBody(body) {
this.type = syntax_1.Syntax.ClassBody;
this.body = body;
}
return ClassBody;
}());
exports.ClassBody = ClassBody;
var ClassDeclaration = (function () {
function ClassDeclaration(id, superClass, body) {
this.type = syntax_1.Syntax.ClassDeclaration;
this.id = id;
this.superClass = superClass;
this.body = body;
}
return ClassDeclaration;
}());
exports.ClassDeclaration = ClassDeclaration;
var ClassExpression = (function () {
function ClassExpression(id, superClass, body) {
this.type = syntax_1.Syntax.ClassExpression;
this.id = id;
this.superClass = superClass;
this.body = body;
}
return ClassExpression;
}());
exports.ClassExpression = ClassExpression;
var ComputedMemberExpression = (function () {
function ComputedMemberExpression(object, property) {
this.type = syntax_1.Syntax.MemberExpression;
this.computed = true;
this.object = object;
this.property = property;
}
return ComputedMemberExpression;
}());
exports.ComputedMemberExpression = ComputedMemberExpression;
var ConditionalExpression = (function () {
function ConditionalExpression(test, consequent, alternate) {
this.type = syntax_1.Syntax.ConditionalExpression;
this.test = test;
this.consequent = consequent;
this.alternate = alternate;
}
return ConditionalExpression;
}());
exports.ConditionalExpression = ConditionalExpression;
var ContinueStatement = (function () {
function ContinueStatement(label) {
this.type = syntax_1.Syntax.ContinueStatement;
this.label = label;
}
return ContinueStatement;
}());
exports.ContinueStatement = ContinueStatement;
var DebuggerStatement = (function () {
function DebuggerStatement() {
this.type = syntax_1.Syntax.DebuggerStatement;
}
return DebuggerStatement;
}());
exports.DebuggerStatement = DebuggerStatement;
var Directive = (function () {
function Directive(expression, directive) {
this.type = syntax_1.Syntax.ExpressionStatement;
this.expression = expression;
this.directive = directive;
}
return Directive;
}());
exports.Directive = Directive;
var DoWhileStatement = (function () {
function DoWhileStatement(body, test) {
this.type = syntax_1.Syntax.DoWhileStatement;
this.body = body;
this.test = test;
}
return DoWhileStatement;
}());
exports.DoWhileStatement = DoWhileStatement;
var EmptyStatement = (function () {
function EmptyStatement() {
this.type = syntax_1.Syntax.EmptyStatement;
}
return EmptyStatement;
}());
exports.EmptyStatement = EmptyStatement;
var ExportAllDeclaration = (function () {
function ExportAllDeclaration(source) {
this.type = syntax_1.Syntax.ExportAllDeclaration;
this.source = source;
}
return ExportAllDeclaration;
}());
exports.ExportAllDeclaration = ExportAllDeclaration;
var ExportDefaultDeclaration = (function () {
function ExportDefaultDeclaration(declaration) {
this.type = syntax_1.Syntax.ExportDefaultDeclaration;
this.declaration = declaration;
}
return ExportDefaultDeclaration;
}());
exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
var ExportNamedDeclaration = (function () {
function ExportNamedDeclaration(declaration, specifiers, source) {
this.type = syntax_1.Syntax.ExportNamedDeclaration;
this.declaration = declaration;
this.specifiers = specifiers;
this.source = source;
}
return ExportNamedDeclaration;
}());
exports.ExportNamedDeclaration = ExportNamedDeclaration;
var ExportSpecifier = (function () {
function ExportSpecifier(local, exported) {
this.type = syntax_1.Syntax.ExportSpecifier;
this.exported = exported;
this.local = local;
}
return ExportSpecifier;
}());
exports.ExportSpecifier = ExportSpecifier;
var ExpressionStatement = (function () {
function ExpressionStatement(expression) {
this.type = syntax_1.Syntax.ExpressionStatement;
this.expression = expression;
}
return ExpressionStatement;
}());
exports.ExpressionStatement = ExpressionStatement;
var ForInStatement = (function () {
function ForInStatement(left, right, body) {
this.type = syntax_1.Syntax.ForInStatement;
this.left = left;
this.right = right;
this.body = body;
this.each = false;
}
return ForInStatement;
}());
exports.ForInStatement = ForInStatement;
var ForOfStatement = (function () {
function ForOfStatement(left, right, body) {
this.type = syntax_1.Syntax.ForOfStatement;
this.left = left;
this.right = right;
this.body = body;
}
return ForOfStatement;
}());
exports.ForOfStatement = ForOfStatement;
var ForStatement = (function () {
function ForStatement(init, test, update, body) {
this.type = syntax_1.Syntax.ForStatement;
this.init = init;
this.test = test;
this.update = update;
this.body = body;
}
return ForStatement;
}());
exports.ForStatement = ForStatement;
var FunctionDeclaration = (function () {
function FunctionDeclaration(id, params, body, generator) {
this.type = syntax_1.Syntax.FunctionDeclaration;
this.id = id;
this.params = params;
this.body = body;
this.generator = generator;
this.expression = false;
this.async = false;
}
return FunctionDeclaration;
}());
exports.FunctionDeclaration = FunctionDeclaration;
var FunctionExpression = (function () {
function FunctionExpression(id, params, body, generator) {
this.type = syntax_1.Syntax.FunctionExpression;
this.id = id;
this.params = params;
this.body = body;
this.generator = generator;
this.expression = false;
this.async = false;
}
return FunctionExpression;
}());
exports.FunctionExpression = FunctionExpression;
var Identifier = (function () {
function Identifier(name) {
this.type = syntax_1.Syntax.Identifier;
this.name = name;
}
return Identifier;
}());
exports.Identifier = Identifier;
var IfStatement = (function () {
function IfStatement(test, consequent, alternate) {
this.type = syntax_1.Syntax.IfStatement;
this.test = test;
this.consequent = consequent;
this.alternate = alternate;
}
return IfStatement;
}());
exports.IfStatement = IfStatement;
var ImportDeclaration = (function () {
function ImportDeclaration(specifiers, source) {
this.type = syntax_1.Syntax.ImportDeclaration;
this.specifiers = specifiers;
this.source = source;
}
return ImportDeclaration;
}());
exports.ImportDeclaration = ImportDeclaration;
var ImportDefaultSpecifier = (function () {
function ImportDefaultSpecifier(local) {
this.type = syntax_1.Syntax.ImportDefaultSpecifier;
this.local = local;
}
return ImportDefaultSpecifier;
}());
exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
var ImportNamespaceSpecifier = (function () {
function ImportNamespaceSpecifier(local) {
this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
this.local = local;
}
return ImportNamespaceSpecifier;
}());
exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
var ImportSpecifier = (function () {
function ImportSpecifier(local, imported) {
this.type = syntax_1.Syntax.ImportSpecifier;
this.local = local;
this.imported = imported;
}
return ImportSpecifier;
}());
exports.ImportSpecifier = ImportSpecifier;
var LabeledStatement = (function () {
function LabeledStatement(label, body) {
this.type = syntax_1.Syntax.LabeledStatement;
this.label = label;
this.body = body;
}
return LabeledStatement;
}());
exports.LabeledStatement = LabeledStatement;
var Literal = (function () {
function Literal(value, raw) {
this.type = syntax_1.Syntax.Literal;
this.value = value;
this.raw = raw;
}
return Literal;
}());
exports.Literal = Literal;
var MetaProperty = (function () {
function MetaProperty(meta, property) {
this.type = syntax_1.Syntax.MetaProperty;
this.meta = meta;
this.property = property;
}
return MetaProperty;
}());
exports.MetaProperty = MetaProperty;
var MethodDefinition = (function () {
function MethodDefinition(key, computed, value, kind, isStatic) {
this.type = syntax_1.Syntax.MethodDefinition;
this.key = key;
this.computed = computed;
this.value = value;
this.kind = kind;
this.static = isStatic;
}
return MethodDefinition;
}());
exports.MethodDefinition = MethodDefinition;
var Module = (function () {
function Module(body) {
this.type = syntax_1.Syntax.Program;
this.body = body;
this.sourceType = 'module';
}
return Module;
}());
exports.Module = Module;
var NewExpression = (function () {
function NewExpression(callee, args) {
this.type = syntax_1.Syntax.NewExpression;
this.callee = callee;
this.arguments = args;
}
return NewExpression;
}());
exports.NewExpression = NewExpression;
var ObjectExpression = (function () {
function ObjectExpression(properties) {
this.type = syntax_1.Syntax.ObjectExpression;
this.properties = properties;
}
return ObjectExpression;
}());
exports.ObjectExpression = ObjectExpression;
var ObjectPattern = (function () {
function ObjectPattern(properties) {
this.type = syntax_1.Syntax.ObjectPattern;
this.properties = properties;
}
return ObjectPattern;
}());
exports.ObjectPattern = ObjectPattern;
var Property = (function () {
function Property(kind, key, computed, value, method, shorthand) {
this.type = syntax_1.Syntax.Property;
this.key = key;
this.computed = computed;
this.value = value;
this.kind = kind;
this.method = method;
this.shorthand = shorthand;
}
return Property;
}());
exports.Property = Property;
var RegexLiteral = (function () {
function RegexLiteral(value, raw, pattern, flags) {
this.type = syntax_1.Syntax.Literal;
this.value = value;
this.raw = raw;
this.regex = { pattern: pattern, flags: flags };
}
return RegexLiteral;
}());
exports.RegexLiteral = RegexLiteral;
var RestElement = (function () {
function RestElement(argument) {
this.type = syntax_1.Syntax.RestElement;
this.argument = argument;
}
return RestElement;
}());
exports.RestElement = RestElement;
var ReturnStatement = (function () {
function ReturnStatement(argument) {
this.type = syntax_1.Syntax.ReturnStatement;
this.argument = argument;
}
return ReturnStatement;
}());
exports.ReturnStatement = ReturnStatement;
var Script = (function () {
function Script(body) {
this.type = syntax_1.Syntax.Program;
this.body = body;
this.sourceType = 'script';
}
return Script;
}());
exports.Script = Script;
var SequenceExpression = (function () {
function SequenceExpression(expressions) {
this.type = syntax_1.Syntax.SequenceExpression;
this.expressions = expressions;
}
return SequenceExpression;
}());
exports.SequenceExpression = SequenceExpression;
var SpreadElement = (function () {
function SpreadElement(argument) {
this.type = syntax_1.Syntax.SpreadElement;
this.argument = argument;
}
return SpreadElement;
}());
exports.SpreadElement = SpreadElement;
var StaticMemberExpression = (function () {
function StaticMemberExpression(object, property) {
this.type = syntax_1.Syntax.MemberExpression;
this.computed = false;
this.object = object;
this.property = property;
}
return StaticMemberExpression;
}());
exports.StaticMemberExpression = StaticMemberExpression;
var Super = (function () {
function Super() {
this.type = syntax_1.Syntax.Super;
}
return Super;
}());
exports.Super = Super;
var SwitchCase = (function () {
function SwitchCase(test, consequent) {
this.type = syntax_1.Syntax.SwitchCase;
this.test = test;
this.consequent = consequent;
}
return SwitchCase;
}());
exports.SwitchCase = SwitchCase;
var SwitchStatement = (function () {
function SwitchStatement(discriminant, cases) {
this.type = syntax_1.Syntax.SwitchStatement;
this.discriminant = discriminant;
this.cases = cases;
}
return SwitchStatement;
}());
exports.SwitchStatement = SwitchStatement;
var TaggedTemplateExpression = (function () {
function TaggedTemplateExpression(tag, quasi) {
this.type = syntax_1.Syntax.TaggedTemplateExpression;
this.tag = tag;
this.quasi = quasi;
}
return TaggedTemplateExpression;
}());
exports.TaggedTemplateExpression = TaggedTemplateExpression;
var TemplateElement = (function () {
function TemplateElement(value, tail) {
this.type = syntax_1.Syntax.TemplateElement;
this.value = value;
this.tail = tail;
}
return TemplateElement;
}());
exports.TemplateElement = TemplateElement;
var TemplateLiteral = (function () {
function TemplateLiteral(quasis, expressions) {
this.type = syntax_1.Syntax.TemplateLiteral;
this.quasis = quasis;
this.expressions = expressions;
}
return TemplateLiteral;
}());
exports.TemplateLiteral = TemplateLiteral;
var ThisExpression = (function () {
function ThisExpression() {
this.type = syntax_1.Syntax.ThisExpression;
}
return ThisExpression;
}());
exports.ThisExpression = ThisExpression;
var ThrowStatement = (function () {
function ThrowStatement(argument) {
this.type = syntax_1.Syntax.ThrowStatement;
this.argument = argument;
}
return ThrowStatement;
}());
exports.ThrowStatement = ThrowStatement;
var TryStatement = (function () {
function TryStatement(block, handler, finalizer) {
this.type = syntax_1.Syntax.TryStatement;
this.block = block;
this.handler = handler;
this.finalizer = finalizer;
}
return TryStatement;
}());
exports.TryStatement = TryStatement;
var UnaryExpression = (function () {
function UnaryExpression(operator, argument) {
this.type = syntax_1.Syntax.UnaryExpression;
this.operator = operator;
this.argument = argument;
this.prefix = true;
}
return UnaryExpression;
}());
exports.UnaryExpression = UnaryExpression;
var UpdateExpression = (function () {
function UpdateExpression(operator, argument, prefix) {
this.type = syntax_1.Syntax.UpdateExpression;
this.operator = operator;
this.argument = argument;
this.prefix = prefix;
}
return UpdateExpression;
}());
exports.UpdateExpression = UpdateExpression;
var VariableDeclaration = (function () {
function VariableDeclaration(declarations, kind) {
this.type = syntax_1.Syntax.VariableDeclaration;
this.declarations = declarations;
this.kind = kind;
}
return VariableDeclaration;
}());
exports.VariableDeclaration = VariableDeclaration;
var VariableDeclarator = (function () {
function VariableDeclarator(id, init) {
this.type = syntax_1.Syntax.VariableDeclarator;
this.id = id;
this.init = init;
}
return VariableDeclarator;
}());
exports.VariableDeclarator = VariableDeclarator;
var WhileStatement = (function () {
function WhileStatement(test, body) {
this.type = syntax_1.Syntax.WhileStatement;
this.test = test;
this.body = body;
}
return WhileStatement;
}());
exports.WhileStatement = WhileStatement;
var WithStatement = (function () {
function WithStatement(object, body) {
this.type = syntax_1.Syntax.WithStatement;
this.object = object;
this.body = body;
}
return WithStatement;
}());
exports.WithStatement = WithStatement;
var YieldExpression = (function () {
function YieldExpression(argument, delegate) {
this.type = syntax_1.Syntax.YieldExpression;
this.argument = argument;
this.delegate = delegate;
}
return YieldExpression;
}());
exports.YieldExpression = YieldExpression;
/***/ },
/* 8 */
/***/ function(module, exports, __nested_webpack_require_80491__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var assert_1 = __nested_webpack_require_80491__(9);
var error_handler_1 = __nested_webpack_require_80491__(10);
var messages_1 = __nested_webpack_require_80491__(11);
var Node = __nested_webpack_require_80491__(7);
var scanner_1 = __nested_webpack_require_80491__(12);
var syntax_1 = __nested_webpack_require_80491__(2);
var token_1 = __nested_webpack_require_80491__(13);
var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder';
var Parser = (function () {
function Parser(code, options, delegate) {
if (options === void 0) { options = {}; }
this.config = {
range: (typeof options.range === 'boolean') && options.range,
loc: (typeof options.loc === 'boolean') && options.loc,
source: null,
tokens: (typeof options.tokens === 'boolean') && options.tokens,
comment: (typeof options.comment === 'boolean') && options.comment,
tolerant: (typeof options.tolerant === 'boolean') && options.tolerant
};
if (this.config.loc && options.source && options.source !== null) {
this.config.source = String(options.source);
}
this.delegate = delegate;
this.errorHandler = new error_handler_1.ErrorHandler();
this.errorHandler.tolerant = this.config.tolerant;
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
this.scanner.trackComment = this.config.comment;
this.operatorPrecedence = {
')': 0,
';': 0,
',': 0,
'=': 0,
']': 0,
'||': 1,
'&&': 2,
'|': 3,
'^': 4,
'&': 5,
'==': 6,
'!=': 6,
'===': 6,
'!==': 6,
'<': 7,
'>': 7,
'<=': 7,
'>=': 7,
'<<': 8,
'>>': 8,
'>>>': 8,
'+': 9,
'-': 9,
'*': 11,
'/': 11,
'%': 11
};
this.lookahead = {
type: 2 /* EOF */,
value: '',
lineNumber: this.scanner.lineNumber,
lineStart: 0,
start: 0,
end: 0
};
this.hasLineTerminator = false;
this.context = {
isModule: false,
await: false,
allowIn: true,
allowStrictDirective: true,
allowYield: true,
firstCoverInitializedNameError: null,
isAssignmentTarget: false,
isBindingElement: false,
inFunctionBody: false,
inIteration: false,
inSwitch: false,
labelSet: {},
strict: false
};
this.tokens = [];
this.startMarker = {
index: 0,
line: this.scanner.lineNumber,
column: 0
};
this.lastMarker = {
index: 0,
line: this.scanner.lineNumber,
column: 0
};
this.nextToken();
this.lastMarker = {
index: this.scanner.index,
line: this.scanner.lineNumber,
column: this.scanner.index - this.scanner.lineStart
};
}
Parser.prototype.throwError = function (messageFormat) {
var values = [];
for (var _i = 1; _i < arguments.length; _i++) {
values[_i - 1] = arguments[_i];
}
var args = Array.prototype.slice.call(arguments, 1);
var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
assert_1.assert(idx < args.length, 'Message reference must be in range');
return args[idx];
});
var index = this.lastMarker.index;
var line = this.lastMarker.line;
var column = this.lastMarker.column + 1;
throw this.errorHandler.createError(index, line, column, msg);
};
Parser.prototype.tolerateError = function (messageFormat) {
var values = [];
for (var _i = 1; _i < arguments.length; _i++) {
values[_i - 1] = arguments[_i];
}
var args = Array.prototype.slice.call(arguments, 1);
var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) {
assert_1.assert(idx < args.length, 'Message reference must be in range');
return args[idx];
});
var index = this.lastMarker.index;
var line = this.scanner.lineNumber;
var column = this.lastMarker.column + 1;
this.errorHandler.tolerateError(index, line, column, msg);
};
// Throw an exception because of the token.
Parser.prototype.unexpectedTokenError = function (token, message) {
var msg = message || messages_1.Messages.UnexpectedToken;
var value;
if (token) {
if (!message) {
msg = (token.type === 2 /* EOF */) ? messages_1.Messages.UnexpectedEOS :
(token.type === 3 /* Identifier */) ? messages_1.Messages.UnexpectedIdentifier :
(token.type === 6 /* NumericLiteral */) ? messages_1.Messages.UnexpectedNumber :
(token.type === 8 /* StringLiteral */) ? messages_1.Messages.UnexpectedString :
(token.type === 10 /* Template */) ? messages_1.Messages.UnexpectedTemplate :
messages_1.Messages.UnexpectedToken;
if (token.type === 4 /* Keyword */) {
if (this.scanner.isFutureReservedWord(token.value)) {
msg = messages_1.Messages.UnexpectedReserved;
}
else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) {
msg = messages_1.Messages.StrictReservedWord;
}
}
}
value = token.value;
}
else {
value = 'ILLEGAL';
}
msg = msg.replace('%0', value);
if (token && typeof token.lineNumber === 'number') {
var index = token.start;
var line = token.lineNumber;
var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;
var column = token.start - lastMarkerLineStart + 1;
return this.errorHandler.createError(index, line, column, msg);
}
else {
var index = this.lastMarker.index;
var line = this.lastMarker.line;
var column = this.lastMarker.column + 1;
return this.errorHandler.createError(index, line, column, msg);
}
};
Parser.prototype.throwUnexpectedToken = function (token, message) {
throw this.unexpectedTokenError(token, message);
};
Parser.prototype.tolerateUnexpectedToken = function (token, message) {
this.errorHandler.tolerate(this.unexpectedTokenError(token, message));
};
Parser.prototype.collectComments = function () {
if (!this.config.comment) {
this.scanner.scanComments();
}
else {
var comments = this.scanner.scanComments();
if (comments.length > 0 && this.delegate) {
for (var i = 0; i < comments.length; ++i) {
var e = comments[i];
var node = void 0;
node = {
type: e.multiLine ? 'BlockComment' : 'LineComment',
value: this.scanner.source.slice(e.slice[0], e.slice[1])
};
if (this.config.range) {
node.range = e.range;
}
if (this.config.loc) {
node.loc = e.loc;
}
var metadata = {
start: {
line: e.loc.start.line,
column: e.loc.start.column,
offset: e.range[0]
},
end: {
line: e.loc.end.line,
column: e.loc.end.column,
offset: e.range[1]
}
};
this.delegate(node, metadata);
}
}
}
};
// From internal representation to an external structure
Parser.prototype.getTokenRaw = function (token) {
return this.scanner.source.slice(token.start, token.end);
};
Parser.prototype.convertToken = function (token) {
var t = {
type: token_1.TokenName[token.type],
value: this.getTokenRaw(token)
};
if (this.config.range) {
t.range = [token.start, token.end];
}
if (this.config.loc) {
t.loc = {
start: {
line: this.startMarker.line,
column: this.startMarker.column
},
end: {
line: this.scanner.lineNumber,
column: this.scanner.index - this.scanner.lineStart
}
};
}
if (token.type === 9 /* RegularExpression */) {
var pattern = token.pattern;
var flags = token.flags;
t.regex = { pattern: pattern, flags: flags };
}
return t;
};
Parser.prototype.nextToken = function () {
var token = this.lookahead;
this.lastMarker.index = this.scanner.index;
this.lastMarker.line = this.scanner.lineNumber;
this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
this.collectComments();
if (this.scanner.index !== this.startMarker.index) {
this.startMarker.index = this.scanner.index;
this.startMarker.line = this.scanner.lineNumber;
this.startMarker.column = this.scanner.index - this.scanner.lineStart;
}
var next = this.scanner.lex();
this.hasLineTerminator = (token.lineNumber !== next.lineNumber);
if (next && this.context.strict && next.type === 3 /* Identifier */) {
if (this.scanner.isStrictModeReservedWord(next.value)) {
next.type = 4 /* Keyword */;
}
}
this.lookahead = next;
if (this.config.tokens && next.type !== 2 /* EOF */) {
this.tokens.push(this.convertToken(next));
}
return token;
};
Parser.prototype.nextRegexToken = function () {
this.collectComments();
var token = this.scanner.scanRegExp();
if (this.config.tokens) {
// Pop the previous token, '/' or '/='
// This is added from the lookahead token.
this.tokens.pop();
this.tokens.push(this.convertToken(token));
}
// Prime the next lookahead.
this.lookahead = token;
this.nextToken();
return token;
};
Parser.prototype.createNode = function () {
return {
index: this.startMarker.index,
line: this.startMarker.line,
column: this.startMarker.column
};
};
Parser.prototype.startNode = function (token, lastLineStart) {
if (lastLineStart === void 0) { lastLineStart = 0; }
var column = token.start - token.lineStart;
var line = token.lineNumber;
if (column < 0) {
column += lastLineStart;
line--;
}
return {
index: token.start,
line: line,
column: column
};
};
Parser.prototype.finalize = function (marker, node) {
if (this.config.range) {
node.range = [marker.index, this.lastMarker.index];
}
if (this.config.loc) {
node.loc = {
start: {
line: marker.line,
column: marker.column,
},
end: {
line: this.lastMarker.line,
column: this.lastMarker.column
}
};
if (this.config.source) {
node.loc.source = this.config.source;
}
}
if (this.delegate) {
var metadata = {
start: {
line: marker.line,
column: marker.column,
offset: marker.index
},
end: {
line: this.lastMarker.line,
column: this.lastMarker.column,
offset: this.lastMarker.index
}
};
this.delegate(node, metadata);
}
return node;
};
// Expect the next token to match the specified punctuator.
// If not, an exception will be thrown.
Parser.prototype.expect = function (value) {
var token = this.nextToken();
if (token.type !== 7 /* Punctuator */ || token.value !== value) {
this.throwUnexpectedToken(token);
}
};
// Quietly expect a comma when in tolerant mode, otherwise delegates to expect().
Parser.prototype.expectCommaSeparator = function () {
if (this.config.tolerant) {
var token = this.lookahead;
if (token.type === 7 /* Punctuator */ && token.value === ',') {
this.nextToken();
}
else if (token.type === 7 /* Punctuator */ && token.value === ';') {
this.nextToken();
this.tolerateUnexpectedToken(token);
}
else {
this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken);
}
}
else {
this.expect(',');
}
};
// Expect the next token to match the specified keyword.
// If not, an exception will be thrown.
Parser.prototype.expectKeyword = function (keyword) {
var token = this.nextToken();
if (token.type !== 4 /* Keyword */ || token.value !== keyword) {
this.throwUnexpectedToken(token);
}
};
// Return true if the next token matches the specified punctuator.
Parser.prototype.match = function (value) {
return this.lookahead.type === 7 /* Punctuator */ && this.lookahead.value === value;
};
// Return true if the next token matches the specified keyword
Parser.prototype.matchKeyword = function (keyword) {
return this.lookahead.type === 4 /* Keyword */ && this.lookahead.value === keyword;
};
// Return true if the next token matches the specified contextual keyword
// (where an identifier is sometimes a keyword depending on the context)
Parser.prototype.matchContextualKeyword = function (keyword) {
return this.lookahead.type === 3 /* Identifier */ && this.lookahead.value === keyword;
};
// Return true if the next token is an assignment operator
Parser.prototype.matchAssign = function () {
if (this.lookahead.type !== 7 /* Punctuator */) {
return false;
}
var op = this.lookahead.value;
return op === '=' ||
op === '*=' ||
op === '**=' ||
op === '/=' ||
op === '%=' ||
op === '+=' ||
op === '-=' ||
op === '<<=' ||
op === '>>=' ||
op === '>>>=' ||
op === '&=' ||
op === '^=' ||
op === '|=';
};
// Cover grammar support.
//
// When an assignment expression position starts with an left parenthesis, the determination of the type
// of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead)
// or the first comma. This situation also defers the determination of all the expressions nested in the pair.
//
// There are three productions that can be parsed in a parentheses pair that needs to be determined
// after the outermost pair is closed. They are:
//
// 1. AssignmentExpression
// 2. BindingElements
// 3. AssignmentTargets
//
// In order to avoid exponential backtracking, we use two flags to denote if the production can be
// binding element or assignment target.
//
// The three productions have the relationship:
//
// BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression
//
// with a single exception that CoverInitializedName when used directly in an Expression, generates
// an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the
// first usage of CoverInitializedName and report it when we reached the end of the parentheses pair.
//
// isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not
// effect the current flags. This means the production the parser parses is only used as an expression. Therefore
// the CoverInitializedName check is conducted.
//
// inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates
// the flags outside of the parser. This means the production the parser parses is used as a part of a potential
// pattern. The CoverInitializedName check is deferred.
Parser.prototype.isolateCoverGrammar = function (parseFunction) {
var previousIsBindingElement = this.context.isBindingElement;
var previousIsAssignmentTarget = this.context.isAssignmentTarget;
var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
this.context.isBindingElement = true;
this.context.isAssignmentTarget = true;
this.context.firstCoverInitializedNameError = null;
var result = parseFunction.call(this);
if (this.context.firstCoverInitializedNameError !== null) {
this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);
}
this.context.isBindingElement = previousIsBindingElement;
this.context.isAssignmentTarget = previousIsAssignmentTarget;
this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError;
return result;
};
Parser.prototype.inheritCoverGrammar = function (parseFunction) {
var previousIsBindingElement = this.context.isBindingElement;
var previousIsAssignmentTarget = this.context.isAssignmentTarget;
var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
this.context.isBindingElement = true;
this.context.isAssignmentTarget = true;
this.context.firstCoverInitializedNameError = null;
var result = parseFunction.call(this);
this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement;
this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget;
this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError;
return result;
};
Parser.prototype.consumeSemicolon = function () {
if (this.match(';')) {
this.nextToken();
}
else if (!this.hasLineTerminator) {
if (this.lookahead.type !== 2 /* EOF */ && !this.match('}')) {
this.throwUnexpectedToken(this.lookahead);
}
this.lastMarker.index = this.startMarker.index;
this.lastMarker.line = this.startMarker.line;
this.lastMarker.column = this.startMarker.column;
}
};
// https://tc39.github.io/ecma262/#sec-primary-expression
Parser.prototype.parsePrimaryExpression = function () {
var node = this.createNode();
var expr;
var token, raw;
switch (this.lookahead.type) {
case 3 /* Identifier */:
if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') {
this.tolerateUnexpectedToken(this.lookahead);
}
expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value));
break;
case 6 /* NumericLiteral */:
case 8 /* StringLiteral */:
if (this.context.strict && this.lookahead.octal) {
this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral);
}
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
token = this.nextToken();
raw = this.getTokenRaw(token);
expr = this.finalize(node, new Node.Literal(token.value, raw));
break;
case 1 /* BooleanLiteral */:
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
token = this.nextToken();
raw = this.getTokenRaw(token);
expr = this.finalize(node, new Node.Literal(token.value === 'true', raw));
break;
case 5 /* NullLiteral */:
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
token = this.nextToken();
raw = this.getTokenRaw(token);
expr = this.finalize(node, new Node.Literal(null, raw));
break;
case 10 /* Template */:
expr = this.parseTemplateLiteral();
break;
case 7 /* Punctuator */:
switch (this.lookahead.value) {
case '(':
this.context.isBindingElement = false;
expr = this.inheritCoverGrammar(this.parseGroupExpression);
break;
case '[':
expr = this.inheritCoverGrammar(this.parseArrayInitializer);
break;
case '{':
expr = this.inheritCoverGrammar(this.parseObjectInitializer);
break;
case '/':
case '/=':
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
this.scanner.index = this.startMarker.index;
token = this.nextRegexToken();
raw = this.getTokenRaw(token);
expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags));
break;
default:
expr = this.throwUnexpectedToken(this.nextToken());
}
break;
case 4 /* Keyword */:
if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) {
expr = this.parseIdentifierName();
}
else if (!this.context.strict && this.matchKeyword('let')) {
expr = this.finalize(node, new Node.Identifier(this.nextToken().value));
}
else {
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
if (this.matchKeyword('function')) {
expr = this.parseFunctionExpression();
}
else if (this.matchKeyword('this')) {
this.nextToken();
expr = this.finalize(node, new Node.ThisExpression());
}
else if (this.matchKeyword('class')) {
expr = this.parseClassExpression();
}
else {
expr = this.throwUnexpectedToken(this.nextToken());
}
}
break;
default:
expr = this.throwUnexpectedToken(this.nextToken());
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-array-initializer
Parser.prototype.parseSpreadElement = function () {
var node = this.createNode();
this.expect('...');
var arg = this.inheritCoverGrammar(this.parseAssignmentExpression);
return this.finalize(node, new Node.SpreadElement(arg));
};
Parser.prototype.parseArrayInitializer = function () {
var node = this.createNode();
var elements = [];
this.expect('[');
while (!this.match(']')) {
if (this.match(',')) {
this.nextToken();
elements.push(null);
}
else if (this.match('...')) {
var element = this.parseSpreadElement();
if (!this.match(']')) {
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
this.expect(',');
}
elements.push(element);
}
else {
elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
if (!this.match(']')) {
this.expect(',');
}
}
}
this.expect(']');
return this.finalize(node, new Node.ArrayExpression(elements));
};
// https://tc39.github.io/ecma262/#sec-object-initializer
Parser.prototype.parsePropertyMethod = function (params) {
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
var previousStrict = this.context.strict;
var previousAllowStrictDirective = this.context.allowStrictDirective;
this.context.allowStrictDirective = params.simple;
var body = this.isolateCoverGrammar(this.parseFunctionSourceElements);
if (this.context.strict && params.firstRestricted) {
this.tolerateUnexpectedToken(params.firstRestricted, params.message);
}
if (this.context.strict && params.stricted) {
this.tolerateUnexpectedToken(params.stricted, params.message);
}
this.context.strict = previousStrict;
this.context.allowStrictDirective = previousAllowStrictDirective;
return body;
};
Parser.prototype.parsePropertyMethodFunction = function () {
var isGenerator = false;
var node = this.createNode();
var previousAllowYield = this.context.allowYield;
this.context.allowYield = true;
var params = this.parseFormalParameters();
var method = this.parsePropertyMethod(params);
this.context.allowYield = previousAllowYield;
return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
};
Parser.prototype.parsePropertyMethodAsyncFunction = function () {
var node = this.createNode();
var previousAllowYield = this.context.allowYield;
var previousAwait = this.context.await;
this.context.allowYield = false;
this.context.await = true;
var params = this.parseFormalParameters();
var method = this.parsePropertyMethod(params);
this.context.allowYield = previousAllowYield;
this.context.await = previousAwait;
return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method));
};
Parser.prototype.parseObjectPropertyKey = function () {
var node = this.createNode();
var token = this.nextToken();
var key;
switch (token.type) {
case 8 /* StringLiteral */:
case 6 /* NumericLiteral */:
if (this.context.strict && token.octal) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral);
}
var raw = this.getTokenRaw(token);
key = this.finalize(node, new Node.Literal(token.value, raw));
break;
case 3 /* Identifier */:
case 1 /* BooleanLiteral */:
case 5 /* NullLiteral */:
case 4 /* Keyword */:
key = this.finalize(node, new Node.Identifier(token.value));
break;
case 7 /* Punctuator */:
if (token.value === '[') {
key = this.isolateCoverGrammar(this.parseAssignmentExpression);
this.expect(']');
}
else {
key = this.throwUnexpectedToken(token);
}
break;
default:
key = this.throwUnexpectedToken(token);
}
return key;
};
Parser.prototype.isPropertyKey = function (key, value) {
return (key.type === syntax_1.Syntax.Identifier && key.name === value) ||
(key.type === syntax_1.Syntax.Literal && key.value === value);
};
Parser.prototype.parseObjectProperty = function (hasProto) {
var node = this.createNode();
var token = this.lookahead;
var kind;
var key = null;
var value = null;
var computed = false;
var method = false;
var shorthand = false;
var isAsync = false;
if (token.type === 3 /* Identifier */) {
var id = token.value;
this.nextToken();
computed = this.match('[');
isAsync = !this.hasLineTerminator && (id === 'async') &&
!this.match(':') && !this.match('(') && !this.match('*') && !this.match(',');
key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id));
}
else if (this.match('*')) {
this.nextToken();
}
else {
computed = this.match('[');
key = this.parseObjectPropertyKey();
}
var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'get' && lookaheadPropertyKey) {
kind = 'get';
computed = this.match('[');
key = this.parseObjectPropertyKey();
this.context.allowYield = false;
value = this.parseGetterMethod();
}
else if (token.type === 3 /* Identifier */ && !isAsync && token.value === 'set' && lookaheadPropertyKey) {
kind = 'set';
computed = this.match('[');
key = this.parseObjectPropertyKey();
value = this.parseSetterMethod();
}
else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
kind = 'init';
computed = this.match('[');
key = this.parseObjectPropertyKey();
value = this.parseGeneratorMethod();
method = true;
}
else {
if (!key) {
this.throwUnexpectedToken(this.lookahead);
}
kind = 'init';
if (this.match(':') && !isAsync) {
if (!computed && this.isPropertyKey(key, '__proto__')) {
if (hasProto.value) {
this.tolerateError(messages_1.Messages.DuplicateProtoProperty);
}
hasProto.value = true;
}
this.nextToken();
value = this.inheritCoverGrammar(this.parseAssignmentExpression);
}
else if (this.match('(')) {
value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
method = true;
}
else if (token.type === 3 /* Identifier */) {
var id = this.finalize(node, new Node.Identifier(token.value));
if (this.match('=')) {
this.context.firstCoverInitializedNameError = this.lookahead;
this.nextToken();
shorthand = true;
var init = this.isolateCoverGrammar(this.parseAssignmentExpression);
value = this.finalize(node, new Node.AssignmentPattern(id, init));
}
else {
shorthand = true;
value = id;
}
}
else {
this.throwUnexpectedToken(this.nextToken());
}
}
return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand));
};
Parser.prototype.parseObjectInitializer = function () {
var node = this.createNode();
this.expect('{');
var properties = [];
var hasProto = { value: false };
while (!this.match('}')) {
properties.push(this.parseObjectProperty(hasProto));
if (!this.match('}')) {
this.expectCommaSeparator();
}
}
this.expect('}');
return this.finalize(node, new Node.ObjectExpression(properties));
};
// https://tc39.github.io/ecma262/#sec-template-literals
Parser.prototype.parseTemplateHead = function () {
assert_1.assert(this.lookahead.head, 'Template literal must start with a template head');
var node = this.createNode();
var token = this.nextToken();
var raw = token.value;
var cooked = token.cooked;
return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
};
Parser.prototype.parseTemplateElement = function () {
if (this.lookahead.type !== 10 /* Template */) {
this.throwUnexpectedToken();
}
var node = this.createNode();
var token = this.nextToken();
var raw = token.value;
var cooked = token.cooked;
return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail));
};
Parser.prototype.parseTemplateLiteral = function () {
var node = this.createNode();
var expressions = [];
var quasis = [];
var quasi = this.parseTemplateHead();
quasis.push(quasi);
while (!quasi.tail) {
expressions.push(this.parseExpression());
quasi = this.parseTemplateElement();
quasis.push(quasi);
}
return this.finalize(node, new Node.TemplateLiteral(quasis, expressions));
};
// https://tc39.github.io/ecma262/#sec-grouping-operator
Parser.prototype.reinterpretExpressionAsPattern = function (expr) {
switch (expr.type) {
case syntax_1.Syntax.Identifier:
case syntax_1.Syntax.MemberExpression:
case syntax_1.Syntax.RestElement:
case syntax_1.Syntax.AssignmentPattern:
break;
case syntax_1.Syntax.SpreadElement:
expr.type = syntax_1.Syntax.RestElement;
this.reinterpretExpressionAsPattern(expr.argument);
break;
case syntax_1.Syntax.ArrayExpression:
expr.type = syntax_1.Syntax.ArrayPattern;
for (var i = 0; i < expr.elements.length; i++) {
if (expr.elements[i] !== null) {
this.reinterpretExpressionAsPattern(expr.elements[i]);
}
}
break;
case syntax_1.Syntax.ObjectExpression:
expr.type = syntax_1.Syntax.ObjectPattern;
for (var i = 0; i < expr.properties.length; i++) {
this.reinterpretExpressionAsPattern(expr.properties[i].value);
}
break;
case syntax_1.Syntax.AssignmentExpression:
expr.type = syntax_1.Syntax.AssignmentPattern;
delete expr.operator;
this.reinterpretExpressionAsPattern(expr.left);
break;
default:
// Allow other node type for tolerant parsing.
break;
}
};
Parser.prototype.parseGroupExpression = function () {
var expr;
this.expect('(');
if (this.match(')')) {
this.nextToken();
if (!this.match('=>')) {
this.expect('=>');
}
expr = {
type: ArrowParameterPlaceHolder,
params: [],
async: false
};
}
else {
var startToken = this.lookahead;
var params = [];
if (this.match('...')) {
expr = this.parseRestElement(params);
this.expect(')');
if (!this.match('=>')) {
this.expect('=>');
}
expr = {
type: ArrowParameterPlaceHolder,
params: [expr],
async: false
};
}
else {
var arrow = false;
this.context.isBindingElement = true;
expr = this.inheritCoverGrammar(this.parseAssignmentExpression);
if (this.match(',')) {
var expressions = [];
this.context.isAssignmentTarget = false;
expressions.push(expr);
while (this.lookahead.type !== 2 /* EOF */) {
if (!this.match(',')) {
break;
}
this.nextToken();
if (this.match(')')) {
this.nextToken();
for (var i = 0; i < expressions.length; i++) {
this.reinterpretExpressionAsPattern(expressions[i]);
}
arrow = true;
expr = {
type: ArrowParameterPlaceHolder,
params: expressions,
async: false
};
}
else if (this.match('...')) {
if (!this.context.isBindingElement) {
this.throwUnexpectedToken(this.lookahead);
}
expressions.push(this.parseRestElement(params));
this.expect(')');
if (!this.match('=>')) {
this.expect('=>');
}
this.context.isBindingElement = false;
for (var i = 0; i < expressions.length; i++) {
this.reinterpretExpressionAsPattern(expressions[i]);
}
arrow = true;
expr = {
type: ArrowParameterPlaceHolder,
params: expressions,
async: false
};
}
else {
expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
}
if (arrow) {
break;
}
}
if (!arrow) {
expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
}
}
if (!arrow) {
this.expect(')');
if (this.match('=>')) {
if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') {
arrow = true;
expr = {
type: ArrowParameterPlaceHolder,
params: [expr],
async: false
};
}
if (!arrow) {
if (!this.context.isBindingElement) {
this.throwUnexpectedToken(this.lookahead);
}
if (expr.type === syntax_1.Syntax.SequenceExpression) {
for (var i = 0; i < expr.expressions.length; i++) {
this.reinterpretExpressionAsPattern(expr.expressions[i]);
}
}
else {
this.reinterpretExpressionAsPattern(expr);
}
var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]);
expr = {
type: ArrowParameterPlaceHolder,
params: parameters,
async: false
};
}
}
this.context.isBindingElement = false;
}
}
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-left-hand-side-expressions
Parser.prototype.parseArguments = function () {
this.expect('(');
var args = [];
if (!this.match(')')) {
while (true) {
var expr = this.match('...') ? this.parseSpreadElement() :
this.isolateCoverGrammar(this.parseAssignmentExpression);
args.push(expr);
if (this.match(')')) {
break;
}
this.expectCommaSeparator();
if (this.match(')')) {
break;
}
}
}
this.expect(')');
return args;
};
Parser.prototype.isIdentifierName = function (token) {
return token.type === 3 /* Identifier */ ||
token.type === 4 /* Keyword */ ||
token.type === 1 /* BooleanLiteral */ ||
token.type === 5 /* NullLiteral */;
};
Parser.prototype.parseIdentifierName = function () {
var node = this.createNode();
var token = this.nextToken();
if (!this.isIdentifierName(token)) {
this.throwUnexpectedToken(token);
}
return this.finalize(node, new Node.Identifier(token.value));
};
Parser.prototype.parseNewExpression = function () {
var node = this.createNode();
var id = this.parseIdentifierName();
assert_1.assert(id.name === 'new', 'New expression must start with `new`');
var expr;
if (this.match('.')) {
this.nextToken();
if (this.lookahead.type === 3 /* Identifier */ && this.context.inFunctionBody && this.lookahead.value === 'target') {
var property = this.parseIdentifierName();
expr = new Node.MetaProperty(id, property);
}
else {
this.throwUnexpectedToken(this.lookahead);
}
}
else {
var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);
var args = this.match('(') ? this.parseArguments() : [];
expr = new Node.NewExpression(callee, args);
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
}
return this.finalize(node, expr);
};
Parser.prototype.parseAsyncArgument = function () {
var arg = this.parseAssignmentExpression();
this.context.firstCoverInitializedNameError = null;
return arg;
};
Parser.prototype.parseAsyncArguments = function () {
this.expect('(');
var args = [];
if (!this.match(')')) {
while (true) {
var expr = this.match('...') ? this.parseSpreadElement() :
this.isolateCoverGrammar(this.parseAsyncArgument);
args.push(expr);
if (this.match(')')) {
break;
}
this.expectCommaSeparator();
if (this.match(')')) {
break;
}
}
}
this.expect(')');
return args;
};
Parser.prototype.parseLeftHandSideExpressionAllowCall = function () {
var startToken = this.lookahead;
var maybeAsync = this.matchContextualKeyword('async');
var previousAllowIn = this.context.allowIn;
this.context.allowIn = true;
var expr;
if (this.matchKeyword('super') && this.context.inFunctionBody) {
expr = this.createNode();
this.nextToken();
expr = this.finalize(expr, new Node.Super());
if (!this.match('(') && !this.match('.') && !this.match('[')) {
this.throwUnexpectedToken(this.lookahead);
}
}
else {
expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
}
while (true) {
if (this.match('.')) {
this.context.isBindingElement = false;
this.context.isAssignmentTarget = true;
this.expect('.');
var property = this.parseIdentifierName();
expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property));
}
else if (this.match('(')) {
var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber);
this.context.isBindingElement = false;
this.context.isAssignmentTarget = false;
var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();
expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args));
if (asyncArrow && this.match('=>')) {
for (var i = 0; i < args.length; ++i) {
this.reinterpretExpressionAsPattern(args[i]);
}
expr = {
type: ArrowParameterPlaceHolder,
params: args,
async: true
};
}
}
else if (this.match('[')) {
this.context.isBindingElement = false;
this.context.isAssignmentTarget = true;
this.expect('[');
var property = this.isolateCoverGrammar(this.parseExpression);
this.expect(']');
expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property));
}
else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
var quasi = this.parseTemplateLiteral();
expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi));
}
else {
break;
}
}
this.context.allowIn = previousAllowIn;
return expr;
};
Parser.prototype.parseSuper = function () {
var node = this.createNode();
this.expectKeyword('super');
if (!this.match('[') && !this.match('.')) {
this.throwUnexpectedToken(this.lookahead);
}
return this.finalize(node, new Node.Super());
};
Parser.prototype.parseLeftHandSideExpression = function () {
assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.');
var node = this.startNode(this.lookahead);
var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() :
this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression);
while (true) {
if (this.match('[')) {
this.context.isBindingElement = false;
this.context.isAssignmentTarget = true;
this.expect('[');
var property = this.isolateCoverGrammar(this.parseExpression);
this.expect(']');
expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property));
}
else if (this.match('.')) {
this.context.isBindingElement = false;
this.context.isAssignmentTarget = true;
this.expect('.');
var property = this.parseIdentifierName();
expr = this.finalize(node, new Node.StaticMemberExpression(expr, property));
}
else if (this.lookahead.type === 10 /* Template */ && this.lookahead.head) {
var quasi = this.parseTemplateLiteral();
expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi));
}
else {
break;
}
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-update-expressions
Parser.prototype.parseUpdateExpression = function () {
var expr;
var startToken = this.lookahead;
if (this.match('++') || this.match('--')) {
var node = this.startNode(startToken);
var token = this.nextToken();
expr = this.inheritCoverGrammar(this.parseUnaryExpression);
if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
this.tolerateError(messages_1.Messages.StrictLHSPrefix);
}
if (!this.context.isAssignmentTarget) {
this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
}
var prefix = true;
expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix));
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
}
else {
expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
if (!this.hasLineTerminator && this.lookahead.type === 7 /* Punctuator */) {
if (this.match('++') || this.match('--')) {
if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
this.tolerateError(messages_1.Messages.StrictLHSPostfix);
}
if (!this.context.isAssignmentTarget) {
this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
}
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
var operator = this.nextToken().value;
var prefix = false;
expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix));
}
}
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-unary-operators
Parser.prototype.parseAwaitExpression = function () {
var node = this.createNode();
this.nextToken();
var argument = this.parseUnaryExpression();
return this.finalize(node, new Node.AwaitExpression(argument));
};
Parser.prototype.parseUnaryExpression = function () {
var expr;
if (this.match('+') || this.match('-') || this.match('~') || this.match('!') ||
this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) {
var node = this.startNode(this.lookahead);
var token = this.nextToken();
expr = this.inheritCoverGrammar(this.parseUnaryExpression);
expr = this.finalize(node, new Node.UnaryExpression(token.value, expr));
if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) {
this.tolerateError(messages_1.Messages.StrictDelete);
}
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
}
else if (this.context.await && this.matchContextualKeyword('await')) {
expr = this.parseAwaitExpression();
}
else {
expr = this.parseUpdateExpression();
}
return expr;
};
Parser.prototype.parseExponentiationExpression = function () {
var startToken = this.lookahead;
var expr = this.inheritCoverGrammar(this.parseUnaryExpression);
if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) {
this.nextToken();
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
var left = expr;
var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right));
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-exp-operator
// https://tc39.github.io/ecma262/#sec-multiplicative-operators
// https://tc39.github.io/ecma262/#sec-additive-operators
// https://tc39.github.io/ecma262/#sec-bitwise-shift-operators
// https://tc39.github.io/ecma262/#sec-relational-operators
// https://tc39.github.io/ecma262/#sec-equality-operators
// https://tc39.github.io/ecma262/#sec-binary-bitwise-operators
// https://tc39.github.io/ecma262/#sec-binary-logical-operators
Parser.prototype.binaryPrecedence = function (token) {
var op = token.value;
var precedence;
if (token.type === 7 /* Punctuator */) {
precedence = this.operatorPrecedence[op] || 0;
}
else if (token.type === 4 /* Keyword */) {
precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0;
}
else {
precedence = 0;
}
return precedence;
};
Parser.prototype.parseBinaryExpression = function () {
var startToken = this.lookahead;
var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
var token = this.lookahead;
var prec = this.binaryPrecedence(token);
if (prec > 0) {
this.nextToken();
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
var markers = [startToken, this.lookahead];
var left = expr;
var right = this.isolateCoverGrammar(this.parseExponentiationExpression);
var stack = [left, token.value, right];
var precedences = [prec];
while (true) {
prec = this.binaryPrecedence(this.lookahead);
if (prec <= 0) {
break;
}
// Reduce: make a binary expression from the three topmost entries.
while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) {
right = stack.pop();
var operator = stack.pop();
precedences.pop();
left = stack.pop();
markers.pop();
var node = this.startNode(markers[markers.length - 1]);
stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right)));
}
// Shift.
stack.push(this.nextToken().value);
precedences.push(prec);
markers.push(this.lookahead);
stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression));
}
// Final reduce to clean-up the stack.
var i = stack.length - 1;
expr = stack[i];
var lastMarker = markers.pop();
while (i > 1) {
var marker = markers.pop();
var lastLineStart = lastMarker && lastMarker.lineStart;
var node = this.startNode(marker, lastLineStart);
var operator = stack[i - 1];
expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr));
i -= 2;
lastMarker = marker;
}
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-conditional-operator
Parser.prototype.parseConditionalExpression = function () {
var startToken = this.lookahead;
var expr = this.inheritCoverGrammar(this.parseBinaryExpression);
if (this.match('?')) {
this.nextToken();
var previousAllowIn = this.context.allowIn;
this.context.allowIn = true;
var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);
this.context.allowIn = previousAllowIn;
this.expect(':');
var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);
expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate));
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-assignment-operators
Parser.prototype.checkPatternParam = function (options, param) {
switch (param.type) {
case syntax_1.Syntax.Identifier:
this.validateParam(options, param, param.name);
break;
case syntax_1.Syntax.RestElement:
this.checkPatternParam(options, param.argument);
break;
case syntax_1.Syntax.AssignmentPattern:
this.checkPatternParam(options, param.left);
break;
case syntax_1.Syntax.ArrayPattern:
for (var i = 0; i < param.elements.length; i++) {
if (param.elements[i] !== null) {
this.checkPatternParam(options, param.elements[i]);
}
}
break;
case syntax_1.Syntax.ObjectPattern:
for (var i = 0; i < param.properties.length; i++) {
this.checkPatternParam(options, param.properties[i].value);
}
break;
default:
break;
}
options.simple = options.simple && (param instanceof Node.Identifier);
};
Parser.prototype.reinterpretAsCoverFormalsList = function (expr) {
var params = [expr];
var options;
var asyncArrow = false;
switch (expr.type) {
case syntax_1.Syntax.Identifier:
break;
case ArrowParameterPlaceHolder:
params = expr.params;
asyncArrow = expr.async;
break;
default:
return null;
}
options = {
simple: true,
paramSet: {}
};
for (var i = 0; i < params.length; ++i) {
var param = params[i];
if (param.type === syntax_1.Syntax.AssignmentPattern) {
if (param.right.type === syntax_1.Syntax.YieldExpression) {
if (param.right.argument) {
this.throwUnexpectedToken(this.lookahead);
}
param.right.type = syntax_1.Syntax.Identifier;
param.right.name = 'yield';
delete param.right.argument;
delete param.right.delegate;
}
}
else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') {
this.throwUnexpectedToken(this.lookahead);
}
this.checkPatternParam(options, param);
params[i] = param;
}
if (this.context.strict || !this.context.allowYield) {
for (var i = 0; i < params.length; ++i) {
var param = params[i];
if (param.type === syntax_1.Syntax.YieldExpression) {
this.throwUnexpectedToken(this.lookahead);
}
}
}
if (options.message === messages_1.Messages.StrictParamDupe) {
var token = this.context.strict ? options.stricted : options.firstRestricted;
this.throwUnexpectedToken(token, options.message);
}
return {
simple: options.simple,
params: params,
stricted: options.stricted,
firstRestricted: options.firstRestricted,
message: options.message
};
};
Parser.prototype.parseAssignmentExpression = function () {
var expr;
if (!this.context.allowYield && this.matchKeyword('yield')) {
expr = this.parseYieldExpression();
}
else {
var startToken = this.lookahead;
var token = startToken;
expr = this.parseConditionalExpression();
if (token.type === 3 /* Identifier */ && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') {
if (this.lookahead.type === 3 /* Identifier */ || this.matchKeyword('yield')) {
var arg = this.parsePrimaryExpression();
this.reinterpretExpressionAsPattern(arg);
expr = {
type: ArrowParameterPlaceHolder,
params: [arg],
async: true
};
}
}
if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) {
// https://tc39.github.io/ecma262/#sec-arrow-function-definitions
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
var isAsync = expr.async;
var list = this.reinterpretAsCoverFormalsList(expr);
if (list) {
if (this.hasLineTerminator) {
this.tolerateUnexpectedToken(this.lookahead);
}
this.context.firstCoverInitializedNameError = null;
var previousStrict = this.context.strict;
var previousAllowStrictDirective = this.context.allowStrictDirective;
this.context.allowStrictDirective = list.simple;
var previousAllowYield = this.context.allowYield;
var previousAwait = this.context.await;
this.context.allowYield = true;
this.context.await = isAsync;
var node = this.startNode(startToken);
this.expect('=>');
var body = void 0;
if (this.match('{')) {
var previousAllowIn = this.context.allowIn;
this.context.allowIn = true;
body = this.parseFunctionSourceElements();
this.context.allowIn = previousAllowIn;
}
else {
body = this.isolateCoverGrammar(this.parseAssignmentExpression);
}
var expression = body.type !== syntax_1.Syntax.BlockStatement;
if (this.context.strict && list.firstRestricted) {
this.throwUnexpectedToken(list.firstRestricted, list.message);
}
if (this.context.strict && list.stricted) {
this.tolerateUnexpectedToken(list.stricted, list.message);
}
expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) :
this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression));
this.context.strict = previousStrict;
this.context.allowStrictDirective = previousAllowStrictDirective;
this.context.allowYield = previousAllowYield;
this.context.await = previousAwait;
}
}
else {
if (this.matchAssign()) {
if (!this.context.isAssignmentTarget) {
this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
}
if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {
var id = expr;
if (this.scanner.isRestrictedWord(id.name)) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);
}
if (this.scanner.isStrictModeReservedWord(id.name)) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
}
}
if (!this.match('=')) {
this.context.isAssignmentTarget = false;
this.context.isBindingElement = false;
}
else {
this.reinterpretExpressionAsPattern(expr);
}
token = this.nextToken();
var operator = token.value;
var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right));
this.context.firstCoverInitializedNameError = null;
}
}
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-comma-operator
Parser.prototype.parseExpression = function () {
var startToken = this.lookahead;
var expr = this.isolateCoverGrammar(this.parseAssignmentExpression);
if (this.match(',')) {
var expressions = [];
expressions.push(expr);
while (this.lookahead.type !== 2 /* EOF */) {
if (!this.match(',')) {
break;
}
this.nextToken();
expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
}
expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions));
}
return expr;
};
// https://tc39.github.io/ecma262/#sec-block
Parser.prototype.parseStatementListItem = function () {
var statement;
this.context.isAssignmentTarget = true;
this.context.isBindingElement = true;
if (this.lookahead.type === 4 /* Keyword */) {
switch (this.lookahead.value) {
case 'export':
if (!this.context.isModule) {
this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration);
}
statement = this.parseExportDeclaration();
break;
case 'import':
if (!this.context.isModule) {
this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration);
}
statement = this.parseImportDeclaration();
break;
case 'const':
statement = this.parseLexicalDeclaration({ inFor: false });
break;
case 'function':
statement = this.parseFunctionDeclaration();
break;
case 'class':
statement = this.parseClassDeclaration();
break;
case 'let':
statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement();
break;
default:
statement = this.parseStatement();
break;
}
}
else {
statement = this.parseStatement();
}
return statement;
};
Parser.prototype.parseBlock = function () {
var node = this.createNode();
this.expect('{');
var block = [];
while (true) {
if (this.match('}')) {
break;
}
block.push(this.parseStatementListItem());
}
this.expect('}');
return this.finalize(node, new Node.BlockStatement(block));
};
// https://tc39.github.io/ecma262/#sec-let-and-const-declarations
Parser.prototype.parseLexicalBinding = function (kind, options) {
var node = this.createNode();
var params = [];
var id = this.parsePattern(params, kind);
if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
if (this.scanner.isRestrictedWord(id.name)) {
this.tolerateError(messages_1.Messages.StrictVarName);
}
}
var init = null;
if (kind === 'const') {
if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) {
if (this.match('=')) {
this.nextToken();
init = this.isolateCoverGrammar(this.parseAssignmentExpression);
}
else {
this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const');
}
}
}
else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) {
this.expect('=');
init = this.isolateCoverGrammar(this.parseAssignmentExpression);
}
return this.finalize(node, new Node.VariableDeclarator(id, init));
};
Parser.prototype.parseBindingList = function (kind, options) {
var list = [this.parseLexicalBinding(kind, options)];
while (this.match(',')) {
this.nextToken();
list.push(this.parseLexicalBinding(kind, options));
}
return list;
};
Parser.prototype.isLexicalDeclaration = function () {
var state = this.scanner.saveState();
this.scanner.scanComments();
var next = this.scanner.lex();
this.scanner.restoreState(state);
return (next.type === 3 /* Identifier */) ||
(next.type === 7 /* Punctuator */ && next.value === '[') ||
(next.type === 7 /* Punctuator */ && next.value === '{') ||
(next.type === 4 /* Keyword */ && next.value === 'let') ||
(next.type === 4 /* Keyword */ && next.value === 'yield');
};
Parser.prototype.parseLexicalDeclaration = function (options) {
var node = this.createNode();
var kind = this.nextToken().value;
assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const');
var declarations = this.parseBindingList(kind, options);
this.consumeSemicolon();
return this.finalize(node, new Node.VariableDeclaration(declarations, kind));
};
// https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns
Parser.prototype.parseBindingRestElement = function (params, kind) {
var node = this.createNode();
this.expect('...');
var arg = this.parsePattern(params, kind);
return this.finalize(node, new Node.RestElement(arg));
};
Parser.prototype.parseArrayPattern = function (params, kind) {
var node = this.createNode();
this.expect('[');
var elements = [];
while (!this.match(']')) {
if (this.match(',')) {
this.nextToken();
elements.push(null);
}
else {
if (this.match('...')) {
elements.push(this.parseBindingRestElement(params, kind));
break;
}
else {
elements.push(this.parsePatternWithDefault(params, kind));
}
if (!this.match(']')) {
this.expect(',');
}
}
}
this.expect(']');
return this.finalize(node, new Node.ArrayPattern(elements));
};
Parser.prototype.parsePropertyPattern = function (params, kind) {
var node = this.createNode();
var computed = false;
var shorthand = false;
var method = false;
var key;
var value;
if (this.lookahead.type === 3 /* Identifier */) {
var keyToken = this.lookahead;
key = this.parseVariableIdentifier();
var init = this.finalize(node, new Node.Identifier(keyToken.value));
if (this.match('=')) {
params.push(keyToken);
shorthand = true;
this.nextToken();
var expr = this.parseAssignmentExpression();
value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr));
}
else if (!this.match(':')) {
params.push(keyToken);
shorthand = true;
value = init;
}
else {
this.expect(':');
value = this.parsePatternWithDefault(params, kind);
}
}
else {
computed = this.match('[');
key = this.parseObjectPropertyKey();
this.expect(':');
value = this.parsePatternWithDefault(params, kind);
}
return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand));
};
Parser.prototype.parseObjectPattern = function (params, kind) {
var node = this.createNode();
var properties = [];
this.expect('{');
while (!this.match('}')) {
properties.push(this.parsePropertyPattern(params, kind));
if (!this.match('}')) {
this.expect(',');
}
}
this.expect('}');
return this.finalize(node, new Node.ObjectPattern(properties));
};
Parser.prototype.parsePattern = function (params, kind) {
var pattern;
if (this.match('[')) {
pattern = this.parseArrayPattern(params, kind);
}
else if (this.match('{')) {
pattern = this.parseObjectPattern(params, kind);
}
else {
if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) {
this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding);
}
params.push(this.lookahead);
pattern = this.parseVariableIdentifier(kind);
}
return pattern;
};
Parser.prototype.parsePatternWithDefault = function (params, kind) {
var startToken = this.lookahead;
var pattern = this.parsePattern(params, kind);
if (this.match('=')) {
this.nextToken();
var previousAllowYield = this.context.allowYield;
this.context.allowYield = true;
var right = this.isolateCoverGrammar(this.parseAssignmentExpression);
this.context.allowYield = previousAllowYield;
pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right));
}
return pattern;
};
// https://tc39.github.io/ecma262/#sec-variable-statement
Parser.prototype.parseVariableIdentifier = function (kind) {
var node = this.createNode();
var token = this.nextToken();
if (token.type === 4 /* Keyword */ && token.value === 'yield') {
if (this.context.strict) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
}
else if (!this.context.allowYield) {
this.throwUnexpectedToken(token);
}
}
else if (token.type !== 3 /* Identifier */) {
if (this.context.strict && token.type === 4 /* Keyword */ && this.scanner.isStrictModeReservedWord(token.value)) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
}
else {
if (this.context.strict || token.value !== 'let' || kind !== 'var') {
this.throwUnexpectedToken(token);
}
}
}
else if ((this.context.isModule || this.context.await) && token.type === 3 /* Identifier */ && token.value === 'await') {
this.tolerateUnexpectedToken(token);
}
return this.finalize(node, new Node.Identifier(token.value));
};
Parser.prototype.parseVariableDeclaration = function (options) {
var node = this.createNode();
var params = [];
var id = this.parsePattern(params, 'var');
if (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
if (this.scanner.isRestrictedWord(id.name)) {
this.tolerateError(messages_1.Messages.StrictVarName);
}
}
var init = null;
if (this.match('=')) {
this.nextToken();
init = this.isolateCoverGrammar(this.parseAssignmentExpression);
}
else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) {
this.expect('=');
}
return this.finalize(node, new Node.VariableDeclarator(id, init));
};
Parser.prototype.parseVariableDeclarationList = function (options) {
var opt = { inFor: options.inFor };
var list = [];
list.push(this.parseVariableDeclaration(opt));
while (this.match(',')) {
this.nextToken();
list.push(this.parseVariableDeclaration(opt));
}
return list;
};
Parser.prototype.parseVariableStatement = function () {
var node = this.createNode();
this.expectKeyword('var');
var declarations = this.parseVariableDeclarationList({ inFor: false });
this.consumeSemicolon();
return this.finalize(node, new Node.VariableDeclaration(declarations, 'var'));
};
// https://tc39.github.io/ecma262/#sec-empty-statement
Parser.prototype.parseEmptyStatement = function () {
var node = this.createNode();
this.expect(';');
return this.finalize(node, new Node.EmptyStatement());
};
// https://tc39.github.io/ecma262/#sec-expression-statement
Parser.prototype.parseExpressionStatement = function () {
var node = this.createNode();
var expr = this.parseExpression();
this.consumeSemicolon();
return this.finalize(node, new Node.ExpressionStatement(expr));
};
// https://tc39.github.io/ecma262/#sec-if-statement
Parser.prototype.parseIfClause = function () {
if (this.context.strict && this.matchKeyword('function')) {
this.tolerateError(messages_1.Messages.StrictFunction);
}
return this.parseStatement();
};
Parser.prototype.parseIfStatement = function () {
var node = this.createNode();
var consequent;
var alternate = null;
this.expectKeyword('if');
this.expect('(');
var test = this.parseExpression();
if (!this.match(')') && this.config.tolerant) {
this.tolerateUnexpectedToken(this.nextToken());
consequent = this.finalize(this.createNode(), new Node.EmptyStatement());
}
else {
this.expect(')');
consequent = this.parseIfClause();
if (this.matchKeyword('else')) {
this.nextToken();
alternate = this.parseIfClause();
}
}
return this.finalize(node, new Node.IfStatement(test, consequent, alternate));
};
// https://tc39.github.io/ecma262/#sec-do-while-statement
Parser.prototype.parseDoWhileStatement = function () {
var node = this.createNode();
this.expectKeyword('do');
var previousInIteration = this.context.inIteration;
this.context.inIteration = true;
var body = this.parseStatement();
this.context.inIteration = previousInIteration;
this.expectKeyword('while');
this.expect('(');
var test = this.parseExpression();
if (!this.match(')') && this.config.tolerant) {
this.tolerateUnexpectedToken(this.nextToken());
}
else {
this.expect(')');
if (this.match(';')) {
this.nextToken();
}
}
return this.finalize(node, new Node.DoWhileStatement(body, test));
};
// https://tc39.github.io/ecma262/#sec-while-statement
Parser.prototype.parseWhileStatement = function () {
var node = this.createNode();
var body;
this.expectKeyword('while');
this.expect('(');
var test = this.parseExpression();
if (!this.match(')') && this.config.tolerant) {
this.tolerateUnexpectedToken(this.nextToken());
body = this.finalize(this.createNode(), new Node.EmptyStatement());
}
else {
this.expect(')');
var previousInIteration = this.context.inIteration;
this.context.inIteration = true;
body = this.parseStatement();
this.context.inIteration = previousInIteration;
}
return this.finalize(node, new Node.WhileStatement(test, body));
};
// https://tc39.github.io/ecma262/#sec-for-statement
// https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements
Parser.prototype.parseForStatement = function () {
var init = null;
var test = null;
var update = null;
var forIn = true;
var left, right;
var node = this.createNode();
this.expectKeyword('for');
this.expect('(');
if (this.match(';')) {
this.nextToken();
}
else {
if (this.matchKeyword('var')) {
init = this.createNode();
this.nextToken();
var previousAllowIn = this.context.allowIn;
this.context.allowIn = false;
var declarations = this.parseVariableDeclarationList({ inFor: true });
this.context.allowIn = previousAllowIn;
if (declarations.length === 1 && this.matchKeyword('in')) {
var decl = declarations[0];
if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) {
this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in');
}
init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
this.nextToken();
left = init;
right = this.parseExpression();
init = null;
}
else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {
init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
this.nextToken();
left = init;
right = this.parseAssignmentExpression();
init = null;
forIn = false;
}
else {
init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var'));
this.expect(';');
}
}
else if (this.matchKeyword('const') || this.matchKeyword('let')) {
init = this.createNode();
var kind = this.nextToken().value;
if (!this.context.strict && this.lookahead.value === 'in') {
init = this.finalize(init, new Node.Identifier(kind));
this.nextToken();
left = init;
right = this.parseExpression();
init = null;
}
else {
var previousAllowIn = this.context.allowIn;
this.context.allowIn = false;
var declarations = this.parseBindingList(kind, { inFor: true });
this.context.allowIn = previousAllowIn;
if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) {
init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
this.nextToken();
left = init;
right = this.parseExpression();
init = null;
}
else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) {
init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
this.nextToken();
left = init;
right = this.parseAssignmentExpression();
init = null;
forIn = false;
}
else {
this.consumeSemicolon();
init = this.finalize(init, new Node.VariableDeclaration(declarations, kind));
}
}
}
else {
var initStartToken = this.lookahead;
var previousAllowIn = this.context.allowIn;
this.context.allowIn = false;
init = this.inheritCoverGrammar(this.parseAssignmentExpression);
this.context.allowIn = previousAllowIn;
if (this.matchKeyword('in')) {
if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
}
this.nextToken();
this.reinterpretExpressionAsPattern(init);
left = init;
right = this.parseExpression();
init = null;
}
else if (this.matchContextualKeyword('of')) {
if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) {
this.tolerateError(messages_1.Messages.InvalidLHSInForLoop);
}
this.nextToken();
this.reinterpretExpressionAsPattern(init);
left = init;
right = this.parseAssignmentExpression();
init = null;
forIn = false;
}
else {
if (this.match(',')) {
var initSeq = [init];
while (this.match(',')) {
this.nextToken();
initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
}
init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq));
}
this.expect(';');
}
}
}
if (typeof left === 'undefined') {
if (!this.match(';')) {
test = this.parseExpression();
}
this.expect(';');
if (!this.match(')')) {
update = this.parseExpression();
}
}
var body;
if (!this.match(')') && this.config.tolerant) {
this.tolerateUnexpectedToken(this.nextToken());
body = this.finalize(this.createNode(), new Node.EmptyStatement());
}
else {
this.expect(')');
var previousInIteration = this.context.inIteration;
this.context.inIteration = true;
body = this.isolateCoverGrammar(this.parseStatement);
this.context.inIteration = previousInIteration;
}
return (typeof left === 'undefined') ?
this.finalize(node, new Node.ForStatement(init, test, update, body)) :
forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) :
this.finalize(node, new Node.ForOfStatement(left, right, body));
};
// https://tc39.github.io/ecma262/#sec-continue-statement
Parser.prototype.parseContinueStatement = function () {
var node = this.createNode();
this.expectKeyword('continue');
var label = null;
if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
var id = this.parseVariableIdentifier();
label = id;
var key = '$' + id.name;
if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
this.throwError(messages_1.Messages.UnknownLabel, id.name);
}
}
this.consumeSemicolon();
if (label === null && !this.context.inIteration) {
this.throwError(messages_1.Messages.IllegalContinue);
}
return this.finalize(node, new Node.ContinueStatement(label));
};
// https://tc39.github.io/ecma262/#sec-break-statement
Parser.prototype.parseBreakStatement = function () {
var node = this.createNode();
this.expectKeyword('break');
var label = null;
if (this.lookahead.type === 3 /* Identifier */ && !this.hasLineTerminator) {
var id = this.parseVariableIdentifier();
var key = '$' + id.name;
if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
this.throwError(messages_1.Messages.UnknownLabel, id.name);
}
label = id;
}
this.consumeSemicolon();
if (label === null && !this.context.inIteration && !this.context.inSwitch) {
this.throwError(messages_1.Messages.IllegalBreak);
}
return this.finalize(node, new Node.BreakStatement(label));
};
// https://tc39.github.io/ecma262/#sec-return-statement
Parser.prototype.parseReturnStatement = function () {
if (!this.context.inFunctionBody) {
this.tolerateError(messages_1.Messages.IllegalReturn);
}
var node = this.createNode();
this.expectKeyword('return');
var hasArgument = (!this.match(';') && !this.match('}') &&
!this.hasLineTerminator && this.lookahead.type !== 2 /* EOF */) ||
this.lookahead.type === 8 /* StringLiteral */ ||
this.lookahead.type === 10 /* Template */;
var argument = hasArgument ? this.parseExpression() : null;
this.consumeSemicolon();
return this.finalize(node, new Node.ReturnStatement(argument));
};
// https://tc39.github.io/ecma262/#sec-with-statement
Parser.prototype.parseWithStatement = function () {
if (this.context.strict) {
this.tolerateError(messages_1.Messages.StrictModeWith);
}
var node = this.createNode();
var body;
this.expectKeyword('with');
this.expect('(');
var object = this.parseExpression();
if (!this.match(')') && this.config.tolerant) {
this.tolerateUnexpectedToken(this.nextToken());
body = this.finalize(this.createNode(), new Node.EmptyStatement());
}
else {
this.expect(')');
body = this.parseStatement();
}
return this.finalize(node, new Node.WithStatement(object, body));
};
// https://tc39.github.io/ecma262/#sec-switch-statement
Parser.prototype.parseSwitchCase = function () {
var node = this.createNode();
var test;
if (this.matchKeyword('default')) {
this.nextToken();
test = null;
}
else {
this.expectKeyword('case');
test = this.parseExpression();
}
this.expect(':');
var consequent = [];
while (true) {
if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) {
break;
}
consequent.push(this.parseStatementListItem());
}
return this.finalize(node, new Node.SwitchCase(test, consequent));
};
Parser.prototype.parseSwitchStatement = function () {
var node = this.createNode();
this.expectKeyword('switch');
this.expect('(');
var discriminant = this.parseExpression();
this.expect(')');
var previousInSwitch = this.context.inSwitch;
this.context.inSwitch = true;
var cases = [];
var defaultFound = false;
this.expect('{');
while (true) {
if (this.match('}')) {
break;
}
var clause = this.parseSwitchCase();
if (clause.test === null) {
if (defaultFound) {
this.throwError(messages_1.Messages.MultipleDefaultsInSwitch);
}
defaultFound = true;
}
cases.push(clause);
}
this.expect('}');
this.context.inSwitch = previousInSwitch;
return this.finalize(node, new Node.SwitchStatement(discriminant, cases));
};
// https://tc39.github.io/ecma262/#sec-labelled-statements
Parser.prototype.parseLabelledStatement = function () {
var node = this.createNode();
var expr = this.parseExpression();
var statement;
if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) {
this.nextToken();
var id = expr;
var key = '$' + id.name;
if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name);
}
this.context.labelSet[key] = true;
var body = void 0;
if (this.matchKeyword('class')) {
this.tolerateUnexpectedToken(this.lookahead);
body = this.parseClassDeclaration();
}
else if (this.matchKeyword('function')) {
var token = this.lookahead;
var declaration = this.parseFunctionDeclaration();
if (this.context.strict) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction);
}
else if (declaration.generator) {
this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext);
}
body = declaration;
}
else {
body = this.parseStatement();
}
delete this.context.labelSet[key];
statement = new Node.LabeledStatement(id, body);
}
else {
this.consumeSemicolon();
statement = new Node.ExpressionStatement(expr);
}
return this.finalize(node, statement);
};
// https://tc39.github.io/ecma262/#sec-throw-statement
Parser.prototype.parseThrowStatement = function () {
var node = this.createNode();
this.expectKeyword('throw');
if (this.hasLineTerminator) {
this.throwError(messages_1.Messages.NewlineAfterThrow);
}
var argument = this.parseExpression();
this.consumeSemicolon();
return this.finalize(node, new Node.ThrowStatement(argument));
};
// https://tc39.github.io/ecma262/#sec-try-statement
Parser.prototype.parseCatchClause = function () {
var node = this.createNode();
this.expectKeyword('catch');
this.expect('(');
if (this.match(')')) {
this.throwUnexpectedToken(this.lookahead);
}
var params = [];
var param = this.parsePattern(params);
var paramMap = {};
for (var i = 0; i < params.length; i++) {
var key = '$' + params[i].value;
if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value);
}
paramMap[key] = true;
}
if (this.context.strict && param.type === syntax_1.Syntax.Identifier) {
if (this.scanner.isRestrictedWord(param.name)) {
this.tolerateError(messages_1.Messages.StrictCatchVariable);
}
}
this.expect(')');
var body = this.parseBlock();
return this.finalize(node, new Node.CatchClause(param, body));
};
Parser.prototype.parseFinallyClause = function () {
this.expectKeyword('finally');
return this.parseBlock();
};
Parser.prototype.parseTryStatement = function () {
var node = this.createNode();
this.expectKeyword('try');
var block = this.parseBlock();
var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null;
var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null;
if (!handler && !finalizer) {
this.throwError(messages_1.Messages.NoCatchOrFinally);
}
return this.finalize(node, new Node.TryStatement(block, handler, finalizer));
};
// https://tc39.github.io/ecma262/#sec-debugger-statement
Parser.prototype.parseDebuggerStatement = function () {
var node = this.createNode();
this.expectKeyword('debugger');
this.consumeSemicolon();
return this.finalize(node, new Node.DebuggerStatement());
};
// https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations
Parser.prototype.parseStatement = function () {
var statement;
switch (this.lookahead.type) {
case 1 /* BooleanLiteral */:
case 5 /* NullLiteral */:
case 6 /* NumericLiteral */:
case 8 /* StringLiteral */:
case 10 /* Template */:
case 9 /* RegularExpression */:
statement = this.parseExpressionStatement();
break;
case 7 /* Punctuator */:
var value = this.lookahead.value;
if (value === '{') {
statement = this.parseBlock();
}
else if (value === '(') {
statement = this.parseExpressionStatement();
}
else if (value === ';') {
statement = this.parseEmptyStatement();
}
else {
statement = this.parseExpressionStatement();
}
break;
case 3 /* Identifier */:
statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement();
break;
case 4 /* Keyword */:
switch (this.lookahead.value) {
case 'break':
statement = this.parseBreakStatement();
break;
case 'continue':
statement = this.parseContinueStatement();
break;
case 'debugger':
statement = this.parseDebuggerStatement();
break;
case 'do':
statement = this.parseDoWhileStatement();
break;
case 'for':
statement = this.parseForStatement();
break;
case 'function':
statement = this.parseFunctionDeclaration();
break;
case 'if':
statement = this.parseIfStatement();
break;
case 'return':
statement = this.parseReturnStatement();
break;
case 'switch':
statement = this.parseSwitchStatement();
break;
case 'throw':
statement = this.parseThrowStatement();
break;
case 'try':
statement = this.parseTryStatement();
break;
case 'var':
statement = this.parseVariableStatement();
break;
case 'while':
statement = this.parseWhileStatement();
break;
case 'with':
statement = this.parseWithStatement();
break;
default:
statement = this.parseExpressionStatement();
break;
}
break;
default:
statement = this.throwUnexpectedToken(this.lookahead);
}
return statement;
};
// https://tc39.github.io/ecma262/#sec-function-definitions
Parser.prototype.parseFunctionSourceElements = function () {
var node = this.createNode();
this.expect('{');
var body = this.parseDirectivePrologues();
var previousLabelSet = this.context.labelSet;
var previousInIteration = this.context.inIteration;
var previousInSwitch = this.context.inSwitch;
var previousInFunctionBody = this.context.inFunctionBody;
this.context.labelSet = {};
this.context.inIteration = false;
this.context.inSwitch = false;
this.context.inFunctionBody = true;
while (this.lookahead.type !== 2 /* EOF */) {
if (this.match('}')) {
break;
}
body.push(this.parseStatementListItem());
}
this.expect('}');
this.context.labelSet = previousLabelSet;
this.context.inIteration = previousInIteration;
this.context.inSwitch = previousInSwitch;
this.context.inFunctionBody = previousInFunctionBody;
return this.finalize(node, new Node.BlockStatement(body));
};
Parser.prototype.validateParam = function (options, param, name) {
var key = '$' + name;
if (this.context.strict) {
if (this.scanner.isRestrictedWord(name)) {
options.stricted = param;
options.message = messages_1.Messages.StrictParamName;
}
if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
options.stricted = param;
options.message = messages_1.Messages.StrictParamDupe;
}
}
else if (!options.firstRestricted) {
if (this.scanner.isRestrictedWord(name)) {
options.firstRestricted = param;
options.message = messages_1.Messages.StrictParamName;
}
else if (this.scanner.isStrictModeReservedWord(name)) {
options.firstRestricted = param;
options.message = messages_1.Messages.StrictReservedWord;
}
else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
options.stricted = param;
options.message = messages_1.Messages.StrictParamDupe;
}
}
/* istanbul ignore next */
if (typeof Object.defineProperty === 'function') {
Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true });
}
else {
options.paramSet[key] = true;
}
};
Parser.prototype.parseRestElement = function (params) {
var node = this.createNode();
this.expect('...');
var arg = this.parsePattern(params);
if (this.match('=')) {
this.throwError(messages_1.Messages.DefaultRestParameter);
}
if (!this.match(')')) {
this.throwError(messages_1.Messages.ParameterAfterRestParameter);
}
return this.finalize(node, new Node.RestElement(arg));
};
Parser.prototype.parseFormalParameter = function (options) {
var params = [];
var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params);
for (var i = 0; i < params.length; i++) {
this.validateParam(options, params[i], params[i].value);
}
options.simple = options.simple && (param instanceof Node.Identifier);
options.params.push(param);
};
Parser.prototype.parseFormalParameters = function (firstRestricted) {
var options;
options = {
simple: true,
params: [],
firstRestricted: firstRestricted
};
this.expect('(');
if (!this.match(')')) {
options.paramSet = {};
while (this.lookahead.type !== 2 /* EOF */) {
this.parseFormalParameter(options);
if (this.match(')')) {
break;
}
this.expect(',');
if (this.match(')')) {
break;
}
}
}
this.expect(')');
return {
simple: options.simple,
params: options.params,
stricted: options.stricted,
firstRestricted: options.firstRestricted,
message: options.message
};
};
Parser.prototype.matchAsyncFunction = function () {
var match = this.matchContextualKeyword('async');
if (match) {
var state = this.scanner.saveState();
this.scanner.scanComments();
var next = this.scanner.lex();
this.scanner.restoreState(state);
match = (state.lineNumber === next.lineNumber) && (next.type === 4 /* Keyword */) && (next.value === 'function');
}
return match;
};
Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) {
var node = this.createNode();
var isAsync = this.matchContextualKeyword('async');
if (isAsync) {
this.nextToken();
}
this.expectKeyword('function');
var isGenerator = isAsync ? false : this.match('*');
if (isGenerator) {
this.nextToken();
}
var message;
var id = null;
var firstRestricted = null;
if (!identifierIsOptional || !this.match('(')) {
var token = this.lookahead;
id = this.parseVariableIdentifier();
if (this.context.strict) {
if (this.scanner.isRestrictedWord(token.value)) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
}
}
else {
if (this.scanner.isRestrictedWord(token.value)) {
firstRestricted = token;
message = messages_1.Messages.StrictFunctionName;
}
else if (this.scanner.isStrictModeReservedWord(token.value)) {
firstRestricted = token;
message = messages_1.Messages.StrictReservedWord;
}
}
}
var previousAllowAwait = this.context.await;
var previousAllowYield = this.context.allowYield;
this.context.await = isAsync;
this.context.allowYield = !isGenerator;
var formalParameters = this.parseFormalParameters(firstRestricted);
var params = formalParameters.params;
var stricted = formalParameters.stricted;
firstRestricted = formalParameters.firstRestricted;
if (formalParameters.message) {
message = formalParameters.message;
}
var previousStrict = this.context.strict;
var previousAllowStrictDirective = this.context.allowStrictDirective;
this.context.allowStrictDirective = formalParameters.simple;
var body = this.parseFunctionSourceElements();
if (this.context.strict && firstRestricted) {
this.throwUnexpectedToken(firstRestricted, message);
}
if (this.context.strict && stricted) {
this.tolerateUnexpectedToken(stricted, message);
}
this.context.strict = previousStrict;
this.context.allowStrictDirective = previousAllowStrictDirective;
this.context.await = previousAllowAwait;
this.context.allowYield = previousAllowYield;
return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) :
this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator));
};
Parser.prototype.parseFunctionExpression = function () {
var node = this.createNode();
var isAsync = this.matchContextualKeyword('async');
if (isAsync) {
this.nextToken();
}
this.expectKeyword('function');
var isGenerator = isAsync ? false : this.match('*');
if (isGenerator) {
this.nextToken();
}
var message;
var id = null;
var firstRestricted;
var previousAllowAwait = this.context.await;
var previousAllowYield = this.context.allowYield;
this.context.await = isAsync;
this.context.allowYield = !isGenerator;
if (!this.match('(')) {
var token = this.lookahead;
id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier();
if (this.context.strict) {
if (this.scanner.isRestrictedWord(token.value)) {
this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
}
}
else {
if (this.scanner.isRestrictedWord(token.value)) {
firstRestricted = token;
message = messages_1.Messages.StrictFunctionName;
}
else if (this.scanner.isStrictModeReservedWord(token.value)) {
firstRestricted = token;
message = messages_1.Messages.StrictReservedWord;
}
}
}
var formalParameters = this.parseFormalParameters(firstRestricted);
var params = formalParameters.params;
var stricted = formalParameters.stricted;
firstRestricted = formalParameters.firstRestricted;
if (formalParameters.message) {
message = formalParameters.message;
}
var previousStrict = this.context.strict;
var previousAllowStrictDirective = this.context.allowStrictDirective;
this.context.allowStrictDirective = formalParameters.simple;
var body = this.parseFunctionSourceElements();
if (this.context.strict && firstRestricted) {
this.throwUnexpectedToken(firstRestricted, message);
}
if (this.context.strict && stricted) {
this.tolerateUnexpectedToken(stricted, message);
}
this.context.strict = previousStrict;
this.context.allowStrictDirective = previousAllowStrictDirective;
this.context.await = previousAllowAwait;
this.context.allowYield = previousAllowYield;
return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) :
this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator));
};
// https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive
Parser.prototype.parseDirective = function () {
var token = this.lookahead;
var node = this.createNode();
var expr = this.parseExpression();
var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null;
this.consumeSemicolon();
return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr));
};
Parser.prototype.parseDirectivePrologues = function () {
var firstRestricted = null;
var body = [];
while (true) {
var token = this.lookahead;
if (token.type !== 8 /* StringLiteral */) {
break;
}
var statement = this.parseDirective();
body.push(statement);
var directive = statement.directive;
if (typeof directive !== 'string') {
break;
}
if (directive === 'use strict') {
this.context.strict = true;
if (firstRestricted) {
this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral);
}
if (!this.context.allowStrictDirective) {
this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective);
}
}
else {
if (!firstRestricted && token.octal) {
firstRestricted = token;
}
}
}
return body;
};
// https://tc39.github.io/ecma262/#sec-method-definitions
Parser.prototype.qualifiedPropertyName = function (token) {
switch (token.type) {
case 3 /* Identifier */:
case 8 /* StringLiteral */:
case 1 /* BooleanLiteral */:
case 5 /* NullLiteral */:
case 6 /* NumericLiteral */:
case 4 /* Keyword */:
return true;
case 7 /* Punctuator */:
return token.value === '[';
default:
break;
}
return false;
};
Parser.prototype.parseGetterMethod = function () {
var node = this.createNode();
var isGenerator = false;
var previousAllowYield = this.context.allowYield;
this.context.allowYield = !isGenerator;
var formalParameters = this.parseFormalParameters();
if (formalParameters.params.length > 0) {
this.tolerateError(messages_1.Messages.BadGetterArity);
}
var method = this.parsePropertyMethod(formalParameters);
this.context.allowYield = previousAllowYield;
return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
};
Parser.prototype.parseSetterMethod = function () {
var node = this.createNode();
var isGenerator = false;
var previousAllowYield = this.context.allowYield;
this.context.allowYield = !isGenerator;
var formalParameters = this.parseFormalParameters();
if (formalParameters.params.length !== 1) {
this.tolerateError(messages_1.Messages.BadSetterArity);
}
else if (formalParameters.params[0] instanceof Node.RestElement) {
this.tolerateError(messages_1.Messages.BadSetterRestParameter);
}
var method = this.parsePropertyMethod(formalParameters);
this.context.allowYield = previousAllowYield;
return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator));
};
Parser.prototype.parseGeneratorMethod = function () {
var node = this.createNode();
var isGenerator = true;
var previousAllowYield = this.context.allowYield;
this.context.allowYield = true;
var params = this.parseFormalParameters();
this.context.allowYield = false;
var method = this.parsePropertyMethod(params);
this.context.allowYield = previousAllowYield;
return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator));
};
// https://tc39.github.io/ecma262/#sec-generator-function-definitions
Parser.prototype.isStartOfExpression = function () {
var start = true;
var value = this.lookahead.value;
switch (this.lookahead.type) {
case 7 /* Punctuator */:
start = (value === '[') || (value === '(') || (value === '{') ||
(value === '+') || (value === '-') ||
(value === '!') || (value === '~') ||
(value === '++') || (value === '--') ||
(value === '/') || (value === '/='); // regular expression literal
break;
case 4 /* Keyword */:
start = (value === 'class') || (value === 'delete') ||
(value === 'function') || (value === 'let') || (value === 'new') ||
(value === 'super') || (value === 'this') || (value === 'typeof') ||
(value === 'void') || (value === 'yield');
break;
default:
break;
}
return start;
};
Parser.prototype.parseYieldExpression = function () {
var node = this.createNode();
this.expectKeyword('yield');
var argument = null;
var delegate = false;
if (!this.hasLineTerminator) {
var previousAllowYield = this.context.allowYield;
this.context.allowYield = false;
delegate = this.match('*');
if (delegate) {
this.nextToken();
argument = this.parseAssignmentExpression();
}
else if (this.isStartOfExpression()) {
argument = this.parseAssignmentExpression();
}
this.context.allowYield = previousAllowYield;
}
return this.finalize(node, new Node.YieldExpression(argument, delegate));
};
// https://tc39.github.io/ecma262/#sec-class-definitions
Parser.prototype.parseClassElement = function (hasConstructor) {
var token = this.lookahead;
var node = this.createNode();
var kind = '';
var key = null;
var value = null;
var computed = false;
var method = false;
var isStatic = false;
var isAsync = false;
if (this.match('*')) {
this.nextToken();
}
else {
computed = this.match('[');
key = this.parseObjectPropertyKey();
var id = key;
if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) {
token = this.lookahead;
isStatic = true;
computed = this.match('[');
if (this.match('*')) {
this.nextToken();
}
else {
key = this.parseObjectPropertyKey();
}
}
if ((token.type === 3 /* Identifier */) && !this.hasLineTerminator && (token.value === 'async')) {
var punctuator = this.lookahead.value;
if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') {
isAsync = true;
token = this.lookahead;
key = this.parseObjectPropertyKey();
if (token.type === 3 /* Identifier */ && token.value === 'constructor') {
this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync);
}
}
}
}
var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
if (token.type === 3 /* Identifier */) {
if (token.value === 'get' && lookaheadPropertyKey) {
kind = 'get';
computed = this.match('[');
key = this.parseObjectPropertyKey();
this.context.allowYield = false;
value = this.parseGetterMethod();
}
else if (token.value === 'set' && lookaheadPropertyKey) {
kind = 'set';
computed = this.match('[');
key = this.parseObjectPropertyKey();
value = this.parseSetterMethod();
}
}
else if (token.type === 7 /* Punctuator */ && token.value === '*' && lookaheadPropertyKey) {
kind = 'init';
computed = this.match('[');
key = this.parseObjectPropertyKey();
value = this.parseGeneratorMethod();
method = true;
}
if (!kind && key && this.match('(')) {
kind = 'init';
value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
method = true;
}
if (!kind) {
this.throwUnexpectedToken(this.lookahead);
}
if (kind === 'init') {
kind = 'method';
}
if (!computed) {
if (isStatic && this.isPropertyKey(key, 'prototype')) {
this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype);
}
if (!isStatic && this.isPropertyKey(key, 'constructor')) {
if (kind !== 'method' || !method || (value && value.generator)) {
this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod);
}
if (hasConstructor.value) {
this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor);
}
else {
hasConstructor.value = true;
}
kind = 'constructor';
}
}
return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic));
};
Parser.prototype.parseClassElementList = function () {
var body = [];
var hasConstructor = { value: false };
this.expect('{');
while (!this.match('}')) {
if (this.match(';')) {
this.nextToken();
}
else {
body.push(this.parseClassElement(hasConstructor));
}
}
this.expect('}');
return body;
};
Parser.prototype.parseClassBody = function () {
var node = this.createNode();
var elementList = this.parseClassElementList();
return this.finalize(node, new Node.ClassBody(elementList));
};
Parser.prototype.parseClassDeclaration = function (identifierIsOptional) {
var node = this.createNode();
var previousStrict = this.context.strict;
this.context.strict = true;
this.expectKeyword('class');
var id = (identifierIsOptional && (this.lookahead.type !== 3 /* Identifier */)) ? null : this.parseVariableIdentifier();
var superClass = null;
if (this.matchKeyword('extends')) {
this.nextToken();
superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
}
var classBody = this.parseClassBody();
this.context.strict = previousStrict;
return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody));
};
Parser.prototype.parseClassExpression = function () {
var node = this.createNode();
var previousStrict = this.context.strict;
this.context.strict = true;
this.expectKeyword('class');
var id = (this.lookahead.type === 3 /* Identifier */) ? this.parseVariableIdentifier() : null;
var superClass = null;
if (this.matchKeyword('extends')) {
this.nextToken();
superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
}
var classBody = this.parseClassBody();
this.context.strict = previousStrict;
return this.finalize(node, new Node.ClassExpression(id, superClass, classBody));
};
// https://tc39.github.io/ecma262/#sec-scripts
// https://tc39.github.io/ecma262/#sec-modules
Parser.prototype.parseModule = function () {
this.context.strict = true;
this.context.isModule = true;
this.scanner.isModule = true;
var node = this.createNode();
var body = this.parseDirectivePrologues();
while (this.lookahead.type !== 2 /* EOF */) {
body.push(this.parseStatementListItem());
}
return this.finalize(node, new Node.Module(body));
};
Parser.prototype.parseScript = function () {
var node = this.createNode();
var body = this.parseDirectivePrologues();
while (this.lookahead.type !== 2 /* EOF */) {
body.push(this.parseStatementListItem());
}
return this.finalize(node, new Node.Script(body));
};
// https://tc39.github.io/ecma262/#sec-imports
Parser.prototype.parseModuleSpecifier = function () {
var node = this.createNode();
if (this.lookahead.type !== 8 /* StringLiteral */) {
this.throwError(messages_1.Messages.InvalidModuleSpecifier);
}
var token = this.nextToken();
var raw = this.getTokenRaw(token);
return this.finalize(node, new Node.Literal(token.value, raw));
};
// import {<foo as bar>} ...;
Parser.prototype.parseImportSpecifier = function () {
var node = this.createNode();
var imported;
var local;
if (this.lookahead.type === 3 /* Identifier */) {
imported = this.parseVariableIdentifier();
local = imported;
if (this.matchContextualKeyword('as')) {
this.nextToken();
local = this.parseVariableIdentifier();
}
}
else {
imported = this.parseIdentifierName();
local = imported;
if (this.matchContextualKeyword('as')) {
this.nextToken();
local = this.parseVariableIdentifier();
}
else {
this.throwUnexpectedToken(this.nextToken());
}
}
return this.finalize(node, new Node.ImportSpecifier(local, imported));
};
// {foo, bar as bas}
Parser.prototype.parseNamedImports = function () {
this.expect('{');
var specifiers = [];
while (!this.match('}')) {
specifiers.push(this.parseImportSpecifier());
if (!this.match('}')) {
this.expect(',');
}
}
this.expect('}');
return specifiers;
};
// import <foo> ...;
Parser.prototype.parseImportDefaultSpecifier = function () {
var node = this.createNode();
var local = this.parseIdentifierName();
return this.finalize(node, new Node.ImportDefaultSpecifier(local));
};
// import <* as foo> ...;
Parser.prototype.parseImportNamespaceSpecifier = function () {
var node = this.createNode();
this.expect('*');
if (!this.matchContextualKeyword('as')) {
this.throwError(messages_1.Messages.NoAsAfterImportNamespace);
}
this.nextToken();
var local = this.parseIdentifierName();
return this.finalize(node, new Node.ImportNamespaceSpecifier(local));
};
Parser.prototype.parseImportDeclaration = function () {
if (this.context.inFunctionBody) {
this.throwError(messages_1.Messages.IllegalImportDeclaration);
}
var node = this.createNode();
this.expectKeyword('import');
var src;
var specifiers = [];
if (this.lookahead.type === 8 /* StringLiteral */) {
// import 'foo';
src = this.parseModuleSpecifier();
}
else {
if (this.match('{')) {
// import {bar}
specifiers = specifiers.concat(this.parseNamedImports());
}
else if (this.match('*')) {
// import * as foo
specifiers.push(this.parseImportNamespaceSpecifier());
}
else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) {
// import foo
specifiers.push(this.parseImportDefaultSpecifier());
if (this.match(',')) {
this.nextToken();
if (this.match('*')) {
// import foo, * as foo
specifiers.push(this.parseImportNamespaceSpecifier());
}
else if (this.match('{')) {
// import foo, {bar}
specifiers = specifiers.concat(this.parseNamedImports());
}
else {
this.throwUnexpectedToken(this.lookahead);
}
}
}
else {
this.throwUnexpectedToken(this.nextToken());
}
if (!this.matchContextualKeyword('from')) {
var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
this.throwError(message, this.lookahead.value);
}
this.nextToken();
src = this.parseModuleSpecifier();
}
this.consumeSemicolon();
return this.finalize(node, new Node.ImportDeclaration(specifiers, src));
};
// https://tc39.github.io/ecma262/#sec-exports
Parser.prototype.parseExportSpecifier = function () {
var node = this.createNode();
var local = this.parseIdentifierName();
var exported = local;
if (this.matchContextualKeyword('as')) {
this.nextToken();
exported = this.parseIdentifierName();
}
return this.finalize(node, new Node.ExportSpecifier(local, exported));
};
Parser.prototype.parseExportDeclaration = function () {
if (this.context.inFunctionBody) {
this.throwError(messages_1.Messages.IllegalExportDeclaration);
}
var node = this.createNode();
this.expectKeyword('export');
var exportDeclaration;
if (this.matchKeyword('default')) {
// export default ...
this.nextToken();
if (this.matchKeyword('function')) {
// export default function foo () {}
// export default function () {}
var declaration = this.parseFunctionDeclaration(true);
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
}
else if (this.matchKeyword('class')) {
// export default class foo {}
var declaration = this.parseClassDeclaration(true);
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
}
else if (this.matchContextualKeyword('async')) {
// export default async function f () {}
// export default async function () {}
// export default async x => x
var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
}
else {
if (this.matchContextualKeyword('from')) {
this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value);
}
// export default {};
// export default [];
// export default (1 + 2);
var declaration = this.match('{') ? this.parseObjectInitializer() :
this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression();
this.consumeSemicolon();
exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration));
}
}
else if (this.match('*')) {
// export * from 'foo';
this.nextToken();
if (!this.matchContextualKeyword('from')) {
var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
this.throwError(message, this.lookahead.value);
}
this.nextToken();
var src = this.parseModuleSpecifier();
this.consumeSemicolon();
exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src));
}
else if (this.lookahead.type === 4 /* Keyword */) {
// export var f = 1;
var declaration = void 0;
switch (this.lookahead.value) {
case 'let':
case 'const':
declaration = this.parseLexicalDeclaration({ inFor: false });
break;
case 'var':
case 'class':
case 'function':
declaration = this.parseStatementListItem();
break;
default:
this.throwUnexpectedToken(this.lookahead);
}
exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
}
else if (this.matchAsyncFunction()) {
var declaration = this.parseFunctionDeclaration();
exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null));
}
else {
var specifiers = [];
var source = null;
var isExportFromIdentifier = false;
this.expect('{');
while (!this.match('}')) {
isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default');
specifiers.push(this.parseExportSpecifier());
if (!this.match('}')) {
this.expect(',');
}
}
this.expect('}');
if (this.matchContextualKeyword('from')) {
// export {default} from 'foo';
// export {foo} from 'foo';
this.nextToken();
source = this.parseModuleSpecifier();
this.consumeSemicolon();
}
else if (isExportFromIdentifier) {
// export {default}; // missing fromClause
var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
this.throwError(message, this.lookahead.value);
}
else {
// export {foo};
this.consumeSemicolon();
}
exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source));
}
return exportDeclaration;
};
return Parser;
}());
exports.Parser = Parser;
/***/ },
/* 9 */
/***/ function(module, exports) {
"use strict";
// Ensure the condition is true, otherwise throw an error.
// This is only to have a better contract semantic, i.e. another safety net
// to catch a logic error. The condition shall be fulfilled in normal case.
// Do NOT use this to enforce a certain condition on any user input.
Object.defineProperty(exports, "__esModule", { value: true });
function assert(condition, message) {
/* istanbul ignore if */
if (!condition) {
throw new Error('ASSERT: ' + message);
}
}
exports.assert = assert;
/***/ },
/* 10 */
/***/ function(module, exports) {
"use strict";
/* tslint:disable:max-classes-per-file */
Object.defineProperty(exports, "__esModule", { value: true });
var ErrorHandler = (function () {
function ErrorHandler() {
this.errors = [];
this.tolerant = false;
}
ErrorHandler.prototype.recordError = function (error) {
this.errors.push(error);
};
ErrorHandler.prototype.tolerate = function (error) {
if (this.tolerant) {
this.recordError(error);
}
else {
throw error;
}
};
ErrorHandler.prototype.constructError = function (msg, column) {
var error = new Error(msg);
try {
throw error;
}
catch (base) {
/* istanbul ignore else */
if (Object.create && Object.defineProperty) {
error = Object.create(base);
Object.defineProperty(error, 'column', { value: column });
}
}
/* istanbul ignore next */
return error;
};
ErrorHandler.prototype.createError = function (index, line, col, description) {
var msg = 'Line ' + line + ': ' + description;
var error = this.constructError(msg, col);
error.index = index;
error.lineNumber = line;
error.description = description;
return error;
};
ErrorHandler.prototype.throwError = function (index, line, col, description) {
throw this.createError(index, line, col, description);
};
ErrorHandler.prototype.tolerateError = function (index, line, col, description) {
var error = this.createError(index, line, col, description);
if (this.tolerant) {
this.recordError(error);
}
else {
throw error;
}
};
return ErrorHandler;
}());
exports.ErrorHandler = ErrorHandler;
/***/ },
/* 11 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Error messages should be identical to V8.
exports.Messages = {
BadGetterArity: 'Getter must not have any formal parameters',
BadSetterArity: 'Setter must have exactly one formal parameter',
BadSetterRestParameter: 'Setter function argument must not be a rest parameter',
ConstructorIsAsync: 'Class constructor may not be an async method',
ConstructorSpecialMethod: 'Class constructor may not be an accessor',
DeclarationMissingInitializer: 'Missing initializer in %0 declaration',
DefaultRestParameter: 'Unexpected token =',
DuplicateBinding: 'Duplicate binding %0',
DuplicateConstructor: 'A class may only have one constructor',
DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',
ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer',
GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts',
IllegalBreak: 'Illegal break statement',
IllegalContinue: 'Illegal continue statement',
IllegalExportDeclaration: 'Unexpected token',
IllegalImportDeclaration: 'Unexpected token',
IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list',
IllegalReturn: 'Illegal return statement',
InvalidEscapedReservedWord: 'Keyword must not contain escaped characters',
InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence',
InvalidLHSInAssignment: 'Invalid left-hand side in assignment',
InvalidLHSInForIn: 'Invalid left-hand side in for-in',
InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',
InvalidModuleSpecifier: 'Unexpected token',
InvalidRegExp: 'Invalid regular expression',
LetInLexicalBinding: 'let is disallowed as a lexically bound name',
MissingFromClause: 'Unexpected token',
MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
NewlineAfterThrow: 'Illegal newline after throw',
NoAsAfterImportNamespace: 'Unexpected token',
NoCatchOrFinally: 'Missing catch or finally after try',
ParameterAfterRestParameter: 'Rest parameter must be last formal parameter',
Redeclaration: '%0 \'%1\' has already been declared',
StaticPrototype: 'Classes may not have static property named prototype',
StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',
StrictDelete: 'Delete of an unqualified identifier in strict mode.',
StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block',
StrictFunctionName: 'Function name may not be eval or arguments in strict mode',
StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',
StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',
StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',
StrictModeWith: 'Strict mode code may not include a with statement',
StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',
StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',
StrictReservedWord: 'Use of future reserved word in strict mode',
StrictVarName: 'Variable name may not be eval or arguments in strict mode',
TemplateOctalLiteral: 'Octal literals are not allowed in template strings.',
UnexpectedEOS: 'Unexpected end of input',
UnexpectedIdentifier: 'Unexpected identifier',
UnexpectedNumber: 'Unexpected number',
UnexpectedReserved: 'Unexpected reserved word',
UnexpectedString: 'Unexpected string',
UnexpectedTemplate: 'Unexpected quasi %0',
UnexpectedToken: 'Unexpected token %0',
UnexpectedTokenIllegal: 'Unexpected token ILLEGAL',
UnknownLabel: 'Undefined label \'%0\'',
UnterminatedRegExp: 'Invalid regular expression: missing /'
};
/***/ },
/* 12 */
/***/ function(module, exports, __nested_webpack_require_226595__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var assert_1 = __nested_webpack_require_226595__(9);
var character_1 = __nested_webpack_require_226595__(4);
var messages_1 = __nested_webpack_require_226595__(11);
function hexValue(ch) {
return '0123456789abcdef'.indexOf(ch.toLowerCase());
}
function octalValue(ch) {
return '01234567'.indexOf(ch);
}
var Scanner = (function () {
function Scanner(code, handler) {
this.source = code;
this.errorHandler = handler;
this.trackComment = false;
this.isModule = false;
this.length = code.length;
this.index = 0;
this.lineNumber = (code.length > 0) ? 1 : 0;
this.lineStart = 0;
this.curlyStack = [];
}
Scanner.prototype.saveState = function () {
return {
index: this.index,
lineNumber: this.lineNumber,
lineStart: this.lineStart
};
};
Scanner.prototype.restoreState = function (state) {
this.index = state.index;
this.lineNumber = state.lineNumber;
this.lineStart = state.lineStart;
};
Scanner.prototype.eof = function () {
return this.index >= this.length;
};
Scanner.prototype.throwUnexpectedToken = function (message) {
if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
};
Scanner.prototype.tolerateUnexpectedToken = function (message) {
if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; }
this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
};
// https://tc39.github.io/ecma262/#sec-comments
Scanner.prototype.skipSingleLineComment = function (offset) {
var comments = [];
var start, loc;
if (this.trackComment) {
comments = [];
start = this.index - offset;
loc = {
start: {
line: this.lineNumber,
column: this.index - this.lineStart - offset
},
end: {}
};
}
while (!this.eof()) {
var ch = this.source.charCodeAt(this.index);
++this.index;
if (character_1.Character.isLineTerminator(ch)) {
if (this.trackComment) {
loc.end = {
line: this.lineNumber,
column: this.index - this.lineStart - 1
};
var entry = {
multiLine: false,
slice: [start + offset, this.index - 1],
range: [start, this.index - 1],
loc: loc
};
comments.push(entry);
}
if (ch === 13 && this.source.charCodeAt(this.index) === 10) {
++this.index;
}
++this.lineNumber;
this.lineStart = this.index;
return comments;
}
}
if (this.trackComment) {
loc.end = {
line: this.lineNumber,
column: this.index - this.lineStart
};
var entry = {
multiLine: false,
slice: [start + offset, this.index],
range: [start, this.index],
loc: loc
};
comments.push(entry);
}
return comments;
};
Scanner.prototype.skipMultiLineComment = function () {
var comments = [];
var start, loc;
if (this.trackComment) {
comments = [];
start = this.index - 2;
loc = {
start: {
line: this.lineNumber,
column: this.index - this.lineStart - 2
},
end: {}
};
}
while (!this.eof()) {
var ch = this.source.charCodeAt(this.index);
if (character_1.Character.isLineTerminator(ch)) {
if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) {
++this.index;
}
++this.lineNumber;
++this.index;
this.lineStart = this.index;
}
else if (ch === 0x2A) {
// Block comment ends with '*/'.
if (this.source.charCodeAt(this.index + 1) === 0x2F) {
this.index += 2;
if (this.trackComment) {
loc.end = {
line: this.lineNumber,
column: this.index - this.lineStart
};
var entry = {
multiLine: true,
slice: [start + 2, this.index - 2],
range: [start, this.index],
loc: loc
};
comments.push(entry);
}
return comments;
}
++this.index;
}
else {
++this.index;
}
}
// Ran off the end of the file - the whole thing is a comment
if (this.trackComment) {
loc.end = {
line: this.lineNumber,
column: this.index - this.lineStart
};
var entry = {
multiLine: true,
slice: [start + 2, this.index],
range: [start, this.index],
loc: loc
};
comments.push(entry);
}
this.tolerateUnexpectedToken();
return comments;
};
Scanner.prototype.scanComments = function () {
var comments;
if (this.trackComment) {
comments = [];
}
var start = (this.index === 0);
while (!this.eof()) {
var ch = this.source.charCodeAt(this.index);
if (character_1.Character.isWhiteSpace(ch)) {
++this.index;
}
else if (character_1.Character.isLineTerminator(ch)) {
++this.index;
if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) {
++this.index;
}
++this.lineNumber;
this.lineStart = this.index;
start = true;
}
else if (ch === 0x2F) {
ch = this.source.charCodeAt(this.index + 1);
if (ch === 0x2F) {
this.index += 2;
var comment = this.skipSingleLineComment(2);
if (this.trackComment) {
comments = comments.concat(comment);
}
start = true;
}
else if (ch === 0x2A) {
this.index += 2;
var comment = this.skipMultiLineComment();
if (this.trackComment) {
comments = comments.concat(comment);
}
}
else {
break;
}
}
else if (start && ch === 0x2D) {
// U+003E is '>'
if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) {
// '-->' is a single-line comment
this.index += 3;
var comment = this.skipSingleLineComment(3);
if (this.trackComment) {
comments = comments.concat(comment);
}
}
else {
break;
}
}
else if (ch === 0x3C && !this.isModule) {
if (this.source.slice(this.index + 1, this.index + 4) === '!--') {
this.index += 4; // `<!--`
var comment = this.skipSingleLineComment(4);
if (this.trackComment) {
comments = comments.concat(comment);
}
}
else {
break;
}
}
else {
break;
}
}
return comments;
};
// https://tc39.github.io/ecma262/#sec-future-reserved-words
Scanner.prototype.isFutureReservedWord = function (id) {
switch (id) {
case 'enum':
case 'export':
case 'import':
case 'super':
return true;
default:
return false;
}
};
Scanner.prototype.isStrictModeReservedWord = function (id) {
switch (id) {
case 'implements':
case 'interface':
case 'package':
case 'private':
case 'protected':
case 'public':
case 'static':
case 'yield':
case 'let':
return true;
default:
return false;
}
};
Scanner.prototype.isRestrictedWord = function (id) {
return id === 'eval' || id === 'arguments';
};
// https://tc39.github.io/ecma262/#sec-keywords
Scanner.prototype.isKeyword = function (id) {
switch (id.length) {
case 2:
return (id === 'if') || (id === 'in') || (id === 'do');
case 3:
return (id === 'var') || (id === 'for') || (id === 'new') ||
(id === 'try') || (id === 'let');
case 4:
return (id === 'this') || (id === 'else') || (id === 'case') ||
(id === 'void') || (id === 'with') || (id === 'enum');
case 5:
return (id === 'while') || (id === 'break') || (id === 'catch') ||
(id === 'throw') || (id === 'const') || (id === 'yield') ||
(id === 'class') || (id === 'super');
case 6:
return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
(id === 'switch') || (id === 'export') || (id === 'import');
case 7:
return (id === 'default') || (id === 'finally') || (id === 'extends');
case 8:
return (id === 'function') || (id === 'continue') || (id === 'debugger');
case 10:
return (id === 'instanceof');
default:
return false;
}
};
Scanner.prototype.codePointAt = function (i) {
var cp = this.source.charCodeAt(i);
if (cp >= 0xD800 && cp <= 0xDBFF) {
var second = this.source.charCodeAt(i + 1);
if (second >= 0xDC00 && second <= 0xDFFF) {
var first = cp;
cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
}
}
return cp;
};
Scanner.prototype.scanHexEscape = function (prefix) {
var len = (prefix === 'u') ? 4 : 2;
var code = 0;
for (var i = 0; i < len; ++i) {
if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
code = code * 16 + hexValue(this.source[this.index++]);
}
else {
return null;
}
}
return String.fromCharCode(code);
};
Scanner.prototype.scanUnicodeCodePointEscape = function () {
var ch = this.source[this.index];
var code = 0;
// At least, one hex digit is required.
if (ch === '}') {
this.throwUnexpectedToken();
}
while (!this.eof()) {
ch = this.source[this.index++];
if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) {
break;
}
code = code * 16 + hexValue(ch);
}
if (code > 0x10FFFF || ch !== '}') {
this.throwUnexpectedToken();
}
return character_1.Character.fromCodePoint(code);
};
Scanner.prototype.getIdentifier = function () {
var start = this.index++;
while (!this.eof()) {
var ch = this.source.charCodeAt(this.index);
if (ch === 0x5C) {
// Blackslash (U+005C) marks Unicode escape sequence.
this.index = start;
return this.getComplexIdentifier();
}
else if (ch >= 0xD800 && ch < 0xDFFF) {
// Need to handle surrogate pairs.
this.index = start;
return this.getComplexIdentifier();
}
if (character_1.Character.isIdentifierPart(ch)) {
++this.index;
}
else {
break;
}
}
return this.source.slice(start, this.index);
};
Scanner.prototype.getComplexIdentifier = function () {
var cp = this.codePointAt(this.index);
var id = character_1.Character.fromCodePoint(cp);
this.index += id.length;
// '\u' (U+005C, U+0075) denotes an escaped character.
var ch;
if (cp === 0x5C) {
if (this.source.charCodeAt(this.index) !== 0x75) {
this.throwUnexpectedToken();
}
++this.index;
if (this.source[this.index] === '{') {
++this.index;
ch = this.scanUnicodeCodePointEscape();
}
else {
ch = this.scanHexEscape('u');
if (ch === null || ch === '\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) {
this.throwUnexpectedToken();
}
}
id = ch;
}
while (!this.eof()) {
cp = this.codePointAt(this.index);
if (!character_1.Character.isIdentifierPart(cp)) {
break;
}
ch = character_1.Character.fromCodePoint(cp);
id += ch;
this.index += ch.length;
// '\u' (U+005C, U+0075) denotes an escaped character.
if (cp === 0x5C) {
id = id.substr(0, id.length - 1);
if (this.source.charCodeAt(this.index) !== 0x75) {
this.throwUnexpectedToken();
}
++this.index;
if (this.source[this.index] === '{') {
++this.index;
ch = this.scanUnicodeCodePointEscape();
}
else {
ch = this.scanHexEscape('u');
if (ch === null || ch === '\\' || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
this.throwUnexpectedToken();
}
}
id += ch;
}
}
return id;
};
Scanner.prototype.octalToDecimal = function (ch) {
// \0 is not octal escape sequence
var octal = (ch !== '0');
var code = octalValue(ch);
if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
octal = true;
code = code * 8 + octalValue(this.source[this.index++]);
// 3 digits are only allowed when string starts
// with 0, 1, 2, 3
if ('0123'.indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
code = code * 8 + octalValue(this.source[this.index++]);
}
}
return {
code: code,
octal: octal
};
};
// https://tc39.github.io/ecma262/#sec-names-and-keywords
Scanner.prototype.scanIdentifier = function () {
var type;
var start = this.index;
// Backslash (U+005C) starts an escaped character.
var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier();
// There is no keyword or literal with only one character.
// Thus, it must be an identifier.
if (id.length === 1) {
type = 3 /* Identifier */;
}
else if (this.isKeyword(id)) {
type = 4 /* Keyword */;
}
else if (id === 'null') {
type = 5 /* NullLiteral */;
}
else if (id === 'true' || id === 'false') {
type = 1 /* BooleanLiteral */;
}
else {
type = 3 /* Identifier */;
}
if (type !== 3 /* Identifier */ && (start + id.length !== this.index)) {
var restore = this.index;
this.index = start;
this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);
this.index = restore;
}
return {
type: type,
value: id,
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
// https://tc39.github.io/ecma262/#sec-punctuators
Scanner.prototype.scanPunctuator = function () {
var start = this.index;
// Check for most common single-character punctuators.
var str = this.source[this.index];
switch (str) {
case '(':
case '{':
if (str === '{') {
this.curlyStack.push('{');
}
++this.index;
break;
case '.':
++this.index;
if (this.source[this.index] === '.' && this.source[this.index + 1] === '.') {
// Spread operator: ...
this.index += 2;
str = '...';
}
break;
case '}':
++this.index;
this.curlyStack.pop();
break;
case ')':
case ';':
case ',':
case '[':
case ']':
case ':':
case '?':
case '~':
++this.index;
break;
default:
// 4-character punctuator.
str = this.source.substr(this.index, 4);
if (str === '>>>=') {
this.index += 4;
}
else {
// 3-character punctuators.
str = str.substr(0, 3);
if (str === '===' || str === '!==' || str === '>>>' ||
str === '<<=' || str === '>>=' || str === '**=') {
this.index += 3;
}
else {
// 2-character punctuators.
str = str.substr(0, 2);
if (str === '&&' || str === '||' || str === '==' || str === '!=' ||
str === '+=' || str === '-=' || str === '*=' || str === '/=' ||
str === '++' || str === '--' || str === '<<' || str === '>>' ||
str === '&=' || str === '|=' || str === '^=' || str === '%=' ||
str === '<=' || str === '>=' || str === '=>' || str === '**') {
this.index += 2;
}
else {
// 1-character punctuators.
str = this.source[this.index];
if ('<>=!+-*%&|^/'.indexOf(str) >= 0) {
++this.index;
}
}
}
}
}
if (this.index === start) {
this.throwUnexpectedToken();
}
return {
type: 7 /* Punctuator */,
value: str,
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
// https://tc39.github.io/ecma262/#sec-literals-numeric-literals
Scanner.prototype.scanHexLiteral = function (start) {
var num = '';
while (!this.eof()) {
if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
break;
}
num += this.source[this.index++];
}
if (num.length === 0) {
this.throwUnexpectedToken();
}
if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
this.throwUnexpectedToken();
}
return {
type: 6 /* NumericLiteral */,
value: parseInt('0x' + num, 16),
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
Scanner.prototype.scanBinaryLiteral = function (start) {
var num = '';
var ch;
while (!this.eof()) {
ch = this.source[this.index];
if (ch !== '0' && ch !== '1') {
break;
}
num += this.source[this.index++];
}
if (num.length === 0) {
// only 0b or 0B
this.throwUnexpectedToken();
}
if (!this.eof()) {
ch = this.source.charCodeAt(this.index);
/* istanbul ignore else */
if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) {
this.throwUnexpectedToken();
}
}
return {
type: 6 /* NumericLiteral */,
value: parseInt(num, 2),
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
Scanner.prototype.scanOctalLiteral = function (prefix, start) {
var num = '';
var octal = false;
if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) {
octal = true;
num = '0' + this.source[this.index++];
}
else {
++this.index;
}
while (!this.eof()) {
if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
break;
}
num += this.source[this.index++];
}
if (!octal && num.length === 0) {
// only 0o or 0O
this.throwUnexpectedToken();
}
if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
this.throwUnexpectedToken();
}
return {
type: 6 /* NumericLiteral */,
value: parseInt(num, 8),
octal: octal,
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
Scanner.prototype.isImplicitOctalLiteral = function () {
// Implicit octal, unless there is a non-octal digit.
// (Annex B.1.1 on Numeric Literals)
for (var i = this.index + 1; i < this.length; ++i) {
var ch = this.source[i];
if (ch === '8' || ch === '9') {
return false;
}
if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
return true;
}
}
return true;
};
Scanner.prototype.scanNumericLiteral = function () {
var start = this.index;
var ch = this.source[start];
assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), 'Numeric literal must start with a decimal digit or a decimal point');
var num = '';
if (ch !== '.') {
num = this.source[this.index++];
ch = this.source[this.index];
// Hex number starts with '0x'.
// Octal number starts with '0'.
// Octal number in ES6 starts with '0o'.
// Binary number in ES6 starts with '0b'.
if (num === '0') {
if (ch === 'x' || ch === 'X') {
++this.index;
return this.scanHexLiteral(start);
}
if (ch === 'b' || ch === 'B') {
++this.index;
return this.scanBinaryLiteral(start);
}
if (ch === 'o' || ch === 'O') {
return this.scanOctalLiteral(ch, start);
}
if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
if (this.isImplicitOctalLiteral()) {
return this.scanOctalLiteral(ch, start);
}
}
}
while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
num += this.source[this.index++];
}
ch = this.source[this.index];
}
if (ch === '.') {
num += this.source[this.index++];
while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
num += this.source[this.index++];
}
ch = this.source[this.index];
}
if (ch === 'e' || ch === 'E') {
num += this.source[this.index++];
ch = this.source[this.index];
if (ch === '+' || ch === '-') {
num += this.source[this.index++];
}
if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
num += this.source[this.index++];
}
}
else {
this.throwUnexpectedToken();
}
}
if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
this.throwUnexpectedToken();
}
return {
type: 6 /* NumericLiteral */,
value: parseFloat(num),
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
// https://tc39.github.io/ecma262/#sec-literals-string-literals
Scanner.prototype.scanStringLiteral = function () {
var start = this.index;
var quote = this.source[start];
assert_1.assert((quote === '\'' || quote === '"'), 'String literal must starts with a quote');
++this.index;
var octal = false;
var str = '';
while (!this.eof()) {
var ch = this.source[this.index++];
if (ch === quote) {
quote = '';
break;
}
else if (ch === '\\') {
ch = this.source[this.index++];
if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
switch (ch) {
case 'u':
if (this.source[this.index] === '{') {
++this.index;
str += this.scanUnicodeCodePointEscape();
}
else {
var unescaped_1 = this.scanHexEscape(ch);
if (unescaped_1 === null) {
this.throwUnexpectedToken();
}
str += unescaped_1;
}
break;
case 'x':
var unescaped = this.scanHexEscape(ch);
if (unescaped === null) {
this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
}
str += unescaped;
break;
case 'n':
str += '\n';
break;
case 'r':
str += '\r';
break;
case 't':
str += '\t';
break;
case 'b':
str += '\b';
break;
case 'f':
str += '\f';
break;
case 'v':
str += '\x0B';
break;
case '8':
case '9':
str += ch;
this.tolerateUnexpectedToken();
break;
default:
if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
var octToDec = this.octalToDecimal(ch);
octal = octToDec.octal || octal;
str += String.fromCharCode(octToDec.code);
}
else {
str += ch;
}
break;
}
}
else {
++this.lineNumber;
if (ch === '\r' && this.source[this.index] === '\n') {
++this.index;
}
this.lineStart = this.index;
}
}
else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
break;
}
else {
str += ch;
}
}
if (quote !== '') {
this.index = start;
this.throwUnexpectedToken();
}
return {
type: 8 /* StringLiteral */,
value: str,
octal: octal,
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
// https://tc39.github.io/ecma262/#sec-template-literal-lexical-components
Scanner.prototype.scanTemplate = function () {
var cooked = '';
var terminated = false;
var start = this.index;
var head = (this.source[start] === '`');
var tail = false;
var rawOffset = 2;
++this.index;
while (!this.eof()) {
var ch = this.source[this.index++];
if (ch === '`') {
rawOffset = 1;
tail = true;
terminated = true;
break;
}
else if (ch === '$') {
if (this.source[this.index] === '{') {
this.curlyStack.push('${');
++this.index;
terminated = true;
break;
}
cooked += ch;
}
else if (ch === '\\') {
ch = this.source[this.index++];
if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
switch (ch) {
case 'n':
cooked += '\n';
break;
case 'r':
cooked += '\r';
break;
case 't':
cooked += '\t';
break;
case 'u':
if (this.source[this.index] === '{') {
++this.index;
cooked += this.scanUnicodeCodePointEscape();
}
else {
var restore = this.index;
var unescaped_2 = this.scanHexEscape(ch);
if (unescaped_2 !== null) {
cooked += unescaped_2;
}
else {
this.index = restore;
cooked += ch;
}
}
break;
case 'x':
var unescaped = this.scanHexEscape(ch);
if (unescaped === null) {
this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
}
cooked += unescaped;
break;
case 'b':
cooked += '\b';
break;
case 'f':
cooked += '\f';
break;
case 'v':
cooked += '\v';
break;
default:
if (ch === '0') {
if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
// Illegal: \01 \02 and so on
this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
}
cooked += '\0';
}
else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
// Illegal: \1 \2
this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
}
else {
cooked += ch;
}
break;
}
}
else {
++this.lineNumber;
if (ch === '\r' && this.source[this.index] === '\n') {
++this.index;
}
this.lineStart = this.index;
}
}
else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
++this.lineNumber;
if (ch === '\r' && this.source[this.index] === '\n') {
++this.index;
}
this.lineStart = this.index;
cooked += '\n';
}
else {
cooked += ch;
}
}
if (!terminated) {
this.throwUnexpectedToken();
}
if (!head) {
this.curlyStack.pop();
}
return {
type: 10 /* Template */,
value: this.source.slice(start + 1, this.index - rawOffset),
cooked: cooked,
head: head,
tail: tail,
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
// https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals
Scanner.prototype.testRegExp = function (pattern, flags) {
// The BMP character to use as a replacement for astral symbols when
// translating an ES6 "u"-flagged pattern to an ES5-compatible
// approximation.
// Note: replacing with '\uFFFF' enables false positives in unlikely
// scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid
// pattern that would not be detected by this substitution.
var astralSubstitute = '\uFFFF';
var tmp = pattern;
var self = this;
if (flags.indexOf('u') >= 0) {
tmp = tmp
.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) {
var codePoint = parseInt($1 || $2, 16);
if (codePoint > 0x10FFFF) {
self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
}
if (codePoint <= 0xFFFF) {
return String.fromCharCode(codePoint);
}
return astralSubstitute;
})
.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
}
// First, detect invalid regular expressions.
try {
RegExp(tmp);
}
catch (e) {
this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
}
// Return a regular expression object for this pattern-flag pair, or
// `null` in case the current environment doesn't support the flags it
// uses.
try {
return new RegExp(pattern, flags);
}
catch (exception) {
/* istanbul ignore next */
return null;
}
};
Scanner.prototype.scanRegExpBody = function () {
var ch = this.source[this.index];
assert_1.assert(ch === '/', 'Regular expression literal must start with a slash');
var str = this.source[this.index++];
var classMarker = false;
var terminated = false;
while (!this.eof()) {
ch = this.source[this.index++];
str += ch;
if (ch === '\\') {
ch = this.source[this.index++];
// https://tc39.github.io/ecma262/#sec-literals-regular-expression-literals
if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
}
str += ch;
}
else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
}
else if (classMarker) {
if (ch === ']') {
classMarker = false;
}
}
else {
if (ch === '/') {
terminated = true;
break;
}
else if (ch === '[') {
classMarker = true;
}
}
}
if (!terminated) {
this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
}
// Exclude leading and trailing slash.
return str.substr(1, str.length - 2);
};
Scanner.prototype.scanRegExpFlags = function () {
var str = '';
var flags = '';
while (!this.eof()) {
var ch = this.source[this.index];
if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
break;
}
++this.index;
if (ch === '\\' && !this.eof()) {
ch = this.source[this.index];
if (ch === 'u') {
++this.index;
var restore = this.index;
var char = this.scanHexEscape('u');
if (char !== null) {
flags += char;
for (str += '\\u'; restore < this.index; ++restore) {
str += this.source[restore];
}
}
else {
this.index = restore;
flags += 'u';
str += '\\u';
}
this.tolerateUnexpectedToken();
}
else {
str += '\\';
this.tolerateUnexpectedToken();
}
}
else {
flags += ch;
str += ch;
}
}
return flags;
};
Scanner.prototype.scanRegExp = function () {
var start = this.index;
var pattern = this.scanRegExpBody();
var flags = this.scanRegExpFlags();
var value = this.testRegExp(pattern, flags);
return {
type: 9 /* RegularExpression */,
value: '',
pattern: pattern,
flags: flags,
regex: value,
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: start,
end: this.index
};
};
Scanner.prototype.lex = function () {
if (this.eof()) {
return {
type: 2 /* EOF */,
value: '',
lineNumber: this.lineNumber,
lineStart: this.lineStart,
start: this.index,
end: this.index
};
}
var cp = this.source.charCodeAt(this.index);
if (character_1.Character.isIdentifierStart(cp)) {
return this.scanIdentifier();
}
// Very common: ( and ) and ;
if (cp === 0x28 || cp === 0x29 || cp === 0x3B) {
return this.scanPunctuator();
}
// String literal starts with single quote (U+0027) or double quote (U+0022).
if (cp === 0x27 || cp === 0x22) {
return this.scanStringLiteral();
}
// Dot (.) U+002E can also start a floating-point number, hence the need
// to check the next character.
if (cp === 0x2E) {
if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) {
return this.scanNumericLiteral();
}
return this.scanPunctuator();
}
if (character_1.Character.isDecimalDigit(cp)) {
return this.scanNumericLiteral();
}
// Template literals start with ` (U+0060) for template head
// or } (U+007D) for template middle or template tail.
if (cp === 0x60 || (cp === 0x7D && this.curlyStack[this.curlyStack.length - 1] === '${')) {
return this.scanTemplate();
}
// Possible identifier start in a surrogate pair.
if (cp >= 0xD800 && cp < 0xDFFF) {
if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) {
return this.scanIdentifier();
}
}
return this.scanPunctuator();
};
return Scanner;
}());
exports.Scanner = Scanner;
/***/ },
/* 13 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TokenName = {};
exports.TokenName[1 /* BooleanLiteral */] = 'Boolean';
exports.TokenName[2 /* EOF */] = '<end>';
exports.TokenName[3 /* Identifier */] = 'Identifier';
exports.TokenName[4 /* Keyword */] = 'Keyword';
exports.TokenName[5 /* NullLiteral */] = 'Null';
exports.TokenName[6 /* NumericLiteral */] = 'Numeric';
exports.TokenName[7 /* Punctuator */] = 'Punctuator';
exports.TokenName[8 /* StringLiteral */] = 'String';
exports.TokenName[9 /* RegularExpression */] = 'RegularExpression';
exports.TokenName[10 /* Template */] = 'Template';
/***/ },
/* 14 */
/***/ function(module, exports) {
"use strict";
// Generated by generate-xhtml-entities.js. DO NOT MODIFY!
Object.defineProperty(exports, "__esModule", { value: true });
exports.XHTMLEntities = {
quot: '\u0022',
amp: '\u0026',
apos: '\u0027',
gt: '\u003E',
nbsp: '\u00A0',
iexcl: '\u00A1',
cent: '\u00A2',
pound: '\u00A3',
curren: '\u00A4',
yen: '\u00A5',
brvbar: '\u00A6',
sect: '\u00A7',
uml: '\u00A8',
copy: '\u00A9',
ordf: '\u00AA',
laquo: '\u00AB',
not: '\u00AC',
shy: '\u00AD',
reg: '\u00AE',
macr: '\u00AF',
deg: '\u00B0',
plusmn: '\u00B1',
sup2: '\u00B2',
sup3: '\u00B3',
acute: '\u00B4',
micro: '\u00B5',
para: '\u00B6',
middot: '\u00B7',
cedil: '\u00B8',
sup1: '\u00B9',
ordm: '\u00BA',
raquo: '\u00BB',
frac14: '\u00BC',
frac12: '\u00BD',
frac34: '\u00BE',
iquest: '\u00BF',
Agrave: '\u00C0',
Aacute: '\u00C1',
Acirc: '\u00C2',
Atilde: '\u00C3',
Auml: '\u00C4',
Aring: '\u00C5',
AElig: '\u00C6',
Ccedil: '\u00C7',
Egrave: '\u00C8',
Eacute: '\u00C9',
Ecirc: '\u00CA',
Euml: '\u00CB',
Igrave: '\u00CC',
Iacute: '\u00CD',
Icirc: '\u00CE',
Iuml: '\u00CF',
ETH: '\u00D0',
Ntilde: '\u00D1',
Ograve: '\u00D2',
Oacute: '\u00D3',
Ocirc: '\u00D4',
Otilde: '\u00D5',
Ouml: '\u00D6',
times: '\u00D7',
Oslash: '\u00D8',
Ugrave: '\u00D9',
Uacute: '\u00DA',
Ucirc: '\u00DB',
Uuml: '\u00DC',
Yacute: '\u00DD',
THORN: '\u00DE',
szlig: '\u00DF',
agrave: '\u00E0',
aacute: '\u00E1',
acirc: '\u00E2',
atilde: '\u00E3',
auml: '\u00E4',
aring: '\u00E5',
aelig: '\u00E6',
ccedil: '\u00E7',
egrave: '\u00E8',
eacute: '\u00E9',
ecirc: '\u00EA',
euml: '\u00EB',
igrave: '\u00EC',
iacute: '\u00ED',
icirc: '\u00EE',
iuml: '\u00EF',
eth: '\u00F0',
ntilde: '\u00F1',
ograve: '\u00F2',
oacute: '\u00F3',
ocirc: '\u00F4',
otilde: '\u00F5',
ouml: '\u00F6',
divide: '\u00F7',
oslash: '\u00F8',
ugrave: '\u00F9',
uacute: '\u00FA',
ucirc: '\u00FB',
uuml: '\u00FC',
yacute: '\u00FD',
thorn: '\u00FE',
yuml: '\u00FF',
OElig: '\u0152',
oelig: '\u0153',
Scaron: '\u0160',
scaron: '\u0161',
Yuml: '\u0178',
fnof: '\u0192',
circ: '\u02C6',
tilde: '\u02DC',
Alpha: '\u0391',
Beta: '\u0392',
Gamma: '\u0393',
Delta: '\u0394',
Epsilon: '\u0395',
Zeta: '\u0396',
Eta: '\u0397',
Theta: '\u0398',
Iota: '\u0399',
Kappa: '\u039A',
Lambda: '\u039B',
Mu: '\u039C',
Nu: '\u039D',
Xi: '\u039E',
Omicron: '\u039F',
Pi: '\u03A0',
Rho: '\u03A1',
Sigma: '\u03A3',
Tau: '\u03A4',
Upsilon: '\u03A5',
Phi: '\u03A6',
Chi: '\u03A7',
Psi: '\u03A8',
Omega: '\u03A9',
alpha: '\u03B1',
beta: '\u03B2',
gamma: '\u03B3',
delta: '\u03B4',
epsilon: '\u03B5',
zeta: '\u03B6',
eta: '\u03B7',
theta: '\u03B8',
iota: '\u03B9',
kappa: '\u03BA',
lambda: '\u03BB',
mu: '\u03BC',
nu: '\u03BD',
xi: '\u03BE',
omicron: '\u03BF',
pi: '\u03C0',
rho: '\u03C1',
sigmaf: '\u03C2',
sigma: '\u03C3',
tau: '\u03C4',
upsilon: '\u03C5',
phi: '\u03C6',
chi: '\u03C7',
psi: '\u03C8',
omega: '\u03C9',
thetasym: '\u03D1',
upsih: '\u03D2',
piv: '\u03D6',
ensp: '\u2002',
emsp: '\u2003',
thinsp: '\u2009',
zwnj: '\u200C',
zwj: '\u200D',
lrm: '\u200E',
rlm: '\u200F',
ndash: '\u2013',
mdash: '\u2014',
lsquo: '\u2018',
rsquo: '\u2019',
sbquo: '\u201A',
ldquo: '\u201C',
rdquo: '\u201D',
bdquo: '\u201E',
dagger: '\u2020',
Dagger: '\u2021',
bull: '\u2022',
hellip: '\u2026',
permil: '\u2030',
prime: '\u2032',
Prime: '\u2033',
lsaquo: '\u2039',
rsaquo: '\u203A',
oline: '\u203E',
frasl: '\u2044',
euro: '\u20AC',
image: '\u2111',
weierp: '\u2118',
real: '\u211C',
trade: '\u2122',
alefsym: '\u2135',
larr: '\u2190',
uarr: '\u2191',
rarr: '\u2192',
darr: '\u2193',
harr: '\u2194',
crarr: '\u21B5',
lArr: '\u21D0',
uArr: '\u21D1',
rArr: '\u21D2',
dArr: '\u21D3',
hArr: '\u21D4',
forall: '\u2200',
part: '\u2202',
exist: '\u2203',
empty: '\u2205',
nabla: '\u2207',
isin: '\u2208',
notin: '\u2209',
ni: '\u220B',
prod: '\u220F',
sum: '\u2211',
minus: '\u2212',
lowast: '\u2217',
radic: '\u221A',
prop: '\u221D',
infin: '\u221E',
ang: '\u2220',
and: '\u2227',
or: '\u2228',
cap: '\u2229',
cup: '\u222A',
int: '\u222B',
there4: '\u2234',
sim: '\u223C',
cong: '\u2245',
asymp: '\u2248',
ne: '\u2260',
equiv: '\u2261',
le: '\u2264',
ge: '\u2265',
sub: '\u2282',
sup: '\u2283',
nsub: '\u2284',
sube: '\u2286',
supe: '\u2287',
oplus: '\u2295',
otimes: '\u2297',
perp: '\u22A5',
sdot: '\u22C5',
lceil: '\u2308',
rceil: '\u2309',
lfloor: '\u230A',
rfloor: '\u230B',
loz: '\u25CA',
spades: '\u2660',
clubs: '\u2663',
hearts: '\u2665',
diams: '\u2666',
lang: '\u27E8',
rang: '\u27E9'
};
/***/ },
/* 15 */
/***/ function(module, exports, __nested_webpack_require_277122__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var error_handler_1 = __nested_webpack_require_277122__(10);
var scanner_1 = __nested_webpack_require_277122__(12);
var token_1 = __nested_webpack_require_277122__(13);
var Reader = (function () {
function Reader() {
this.values = [];
this.curly = this.paren = -1;
}
// A function following one of those tokens is an expression.
Reader.prototype.beforeFunctionExpression = function (t) {
return ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',
'return', 'case', 'delete', 'throw', 'void',
// assignment operators
'=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=',
'&=', '|=', '^=', ',',
// binary/unary operators
'+', '-', '*', '**', '/', '%', '++', '--', '<<', '>>', '>>>', '&',
'|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',
'<=', '<', '>', '!=', '!=='].indexOf(t) >= 0;
};
// Determine if forward slash (/) is an operator or part of a regular expression
// https://github.com/mozilla/sweet.js/wiki/design
Reader.prototype.isRegexStart = function () {
var previous = this.values[this.values.length - 1];
var regex = (previous !== null);
switch (previous) {
case 'this':
case ']':
regex = false;
break;
case ')':
var keyword = this.values[this.paren - 1];
regex = (keyword === 'if' || keyword === 'while' || keyword === 'for' || keyword === 'with');
break;
case '}':
// Dividing a function by anything makes little sense,
// but we have to check for that.
regex = false;
if (this.values[this.curly - 3] === 'function') {
// Anonymous function, e.g. function(){} /42
var check = this.values[this.curly - 4];
regex = check ? !this.beforeFunctionExpression(check) : false;
}
else if (this.values[this.curly - 4] === 'function') {
// Named function, e.g. function f(){} /42/
var check = this.values[this.curly - 5];
regex = check ? !this.beforeFunctionExpression(check) : true;
}
break;
default:
break;
}
return regex;
};
Reader.prototype.push = function (token) {
if (token.type === 7 /* Punctuator */ || token.type === 4 /* Keyword */) {
if (token.value === '{') {
this.curly = this.values.length;
}
else if (token.value === '(') {
this.paren = this.values.length;
}
this.values.push(token.value);
}
else {
this.values.push(null);
}
};
return Reader;
}());
var Tokenizer = (function () {
function Tokenizer(code, config) {
this.errorHandler = new error_handler_1.ErrorHandler();
this.errorHandler.tolerant = config ? (typeof config.tolerant === 'boolean' && config.tolerant) : false;
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
this.scanner.trackComment = config ? (typeof config.comment === 'boolean' && config.comment) : false;
this.trackRange = config ? (typeof config.range === 'boolean' && config.range) : false;
this.trackLoc = config ? (typeof config.loc === 'boolean' && config.loc) : false;
this.buffer = [];
this.reader = new Reader();
}
Tokenizer.prototype.errors = function () {
return this.errorHandler.errors;
};
Tokenizer.prototype.getNextToken = function () {
if (this.buffer.length === 0) {
var comments = this.scanner.scanComments();
if (this.scanner.trackComment) {
for (var i = 0; i < comments.length; ++i) {
var e = comments[i];
var value = this.scanner.source.slice(e.slice[0], e.slice[1]);
var comment = {
type: e.multiLine ? 'BlockComment' : 'LineComment',
value: value
};
if (this.trackRange) {
comment.range = e.range;
}
if (this.trackLoc) {
comment.loc = e.loc;
}
this.buffer.push(comment);
}
}
if (!this.scanner.eof()) {
var loc = void 0;
if (this.trackLoc) {
loc = {
start: {
line: this.scanner.lineNumber,
column: this.scanner.index - this.scanner.lineStart
},
end: {}
};
}
var startRegex = (this.scanner.source[this.scanner.index] === '/') && this.reader.isRegexStart();
var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex();
this.reader.push(token);
var entry = {
type: token_1.TokenName[token.type],
value: this.scanner.source.slice(token.start, token.end)
};
if (this.trackRange) {
entry.range = [token.start, token.end];
}
if (this.trackLoc) {
loc.end = {
line: this.scanner.lineNumber,
column: this.scanner.index - this.scanner.lineStart
};
entry.loc = loc;
}
if (token.type === 9 /* RegularExpression */) {
var pattern = token.pattern;
var flags = token.flags;
entry.regex = { pattern: pattern, flags: flags };
}
this.buffer.push(entry);
}
}
return this.buffer.shift();
};
return Tokenizer;
}());
exports.Tokenizer = Tokenizer;
/***/ }
/******/ ])
});
;
/***/ }),
/***/ 23479:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/*
Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 <COPYRIGHT HOLDER> 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.
*/
/*jslint vars:false, bitwise:true*/
/*jshint indent:4*/
/*global exports:true*/
(function clone(exports) {
'use strict';
var Syntax,
VisitorOption,
VisitorKeys,
BREAK,
SKIP,
REMOVE;
function deepCopy(obj) {
var ret = {}, key, val;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
val = obj[key];
if (typeof val === 'object' && val !== null) {
ret[key] = deepCopy(val);
} else {
ret[key] = val;
}
}
}
return ret;
}
// based on LLVM libc++ upper_bound / lower_bound
// MIT License
function upperBound(array, func) {
var diff, len, i, current;
len = array.length;
i = 0;
while (len) {
diff = len >>> 1;
current = i + diff;
if (func(array[current])) {
len = diff;
} else {
i = current + 1;
len -= diff + 1;
}
}
return i;
}
Syntax = {
AssignmentExpression: 'AssignmentExpression',
AssignmentPattern: 'AssignmentPattern',
ArrayExpression: 'ArrayExpression',
ArrayPattern: 'ArrayPattern',
ArrowFunctionExpression: 'ArrowFunctionExpression',
AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
BlockStatement: 'BlockStatement',
BinaryExpression: 'BinaryExpression',
BreakStatement: 'BreakStatement',
CallExpression: 'CallExpression',
CatchClause: 'CatchClause',
ClassBody: 'ClassBody',
ClassDeclaration: 'ClassDeclaration',
ClassExpression: 'ClassExpression',
ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.
ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.
ConditionalExpression: 'ConditionalExpression',
ContinueStatement: 'ContinueStatement',
DebuggerStatement: 'DebuggerStatement',
DirectiveStatement: 'DirectiveStatement',
DoWhileStatement: 'DoWhileStatement',
EmptyStatement: 'EmptyStatement',
ExportAllDeclaration: 'ExportAllDeclaration',
ExportDefaultDeclaration: 'ExportDefaultDeclaration',
ExportNamedDeclaration: 'ExportNamedDeclaration',
ExportSpecifier: 'ExportSpecifier',
ExpressionStatement: 'ExpressionStatement',
ForStatement: 'ForStatement',
ForInStatement: 'ForInStatement',
ForOfStatement: 'ForOfStatement',
FunctionDeclaration: 'FunctionDeclaration',
FunctionExpression: 'FunctionExpression',
GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.
Identifier: 'Identifier',
IfStatement: 'IfStatement',
ImportExpression: 'ImportExpression',
ImportDeclaration: 'ImportDeclaration',
ImportDefaultSpecifier: 'ImportDefaultSpecifier',
ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
ImportSpecifier: 'ImportSpecifier',
Literal: 'Literal',
LabeledStatement: 'LabeledStatement',
LogicalExpression: 'LogicalExpression',
MemberExpression: 'MemberExpression',
MetaProperty: 'MetaProperty',
MethodDefinition: 'MethodDefinition',
ModuleSpecifier: 'ModuleSpecifier',
NewExpression: 'NewExpression',
ObjectExpression: 'ObjectExpression',
ObjectPattern: 'ObjectPattern',
Program: 'Program',
Property: 'Property',
RestElement: 'RestElement',
ReturnStatement: 'ReturnStatement',
SequenceExpression: 'SequenceExpression',
SpreadElement: 'SpreadElement',
Super: 'Super',
SwitchStatement: 'SwitchStatement',
SwitchCase: 'SwitchCase',
TaggedTemplateExpression: 'TaggedTemplateExpression',
TemplateElement: 'TemplateElement',
TemplateLiteral: 'TemplateLiteral',
ThisExpression: 'ThisExpression',
ThrowStatement: 'ThrowStatement',
TryStatement: 'TryStatement',
UnaryExpression: 'UnaryExpression',
UpdateExpression: 'UpdateExpression',
VariableDeclaration: 'VariableDeclaration',
VariableDeclarator: 'VariableDeclarator',
WhileStatement: 'WhileStatement',
WithStatement: 'WithStatement',
YieldExpression: 'YieldExpression'
};
VisitorKeys = {
AssignmentExpression: ['left', 'right'],
AssignmentPattern: ['left', 'right'],
ArrayExpression: ['elements'],
ArrayPattern: ['elements'],
ArrowFunctionExpression: ['params', 'body'],
AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
BlockStatement: ['body'],
BinaryExpression: ['left', 'right'],
BreakStatement: ['label'],
CallExpression: ['callee', 'arguments'],
CatchClause: ['param', 'body'],
ClassBody: ['body'],
ClassDeclaration: ['id', 'superClass', 'body'],
ClassExpression: ['id', 'superClass', 'body'],
ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.
ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
ConditionalExpression: ['test', 'consequent', 'alternate'],
ContinueStatement: ['label'],
DebuggerStatement: [],
DirectiveStatement: [],
DoWhileStatement: ['body', 'test'],
EmptyStatement: [],
ExportAllDeclaration: ['source'],
ExportDefaultDeclaration: ['declaration'],
ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
ExportSpecifier: ['exported', 'local'],
ExpressionStatement: ['expression'],
ForStatement: ['init', 'test', 'update', 'body'],
ForInStatement: ['left', 'right', 'body'],
ForOfStatement: ['left', 'right', 'body'],
FunctionDeclaration: ['id', 'params', 'body'],
FunctionExpression: ['id', 'params', 'body'],
GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
Identifier: [],
IfStatement: ['test', 'consequent', 'alternate'],
ImportExpression: ['source'],
ImportDeclaration: ['specifiers', 'source'],
ImportDefaultSpecifier: ['local'],
ImportNamespaceSpecifier: ['local'],
ImportSpecifier: ['imported', 'local'],
Literal: [],
LabeledStatement: ['label', 'body'],
LogicalExpression: ['left', 'right'],
MemberExpression: ['object', 'property'],
MetaProperty: ['meta', 'property'],
MethodDefinition: ['key', 'value'],
ModuleSpecifier: [],
NewExpression: ['callee', 'arguments'],
ObjectExpression: ['properties'],
ObjectPattern: ['properties'],
Program: ['body'],
Property: ['key', 'value'],
RestElement: [ 'argument' ],
ReturnStatement: ['argument'],
SequenceExpression: ['expressions'],
SpreadElement: ['argument'],
Super: [],
SwitchStatement: ['discriminant', 'cases'],
SwitchCase: ['test', 'consequent'],
TaggedTemplateExpression: ['tag', 'quasi'],
TemplateElement: [],
TemplateLiteral: ['quasis', 'expressions'],
ThisExpression: [],
ThrowStatement: ['argument'],
TryStatement: ['block', 'handler', 'finalizer'],
UnaryExpression: ['argument'],
UpdateExpression: ['argument'],
VariableDeclaration: ['declarations'],
VariableDeclarator: ['id', 'init'],
WhileStatement: ['test', 'body'],
WithStatement: ['object', 'body'],
YieldExpression: ['argument']
};
// unique id
BREAK = {};
SKIP = {};
REMOVE = {};
VisitorOption = {
Break: BREAK,
Skip: SKIP,
Remove: REMOVE
};
function Reference(parent, key) {
this.parent = parent;
this.key = key;
}
Reference.prototype.replace = function replace(node) {
this.parent[this.key] = node;
};
Reference.prototype.remove = function remove() {
if (Array.isArray(this.parent)) {
this.parent.splice(this.key, 1);
return true;
} else {
this.replace(null);
return false;
}
};
function Element(node, path, wrap, ref) {
this.node = node;
this.path = path;
this.wrap = wrap;
this.ref = ref;
}
function Controller() { }
// API:
// return property path array from root to current node
Controller.prototype.path = function path() {
var i, iz, j, jz, result, element;
function addToPath(result, path) {
if (Array.isArray(path)) {
for (j = 0, jz = path.length; j < jz; ++j) {
result.push(path[j]);
}
} else {
result.push(path);
}
}
// root node
if (!this.__current.path) {
return null;
}
// first node is sentinel, second node is root element
result = [];
for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
element = this.__leavelist[i];
addToPath(result, element.path);
}
addToPath(result, this.__current.path);
return result;
};
// API:
// return type of current node
Controller.prototype.type = function () {
var node = this.current();
return node.type || this.__current.wrap;
};
// API:
// return array of parent elements
Controller.prototype.parents = function parents() {
var i, iz, result;
// first node is sentinel
result = [];
for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
result.push(this.__leavelist[i].node);
}
return result;
};
// API:
// return current node
Controller.prototype.current = function current() {
return this.__current.node;
};
Controller.prototype.__execute = function __execute(callback, element) {
var previous, result;
result = undefined;
previous = this.__current;
this.__current = element;
this.__state = null;
if (callback) {
result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
}
this.__current = previous;
return result;
};
// API:
// notify control skip / break
Controller.prototype.notify = function notify(flag) {
this.__state = flag;
};
// API:
// skip child nodes of current node
Controller.prototype.skip = function () {
this.notify(SKIP);
};
// API:
// break traversals
Controller.prototype['break'] = function () {
this.notify(BREAK);
};
// API:
// remove node
Controller.prototype.remove = function () {
this.notify(REMOVE);
};
Controller.prototype.__initialize = function(root, visitor) {
this.visitor = visitor;
this.root = root;
this.__worklist = [];
this.__leavelist = [];
this.__current = null;
this.__state = null;
this.__fallback = null;
if (visitor.fallback === 'iteration') {
this.__fallback = Object.keys;
} else if (typeof visitor.fallback === 'function') {
this.__fallback = visitor.fallback;
}
this.__keys = VisitorKeys;
if (visitor.keys) {
this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
}
};
function isNode(node) {
if (node == null) {
return false;
}
return typeof node === 'object' && typeof node.type === 'string';
}
function isProperty(nodeType, key) {
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
}
Controller.prototype.traverse = function traverse(root, visitor) {
var worklist,
leavelist,
element,
node,
nodeType,
ret,
key,
current,
current2,
candidates,
candidate,
sentinel;
this.__initialize(root, visitor);
sentinel = {};
// reference
worklist = this.__worklist;
leavelist = this.__leavelist;
// initialize
worklist.push(new Element(root, null, null, null));
leavelist.push(new Element(null, null, null, null));
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
ret = this.__execute(visitor.leave, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
continue;
}
if (element.node) {
ret = this.__execute(visitor.enter, element);
if (this.__state === BREAK || ret === BREAK) {
return;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || ret === SKIP) {
continue;
}
node = element.node;
nodeType = node.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node);
} else {
throw new Error('Unknown node type ' + nodeType + '.');
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], 'Property', null);
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, null);
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, null));
}
}
}
}
};
Controller.prototype.replace = function replace(root, visitor) {
var worklist,
leavelist,
node,
nodeType,
target,
element,
current,
current2,
candidates,
candidate,
sentinel,
outer,
key;
function removeElem(element) {
var i,
key,
nextElem,
parent;
if (element.ref.remove()) {
// When the reference is an element of an array.
key = element.ref.key;
parent = element.ref.parent;
// If removed from array, then decrease following items' keys.
i = worklist.length;
while (i--) {
nextElem = worklist[i];
if (nextElem.ref && nextElem.ref.parent === parent) {
if (nextElem.ref.key < key) {
break;
}
--nextElem.ref.key;
}
}
}
}
this.__initialize(root, visitor);
sentinel = {};
// reference
worklist = this.__worklist;
leavelist = this.__leavelist;
// initialize
outer = {
root: root
};
element = new Element(root, null, null, new Reference(outer, 'root'));
worklist.push(element);
leavelist.push(element);
while (worklist.length) {
element = worklist.pop();
if (element === sentinel) {
element = leavelist.pop();
target = this.__execute(visitor.leave, element);
// node may be replaced with null,
// so distinguish between undefined and null in this place
if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
// replace
element.ref.replace(target);
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
continue;
}
target = this.__execute(visitor.enter, element);
// node may be replaced with null,
// so distinguish between undefined and null in this place
if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
// replace
element.ref.replace(target);
element.node = target;
}
if (this.__state === REMOVE || target === REMOVE) {
removeElem(element);
element.node = null;
}
if (this.__state === BREAK || target === BREAK) {
return outer.root;
}
// node may be null
node = element.node;
if (!node) {
continue;
}
worklist.push(sentinel);
leavelist.push(element);
if (this.__state === SKIP || target === SKIP) {
continue;
}
nodeType = node.type || element.wrap;
candidates = this.__keys[nodeType];
if (!candidates) {
if (this.__fallback) {
candidates = this.__fallback(node);
} else {
throw new Error('Unknown node type ' + nodeType + '.');
}
}
current = candidates.length;
while ((current -= 1) >= 0) {
key = candidates[current];
candidate = node[key];
if (!candidate) {
continue;
}
if (Array.isArray(candidate)) {
current2 = candidate.length;
while ((current2 -= 1) >= 0) {
if (!candidate[current2]) {
continue;
}
if (isProperty(nodeType, candidates[current])) {
element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
} else if (isNode(candidate[current2])) {
element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
} else {
continue;
}
worklist.push(element);
}
} else if (isNode(candidate)) {
worklist.push(new Element(candidate, key, null, new Reference(node, key)));
}
}
}
return outer.root;
};
function traverse(root, visitor) {
var controller = new Controller();
return controller.traverse(root, visitor);
}
function replace(root, visitor) {
var controller = new Controller();
return controller.replace(root, visitor);
}
function extendCommentRange(comment, tokens) {
var target;
target = upperBound(tokens, function search(token) {
return token.range[0] > comment.range[0];
});
comment.extendedRange = [comment.range[0], comment.range[1]];
if (target !== tokens.length) {
comment.extendedRange[1] = tokens[target].range[0];
}
target -= 1;
if (target >= 0) {
comment.extendedRange[0] = tokens[target].range[1];
}
return comment;
}
function attachComments(tree, providedComments, tokens) {
// At first, we should calculate extended comment ranges.
var comments = [], comment, len, i, cursor;
if (!tree.range) {
throw new Error('attachComments needs range information');
}
// tokens array is empty, we attach comments to tree as 'leadingComments'
if (!tokens.length) {
if (providedComments.length) {
for (i = 0, len = providedComments.length; i < len; i += 1) {
comment = deepCopy(providedComments[i]);
comment.extendedRange = [0, tree.range[0]];
comments.push(comment);
}
tree.leadingComments = comments;
}
return tree;
}
for (i = 0, len = providedComments.length; i < len; i += 1) {
comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
}
// This is based on John Freeman's implementation.
cursor = 0;
traverse(tree, {
enter: function (node) {
var comment;
while (cursor < comments.length) {
comment = comments[cursor];
if (comment.extendedRange[1] > node.range[0]) {
break;
}
if (comment.extendedRange[1] === node.range[0]) {
if (!node.leadingComments) {
node.leadingComments = [];
}
node.leadingComments.push(comment);
comments.splice(cursor, 1);
} else {
cursor += 1;
}
}
// already out of owned node
if (cursor === comments.length) {
return VisitorOption.Break;
}
if (comments[cursor].extendedRange[0] > node.range[1]) {
return VisitorOption.Skip;
}
}
});
cursor = 0;
traverse(tree, {
leave: function (node) {
var comment;
while (cursor < comments.length) {
comment = comments[cursor];
if (node.range[1] < comment.extendedRange[0]) {
break;
}
if (node.range[1] === comment.extendedRange[0]) {
if (!node.trailingComments) {
node.trailingComments = [];
}
node.trailingComments.push(comment);
comments.splice(cursor, 1);
} else {
cursor += 1;
}
}
// already out of owned node
if (cursor === comments.length) {
return VisitorOption.Break;
}
if (comments[cursor].extendedRange[0] > node.range[1]) {
return VisitorOption.Skip;
}
}
});
return tree;
}
exports.version = __nccwpck_require__(82788)/* .version */ .i8;
exports.Syntax = Syntax;
exports.traverse = traverse;
exports.replace = replace;
exports.attachComments = attachComments;
exports.VisitorKeys = VisitorKeys;
exports.VisitorOption = VisitorOption;
exports.Controller = Controller;
exports.cloneEnvironment = function () { return clone({}); };
return exports;
}(exports));
/* vim: set sw=4 ts=4 et tw=80 : */
/***/ }),
/***/ 70471:
/***/ ((module) => {
/*
Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS '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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function () {
'use strict';
function isExpression(node) {
if (node == null) { return false; }
switch (node.type) {
case 'ArrayExpression':
case 'AssignmentExpression':
case 'BinaryExpression':
case 'CallExpression':
case 'ConditionalExpression':
case 'FunctionExpression':
case 'Identifier':
case 'Literal':
case 'LogicalExpression':
case 'MemberExpression':
case 'NewExpression':
case 'ObjectExpression':
case 'SequenceExpression':
case 'ThisExpression':
case 'UnaryExpression':
case 'UpdateExpression':
return true;
}
return false;
}
function isIterationStatement(node) {
if (node == null) { return false; }
switch (node.type) {
case 'DoWhileStatement':
case 'ForInStatement':
case 'ForStatement':
case 'WhileStatement':
return true;
}
return false;
}
function isStatement(node) {
if (node == null) { return false; }
switch (node.type) {
case 'BlockStatement':
case 'BreakStatement':
case 'ContinueStatement':
case 'DebuggerStatement':
case 'DoWhileStatement':
case 'EmptyStatement':
case 'ExpressionStatement':
case 'ForInStatement':
case 'ForStatement':
case 'IfStatement':
case 'LabeledStatement':
case 'ReturnStatement':
case 'SwitchStatement':
case 'ThrowStatement':
case 'TryStatement':
case 'VariableDeclaration':
case 'WhileStatement':
case 'WithStatement':
return true;
}
return false;
}
function isSourceElement(node) {
return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
}
function trailingStatement(node) {
switch (node.type) {
case 'IfStatement':
if (node.alternate != null) {
return node.alternate;
}
return node.consequent;
case 'LabeledStatement':
case 'ForStatement':
case 'ForInStatement':
case 'WhileStatement':
case 'WithStatement':
return node.body;
}
return null;
}
function isProblematicIfStatement(node) {
var current;
if (node.type !== 'IfStatement') {
return false;
}
if (node.alternate == null) {
return false;
}
current = node.consequent;
do {
if (current.type === 'IfStatement') {
if (current.alternate == null) {
return true;
}
}
current = trailingStatement(current);
} while (current);
return false;
}
module.exports = {
isExpression: isExpression,
isStatement: isStatement,
isIterationStatement: isIterationStatement,
isSourceElement: isSourceElement,
isProblematicIfStatement: isProblematicIfStatement,
trailingStatement: trailingStatement
};
}());
/* vim: set sw=4 ts=4 et tw=80 : */
/***/ }),
/***/ 15501:
/***/ ((module) => {
/*
Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function () {
'use strict';
var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
// See `tools/generate-identifier-regex.js`.
ES5Regex = {
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
};
ES6Regex = {
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
};
function isDecimalDigit(ch) {
return 0x30 <= ch && ch <= 0x39; // 0..9
}
function isHexDigit(ch) {
return 0x30 <= ch && ch <= 0x39 || // 0..9
0x61 <= ch && ch <= 0x66 || // a..f
0x41 <= ch && ch <= 0x46; // A..F
}
function isOctalDigit(ch) {
return ch >= 0x30 && ch <= 0x37; // 0..7
}
// 7.2 White Space
NON_ASCII_WHITESPACES = [
0x1680,
0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
0x202F, 0x205F,
0x3000,
0xFEFF
];
function isWhiteSpace(ch) {
return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
}
// 7.3 Line Terminators
function isLineTerminator(ch) {
return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
}
// 7.6 Identifier Names and Identifiers
function fromCodePoint(cp) {
if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
return cu1 + cu2;
}
IDENTIFIER_START = new Array(0x80);
for(ch = 0; ch < 0x80; ++ch) {
IDENTIFIER_START[ch] =
ch >= 0x61 && ch <= 0x7A || // a..z
ch >= 0x41 && ch <= 0x5A || // A..Z
ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
}
IDENTIFIER_PART = new Array(0x80);
for(ch = 0; ch < 0x80; ++ch) {
IDENTIFIER_PART[ch] =
ch >= 0x61 && ch <= 0x7A || // a..z
ch >= 0x41 && ch <= 0x5A || // A..Z
ch >= 0x30 && ch <= 0x39 || // 0..9
ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
}
function isIdentifierStartES5(ch) {
return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
}
function isIdentifierPartES5(ch) {
return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
}
function isIdentifierStartES6(ch) {
return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
}
function isIdentifierPartES6(ch) {
return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
}
module.exports = {
isDecimalDigit: isDecimalDigit,
isHexDigit: isHexDigit,
isOctalDigit: isOctalDigit,
isWhiteSpace: isWhiteSpace,
isLineTerminator: isLineTerminator,
isIdentifierStartES5: isIdentifierStartES5,
isIdentifierPartES5: isIdentifierPartES5,
isIdentifierStartES6: isIdentifierStartES6,
isIdentifierPartES6: isIdentifierPartES6
};
}());
/* vim: set sw=4 ts=4 et tw=80 : */
/***/ }),
/***/ 67635:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/*
Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function () {
'use strict';
var code = __nccwpck_require__(15501);
function isStrictModeReservedWordES6(id) {
switch (id) {
case 'implements':
case 'interface':
case 'package':
case 'private':
case 'protected':
case 'public':
case 'static':
case 'let':
return true;
default:
return false;
}
}
function isKeywordES5(id, strict) {
// yield should not be treated as keyword under non-strict mode.
if (!strict && id === 'yield') {
return false;
}
return isKeywordES6(id, strict);
}
function isKeywordES6(id, strict) {
if (strict && isStrictModeReservedWordES6(id)) {
return true;
}
switch (id.length) {
case 2:
return (id === 'if') || (id === 'in') || (id === 'do');
case 3:
return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
case 4:
return (id === 'this') || (id === 'else') || (id === 'case') ||
(id === 'void') || (id === 'with') || (id === 'enum');
case 5:
return (id === 'while') || (id === 'break') || (id === 'catch') ||
(id === 'throw') || (id === 'const') || (id === 'yield') ||
(id === 'class') || (id === 'super');
case 6:
return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
(id === 'switch') || (id === 'export') || (id === 'import');
case 7:
return (id === 'default') || (id === 'finally') || (id === 'extends');
case 8:
return (id === 'function') || (id === 'continue') || (id === 'debugger');
case 10:
return (id === 'instanceof');
default:
return false;
}
}
function isReservedWordES5(id, strict) {
return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
}
function isReservedWordES6(id, strict) {
return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
}
function isRestrictedWord(id) {
return id === 'eval' || id === 'arguments';
}
function isIdentifierNameES5(id) {
var i, iz, ch;
if (id.length === 0) { return false; }
ch = id.charCodeAt(0);
if (!code.isIdentifierStartES5(ch)) {
return false;
}
for (i = 1, iz = id.length; i < iz; ++i) {
ch = id.charCodeAt(i);
if (!code.isIdentifierPartES5(ch)) {
return false;
}
}
return true;
}
function decodeUtf16(lead, trail) {
return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
}
function isIdentifierNameES6(id) {
var i, iz, ch, lowCh, check;
if (id.length === 0) { return false; }
check = code.isIdentifierStartES6;
for (i = 0, iz = id.length; i < iz; ++i) {
ch = id.charCodeAt(i);
if (0xD800 <= ch && ch <= 0xDBFF) {
++i;
if (i >= iz) { return false; }
lowCh = id.charCodeAt(i);
if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
return false;
}
ch = decodeUtf16(ch, lowCh);
}
if (!check(ch)) {
return false;
}
check = code.isIdentifierPartES6;
}
return true;
}
function isIdentifierES5(id, strict) {
return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
}
function isIdentifierES6(id, strict) {
return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
}
module.exports = {
isKeywordES5: isKeywordES5,
isKeywordES6: isKeywordES6,
isReservedWordES5: isReservedWordES5,
isReservedWordES6: isReservedWordES6,
isRestrictedWord: isRestrictedWord,
isIdentifierNameES5: isIdentifierNameES5,
isIdentifierNameES6: isIdentifierNameES6,
isIdentifierES5: isIdentifierES5,
isIdentifierES6: isIdentifierES6
};
}());
/* vim: set sw=4 ts=4 et tw=80 : */
/***/ }),
/***/ 94038:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/*
Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function () {
'use strict';
exports.ast = __nccwpck_require__(70471);
exports.code = __nccwpck_require__(15501);
exports.keyword = __nccwpck_require__(67635);
}());
/* vim: set sw=4 ts=4 et tw=80 : */
/***/ }),
/***/ 35152:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
//parse Empty Node as self closing node
const buildOptions = __nccwpck_require__(38280).buildOptions;
const defaultOptions = {
attributeNamePrefix: '@_',
attrNodeName: false,
textNodeName: '#text',
ignoreAttributes: true,
cdataTagName: false,
cdataPositionChar: '\\c',
format: false,
indentBy: ' ',
supressEmptyNode: false,
tagValueProcessor: function(a) {
return a;
},
attrValueProcessor: function(a) {
return a;
},
};
const props = [
'attributeNamePrefix',
'attrNodeName',
'textNodeName',
'ignoreAttributes',
'cdataTagName',
'cdataPositionChar',
'format',
'indentBy',
'supressEmptyNode',
'tagValueProcessor',
'attrValueProcessor',
];
function Parser(options) {
this.options = buildOptions(options, defaultOptions, props);
if (this.options.ignoreAttributes || this.options.attrNodeName) {
this.isAttribute = function(/*a*/) {
return false;
};
} else {
this.attrPrefixLen = this.options.attributeNamePrefix.length;
this.isAttribute = isAttribute;
}
if (this.options.cdataTagName) {
this.isCDATA = isCDATA;
} else {
this.isCDATA = function(/*a*/) {
return false;
};
}
this.replaceCDATAstr = replaceCDATAstr;
this.replaceCDATAarr = replaceCDATAarr;
if (this.options.format) {
this.indentate = indentate;
this.tagEndChar = '>\n';
this.newLine = '\n';
} else {
this.indentate = function() {
return '';
};
this.tagEndChar = '>';
this.newLine = '';
}
if (this.options.supressEmptyNode) {
this.buildTextNode = buildEmptyTextNode;
this.buildObjNode = buildEmptyObjNode;
} else {
this.buildTextNode = buildTextValNode;
this.buildObjNode = buildObjectNode;
}
this.buildTextValNode = buildTextValNode;
this.buildObjectNode = buildObjectNode;
}
Parser.prototype.parse = function(jObj) {
return this.j2x(jObj, 0).val;
};
Parser.prototype.j2x = function(jObj, level) {
let attrStr = '';
let val = '';
const keys = Object.keys(jObj);
const len = keys.length;
for (let i = 0; i < len; i++) {
const key = keys[i];
if (typeof jObj[key] === 'undefined') {
// supress undefined node
} else if (jObj[key] === null) {
val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
} else if (jObj[key] instanceof Date) {
val += this.buildTextNode(jObj[key], key, '', level);
} else if (typeof jObj[key] !== 'object') {
//premitive type
const attr = this.isAttribute(key);
if (attr) {
attrStr += ' ' + attr + '="' + this.options.attrValueProcessor('' + jObj[key]) + '"';
} else if (this.isCDATA(key)) {
if (jObj[this.options.textNodeName]) {
val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]);
} else {
val += this.replaceCDATAstr('', jObj[key]);
}
} else {
//tag value
if (key === this.options.textNodeName) {
if (jObj[this.options.cdataTagName]) {
//value will added while processing cdata
} else {
val += this.options.tagValueProcessor('' + jObj[key]);
}
} else {
val += this.buildTextNode(jObj[key], key, '', level);
}
}
} else if (Array.isArray(jObj[key])) {
//repeated nodes
if (this.isCDATA(key)) {
val += this.indentate(level);
if (jObj[this.options.textNodeName]) {
val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]);
} else {
val += this.replaceCDATAarr('', jObj[key]);
}
} else {
//nested nodes
const arrLen = jObj[key].length;
for (let j = 0; j < arrLen; j++) {
const item = jObj[key][j];
if (typeof item === 'undefined') {
// supress undefined node
} else if (item === null) {
val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
} else if (typeof item === 'object') {
const result = this.j2x(item, level + 1);
val += this.buildObjNode(result.val, key, result.attrStr, level);
} else {
val += this.buildTextNode(item, key, '', level);
}
}
}
} else {
//nested node
if (this.options.attrNodeName && key === this.options.attrNodeName) {
const Ks = Object.keys(jObj[key]);
const L = Ks.length;
for (let j = 0; j < L; j++) {
attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"';
}
} else {
const result = this.j2x(jObj[key], level + 1);
val += this.buildObjNode(result.val, key, result.attrStr, level);
}
}
}
return {attrStr: attrStr, val: val};
};
function replaceCDATAstr(str, cdata) {
str = this.options.tagValueProcessor('' + str);
if (this.options.cdataPositionChar === '' || str === '') {
return str + '<![CDATA[' + cdata + ']]' + this.tagEndChar;
} else {
return str.replace(this.options.cdataPositionChar, '<![CDATA[' + cdata + ']]' + this.tagEndChar);
}
}
function replaceCDATAarr(str, cdata) {
str = this.options.tagValueProcessor('' + str);
if (this.options.cdataPositionChar === '' || str === '') {
return str + '<![CDATA[' + cdata.join(']]><![CDATA[') + ']]' + this.tagEndChar;
} else {
for (let v in cdata) {
str = str.replace(this.options.cdataPositionChar, '<![CDATA[' + cdata[v] + ']]>');
}
return str + this.newLine;
}
}
function buildObjectNode(val, key, attrStr, level) {
if (attrStr && !val.includes('<')) {
return (
this.indentate(level) +
'<' +
key +
attrStr +
'>' +
val +
//+ this.newLine
// + this.indentate(level)
'</' +
key +
this.tagEndChar
);
} else {
return (
this.indentate(level) +
'<' +
key +
attrStr +
this.tagEndChar +
val +
//+ this.newLine
this.indentate(level) +
'</' +
key +
this.tagEndChar
);
}
}
function buildEmptyObjNode(val, key, attrStr, level) {
if (val !== '') {
return this.buildObjectNode(val, key, attrStr, level);
} else {
return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;
//+ this.newLine
}
}
function buildTextValNode(val, key, attrStr, level) {
return (
this.indentate(level) +
'<' +
key +
attrStr +
'>' +
this.options.tagValueProcessor(val) +
'</' +
key +
this.tagEndChar
);
}
function buildEmptyTextNode(val, key, attrStr, level) {
if (val !== '') {
return this.buildTextValNode(val, key, attrStr, level);
} else {
return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;
}
}
function indentate(level) {
return this.options.indentBy.repeat(level);
}
function isAttribute(name /*, options*/) {
if (name.startsWith(this.options.attributeNamePrefix)) {
return name.substr(this.attrPrefixLen);
} else {
return false;
}
}
function isCDATA(name) {
return name === this.options.cdataTagName;
}
//formatting
//indentation
//\n after each closing or self closing tag
module.exports = Parser;
/***/ }),
/***/ 41901:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const char = function(a) {
return String.fromCharCode(a);
};
const chars = {
nilChar: char(176),
missingChar: char(201),
nilPremitive: char(175),
missingPremitive: char(200),
emptyChar: char(178),
emptyValue: char(177), //empty Premitive
boundryChar: char(179),
objStart: char(198),
arrStart: char(204),
arrayEnd: char(185),
};
const charsArr = [
chars.nilChar,
chars.nilPremitive,
chars.missingChar,
chars.missingPremitive,
chars.boundryChar,
chars.emptyChar,
chars.emptyValue,
chars.arrayEnd,
chars.objStart,
chars.arrStart,
];
const _e = function(node, e_schema, options) {
if (typeof e_schema === 'string') {
//premitive
if (node && node[0] && node[0].val !== undefined) {
return getValue(node[0].val, e_schema);
} else {
return getValue(node, e_schema);
}
} else {
const hasValidData = hasData(node);
if (hasValidData === true) {
let str = '';
if (Array.isArray(e_schema)) {
//attributes can't be repeated. hence check in children tags only
str += chars.arrStart;
const itemSchema = e_schema[0];
//var itemSchemaType = itemSchema;
const arr_len = node.length;
if (typeof itemSchema === 'string') {
for (let arr_i = 0; arr_i < arr_len; arr_i++) {
const r = getValue(node[arr_i].val, itemSchema);
str = processValue(str, r);
}
} else {
for (let arr_i = 0; arr_i < arr_len; arr_i++) {
const r = _e(node[arr_i], itemSchema, options);
str = processValue(str, r);
}
}
str += chars.arrayEnd; //indicates that next item is not array item
} else {
//object
str += chars.objStart;
const keys = Object.keys(e_schema);
if (Array.isArray(node)) {
node = node[0];
}
for (let i in keys) {
const key = keys[i];
//a property defined in schema can be present either in attrsMap or children tags
//options.textNodeName will not present in both maps, take it's value from val
//options.attrNodeName will be present in attrsMap
let r;
if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key]) {
r = _e(node.attrsMap[key], e_schema[key], options);
} else if (key === options.textNodeName) {
r = _e(node.val, e_schema[key], options);
} else {
r = _e(node.child[key], e_schema[key], options);
}
str = processValue(str, r);
}
}
return str;
} else {
return hasValidData;
}
}
};
const getValue = function(a /*, type*/) {
switch (a) {
case undefined:
return chars.missingPremitive;
case null:
return chars.nilPremitive;
case '':
return chars.emptyValue;
default:
return a;
}
};
const processValue = function(str, r) {
if (!isAppChar(r[0]) && !isAppChar(str[str.length - 1])) {
str += chars.boundryChar;
}
return str + r;
};
const isAppChar = function(ch) {
return charsArr.indexOf(ch) !== -1;
};
function hasData(jObj) {
if (jObj === undefined) {
return chars.missingChar;
} else if (jObj === null) {
return chars.nilChar;
} else if (
jObj.child &&
Object.keys(jObj.child).length === 0 &&
(!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0)
) {
return chars.emptyChar;
} else {
return true;
}
}
const x2j = __nccwpck_require__(6712);
const buildOptions = __nccwpck_require__(38280).buildOptions;
const convert2nimn = function(node, e_schema, options) {
options = buildOptions(options, x2j.defaultOptions, x2j.props);
return _e(node, e_schema, options);
};
exports.convert2nimn = convert2nimn;
/***/ }),
/***/ 88270:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const util = __nccwpck_require__(38280);
const convertToJson = function(node, options, parentTagName) {
const jObj = {};
// when no child node or attr is present
if ((!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) {
return util.isExist(node.val) ? node.val : '';
}
// otherwise create a textnode if node has some text
if (util.isExist(node.val) && !(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) {
const asArray = util.isTagNameInArrayMode(node.tagname, options.arrayMode, parentTagName)
jObj[options.textNodeName] = asArray ? [node.val] : node.val;
}
util.merge(jObj, node.attrsMap, options.arrayMode);
const keys = Object.keys(node.child);
for (let index = 0; index < keys.length; index++) {
const tagName = keys[index];
if (node.child[tagName] && node.child[tagName].length > 1) {
jObj[tagName] = [];
for (let tag in node.child[tagName]) {
if (node.child[tagName].hasOwnProperty(tag)) {
jObj[tagName].push(convertToJson(node.child[tagName][tag], options, tagName));
}
}
} else {
const result = convertToJson(node.child[tagName][0], options, tagName);
const asArray = (options.arrayMode === true && typeof result === 'object') || util.isTagNameInArrayMode(tagName, options.arrayMode, parentTagName);
jObj[tagName] = asArray ? [result] : result;
}
}
//add value
return jObj;
};
exports.convertToJson = convertToJson;
/***/ }),
/***/ 16014:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const util = __nccwpck_require__(38280);
const buildOptions = __nccwpck_require__(38280).buildOptions;
const x2j = __nccwpck_require__(6712);
//TODO: do it later
const convertToJsonString = function(node, options) {
options = buildOptions(options, x2j.defaultOptions, x2j.props);
options.indentBy = options.indentBy || '';
return _cToJsonStr(node, options, 0);
};
const _cToJsonStr = function(node, options, level) {
let jObj = '{';
//traver through all the children
const keys = Object.keys(node.child);
for (let index = 0; index < keys.length; index++) {
var tagname = keys[index];
if (node.child[tagname] && node.child[tagname].length > 1) {
jObj += '"' + tagname + '" : [ ';
for (var tag in node.child[tagname]) {
jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , ';
}
jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last
} else {
jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,';
}
}
util.merge(jObj, node.attrsMap);
//add attrsMap as new children
if (util.isEmptyObject(jObj)) {
return util.isExist(node.val) ? node.val : '';
} else {
if (util.isExist(node.val)) {
if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) {
jObj += '"' + options.textNodeName + '" : ' + stringval(node.val);
}
}
}
//add value
if (jObj[jObj.length - 1] === ',') {
jObj = jObj.substr(0, jObj.length - 2);
}
return jObj + '}';
};
function stringval(v) {
if (v === true || v === false || !isNaN(v)) {
return v;
} else {
return '"' + v + '"';
}
}
function indentate(options, level) {
return options.indentBy.repeat(level);
}
exports.convertToJsonString = convertToJsonString;
/***/ }),
/***/ 27448:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const nodeToJson = __nccwpck_require__(88270);
const xmlToNodeobj = __nccwpck_require__(6712);
const x2xmlnode = __nccwpck_require__(6712);
const buildOptions = __nccwpck_require__(38280).buildOptions;
const validator = __nccwpck_require__(61739);
exports.parse = function(xmlData, options, validationOption) {
if( validationOption){
if(validationOption === true) validationOption = {}
const result = validator.validate(xmlData, validationOption);
if (result !== true) {
throw Error( result.err.msg)
}
}
options = buildOptions(options, x2xmlnode.defaultOptions, x2xmlnode.props);
const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options)
//print(traversableObj, " ");
return nodeToJson.convertToJson(traversableObj, options);
};
exports.convertTonimn = __nccwpck_require__(41901).convert2nimn;
exports.getTraversalObj = xmlToNodeobj.getTraversalObj;
exports.convertToJson = nodeToJson.convertToJson;
exports.convertToJsonString = __nccwpck_require__(16014).convertToJsonString;
exports.validate = validator.validate;
exports.j2xParser = __nccwpck_require__(35152);
exports.parseToNimn = function(xmlData, schema, options) {
return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options);
};
function print(xmlNode, indentation){
if(xmlNode){
console.log(indentation + "{")
console.log(indentation + " \"tagName\": \"" + xmlNode.tagname + "\", ");
if(xmlNode.parent){
console.log(indentation + " \"parent\": \"" + xmlNode.parent.tagname + "\", ");
}
console.log(indentation + " \"val\": \"" + xmlNode.val + "\", ");
console.log(indentation + " \"attrs\": " + JSON.stringify(xmlNode.attrsMap,null,4) + ", ");
if(xmlNode.child){
console.log(indentation + "\"child\": {")
const indentation2 = indentation + indentation;
Object.keys(xmlNode.child).forEach( function(key) {
const node = xmlNode.child[key];
if(Array.isArray(node)){
console.log(indentation + "\""+key+"\" :[")
node.forEach( function(item,index) {
//console.log(indentation + " \""+index+"\" : [")
print(item, indentation2);
})
console.log(indentation + "],")
}else{
console.log(indentation + " \""+key+"\" : {")
print(node, indentation2);
console.log(indentation + "},")
}
});
console.log(indentation + "},")
}
console.log(indentation + "},")
}
}
/***/ }),
/***/ 38280:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'
const regexName = new RegExp('^' + nameRegexp + '$');
const getAllMatches = function(string, regex) {
const matches = [];
let match = regex.exec(string);
while (match) {
const allmatches = [];
const len = match.length;
for (let index = 0; index < len; index++) {
allmatches.push(match[index]);
}
matches.push(allmatches);
match = regex.exec(string);
}
return matches;
};
const isName = function(string) {
const match = regexName.exec(string);
return !(match === null || typeof match === 'undefined');
};
exports.isExist = function(v) {
return typeof v !== 'undefined';
};
exports.isEmptyObject = function(obj) {
return Object.keys(obj).length === 0;
};
/**
* Copy all the properties of a into b.
* @param {*} target
* @param {*} a
*/
exports.merge = function(target, a, arrayMode) {
if (a) {
const keys = Object.keys(a); // will return an array of own properties
const len = keys.length; //don't make it inline
for (let i = 0; i < len; i++) {
if (arrayMode === 'strict') {
target[keys[i]] = [ a[keys[i]] ];
} else {
target[keys[i]] = a[keys[i]];
}
}
}
};
/* exports.merge =function (b,a){
return Object.assign(b,a);
} */
exports.getValue = function(v) {
if (exports.isExist(v)) {
return v;
} else {
return '';
}
};
// const fakeCall = function(a) {return a;};
// const fakeCallNoReturn = function() {};
exports.buildOptions = function(options, defaultOptions, props) {
var newOptions = {};
if (!options) {
return defaultOptions; //if there are not options
}
for (let i = 0; i < props.length; i++) {
if (options[props[i]] !== undefined) {
newOptions[props[i]] = options[props[i]];
} else {
newOptions[props[i]] = defaultOptions[props[i]];
}
}
return newOptions;
};
/**
* Check if a tag name should be treated as array
*
* @param tagName the node tagname
* @param arrayMode the array mode option
* @param parentTagName the parent tag name
* @returns {boolean} true if node should be parsed as array
*/
exports.isTagNameInArrayMode = function (tagName, arrayMode, parentTagName) {
if (arrayMode === false) {
return false;
} else if (arrayMode instanceof RegExp) {
return arrayMode.test(tagName);
} else if (typeof arrayMode === 'function') {
return !!arrayMode(tagName, parentTagName);
}
return arrayMode === "strict";
}
exports.isName = isName;
exports.getAllMatches = getAllMatches;
exports.nameRegexp = nameRegexp;
/***/ }),
/***/ 61739:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const util = __nccwpck_require__(38280);
const defaultOptions = {
allowBooleanAttributes: false, //A tag can have attributes without any value
};
const props = ['allowBooleanAttributes'];
//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g");
exports.validate = function (xmlData, options) {
options = util.buildOptions(options, defaultOptions, props);
//xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line
//xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag
//xmlData = xmlData.replace(/(<!DOCTYPE[\s\w\"\.\/\-\:]+(\[.*\])*\s*>)/g,"");//Remove DOCTYPE
const tags = [];
let tagFound = false;
//indicates that the root tag has been closed (aka. depth 0 has been reached)
let reachedRoot = false;
if (xmlData[0] === '\ufeff') {
// check for byte order mark (BOM)
xmlData = xmlData.substr(1);
}
for (let i = 0; i < xmlData.length; i++) {
if (xmlData[i] === '<' && xmlData[i+1] === '?') {
i+=2;
i = readPI(xmlData,i);
if (i.err) return i;
}else if (xmlData[i] === '<') {
//starting of tag
//read until you reach to '>' avoiding any '>' in attribute value
i++;
if (xmlData[i] === '!') {
i = readCommentAndCDATA(xmlData, i);
continue;
} else {
let closingTag = false;
if (xmlData[i] === '/') {
//closing tag
closingTag = true;
i++;
}
//read tagname
let tagName = '';
for (; i < xmlData.length &&
xmlData[i] !== '>' &&
xmlData[i] !== ' ' &&
xmlData[i] !== '\t' &&
xmlData[i] !== '\n' &&
xmlData[i] !== '\r'; i++
) {
tagName += xmlData[i];
}
tagName = tagName.trim();
//console.log(tagName);
if (tagName[tagName.length - 1] === '/') {
//self closing tag without attributes
tagName = tagName.substring(0, tagName.length - 1);
//continue;
i--;
}
if (!validateTagName(tagName)) {
let msg;
if (tagName.trim().length === 0) {
msg = "There is an unnecessary space between tag name and backward slash '</ ..'.";
} else {
msg = "Tag '"+tagName+"' is an invalid name.";
}
return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));
}
const result = readAttributeStr(xmlData, i);
if (result === false) {
return getErrorObject('InvalidAttr', "Attributes for '"+tagName+"' have open quote.", getLineNumberForPosition(xmlData, i));
}
let attrStr = result.value;
i = result.index;
if (attrStr[attrStr.length - 1] === '/') {
//self closing tag
attrStr = attrStr.substring(0, attrStr.length - 1);
const isValid = validateAttributeString(attrStr, options);
if (isValid === true) {
tagFound = true;
//continue; //text may presents after self closing tag
} else {
//the result from the nested function returns the position of the error within the attribute
//in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute
//this gives us the absolute index in the entire xml, which we can use to find the line at last
return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));
}
} else if (closingTag) {
if (!result.tagClosed) {
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
} else if (attrStr.trim().length > 0) {
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, i));
} else {
const otg = tags.pop();
if (tagName !== otg) {
return getErrorObject('InvalidTag', "Closing tag '"+otg+"' is expected inplace of '"+tagName+"'.", getLineNumberForPosition(xmlData, i));
}
//when there are no more tags, we reached the root level.
if (tags.length == 0) {
reachedRoot = true;
}
}
} else {
const isValid = validateAttributeString(attrStr, options);
if (isValid !== true) {
//the result from the nested function returns the position of the error within the attribute
//in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute
//this gives us the absolute index in the entire xml, which we can use to find the line at last
return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));
}
//if the root level has been reached before ...
if (reachedRoot === true) {
return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));
} else {
tags.push(tagName);
}
tagFound = true;
}
//skip tag text value
//It may include comments and CDATA value
for (i++; i < xmlData.length; i++) {
if (xmlData[i] === '<') {
if (xmlData[i + 1] === '!') {
//comment or CADATA
i++;
i = readCommentAndCDATA(xmlData, i);
continue;
} else if (xmlData[i+1] === '?') {
i = readPI(xmlData, ++i);
if (i.err) return i;
} else{
break;
}
} else if (xmlData[i] === '&') {
const afterAmp = validateAmpersand(xmlData, i);
if (afterAmp == -1)
return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i));
i = afterAmp;
}
} //end of reading tag text value
if (xmlData[i] === '<') {
i--;
}
}
} else {
if (xmlData[i] === ' ' || xmlData[i] === '\t' || xmlData[i] === '\n' || xmlData[i] === '\r') {
continue;
}
return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i));
}
}
if (!tagFound) {
return getErrorObject('InvalidXml', 'Start tag expected.', 1);
} else if (tags.length > 0) {
return getErrorObject('InvalidXml', "Invalid '"+JSON.stringify(tags, null, 4).replace(/\r?\n/g, '')+"' found.", 1);
}
return true;
};
/**
* Read Processing insstructions and skip
* @param {*} xmlData
* @param {*} i
*/
function readPI(xmlData, i) {
var start = i;
for (; i < xmlData.length; i++) {
if (xmlData[i] == '?' || xmlData[i] == ' ') {
//tagname
var tagname = xmlData.substr(start, i - start);
if (i > 5 && tagname === 'xml') {
return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));
} else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {
//check if valid attribut string
i++;
break;
} else {
continue;
}
}
}
return i;
}
function readCommentAndCDATA(xmlData, i) {
if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {
//comment
for (i += 3; i < xmlData.length; i++) {
if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {
i += 2;
break;
}
}
} else if (
xmlData.length > i + 8 &&
xmlData[i + 1] === 'D' &&
xmlData[i + 2] === 'O' &&
xmlData[i + 3] === 'C' &&
xmlData[i + 4] === 'T' &&
xmlData[i + 5] === 'Y' &&
xmlData[i + 6] === 'P' &&
xmlData[i + 7] === 'E'
) {
let angleBracketsCount = 1;
for (i += 8; i < xmlData.length; i++) {
if (xmlData[i] === '<') {
angleBracketsCount++;
} else if (xmlData[i] === '>') {
angleBracketsCount--;
if (angleBracketsCount === 0) {
break;
}
}
}
} else if (
xmlData.length > i + 9 &&
xmlData[i + 1] === '[' &&
xmlData[i + 2] === 'C' &&
xmlData[i + 3] === 'D' &&
xmlData[i + 4] === 'A' &&
xmlData[i + 5] === 'T' &&
xmlData[i + 6] === 'A' &&
xmlData[i + 7] === '['
) {
for (i += 8; i < xmlData.length; i++) {
if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {
i += 2;
break;
}
}
}
return i;
}
var doubleQuote = '"';
var singleQuote = "'";
/**
* Keep reading xmlData until '<' is found outside the attribute value.
* @param {string} xmlData
* @param {number} i
*/
function readAttributeStr(xmlData, i) {
let attrStr = '';
let startChar = '';
let tagClosed = false;
for (; i < xmlData.length; i++) {
if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {
if (startChar === '') {
startChar = xmlData[i];
} else if (startChar !== xmlData[i]) {
//if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa
continue;
} else {
startChar = '';
}
} else if (xmlData[i] === '>') {
if (startChar === '') {
tagClosed = true;
break;
}
}
attrStr += xmlData[i];
}
if (startChar !== '') {
return false;
}
return {
value: attrStr,
index: i,
tagClosed: tagClosed
};
}
/**
* Select all the attributes whether valid or invalid.
*/
const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g');
//attr, ="sd", a="amit's", a="sd"b="saf", ab cd=""
function validateAttributeString(attrStr, options) {
//console.log("start:"+attrStr+":end");
//if(attrStr.trim().length === 0) return true; //empty string
const matches = util.getAllMatches(attrStr, validAttrStrRegxp);
const attrNames = {};
for (let i = 0; i < matches.length; i++) {
if (matches[i][1].length === 0) {
//nospace before attribute name: a="sd"b="saf"
return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(attrStr, matches[i][0]))
} else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {
//independent attribute: ab
return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(attrStr, matches[i][0]));
}
/* else if(matches[i][6] === undefined){//attribute without value: ab=
return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}};
} */
const attrName = matches[i][2];
if (!validateAttrName(attrName)) {
return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(attrStr, matches[i][0]));
}
if (!attrNames.hasOwnProperty(attrName)) {
//check for duplicate attribute.
attrNames[attrName] = 1;
} else {
return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(attrStr, matches[i][0]));
}
}
return true;
}
function validateNumberAmpersand(xmlData, i) {
let re = /\d/;
if (xmlData[i] === 'x') {
i++;
re = /[\da-fA-F]/;
}
for (; i < xmlData.length; i++) {
if (xmlData[i] === ';')
return i;
if (!xmlData[i].match(re))
break;
}
return -1;
}
function validateAmpersand(xmlData, i) {
// https://www.w3.org/TR/xml/#dt-charref
i++;
if (xmlData[i] === ';')
return -1;
if (xmlData[i] === '#') {
i++;
return validateNumberAmpersand(xmlData, i);
}
let count = 0;
for (; i < xmlData.length; i++, count++) {
if (xmlData[i].match(/\w/) && count < 20)
continue;
if (xmlData[i] === ';')
break;
return -1;
}
return i;
}
function getErrorObject(code, message, lineNumber) {
return {
err: {
code: code,
msg: message,
line: lineNumber,
},
};
}
function validateAttrName(attrName) {
return util.isName(attrName);
}
// const startsWithXML = /^xml/i;
function validateTagName(tagname) {
return util.isName(tagname) /* && !tagname.match(startsWithXML) */;
}
//this function returns the line number for the character at the given index
function getLineNumberForPosition(xmlData, index) {
var lines = xmlData.substring(0, index).split(/\r?\n/);
return lines.length;
}
//this function returns the position of the last character of match within attrStr
function getPositionFromMatch(attrStr, match) {
return attrStr.indexOf(match) + match.length;
}
/***/ }),
/***/ 49539:
/***/ ((module) => {
"use strict";
module.exports = function(tagname, parent, val) {
this.tagname = tagname;
this.parent = parent;
this.child = {}; //child tags
this.attrsMap = {}; //attributes map
this.val = val; //text only
this.addChild = function(child) {
if (Array.isArray(this.child[child.tagname])) {
//already presents
this.child[child.tagname].push(child);
} else {
this.child[child.tagname] = [child];
}
};
};
/***/ }),
/***/ 6712:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const util = __nccwpck_require__(38280);
const buildOptions = __nccwpck_require__(38280).buildOptions;
const xmlNode = __nccwpck_require__(49539);
const regx =
'<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
.replace(/NAME/g, util.nameRegexp);
//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g");
//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g");
//polyfill
if (!Number.parseInt && window.parseInt) {
Number.parseInt = window.parseInt;
}
if (!Number.parseFloat && window.parseFloat) {
Number.parseFloat = window.parseFloat;
}
const defaultOptions = {
attributeNamePrefix: '@_',
attrNodeName: false,
textNodeName: '#text',
ignoreAttributes: true,
ignoreNameSpace: false,
allowBooleanAttributes: false, //a tag can have attributes without any value
//ignoreRootElement : false,
parseNodeValue: true,
parseAttributeValue: false,
arrayMode: false,
trimValues: true, //Trim string values of tag and attributes
cdataTagName: false,
cdataPositionChar: '\\c',
tagValueProcessor: function(a, tagName) {
return a;
},
attrValueProcessor: function(a, attrName) {
return a;
},
stopNodes: []
//decodeStrict: false,
};
exports.defaultOptions = defaultOptions;
const props = [
'attributeNamePrefix',
'attrNodeName',
'textNodeName',
'ignoreAttributes',
'ignoreNameSpace',
'allowBooleanAttributes',
'parseNodeValue',
'parseAttributeValue',
'arrayMode',
'trimValues',
'cdataTagName',
'cdataPositionChar',
'tagValueProcessor',
'attrValueProcessor',
'parseTrueNumberOnly',
'stopNodes'
];
exports.props = props;
/**
* Trim -> valueProcessor -> parse value
* @param {string} tagName
* @param {string} val
* @param {object} options
*/
function processTagValue(tagName, val, options) {
if (val) {
if (options.trimValues) {
val = val.trim();
}
val = options.tagValueProcessor(val, tagName);
val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly);
}
return val;
}
function resolveNameSpace(tagname, options) {
if (options.ignoreNameSpace) {
const tags = tagname.split(':');
const prefix = tagname.charAt(0) === '/' ? '/' : '';
if (tags[0] === 'xmlns') {
return '';
}
if (tags.length === 2) {
tagname = prefix + tags[1];
}
}
return tagname;
}
function parseValue(val, shouldParse, parseTrueNumberOnly) {
if (shouldParse && typeof val === 'string') {
let parsed;
if (val.trim() === '' || isNaN(val)) {
parsed = val === 'true' ? true : val === 'false' ? false : val;
} else {
if (val.indexOf('0x') !== -1) {
//support hexa decimal
parsed = Number.parseInt(val, 16);
} else if (val.indexOf('.') !== -1) {
parsed = Number.parseFloat(val);
val = val.replace(/\.?0+$/, "");
} else {
parsed = Number.parseInt(val, 10);
}
if (parseTrueNumberOnly) {
parsed = String(parsed) === val ? parsed : val;
}
}
return parsed;
} else {
if (util.isExist(val)) {
return val;
} else {
return '';
}
}
}
//TODO: change regex to capture NS
//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm");
const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])(.*?)\\3)?', 'g');
function buildAttributesMap(attrStr, options) {
if (!options.ignoreAttributes && typeof attrStr === 'string') {
attrStr = attrStr.replace(/\r?\n/g, ' ');
//attrStr = attrStr || attrStr.trim();
const matches = util.getAllMatches(attrStr, attrsRegx);
const len = matches.length; //don't make it inline
const attrs = {};
for (let i = 0; i < len; i++) {
const attrName = resolveNameSpace(matches[i][1], options);
if (attrName.length) {
if (matches[i][4] !== undefined) {
if (options.trimValues) {
matches[i][4] = matches[i][4].trim();
}
matches[i][4] = options.attrValueProcessor(matches[i][4], attrName);
attrs[options.attributeNamePrefix + attrName] = parseValue(
matches[i][4],
options.parseAttributeValue,
options.parseTrueNumberOnly
);
} else if (options.allowBooleanAttributes) {
attrs[options.attributeNamePrefix + attrName] = true;
}
}
}
if (!Object.keys(attrs).length) {
return;
}
if (options.attrNodeName) {
const attrCollection = {};
attrCollection[options.attrNodeName] = attrs;
return attrCollection;
}
return attrs;
}
}
const getTraversalObj = function(xmlData, options) {
xmlData = xmlData.replace(/\r\n?/g, "\n");
options = buildOptions(options, defaultOptions, props);
const xmlObj = new xmlNode('!xml');
let currentNode = xmlObj;
let textData = "";
//function match(xmlData){
for(let i=0; i< xmlData.length; i++){
const ch = xmlData[i];
if(ch === '<'){
if( xmlData[i+1] === '/') {//Closing Tag
const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.")
let tagName = xmlData.substring(i+2,closeIndex).trim();
if(options.ignoreNameSpace){
const colonIndex = tagName.indexOf(":");
if(colonIndex !== -1){
tagName = tagName.substr(colonIndex+1);
}
}
/* if (currentNode.parent) {
currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options);
} */
if(currentNode){
if(currentNode.val){
currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options);
}else{
currentNode.val = processTagValue(tagName, textData , options);
}
}
if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) {
currentNode.child = []
if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}}
currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1)
}
currentNode = currentNode.parent;
textData = "";
i = closeIndex;
} else if( xmlData[i+1] === '?') {
i = findClosingIndex(xmlData, "?>", i, "Pi Tag is not closed.")
} else if(xmlData.substr(i + 1, 3) === '!--') {
i = findClosingIndex(xmlData, "-->", i, "Comment is not closed.")
} else if( xmlData.substr(i + 1, 2) === '!D') {
const closeIndex = findClosingIndex(xmlData, ">", i, "DOCTYPE is not closed.")
const tagExp = xmlData.substring(i, closeIndex);
if(tagExp.indexOf("[") >= 0){
i = xmlData.indexOf("]>", i) + 1;
}else{
i = closeIndex;
}
}else if(xmlData.substr(i + 1, 2) === '![') {
const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2
const tagExp = xmlData.substring(i + 9,closeIndex);
//considerations
//1. CDATA will always have parent node
//2. A tag with CDATA is not a leaf node so it's value would be string type.
if(textData){
currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options);
textData = "";
}
if (options.cdataTagName) {
//add cdata node
const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp);
currentNode.addChild(childNode);
//for backtracking
currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar;
//add rest value to parent node
if (tagExp) {
childNode.val = tagExp;
}
} else {
currentNode.val = (currentNode.val || '') + (tagExp || '');
}
i = closeIndex + 2;
}else {//Opening tag
const result = closingIndexForOpeningTag(xmlData, i+1)
let tagExp = result.data;
const closeIndex = result.index;
const separatorIndex = tagExp.indexOf(" ");
let tagName = tagExp;
let shouldBuildAttributesMap = true;
if(separatorIndex !== -1){
tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, '');
tagExp = tagExp.substr(separatorIndex + 1);
}
if(options.ignoreNameSpace){
const colonIndex = tagName.indexOf(":");
if(colonIndex !== -1){
tagName = tagName.substr(colonIndex+1);
shouldBuildAttributesMap = tagName !== result.data.substr(colonIndex + 1);
}
}
//save text to parent node
if (currentNode && textData) {
if(currentNode.tagname !== '!xml'){
currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options);
}
}
if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){//selfClosing tag
if(tagName[tagName.length - 1] === "/"){ //remove trailing '/'
tagName = tagName.substr(0, tagName.length - 1);
tagExp = tagName;
}else{
tagExp = tagExp.substr(0, tagExp.length - 1);
}
const childNode = new xmlNode(tagName, currentNode, '');
if(tagName !== tagExp){
childNode.attrsMap = buildAttributesMap(tagExp, options);
}
currentNode.addChild(childNode);
}else{//opening tag
const childNode = new xmlNode( tagName, currentNode );
if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) {
childNode.startIndex=closeIndex;
}
if(tagName !== tagExp && shouldBuildAttributesMap){
childNode.attrsMap = buildAttributesMap(tagExp, options);
}
currentNode.addChild(childNode);
currentNode = childNode;
}
textData = "";
i = closeIndex;
}
}else{
textData += xmlData[i];
}
}
return xmlObj;
}
function closingIndexForOpeningTag(data, i){
let attrBoundary;
let tagExp = "";
for (let index = i; index < data.length; index++) {
let ch = data[index];
if (attrBoundary) {
if (ch === attrBoundary) attrBoundary = "";//reset
} else if (ch === '"' || ch === "'") {
attrBoundary = ch;
} else if (ch === '>') {
return {
data: tagExp,
index: index
}
} else if (ch === '\t') {
ch = " "
}
tagExp += ch;
}
}
function findClosingIndex(xmlData, str, i, errMsg){
const closingIndex = xmlData.indexOf(str, i);
if(closingIndex === -1){
throw new Error(errMsg)
}else{
return closingIndex + str.length - 1;
}
}
exports.getTraversalObj = getTraversalObj;
/***/ }),
/***/ 91683:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const path_1 = __nccwpck_require__(85622);
/**
* File URI to Path function.
*
* @param {String} uri
* @return {String} path
* @api public
*/
function fileUriToPath(uri) {
if (typeof uri !== 'string' ||
uri.length <= 7 ||
uri.substring(0, 7) !== 'file://') {
throw new TypeError('must pass in a file:// URI to convert to a file path');
}
const rest = decodeURI(uri.substring(7));
const firstSlash = rest.indexOf('/');
let host = rest.substring(0, firstSlash);
let path = rest.substring(firstSlash + 1);
// 2. Scheme Definition
// As a special case, <host> can be the string "localhost" or the empty
// string; this is interpreted as "the machine from which the URL is
// being interpreted".
if (host === 'localhost') {
host = '';
}
if (host) {
host = path_1.sep + path_1.sep + host;
}
// 3.2 Drives, drive letters, mount points, file system root
// Drive letters are mapped into the top of a file URI in various ways,
// depending on the implementation; some applications substitute
// vertical bar ("|") for the colon after the drive letter, yielding
// "file:///c|/tmp/test.txt". In some cases, the colon is left
// unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
// colon is simply omitted, as in "file:///c/tmp/test.txt".
path = path.replace(/^(.+)\|/, '$1:');
// for Windows, we need to invert the path separators from what a URI uses
if (path_1.sep === '\\') {
path = path.replace(/\//g, '\\');
}
if (/^.+:/.test(path)) {
// has Windows drive at beginning of path
}
else {
// unix path…
path = path_1.sep + path;
}
return host + path;
}
module.exports = fileUriToPath;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 43338:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const mkdirpSync = __nccwpck_require__(12915).mkdirsSync
const utimesSync = __nccwpck_require__(52548).utimesMillisSync
const stat = __nccwpck_require__(73901)
function copySync (src, dest, opts) {
if (typeof opts === 'function') {
opts = { filter: opts }
}
opts = opts || {}
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
// Warn about using preserveTimestamps on 32-bit node
if (opts.preserveTimestamps && process.arch === 'ia32') {
console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
see https://github.com/jprichardson/node-fs-extra/issues/269`)
}
const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy')
stat.checkParentPathsSync(src, srcStat, dest, 'copy')
return handleFilterAndCopy(destStat, src, dest, opts)
}
function handleFilterAndCopy (destStat, src, dest, opts) {
if (opts.filter && !opts.filter(src, dest)) return
const destParent = path.dirname(dest)
if (!fs.existsSync(destParent)) mkdirpSync(destParent)
return startCopy(destStat, src, dest, opts)
}
function startCopy (destStat, src, dest, opts) {
if (opts.filter && !opts.filter(src, dest)) return
return getStats(destStat, src, dest, opts)
}
function getStats (destStat, src, dest, opts) {
const statSync = opts.dereference ? fs.statSync : fs.lstatSync
const srcStat = statSync(src)
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
else if (srcStat.isFile() ||
srcStat.isCharacterDevice() ||
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
}
function onFile (srcStat, destStat, src, dest, opts) {
if (!destStat) return copyFile(srcStat, src, dest, opts)
return mayCopyFile(srcStat, src, dest, opts)
}
function mayCopyFile (srcStat, src, dest, opts) {
if (opts.overwrite) {
fs.unlinkSync(dest)
return copyFile(srcStat, src, dest, opts)
} else if (opts.errorOnExist) {
throw new Error(`'${dest}' already exists`)
}
}
function copyFile (srcStat, src, dest, opts) {
if (typeof fs.copyFileSync === 'function') {
fs.copyFileSync(src, dest)
fs.chmodSync(dest, srcStat.mode)
if (opts.preserveTimestamps) {
return utimesSync(dest, srcStat.atime, srcStat.mtime)
}
return
}
return copyFileFallback(srcStat, src, dest, opts)
}
function copyFileFallback (srcStat, src, dest, opts) {
const BUF_LENGTH = 64 * 1024
const _buff = __nccwpck_require__(47696)(BUF_LENGTH)
const fdr = fs.openSync(src, 'r')
const fdw = fs.openSync(dest, 'w', srcStat.mode)
let pos = 0
while (pos < srcStat.size) {
const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
fs.writeSync(fdw, _buff, 0, bytesRead)
pos += bytesRead
}
if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime)
fs.closeSync(fdr)
fs.closeSync(fdw)
}
function onDir (srcStat, destStat, src, dest, opts) {
if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts)
if (destStat && !destStat.isDirectory()) {
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
}
return copyDir(src, dest, opts)
}
function mkDirAndCopy (srcStat, src, dest, opts) {
fs.mkdirSync(dest)
copyDir(src, dest, opts)
return fs.chmodSync(dest, srcStat.mode)
}
function copyDir (src, dest, opts) {
fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
}
function copyDirItem (item, src, dest, opts) {
const srcItem = path.join(src, item)
const destItem = path.join(dest, item)
const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy')
return startCopy(destStat, srcItem, destItem, opts)
}
function onLink (destStat, src, dest, opts) {
let resolvedSrc = fs.readlinkSync(src)
if (opts.dereference) {
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
}
if (!destStat) {
return fs.symlinkSync(resolvedSrc, dest)
} else {
let resolvedDest
try {
resolvedDest = fs.readlinkSync(dest)
} catch (err) {
// dest exists and is a regular file or directory,
// Windows may throw UNKNOWN error. If dest already exists,
// fs throws error anyway, so no need to guard against it here.
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
throw err
}
if (opts.dereference) {
resolvedDest = path.resolve(process.cwd(), resolvedDest)
}
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
}
// prevent copy if src is a subdir of dest since unlinking
// dest in this case would result in removing src contents
// and therefore a broken symlink would be created.
if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
}
return copyLink(resolvedSrc, dest)
}
}
function copyLink (resolvedSrc, dest) {
fs.unlinkSync(dest)
return fs.symlinkSync(resolvedSrc, dest)
}
module.exports = copySync
/***/ }),
/***/ 11135:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
module.exports = {
copySync: __nccwpck_require__(43338)
}
/***/ }),
/***/ 38834:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const mkdirp = __nccwpck_require__(12915).mkdirs
const pathExists = __nccwpck_require__(43835).pathExists
const utimes = __nccwpck_require__(52548).utimesMillis
const stat = __nccwpck_require__(73901)
function copy (src, dest, opts, cb) {
if (typeof opts === 'function' && !cb) {
cb = opts
opts = {}
} else if (typeof opts === 'function') {
opts = { filter: opts }
}
cb = cb || function () {}
opts = opts || {}
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
// Warn about using preserveTimestamps on 32-bit node
if (opts.preserveTimestamps && process.arch === 'ia32') {
console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
see https://github.com/jprichardson/node-fs-extra/issues/269`)
}
stat.checkPaths(src, dest, 'copy', (err, stats) => {
if (err) return cb(err)
const { srcStat, destStat } = stats
stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
if (err) return cb(err)
if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
return checkParentDir(destStat, src, dest, opts, cb)
})
})
}
function checkParentDir (destStat, src, dest, opts, cb) {
const destParent = path.dirname(dest)
pathExists(destParent, (err, dirExists) => {
if (err) return cb(err)
if (dirExists) return startCopy(destStat, src, dest, opts, cb)
mkdirp(destParent, err => {
if (err) return cb(err)
return startCopy(destStat, src, dest, opts, cb)
})
})
}
function handleFilter (onInclude, destStat, src, dest, opts, cb) {
Promise.resolve(opts.filter(src, dest)).then(include => {
if (include) return onInclude(destStat, src, dest, opts, cb)
return cb()
}, error => cb(error))
}
function startCopy (destStat, src, dest, opts, cb) {
if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
return getStats(destStat, src, dest, opts, cb)
}
function getStats (destStat, src, dest, opts, cb) {
const stat = opts.dereference ? fs.stat : fs.lstat
stat(src, (err, srcStat) => {
if (err) return cb(err)
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
else if (srcStat.isFile() ||
srcStat.isCharacterDevice() ||
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
})
}
function onFile (srcStat, destStat, src, dest, opts, cb) {
if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
return mayCopyFile(srcStat, src, dest, opts, cb)
}
function mayCopyFile (srcStat, src, dest, opts, cb) {
if (opts.overwrite) {
fs.unlink(dest, err => {
if (err) return cb(err)
return copyFile(srcStat, src, dest, opts, cb)
})
} else if (opts.errorOnExist) {
return cb(new Error(`'${dest}' already exists`))
} else return cb()
}
function copyFile (srcStat, src, dest, opts, cb) {
if (typeof fs.copyFile === 'function') {
return fs.copyFile(src, dest, err => {
if (err) return cb(err)
return setDestModeAndTimestamps(srcStat, dest, opts, cb)
})
}
return copyFileFallback(srcStat, src, dest, opts, cb)
}
function copyFileFallback (srcStat, src, dest, opts, cb) {
const rs = fs.createReadStream(src)
rs.on('error', err => cb(err)).once('open', () => {
const ws = fs.createWriteStream(dest, { mode: srcStat.mode })
ws.on('error', err => cb(err))
.on('open', () => rs.pipe(ws))
.once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb))
})
}
function setDestModeAndTimestamps (srcStat, dest, opts, cb) {
fs.chmod(dest, srcStat.mode, err => {
if (err) return cb(err)
if (opts.preserveTimestamps) {
return utimes(dest, srcStat.atime, srcStat.mtime, cb)
}
return cb()
})
}
function onDir (srcStat, destStat, src, dest, opts, cb) {
if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts, cb)
if (destStat && !destStat.isDirectory()) {
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
}
return copyDir(src, dest, opts, cb)
}
function mkDirAndCopy (srcStat, src, dest, opts, cb) {
fs.mkdir(dest, err => {
if (err) return cb(err)
copyDir(src, dest, opts, err => {
if (err) return cb(err)
return fs.chmod(dest, srcStat.mode, cb)
})
})
}
function copyDir (src, dest, opts, cb) {
fs.readdir(src, (err, items) => {
if (err) return cb(err)
return copyDirItems(items, src, dest, opts, cb)
})
}
function copyDirItems (items, src, dest, opts, cb) {
const item = items.pop()
if (!item) return cb()
return copyDirItem(items, item, src, dest, opts, cb)
}
function copyDirItem (items, item, src, dest, opts, cb) {
const srcItem = path.join(src, item)
const destItem = path.join(dest, item)
stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => {
if (err) return cb(err)
const { destStat } = stats
startCopy(destStat, srcItem, destItem, opts, err => {
if (err) return cb(err)
return copyDirItems(items, src, dest, opts, cb)
})
})
}
function onLink (destStat, src, dest, opts, cb) {
fs.readlink(src, (err, resolvedSrc) => {
if (err) return cb(err)
if (opts.dereference) {
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
}
if (!destStat) {
return fs.symlink(resolvedSrc, dest, cb)
} else {
fs.readlink(dest, (err, resolvedDest) => {
if (err) {
// dest exists and is a regular file or directory,
// Windows may throw UNKNOWN error. If dest already exists,
// fs throws error anyway, so no need to guard against it here.
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
return cb(err)
}
if (opts.dereference) {
resolvedDest = path.resolve(process.cwd(), resolvedDest)
}
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
}
// do not copy if src is a subdir of dest since unlinking
// dest in this case would result in removing src contents
// and therefore a broken symlink would be created.
if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
}
return copyLink(resolvedSrc, dest, cb)
})
}
})
}
function copyLink (resolvedSrc, dest, cb) {
fs.unlink(dest, err => {
if (err) return cb(err)
return fs.symlink(resolvedSrc, dest, cb)
})
}
module.exports = copy
/***/ }),
/***/ 61335:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
module.exports = {
copy: u(__nccwpck_require__(38834))
}
/***/ }),
/***/ 96970:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const mkdir = __nccwpck_require__(12915)
const remove = __nccwpck_require__(47357)
const emptyDir = u(function emptyDir (dir, callback) {
callback = callback || function () {}
fs.readdir(dir, (err, items) => {
if (err) return mkdir.mkdirs(dir, callback)
items = items.map(item => path.join(dir, item))
deleteItem()
function deleteItem () {
const item = items.pop()
if (!item) return callback()
remove.remove(item, err => {
if (err) return callback(err)
deleteItem()
})
}
})
})
function emptyDirSync (dir) {
let items
try {
items = fs.readdirSync(dir)
} catch (err) {
return mkdir.mkdirsSync(dir)
}
items.forEach(item => {
item = path.join(dir, item)
remove.removeSync(item)
})
}
module.exports = {
emptyDirSync,
emptydirSync: emptyDirSync,
emptyDir,
emptydir: emptyDir
}
/***/ }),
/***/ 2164:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const path = __nccwpck_require__(85622)
const fs = __nccwpck_require__(14178)
const mkdir = __nccwpck_require__(12915)
const pathExists = __nccwpck_require__(43835).pathExists
function createFile (file, callback) {
function makeFile () {
fs.writeFile(file, '', err => {
if (err) return callback(err)
callback()
})
}
fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
if (!err && stats.isFile()) return callback()
const dir = path.dirname(file)
pathExists(dir, (err, dirExists) => {
if (err) return callback(err)
if (dirExists) return makeFile()
mkdir.mkdirs(dir, err => {
if (err) return callback(err)
makeFile()
})
})
})
}
function createFileSync (file) {
let stats
try {
stats = fs.statSync(file)
} catch (e) {}
if (stats && stats.isFile()) return
const dir = path.dirname(file)
if (!fs.existsSync(dir)) {
mkdir.mkdirsSync(dir)
}
fs.writeFileSync(file, '')
}
module.exports = {
createFile: u(createFile),
createFileSync
}
/***/ }),
/***/ 40055:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const file = __nccwpck_require__(2164)
const link = __nccwpck_require__(53797)
const symlink = __nccwpck_require__(72549)
module.exports = {
// file
createFile: file.createFile,
createFileSync: file.createFileSync,
ensureFile: file.createFile,
ensureFileSync: file.createFileSync,
// link
createLink: link.createLink,
createLinkSync: link.createLinkSync,
ensureLink: link.createLink,
ensureLinkSync: link.createLinkSync,
// symlink
createSymlink: symlink.createSymlink,
createSymlinkSync: symlink.createSymlinkSync,
ensureSymlink: symlink.createSymlink,
ensureSymlinkSync: symlink.createSymlinkSync
}
/***/ }),
/***/ 53797:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const path = __nccwpck_require__(85622)
const fs = __nccwpck_require__(14178)
const mkdir = __nccwpck_require__(12915)
const pathExists = __nccwpck_require__(43835).pathExists
function createLink (srcpath, dstpath, callback) {
function makeLink (srcpath, dstpath) {
fs.link(srcpath, dstpath, err => {
if (err) return callback(err)
callback(null)
})
}
pathExists(dstpath, (err, destinationExists) => {
if (err) return callback(err)
if (destinationExists) return callback(null)
fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureLink')
return callback(err)
}
const dir = path.dirname(dstpath)
pathExists(dir, (err, dirExists) => {
if (err) return callback(err)
if (dirExists) return makeLink(srcpath, dstpath)
mkdir.mkdirs(dir, err => {
if (err) return callback(err)
makeLink(srcpath, dstpath)
})
})
})
})
}
function createLinkSync (srcpath, dstpath) {
const destinationExists = fs.existsSync(dstpath)
if (destinationExists) return undefined
try {
fs.lstatSync(srcpath)
} catch (err) {
err.message = err.message.replace('lstat', 'ensureLink')
throw err
}
const dir = path.dirname(dstpath)
const dirExists = fs.existsSync(dir)
if (dirExists) return fs.linkSync(srcpath, dstpath)
mkdir.mkdirsSync(dir)
return fs.linkSync(srcpath, dstpath)
}
module.exports = {
createLink: u(createLink),
createLinkSync
}
/***/ }),
/***/ 53727:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const path = __nccwpck_require__(85622)
const fs = __nccwpck_require__(14178)
const pathExists = __nccwpck_require__(43835).pathExists
/**
* Function that returns two types of paths, one relative to symlink, and one
* relative to the current working directory. Checks if path is absolute or
* relative. If the path is relative, this function checks if the path is
* relative to symlink or relative to current working directory. This is an
* initiative to find a smarter `srcpath` to supply when building symlinks.
* This allows you to determine which path to use out of one of three possible
* types of source paths. The first is an absolute path. This is detected by
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
* see if it exists. If it does it's used, if not an error is returned
* (callback)/ thrown (sync). The other two options for `srcpath` are a
* relative url. By default Node's `fs.symlink` works by creating a symlink
* using `dstpath` and expects the `srcpath` to be relative to the newly
* created symlink. If you provide a `srcpath` that does not exist on the file
* system it results in a broken symlink. To minimize this, the function
* checks to see if the 'relative to symlink' source file exists, and if it
* does it will use it. If it does not, it checks if there's a file that
* exists that is relative to the current working directory, if does its used.
* This preserves the expectations of the original fs.symlink spec and adds
* the ability to pass in `relative to current working direcotry` paths.
*/
function symlinkPaths (srcpath, dstpath, callback) {
if (path.isAbsolute(srcpath)) {
return fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureSymlink')
return callback(err)
}
return callback(null, {
'toCwd': srcpath,
'toDst': srcpath
})
})
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
return pathExists(relativeToDst, (err, exists) => {
if (err) return callback(err)
if (exists) {
return callback(null, {
'toCwd': relativeToDst,
'toDst': srcpath
})
} else {
return fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureSymlink')
return callback(err)
}
return callback(null, {
'toCwd': srcpath,
'toDst': path.relative(dstdir, srcpath)
})
})
}
})
}
}
function symlinkPathsSync (srcpath, dstpath) {
let exists
if (path.isAbsolute(srcpath)) {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('absolute srcpath does not exist')
return {
'toCwd': srcpath,
'toDst': srcpath
}
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
exists = fs.existsSync(relativeToDst)
if (exists) {
return {
'toCwd': relativeToDst,
'toDst': srcpath
}
} else {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('relative srcpath does not exist')
return {
'toCwd': srcpath,
'toDst': path.relative(dstdir, srcpath)
}
}
}
}
module.exports = {
symlinkPaths,
symlinkPathsSync
}
/***/ }),
/***/ 18254:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
function symlinkType (srcpath, type, callback) {
callback = (typeof type === 'function') ? type : callback
type = (typeof type === 'function') ? false : type
if (type) return callback(null, type)
fs.lstat(srcpath, (err, stats) => {
if (err) return callback(null, 'file')
type = (stats && stats.isDirectory()) ? 'dir' : 'file'
callback(null, type)
})
}
function symlinkTypeSync (srcpath, type) {
let stats
if (type) return type
try {
stats = fs.lstatSync(srcpath)
} catch (e) {
return 'file'
}
return (stats && stats.isDirectory()) ? 'dir' : 'file'
}
module.exports = {
symlinkType,
symlinkTypeSync
}
/***/ }),
/***/ 72549:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const path = __nccwpck_require__(85622)
const fs = __nccwpck_require__(14178)
const _mkdirs = __nccwpck_require__(12915)
const mkdirs = _mkdirs.mkdirs
const mkdirsSync = _mkdirs.mkdirsSync
const _symlinkPaths = __nccwpck_require__(53727)
const symlinkPaths = _symlinkPaths.symlinkPaths
const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
const _symlinkType = __nccwpck_require__(18254)
const symlinkType = _symlinkType.symlinkType
const symlinkTypeSync = _symlinkType.symlinkTypeSync
const pathExists = __nccwpck_require__(43835).pathExists
function createSymlink (srcpath, dstpath, type, callback) {
callback = (typeof type === 'function') ? type : callback
type = (typeof type === 'function') ? false : type
pathExists(dstpath, (err, destinationExists) => {
if (err) return callback(err)
if (destinationExists) return callback(null)
symlinkPaths(srcpath, dstpath, (err, relative) => {
if (err) return callback(err)
srcpath = relative.toDst
symlinkType(relative.toCwd, type, (err, type) => {
if (err) return callback(err)
const dir = path.dirname(dstpath)
pathExists(dir, (err, dirExists) => {
if (err) return callback(err)
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
mkdirs(dir, err => {
if (err) return callback(err)
fs.symlink(srcpath, dstpath, type, callback)
})
})
})
})
})
}
function createSymlinkSync (srcpath, dstpath, type) {
const destinationExists = fs.existsSync(dstpath)
if (destinationExists) return undefined
const relative = symlinkPathsSync(srcpath, dstpath)
srcpath = relative.toDst
type = symlinkTypeSync(relative.toCwd, type)
const dir = path.dirname(dstpath)
const exists = fs.existsSync(dir)
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
mkdirsSync(dir)
return fs.symlinkSync(srcpath, dstpath, type)
}
module.exports = {
createSymlink: u(createSymlink),
createSymlinkSync
}
/***/ }),
/***/ 61176:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
// This is adapted from https://github.com/normalize/mz
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const fs = __nccwpck_require__(14178)
const api = [
'access',
'appendFile',
'chmod',
'chown',
'close',
'copyFile',
'fchmod',
'fchown',
'fdatasync',
'fstat',
'fsync',
'ftruncate',
'futimes',
'lchown',
'lchmod',
'link',
'lstat',
'mkdir',
'mkdtemp',
'open',
'readFile',
'readdir',
'readlink',
'realpath',
'rename',
'rmdir',
'stat',
'symlink',
'truncate',
'unlink',
'utimes',
'writeFile'
].filter(key => {
// Some commands are not available on some systems. Ex:
// fs.copyFile was added in Node.js v8.5.0
// fs.mkdtemp was added in Node.js v5.10.0
// fs.lchown is not available on at least some Linux
return typeof fs[key] === 'function'
})
// Export all keys:
Object.keys(fs).forEach(key => {
if (key === 'promises') {
// fs.promises is a getter property that triggers ExperimentalWarning
// Don't re-export it here, the getter is defined in "lib/index.js"
return
}
exports[key] = fs[key]
})
// Universalify async methods:
api.forEach(method => {
exports[method] = u(fs[method])
})
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
// since we are a drop-in replacement for the native module
exports.exists = function (filename, callback) {
if (typeof callback === 'function') {
return fs.exists(filename, callback)
}
return new Promise(resolve => {
return fs.exists(filename, resolve)
})
}
// fs.read() & fs.write need special treatment due to multiple callback args
exports.read = function (fd, buffer, offset, length, position, callback) {
if (typeof callback === 'function') {
return fs.read(fd, buffer, offset, length, position, callback)
}
return new Promise((resolve, reject) => {
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
if (err) return reject(err)
resolve({ bytesRead, buffer })
})
})
}
// Function signature can be
// fs.write(fd, buffer[, offset[, length[, position]]], callback)
// OR
// fs.write(fd, string[, position[, encoding]], callback)
// We need to handle both cases, so we use ...args
exports.write = function (fd, buffer, ...args) {
if (typeof args[args.length - 1] === 'function') {
return fs.write(fd, buffer, ...args)
}
return new Promise((resolve, reject) => {
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
if (err) return reject(err)
resolve({ bytesWritten, buffer })
})
})
}
// fs.realpath.native only available in Node v9.2+
if (typeof fs.realpath.native === 'function') {
exports.realpath.native = u(fs.realpath.native)
}
/***/ }),
/***/ 5630:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
module.exports = Object.assign(
{},
// Export promiseified graceful-fs:
__nccwpck_require__(61176),
// Export extra methods:
__nccwpck_require__(11135),
__nccwpck_require__(61335),
__nccwpck_require__(96970),
__nccwpck_require__(40055),
__nccwpck_require__(40213),
__nccwpck_require__(12915),
__nccwpck_require__(69665),
__nccwpck_require__(41497),
__nccwpck_require__(16570),
__nccwpck_require__(43835),
__nccwpck_require__(47357)
)
// Export fs.promises as a getter property so that we don't trigger
// ExperimentalWarning before fs.promises is actually accessed.
const fs = __nccwpck_require__(35747)
if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
Object.defineProperty(module.exports, "promises", ({
get () { return fs.promises }
}))
}
/***/ }),
/***/ 40213:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const jsonFile = __nccwpck_require__(18970)
jsonFile.outputJson = u(__nccwpck_require__(60531))
jsonFile.outputJsonSync = __nccwpck_require__(19421)
// aliases
jsonFile.outputJSON = jsonFile.outputJson
jsonFile.outputJSONSync = jsonFile.outputJsonSync
jsonFile.writeJSON = jsonFile.writeJson
jsonFile.writeJSONSync = jsonFile.writeJsonSync
jsonFile.readJSON = jsonFile.readJson
jsonFile.readJSONSync = jsonFile.readJsonSync
module.exports = jsonFile
/***/ }),
/***/ 18970:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const jsonFile = __nccwpck_require__(26160)
module.exports = {
// jsonfile exports
readJson: u(jsonFile.readFile),
readJsonSync: jsonFile.readFileSync,
writeJson: u(jsonFile.writeFile),
writeJsonSync: jsonFile.writeFileSync
}
/***/ }),
/***/ 19421:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const mkdir = __nccwpck_require__(12915)
const jsonFile = __nccwpck_require__(18970)
function outputJsonSync (file, data, options) {
const dir = path.dirname(file)
if (!fs.existsSync(dir)) {
mkdir.mkdirsSync(dir)
}
jsonFile.writeJsonSync(file, data, options)
}
module.exports = outputJsonSync
/***/ }),
/***/ 60531:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const path = __nccwpck_require__(85622)
const mkdir = __nccwpck_require__(12915)
const pathExists = __nccwpck_require__(43835).pathExists
const jsonFile = __nccwpck_require__(18970)
function outputJson (file, data, options, callback) {
if (typeof options === 'function') {
callback = options
options = {}
}
const dir = path.dirname(file)
pathExists(dir, (err, itDoes) => {
if (err) return callback(err)
if (itDoes) return jsonFile.writeJson(file, data, options, callback)
mkdir.mkdirs(dir, err => {
if (err) return callback(err)
jsonFile.writeJson(file, data, options, callback)
})
})
}
module.exports = outputJson
/***/ }),
/***/ 12915:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const mkdirs = u(__nccwpck_require__(59677))
const mkdirsSync = __nccwpck_require__(30684)
module.exports = {
mkdirs,
mkdirsSync,
// alias
mkdirp: mkdirs,
mkdirpSync: mkdirsSync,
ensureDir: mkdirs,
ensureDirSync: mkdirsSync
}
/***/ }),
/***/ 30684:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const invalidWin32Path = __nccwpck_require__(71590).invalidWin32Path
const o777 = parseInt('0777', 8)
function mkdirsSync (p, opts, made) {
if (!opts || typeof opts !== 'object') {
opts = { mode: opts }
}
let mode = opts.mode
const xfs = opts.fs || fs
if (process.platform === 'win32' && invalidWin32Path(p)) {
const errInval = new Error(p + ' contains invalid WIN32 path characters.')
errInval.code = 'EINVAL'
throw errInval
}
if (mode === undefined) {
mode = o777 & (~process.umask())
}
if (!made) made = null
p = path.resolve(p)
try {
xfs.mkdirSync(p, mode)
made = made || p
} catch (err0) {
if (err0.code === 'ENOENT') {
if (path.dirname(p) === p) throw err0
made = mkdirsSync(path.dirname(p), opts, made)
mkdirsSync(p, opts, made)
} else {
// In the case of any other error, just see if there's a dir there
// already. If so, then hooray! If not, then something is borked.
let stat
try {
stat = xfs.statSync(p)
} catch (err1) {
throw err0
}
if (!stat.isDirectory()) throw err0
}
}
return made
}
module.exports = mkdirsSync
/***/ }),
/***/ 59677:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const invalidWin32Path = __nccwpck_require__(71590).invalidWin32Path
const o777 = parseInt('0777', 8)
function mkdirs (p, opts, callback, made) {
if (typeof opts === 'function') {
callback = opts
opts = {}
} else if (!opts || typeof opts !== 'object') {
opts = { mode: opts }
}
if (process.platform === 'win32' && invalidWin32Path(p)) {
const errInval = new Error(p + ' contains invalid WIN32 path characters.')
errInval.code = 'EINVAL'
return callback(errInval)
}
let mode = opts.mode
const xfs = opts.fs || fs
if (mode === undefined) {
mode = o777 & (~process.umask())
}
if (!made) made = null
callback = callback || function () {}
p = path.resolve(p)
xfs.mkdir(p, mode, er => {
if (!er) {
made = made || p
return callback(null, made)
}
switch (er.code) {
case 'ENOENT':
if (path.dirname(p) === p) return callback(er)
mkdirs(path.dirname(p), opts, (er, made) => {
if (er) callback(er, made)
else mkdirs(p, opts, callback, made)
})
break
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
xfs.stat(p, (er2, stat) => {
// if the stat fails, then that's super weird.
// let the original error be the failure reason.
if (er2 || !stat.isDirectory()) callback(er, made)
else callback(null, made)
})
break
}
})
}
module.exports = mkdirs
/***/ }),
/***/ 71590:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const path = __nccwpck_require__(85622)
// get drive on windows
function getRootPath (p) {
p = path.normalize(path.resolve(p)).split(path.sep)
if (p.length > 0) return p[0]
return null
}
// http://stackoverflow.com/a/62888/10333 contains more accurate
// TODO: expand to include the rest
const INVALID_PATH_CHARS = /[<>:"|?*]/
function invalidWin32Path (p) {
const rp = getRootPath(p)
p = p.replace(rp, '')
return INVALID_PATH_CHARS.test(p)
}
module.exports = {
getRootPath,
invalidWin32Path
}
/***/ }),
/***/ 69665:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
module.exports = {
moveSync: __nccwpck_require__(96445)
}
/***/ }),
/***/ 96445:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const copySync = __nccwpck_require__(11135).copySync
const removeSync = __nccwpck_require__(47357).removeSync
const mkdirpSync = __nccwpck_require__(12915).mkdirpSync
const stat = __nccwpck_require__(73901)
function moveSync (src, dest, opts) {
opts = opts || {}
const overwrite = opts.overwrite || opts.clobber || false
const { srcStat } = stat.checkPathsSync(src, dest, 'move')
stat.checkParentPathsSync(src, srcStat, dest, 'move')
mkdirpSync(path.dirname(dest))
return doRename(src, dest, overwrite)
}
function doRename (src, dest, overwrite) {
if (overwrite) {
removeSync(dest)
return rename(src, dest, overwrite)
}
if (fs.existsSync(dest)) throw new Error('dest already exists.')
return rename(src, dest, overwrite)
}
function rename (src, dest, overwrite) {
try {
fs.renameSync(src, dest)
} catch (err) {
if (err.code !== 'EXDEV') throw err
return moveAcrossDevice(src, dest, overwrite)
}
}
function moveAcrossDevice (src, dest, overwrite) {
const opts = {
overwrite,
errorOnExist: true
}
copySync(src, dest, opts)
return removeSync(src)
}
module.exports = moveSync
/***/ }),
/***/ 41497:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
module.exports = {
move: u(__nccwpck_require__(72231))
}
/***/ }),
/***/ 72231:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const copy = __nccwpck_require__(61335).copy
const remove = __nccwpck_require__(47357).remove
const mkdirp = __nccwpck_require__(12915).mkdirp
const pathExists = __nccwpck_require__(43835).pathExists
const stat = __nccwpck_require__(73901)
function move (src, dest, opts, cb) {
if (typeof opts === 'function') {
cb = opts
opts = {}
}
const overwrite = opts.overwrite || opts.clobber || false
stat.checkPaths(src, dest, 'move', (err, stats) => {
if (err) return cb(err)
const { srcStat } = stats
stat.checkParentPaths(src, srcStat, dest, 'move', err => {
if (err) return cb(err)
mkdirp(path.dirname(dest), err => {
if (err) return cb(err)
return doRename(src, dest, overwrite, cb)
})
})
})
}
function doRename (src, dest, overwrite, cb) {
if (overwrite) {
return remove(dest, err => {
if (err) return cb(err)
return rename(src, dest, overwrite, cb)
})
}
pathExists(dest, (err, destExists) => {
if (err) return cb(err)
if (destExists) return cb(new Error('dest already exists.'))
return rename(src, dest, overwrite, cb)
})
}
function rename (src, dest, overwrite, cb) {
fs.rename(src, dest, err => {
if (!err) return cb()
if (err.code !== 'EXDEV') return cb(err)
return moveAcrossDevice(src, dest, overwrite, cb)
})
}
function moveAcrossDevice (src, dest, overwrite, cb) {
const opts = {
overwrite,
errorOnExist: true
}
copy(src, dest, opts, err => {
if (err) return cb(err)
return remove(src, cb)
})
}
module.exports = move
/***/ }),
/***/ 16570:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const mkdir = __nccwpck_require__(12915)
const pathExists = __nccwpck_require__(43835).pathExists
function outputFile (file, data, encoding, callback) {
if (typeof encoding === 'function') {
callback = encoding
encoding = 'utf8'
}
const dir = path.dirname(file)
pathExists(dir, (err, itDoes) => {
if (err) return callback(err)
if (itDoes) return fs.writeFile(file, data, encoding, callback)
mkdir.mkdirs(dir, err => {
if (err) return callback(err)
fs.writeFile(file, data, encoding, callback)
})
})
}
function outputFileSync (file, ...args) {
const dir = path.dirname(file)
if (fs.existsSync(dir)) {
return fs.writeFileSync(file, ...args)
}
mkdir.mkdirsSync(dir)
fs.writeFileSync(file, ...args)
}
module.exports = {
outputFile: u(outputFile),
outputFileSync
}
/***/ }),
/***/ 43835:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromPromise */ .p
const fs = __nccwpck_require__(61176)
function pathExists (path) {
return fs.access(path).then(() => true).catch(() => false)
}
module.exports = {
pathExists: u(pathExists),
pathExistsSync: fs.existsSync
}
/***/ }),
/***/ 47357:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const u = __nccwpck_require__(9046)/* .fromCallback */ .E
const rimraf = __nccwpck_require__(38761)
module.exports = {
remove: u(rimraf),
removeSync: rimraf.sync
}
/***/ }),
/***/ 38761:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const assert = __nccwpck_require__(42357)
const isWindows = (process.platform === 'win32')
function defaults (options) {
const methods = [
'unlink',
'chmod',
'stat',
'lstat',
'rmdir',
'readdir'
]
methods.forEach(m => {
options[m] = options[m] || fs[m]
m = m + 'Sync'
options[m] = options[m] || fs[m]
})
options.maxBusyTries = options.maxBusyTries || 3
}
function rimraf (p, options, cb) {
let busyTries = 0
if (typeof options === 'function') {
cb = options
options = {}
}
assert(p, 'rimraf: missing path')
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
assert(options, 'rimraf: invalid options argument provided')
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
defaults(options)
rimraf_(p, options, function CB (er) {
if (er) {
if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
busyTries < options.maxBusyTries) {
busyTries++
const time = busyTries * 100
// try again, with the same exact callback as this one.
return setTimeout(() => rimraf_(p, options, CB), time)
}
// already gone
if (er.code === 'ENOENT') er = null
}
cb(er)
})
}
// Two possible strategies.
// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
//
// Both result in an extra syscall when you guess wrong. However, there
// are likely far more normal files in the world than directories. This
// is based on the assumption that a the average number of files per
// directory is >= 1.
//
// If anyone ever complains about this, then I guess the strategy could
// be made configurable somehow. But until then, YAGNI.
function rimraf_ (p, options, cb) {
assert(p)
assert(options)
assert(typeof cb === 'function')
// sunos lets the root user unlink directories, which is... weird.
// so we have to lstat here and make sure it's not a dir.
options.lstat(p, (er, st) => {
if (er && er.code === 'ENOENT') {
return cb(null)
}
// Windows can EPERM on stat. Life is suffering.
if (er && er.code === 'EPERM' && isWindows) {
return fixWinEPERM(p, options, er, cb)
}
if (st && st.isDirectory()) {
return rmdir(p, options, er, cb)
}
options.unlink(p, er => {
if (er) {
if (er.code === 'ENOENT') {
return cb(null)
}
if (er.code === 'EPERM') {
return (isWindows)
? fixWinEPERM(p, options, er, cb)
: rmdir(p, options, er, cb)
}
if (er.code === 'EISDIR') {
return rmdir(p, options, er, cb)
}
}
return cb(er)
})
})
}
function fixWinEPERM (p, options, er, cb) {
assert(p)
assert(options)
assert(typeof cb === 'function')
if (er) {
assert(er instanceof Error)
}
options.chmod(p, 0o666, er2 => {
if (er2) {
cb(er2.code === 'ENOENT' ? null : er)
} else {
options.stat(p, (er3, stats) => {
if (er3) {
cb(er3.code === 'ENOENT' ? null : er)
} else if (stats.isDirectory()) {
rmdir(p, options, er, cb)
} else {
options.unlink(p, cb)
}
})
}
})
}
function fixWinEPERMSync (p, options, er) {
let stats
assert(p)
assert(options)
if (er) {
assert(er instanceof Error)
}
try {
options.chmodSync(p, 0o666)
} catch (er2) {
if (er2.code === 'ENOENT') {
return
} else {
throw er
}
}
try {
stats = options.statSync(p)
} catch (er3) {
if (er3.code === 'ENOENT') {
return
} else {
throw er
}
}
if (stats.isDirectory()) {
rmdirSync(p, options, er)
} else {
options.unlinkSync(p)
}
}
function rmdir (p, options, originalEr, cb) {
assert(p)
assert(options)
if (originalEr) {
assert(originalEr instanceof Error)
}
assert(typeof cb === 'function')
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
// if we guessed wrong, and it's not a directory, then
// raise the original error.
options.rmdir(p, er => {
if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
rmkids(p, options, cb)
} else if (er && er.code === 'ENOTDIR') {
cb(originalEr)
} else {
cb(er)
}
})
}
function rmkids (p, options, cb) {
assert(p)
assert(options)
assert(typeof cb === 'function')
options.readdir(p, (er, files) => {
if (er) return cb(er)
let n = files.length
let errState
if (n === 0) return options.rmdir(p, cb)
files.forEach(f => {
rimraf(path.join(p, f), options, er => {
if (errState) {
return
}
if (er) return cb(errState = er)
if (--n === 0) {
options.rmdir(p, cb)
}
})
})
})
}
// this looks simpler, and is strictly *faster*, but will
// tie up the JavaScript thread and fail on excessively
// deep directory trees.
function rimrafSync (p, options) {
let st
options = options || {}
defaults(options)
assert(p, 'rimraf: missing path')
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
assert(options, 'rimraf: missing options')
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
try {
st = options.lstatSync(p)
} catch (er) {
if (er.code === 'ENOENT') {
return
}
// Windows can EPERM on stat. Life is suffering.
if (er.code === 'EPERM' && isWindows) {
fixWinEPERMSync(p, options, er)
}
}
try {
// sunos lets the root user unlink directories, which is... weird.
if (st && st.isDirectory()) {
rmdirSync(p, options, null)
} else {
options.unlinkSync(p)
}
} catch (er) {
if (er.code === 'ENOENT') {
return
} else if (er.code === 'EPERM') {
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
} else if (er.code !== 'EISDIR') {
throw er
}
rmdirSync(p, options, er)
}
}
function rmdirSync (p, options, originalEr) {
assert(p)
assert(options)
if (originalEr) {
assert(originalEr instanceof Error)
}
try {
options.rmdirSync(p)
} catch (er) {
if (er.code === 'ENOTDIR') {
throw originalEr
} else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
rmkidsSync(p, options)
} else if (er.code !== 'ENOENT') {
throw er
}
}
}
function rmkidsSync (p, options) {
assert(p)
assert(options)
options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
if (isWindows) {
// We only end up here once we got ENOTEMPTY at least once, and
// at this point, we are guaranteed to have removed all the kids.
// So, we know that it won't be ENOENT or ENOTDIR or anything else.
// try really hard to delete stuff on windows, because it has a
// PROFOUNDLY annoying habit of not closing handles promptly when
// files are deleted, resulting in spurious ENOTEMPTY errors.
const startTime = Date.now()
do {
try {
const ret = options.rmdirSync(p, options)
return ret
} catch (er) { }
} while (Date.now() - startTime < 500) // give up after 500ms
} else {
const ret = options.rmdirSync(p, options)
return ret
}
}
module.exports = rimraf
rimraf.sync = rimrafSync
/***/ }),
/***/ 47696:
/***/ ((module) => {
"use strict";
/* eslint-disable node/no-deprecated-api */
module.exports = function (size) {
if (typeof Buffer.allocUnsafe === 'function') {
try {
return Buffer.allocUnsafe(size)
} catch (e) {
return new Buffer(size)
}
}
return new Buffer(size)
}
/***/ }),
/***/ 73901:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const path = __nccwpck_require__(85622)
const NODE_VERSION_MAJOR_WITH_BIGINT = 10
const NODE_VERSION_MINOR_WITH_BIGINT = 5
const NODE_VERSION_PATCH_WITH_BIGINT = 0
const nodeVersion = process.versions.node.split('.')
const nodeVersionMajor = Number.parseInt(nodeVersion[0], 10)
const nodeVersionMinor = Number.parseInt(nodeVersion[1], 10)
const nodeVersionPatch = Number.parseInt(nodeVersion[2], 10)
function nodeSupportsBigInt () {
if (nodeVersionMajor > NODE_VERSION_MAJOR_WITH_BIGINT) {
return true
} else if (nodeVersionMajor === NODE_VERSION_MAJOR_WITH_BIGINT) {
if (nodeVersionMinor > NODE_VERSION_MINOR_WITH_BIGINT) {
return true
} else if (nodeVersionMinor === NODE_VERSION_MINOR_WITH_BIGINT) {
if (nodeVersionPatch >= NODE_VERSION_PATCH_WITH_BIGINT) {
return true
}
}
}
return false
}
function getStats (src, dest, cb) {
if (nodeSupportsBigInt()) {
fs.stat(src, { bigint: true }, (err, srcStat) => {
if (err) return cb(err)
fs.stat(dest, { bigint: true }, (err, destStat) => {
if (err) {
if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null })
return cb(err)
}
return cb(null, { srcStat, destStat })
})
})
} else {
fs.stat(src, (err, srcStat) => {
if (err) return cb(err)
fs.stat(dest, (err, destStat) => {
if (err) {
if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null })
return cb(err)
}
return cb(null, { srcStat, destStat })
})
})
}
}
function getStatsSync (src, dest) {
let srcStat, destStat
if (nodeSupportsBigInt()) {
srcStat = fs.statSync(src, { bigint: true })
} else {
srcStat = fs.statSync(src)
}
try {
if (nodeSupportsBigInt()) {
destStat = fs.statSync(dest, { bigint: true })
} else {
destStat = fs.statSync(dest)
}
} catch (err) {
if (err.code === 'ENOENT') return { srcStat, destStat: null }
throw err
}
return { srcStat, destStat }
}
function checkPaths (src, dest, funcName, cb) {
getStats(src, dest, (err, stats) => {
if (err) return cb(err)
const { srcStat, destStat } = stats
if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
return cb(new Error('Source and destination must not be the same.'))
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
return cb(new Error(errMsg(src, dest, funcName)))
}
return cb(null, { srcStat, destStat })
})
}
function checkPathsSync (src, dest, funcName) {
const { srcStat, destStat } = getStatsSync(src, dest)
if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
throw new Error('Source and destination must not be the same.')
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
throw new Error(errMsg(src, dest, funcName))
}
return { srcStat, destStat }
}
// recursively check if dest parent is a subdirectory of src.
// It works for all file types including symlinks since it
// checks the src and dest inodes. It starts from the deepest
// parent and stops once it reaches the src parent or the root path.
function checkParentPaths (src, srcStat, dest, funcName, cb) {
const srcParent = path.resolve(path.dirname(src))
const destParent = path.resolve(path.dirname(dest))
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
if (nodeSupportsBigInt()) {
fs.stat(destParent, { bigint: true }, (err, destStat) => {
if (err) {
if (err.code === 'ENOENT') return cb()
return cb(err)
}
if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
return cb(new Error(errMsg(src, dest, funcName)))
}
return checkParentPaths(src, srcStat, destParent, funcName, cb)
})
} else {
fs.stat(destParent, (err, destStat) => {
if (err) {
if (err.code === 'ENOENT') return cb()
return cb(err)
}
if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
return cb(new Error(errMsg(src, dest, funcName)))
}
return checkParentPaths(src, srcStat, destParent, funcName, cb)
})
}
}
function checkParentPathsSync (src, srcStat, dest, funcName) {
const srcParent = path.resolve(path.dirname(src))
const destParent = path.resolve(path.dirname(dest))
if (destParent === srcParent || destParent === path.parse(destParent).root) return
let destStat
try {
if (nodeSupportsBigInt()) {
destStat = fs.statSync(destParent, { bigint: true })
} else {
destStat = fs.statSync(destParent)
}
} catch (err) {
if (err.code === 'ENOENT') return
throw err
}
if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
throw new Error(errMsg(src, dest, funcName))
}
return checkParentPathsSync(src, srcStat, destParent, funcName)
}
// return true if dest is a subdir of src, otherwise false.
// It only checks the path strings.
function isSrcSubdir (src, dest) {
const srcArr = path.resolve(src).split(path.sep).filter(i => i)
const destArr = path.resolve(dest).split(path.sep).filter(i => i)
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
}
function errMsg (src, dest, funcName) {
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
}
module.exports = {
checkPaths,
checkPathsSync,
checkParentPaths,
checkParentPathsSync,
isSrcSubdir
}
/***/ }),
/***/ 52548:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(14178)
const os = __nccwpck_require__(12087)
const path = __nccwpck_require__(85622)
// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
function hasMillisResSync () {
let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))
tmpfile = path.join(os.tmpdir(), tmpfile)
// 550 millis past UNIX epoch
const d = new Date(1435410243862)
fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
const fd = fs.openSync(tmpfile, 'r+')
fs.futimesSync(fd, d, d)
fs.closeSync(fd)
return fs.statSync(tmpfile).mtime > 1435410243000
}
function hasMillisRes (callback) {
let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))
tmpfile = path.join(os.tmpdir(), tmpfile)
// 550 millis past UNIX epoch
const d = new Date(1435410243862)
fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {
if (err) return callback(err)
fs.open(tmpfile, 'r+', (err, fd) => {
if (err) return callback(err)
fs.futimes(fd, d, d, err => {
if (err) return callback(err)
fs.close(fd, err => {
if (err) return callback(err)
fs.stat(tmpfile, (err, stats) => {
if (err) return callback(err)
callback(null, stats.mtime > 1435410243000)
})
})
})
})
})
}
function timeRemoveMillis (timestamp) {
if (typeof timestamp === 'number') {
return Math.floor(timestamp / 1000) * 1000
} else if (timestamp instanceof Date) {
return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
} else {
throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
}
}
function utimesMillis (path, atime, mtime, callback) {
// if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
fs.open(path, 'r+', (err, fd) => {
if (err) return callback(err)
fs.futimes(fd, atime, mtime, futimesErr => {
fs.close(fd, closeErr => {
if (callback) callback(futimesErr || closeErr)
})
})
})
}
function utimesMillisSync (path, atime, mtime) {
const fd = fs.openSync(path, 'r+')
fs.futimesSync(fd, atime, mtime)
return fs.closeSync(fd)
}
module.exports = {
hasMillisRes,
hasMillisResSync,
timeRemoveMillis,
utimesMillis,
utimesMillisSync
}
/***/ }),
/***/ 25086:
/***/ ((module) => {
"use strict";
module.exports = clone
var getPrototypeOf = Object.getPrototypeOf || function (obj) {
return obj.__proto__
}
function clone (obj) {
if (obj === null || typeof obj !== 'object')
return obj
if (obj instanceof Object)
var copy = { __proto__: getPrototypeOf(obj) }
else
var copy = Object.create(null)
Object.getOwnPropertyNames(obj).forEach(function (key) {
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
})
return copy
}
/***/ }),
/***/ 14178:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var fs = __nccwpck_require__(35747)
var polyfills = __nccwpck_require__(35027)
var legacy = __nccwpck_require__(73836)
var clone = __nccwpck_require__(25086)
var util = __nccwpck_require__(31669)
/* istanbul ignore next - node 0.x polyfill */
var gracefulQueue
var previousSymbol
/* istanbul ignore else - node 0.x polyfill */
if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
gracefulQueue = Symbol.for('graceful-fs.queue')
// This is used in testing by future versions
previousSymbol = Symbol.for('graceful-fs.previous')
} else {
gracefulQueue = '___graceful-fs.queue'
previousSymbol = '___graceful-fs.previous'
}
function noop () {}
function publishQueue(context, queue) {
Object.defineProperty(context, gracefulQueue, {
get: function() {
return queue
}
})
}
var debug = noop
if (util.debuglog)
debug = util.debuglog('gfs4')
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
debug = function() {
var m = util.format.apply(util, arguments)
m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
console.error(m)
}
// Once time initialization
if (!fs[gracefulQueue]) {
// This queue can be shared by multiple loaded instances
var queue = global[gracefulQueue] || []
publishQueue(fs, queue)
// Patch fs.close/closeSync to shared queue version, because we need
// to retry() whenever a close happens *anywhere* in the program.
// This is essential when multiple graceful-fs instances are
// in play at the same time.
fs.close = (function (fs$close) {
function close (fd, cb) {
return fs$close.call(fs, fd, function (err) {
// This function uses the graceful-fs shared queue
if (!err) {
resetQueue()
}
if (typeof cb === 'function')
cb.apply(this, arguments)
})
}
Object.defineProperty(close, previousSymbol, {
value: fs$close
})
return close
})(fs.close)
fs.closeSync = (function (fs$closeSync) {
function closeSync (fd) {
// This function uses the graceful-fs shared queue
fs$closeSync.apply(fs, arguments)
resetQueue()
}
Object.defineProperty(closeSync, previousSymbol, {
value: fs$closeSync
})
return closeSync
})(fs.closeSync)
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
process.on('exit', function() {
debug(fs[gracefulQueue])
__nccwpck_require__(42357).equal(fs[gracefulQueue].length, 0)
})
}
}
if (!global[gracefulQueue]) {
publishQueue(global, fs[gracefulQueue]);
}
module.exports = patch(clone(fs))
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
module.exports = patch(fs)
fs.__patched = true;
}
function patch (fs) {
// Everything that references the open() function needs to be in here
polyfills(fs)
fs.gracefulify = patch
fs.createReadStream = createReadStream
fs.createWriteStream = createWriteStream
var fs$readFile = fs.readFile
fs.readFile = readFile
function readFile (path, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$readFile(path, options, cb)
function go$readFile (path, options, cb, startTime) {
return fs$readFile(path, options, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$writeFile = fs.writeFile
fs.writeFile = writeFile
function writeFile (path, data, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$writeFile(path, data, options, cb)
function go$writeFile (path, data, options, cb, startTime) {
return fs$writeFile(path, data, options, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$appendFile = fs.appendFile
if (fs$appendFile)
fs.appendFile = appendFile
function appendFile (path, data, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$appendFile(path, data, options, cb)
function go$appendFile (path, data, options, cb, startTime) {
return fs$appendFile(path, data, options, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$copyFile = fs.copyFile
if (fs$copyFile)
fs.copyFile = copyFile
function copyFile (src, dest, flags, cb) {
if (typeof flags === 'function') {
cb = flags
flags = 0
}
return go$copyFile(src, dest, flags, cb)
function go$copyFile (src, dest, flags, cb, startTime) {
return fs$copyFile(src, dest, flags, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$readdir = fs.readdir
fs.readdir = readdir
function readdir (path, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$readdir(path, options, cb)
function go$readdir (path, options, cb, startTime) {
return fs$readdir(path, options, function (err, files) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (files && files.sort)
files.sort()
if (typeof cb === 'function')
cb.call(this, err, files)
}
})
}
}
if (process.version.substr(0, 4) === 'v0.8') {
var legStreams = legacy(fs)
ReadStream = legStreams.ReadStream
WriteStream = legStreams.WriteStream
}
var fs$ReadStream = fs.ReadStream
if (fs$ReadStream) {
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
ReadStream.prototype.open = ReadStream$open
}
var fs$WriteStream = fs.WriteStream
if (fs$WriteStream) {
WriteStream.prototype = Object.create(fs$WriteStream.prototype)
WriteStream.prototype.open = WriteStream$open
}
Object.defineProperty(fs, 'ReadStream', {
get: function () {
return ReadStream
},
set: function (val) {
ReadStream = val
},
enumerable: true,
configurable: true
})
Object.defineProperty(fs, 'WriteStream', {
get: function () {
return WriteStream
},
set: function (val) {
WriteStream = val
},
enumerable: true,
configurable: true
})
// legacy names
var FileReadStream = ReadStream
Object.defineProperty(fs, 'FileReadStream', {
get: function () {
return FileReadStream
},
set: function (val) {
FileReadStream = val
},
enumerable: true,
configurable: true
})
var FileWriteStream = WriteStream
Object.defineProperty(fs, 'FileWriteStream', {
get: function () {
return FileWriteStream
},
set: function (val) {
FileWriteStream = val
},
enumerable: true,
configurable: true
})
function ReadStream (path, options) {
if (this instanceof ReadStream)
return fs$ReadStream.apply(this, arguments), this
else
return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
}
function ReadStream$open () {
var that = this
open(that.path, that.flags, that.mode, function (err, fd) {
if (err) {
if (that.autoClose)
that.destroy()
that.emit('error', err)
} else {
that.fd = fd
that.emit('open', fd)
that.read()
}
})
}
function WriteStream (path, options) {
if (this instanceof WriteStream)
return fs$WriteStream.apply(this, arguments), this
else
return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
}
function WriteStream$open () {
var that = this
open(that.path, that.flags, that.mode, function (err, fd) {
if (err) {
that.destroy()
that.emit('error', err)
} else {
that.fd = fd
that.emit('open', fd)
}
})
}
function createReadStream (path, options) {
return new fs.ReadStream(path, options)
}
function createWriteStream (path, options) {
return new fs.WriteStream(path, options)
}
var fs$open = fs.open
fs.open = open
function open (path, flags, mode, cb) {
if (typeof mode === 'function')
cb = mode, mode = null
return go$open(path, flags, mode, cb)
function go$open (path, flags, mode, cb, startTime) {
return fs$open(path, flags, mode, function (err, fd) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
return fs
}
function enqueue (elem) {
debug('ENQUEUE', elem[0].name, elem[1])
fs[gracefulQueue].push(elem)
retry()
}
// keep track of the timeout between retry() calls
var retryTimer
// reset the startTime and lastTime to now
// this resets the start of the 60 second overall timeout as well as the
// delay between attempts so that we'll retry these jobs sooner
function resetQueue () {
var now = Date.now()
for (var i = 0; i < fs[gracefulQueue].length; ++i) {
// entries that are only a length of 2 are from an older version, don't
// bother modifying those since they'll be retried anyway.
if (fs[gracefulQueue][i].length > 2) {
fs[gracefulQueue][i][3] = now // startTime
fs[gracefulQueue][i][4] = now // lastTime
}
}
// call retry to make sure we're actively processing the queue
retry()
}
function retry () {
// clear the timer and remove it to help prevent unintended concurrency
clearTimeout(retryTimer)
retryTimer = undefined
if (fs[gracefulQueue].length === 0)
return
var elem = fs[gracefulQueue].shift()
var fn = elem[0]
var args = elem[1]
// these items may be unset if they were added by an older graceful-fs
var err = elem[2]
var startTime = elem[3]
var lastTime = elem[4]
// if we don't have a startTime we have no way of knowing if we've waited
// long enough, so go ahead and retry this item now
if (startTime === undefined) {
debug('RETRY', fn.name, args)
fn.apply(null, args)
} else if (Date.now() - startTime >= 60000) {
// it's been more than 60 seconds total, bail now
debug('TIMEOUT', fn.name, args)
var cb = args.pop()
if (typeof cb === 'function')
cb.call(null, err)
} else {
// the amount of time between the last attempt and right now
var sinceAttempt = Date.now() - lastTime
// the amount of time between when we first tried, and when we last tried
// rounded up to at least 1
var sinceStart = Math.max(lastTime - startTime, 1)
// backoff. wait longer than the total time we've been retrying, but only
// up to a maximum of 100ms
var desiredDelay = Math.min(sinceStart * 1.2, 100)
// it's been long enough since the last retry, do it again
if (sinceAttempt >= desiredDelay) {
debug('RETRY', fn.name, args)
fn.apply(null, args.concat([startTime]))
} else {
// if we can't do this job yet, push it to the end of the queue
// and let the next iteration check again
fs[gracefulQueue].push(elem)
}
}
// schedule our next run if one isn't already scheduled
if (retryTimer === undefined) {
retryTimer = setTimeout(retry, 0)
}
}
/***/ }),
/***/ 73836:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var Stream = __nccwpck_require__(92413).Stream
module.exports = legacy
function legacy (fs) {
return {
ReadStream: ReadStream,
WriteStream: WriteStream
}
function ReadStream (path, options) {
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
Stream.call(this);
var self = this;
this.path = path;
this.fd = null;
this.readable = true;
this.paused = false;
this.flags = 'r';
this.mode = 438; /*=0666*/
this.bufferSize = 64 * 1024;
options = options || {};
// Mixin options into this
var keys = Object.keys(options);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.encoding) this.setEncoding(this.encoding);
if (this.start !== undefined) {
if ('number' !== typeof this.start) {
throw TypeError('start must be a Number');
}
if (this.end === undefined) {
this.end = Infinity;
} else if ('number' !== typeof this.end) {
throw TypeError('end must be a Number');
}
if (this.start > this.end) {
throw new Error('start must be <= end');
}
this.pos = this.start;
}
if (this.fd !== null) {
process.nextTick(function() {
self._read();
});
return;
}
fs.open(this.path, this.flags, this.mode, function (err, fd) {
if (err) {
self.emit('error', err);
self.readable = false;
return;
}
self.fd = fd;
self.emit('open', fd);
self._read();
})
}
function WriteStream (path, options) {
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
Stream.call(this);
this.path = path;
this.fd = null;
this.writable = true;
this.flags = 'w';
this.encoding = 'binary';
this.mode = 438; /*=0666*/
this.bytesWritten = 0;
options = options || {};
// Mixin options into this
var keys = Object.keys(options);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.start !== undefined) {
if ('number' !== typeof this.start) {
throw TypeError('start must be a Number');
}
if (this.start < 0) {
throw new Error('start must be >= zero');
}
this.pos = this.start;
}
this.busy = false;
this._queue = [];
if (this.fd === null) {
this._open = fs.open;
this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
this.flush();
}
}
}
/***/ }),
/***/ 35027:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var constants = __nccwpck_require__(27619)
var origCwd = process.cwd
var cwd = null
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process)
return cwd
}
try {
process.cwd()
} catch (er) {}
// This check is needed until node.js 12 is required
if (typeof process.chdir === 'function') {
var chdir = process.chdir
process.chdir = function (d) {
cwd = null
chdir.call(process, d)
}
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)
}
module.exports = patch
function patch (fs) {
// (re-)implement some things that are known busted or missing.
// lchmod, broken prior to 0.6.2
// back-port the fix here.
if (constants.hasOwnProperty('O_SYMLINK') &&
process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
patchLchmod(fs)
}
// lutimes implementation, or no-op
if (!fs.lutimes) {
patchLutimes(fs)
}
// https://github.com/isaacs/node-graceful-fs/issues/4
// Chown should not fail on einval or eperm if non-root.
// It should not fail on enosys ever, as this just indicates
// that a fs doesn't support the intended operation.
fs.chown = chownFix(fs.chown)
fs.fchown = chownFix(fs.fchown)
fs.lchown = chownFix(fs.lchown)
fs.chmod = chmodFix(fs.chmod)
fs.fchmod = chmodFix(fs.fchmod)
fs.lchmod = chmodFix(fs.lchmod)
fs.chownSync = chownFixSync(fs.chownSync)
fs.fchownSync = chownFixSync(fs.fchownSync)
fs.lchownSync = chownFixSync(fs.lchownSync)
fs.chmodSync = chmodFixSync(fs.chmodSync)
fs.fchmodSync = chmodFixSync(fs.fchmodSync)
fs.lchmodSync = chmodFixSync(fs.lchmodSync)
fs.stat = statFix(fs.stat)
fs.fstat = statFix(fs.fstat)
fs.lstat = statFix(fs.lstat)
fs.statSync = statFixSync(fs.statSync)
fs.fstatSync = statFixSync(fs.fstatSync)
fs.lstatSync = statFixSync(fs.lstatSync)
// if lchmod/lchown do not exist, then make them no-ops
if (!fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
if (cb) process.nextTick(cb)
}
fs.lchmodSync = function () {}
}
if (!fs.lchown) {
fs.lchown = function (path, uid, gid, cb) {
if (cb) process.nextTick(cb)
}
fs.lchownSync = function () {}
}
// on Windows, A/V software can lock the directory, causing this
// to fail with an EACCES or EPERM if the directory contains newly
// created files. Try again on failure, for up to 60 seconds.
// Set the timeout this long because some Windows Anti-Virus, such as Parity
// bit9, may lock files for up to a minute, causing npm package install
// failures. Also, take care to yield the scheduler. Windows scheduling gives
// CPU to a busy looping process, which can cause the program causing the lock
// contention to be starved of CPU by node, so the contention doesn't resolve.
if (platform === "win32") {
fs.rename = (function (fs$rename) { return function (from, to, cb) {
var start = Date.now()
var backoff = 0;
fs$rename(from, to, function CB (er) {
if (er
&& (er.code === "EACCES" || er.code === "EPERM")
&& Date.now() - start < 60000) {
setTimeout(function() {
fs.stat(to, function (stater, st) {
if (stater && stater.code === "ENOENT")
fs$rename(from, to, CB);
else
cb(er)
})
}, backoff)
if (backoff < 100)
backoff += 10;
return;
}
if (cb) cb(er)
})
}})(fs.rename)
}
// if read() returns EAGAIN, then just try it again.
fs.read = (function (fs$read) {
function read (fd, buffer, offset, length, position, callback_) {
var callback
if (callback_ && typeof callback_ === 'function') {
var eagCounter = 0
callback = function (er, _, __) {
if (er && er.code === 'EAGAIN' && eagCounter < 10) {
eagCounter ++
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
}
callback_.apply(this, arguments)
}
}
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
}
// This ensures `util.promisify` works as it does for native `fs.read`.
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)
return read
})(fs.read)
fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
var eagCounter = 0
while (true) {
try {
return fs$readSync.call(fs, fd, buffer, offset, length, position)
} catch (er) {
if (er.code === 'EAGAIN' && eagCounter < 10) {
eagCounter ++
continue
}
throw er
}
}
}})(fs.readSync)
function patchLchmod (fs) {
fs.lchmod = function (path, mode, callback) {
fs.open( path
, constants.O_WRONLY | constants.O_SYMLINK
, mode
, function (err, fd) {
if (err) {
if (callback) callback(err)
return
}
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function (err) {
fs.close(fd, function(err2) {
if (callback) callback(err || err2)
})
})
})
}
fs.lchmodSync = function (path, mode) {
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
var threw = true
var ret
try {
ret = fs.fchmodSync(fd, mode)
threw = false
} finally {
if (threw) {
try {
fs.closeSync(fd)
} catch (er) {}
} else {
fs.closeSync(fd)
}
}
return ret
}
}
function patchLutimes (fs) {
if (constants.hasOwnProperty("O_SYMLINK")) {
fs.lutimes = function (path, at, mt, cb) {
fs.open(path, constants.O_SYMLINK, function (er, fd) {
if (er) {
if (cb) cb(er)
return
}
fs.futimes(fd, at, mt, function (er) {
fs.close(fd, function (er2) {
if (cb) cb(er || er2)
})
})
})
}
fs.lutimesSync = function (path, at, mt) {
var fd = fs.openSync(path, constants.O_SYMLINK)
var ret
var threw = true
try {
ret = fs.futimesSync(fd, at, mt)
threw = false
} finally {
if (threw) {
try {
fs.closeSync(fd)
} catch (er) {}
} else {
fs.closeSync(fd)
}
}
return ret
}
} else {
fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
fs.lutimesSync = function () {}
}
}
function chmodFix (orig) {
if (!orig) return orig
return function (target, mode, cb) {
return orig.call(fs, target, mode, function (er) {
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
})
}
}
function chmodFixSync (orig) {
if (!orig) return orig
return function (target, mode) {
try {
return orig.call(fs, target, mode)
} catch (er) {
if (!chownErOk(er)) throw er
}
}
}
function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
return orig.call(fs, target, uid, gid, function (er) {
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
})
}
}
function chownFixSync (orig) {
if (!orig) return orig
return function (target, uid, gid) {
try {
return orig.call(fs, target, uid, gid)
} catch (er) {
if (!chownErOk(er)) throw er
}
}
}
function statFix (orig) {
if (!orig) return orig
// Older versions of Node erroneously returned signed integers for
// uid + gid.
return function (target, options, cb) {
if (typeof options === 'function') {
cb = options
options = null
}
function callback (er, stats) {
if (stats) {
if (stats.uid < 0) stats.uid += 0x100000000
if (stats.gid < 0) stats.gid += 0x100000000
}
if (cb) cb.apply(this, arguments)
}
return options ? orig.call(fs, target, options, callback)
: orig.call(fs, target, callback)
}
}
function statFixSync (orig) {
if (!orig) return orig
// Older versions of Node erroneously returned signed integers for
// uid + gid.
return function (target, options) {
var stats = options ? orig.call(fs, target, options)
: orig.call(fs, target)
if (stats) {
if (stats.uid < 0) stats.uid += 0x100000000
if (stats.gid < 0) stats.gid += 0x100000000
}
return stats;
}
}
// ENOSYS means that the fs doesn't support the op. Just ignore
// that, because it doesn't matter.
//
// if there's no getuid, or if getuid() is something other
// than 0, and the error is EINVAL or EPERM, then just ignore
// it.
//
// This specific case is a silent failure in cp, install, tar,
// and most other unix tools that manage permissions.
//
// When running as root, or if other types of errors are
// encountered, then it's strict.
function chownErOk (er) {
if (!er)
return true
if (er.code === "ENOSYS")
return true
var nonroot = !process.getuid || process.getuid() !== 0
if (nonroot) {
if (er.code === "EINVAL" || er.code === "EPERM")
return true
}
return false
}
}
/***/ }),
/***/ 79203:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var fs = __nccwpck_require__(35747),
tls = __nccwpck_require__(4016),
zlib = __nccwpck_require__(78761),
Socket = __nccwpck_require__(11631).Socket,
EventEmitter = __nccwpck_require__(28614).EventEmitter,
inherits = __nccwpck_require__(31669).inherits,
inspect = __nccwpck_require__(31669).inspect;
var Parser = __nccwpck_require__(69330);
var XRegExp = __nccwpck_require__(56155)/* .XRegExp */ .d;
var REX_TIMEVAL = XRegExp.cache('^(?<year>\\d{4})(?<month>\\d{2})(?<date>\\d{2})(?<hour>\\d{2})(?<minute>\\d{2})(?<second>\\d+)(?:.\\d+)?$'),
RE_PASV = /([\d]+),([\d]+),([\d]+),([\d]+),([-\d]+),([-\d]+)/,
RE_EOL = /\r?\n/g,
RE_WD = /"(.+)"(?: |$)/,
RE_SYST = /^([^ ]+)(?: |$)/;
var /*TYPE = {
SYNTAX: 0,
INFO: 1,
SOCKETS: 2,
AUTH: 3,
UNSPEC: 4,
FILESYS: 5
},*/
RETVAL = {
PRELIM: 1,
OK: 2,
WAITING: 3,
ERR_TEMP: 4,
ERR_PERM: 5
},
/*ERRORS = {
421: 'Service not available, closing control connection',
425: 'Can\'t open data connection',
426: 'Connection closed; transfer aborted',
450: 'Requested file action not taken / File unavailable (e.g., file busy)',
451: 'Requested action aborted: local error in processing',
452: 'Requested action not taken / Insufficient storage space in system',
500: 'Syntax error / Command unrecognized',
501: 'Syntax error in parameters or arguments',
502: 'Command not implemented',
503: 'Bad sequence of commands',
504: 'Command not implemented for that parameter',
530: 'Not logged in',
532: 'Need account for storing files',
550: 'Requested action not taken / File unavailable (e.g., file not found, no access)',
551: 'Requested action aborted: page type unknown',
552: 'Requested file action aborted / Exceeded storage allocation (for current directory or dataset)',
553: 'Requested action not taken / File name not allowed'
},*/
bytesNOOP = new Buffer('NOOP\r\n');
var FTP = module.exports = function() {
if (!(this instanceof FTP))
return new FTP();
this._socket = undefined;
this._pasvSock = undefined;
this._feat = undefined;
this._curReq = undefined;
this._queue = [];
this._secstate = undefined;
this._debug = undefined;
this._keepalive = undefined;
this._ending = false;
this._parser = undefined;
this.options = {
host: undefined,
port: undefined,
user: undefined,
password: undefined,
secure: false,
secureOptions: undefined,
connTimeout: undefined,
pasvTimeout: undefined,
aliveTimeout: undefined
};
this.connected = false;
};
inherits(FTP, EventEmitter);
FTP.prototype.connect = function(options) {
var self = this;
if (typeof options !== 'object')
options = {};
this.connected = false;
this.options.host = options.host || 'localhost';
this.options.port = options.port || 21;
this.options.user = options.user || 'anonymous';
this.options.password = options.password || 'anonymous@';
this.options.secure = options.secure || false;
this.options.secureOptions = options.secureOptions;
this.options.connTimeout = options.connTimeout || 10000;
this.options.pasvTimeout = options.pasvTimeout || 10000;
this.options.aliveTimeout = options.keepalive || 10000;
if (typeof options.debug === 'function')
this._debug = options.debug;
var secureOptions,
debug = this._debug,
socket = new Socket();
socket.setTimeout(0);
socket.setKeepAlive(true);
this._parser = new Parser({ debug: debug });
this._parser.on('response', function(code, text) {
var retval = code / 100 >> 0;
if (retval === RETVAL.ERR_TEMP || retval === RETVAL.ERR_PERM) {
if (self._curReq)
self._curReq.cb(makeError(code, text), undefined, code);
else
self.emit('error', makeError(code, text));
} else if (self._curReq)
self._curReq.cb(undefined, text, code);
// a hack to signal we're waiting for a PASV data connection to complete
// first before executing any more queued requests ...
//
// also: don't forget our current request if we're expecting another
// terminating response ....
if (self._curReq && retval !== RETVAL.PRELIM) {
self._curReq = undefined;
self._send();
}
noopreq.cb();
});
if (this.options.secure) {
secureOptions = {};
secureOptions.host = this.options.host;
for (var k in this.options.secureOptions)
secureOptions[k] = this.options.secureOptions[k];
secureOptions.socket = socket;
this.options.secureOptions = secureOptions;
}
if (this.options.secure === 'implicit')
this._socket = tls.connect(secureOptions, onconnect);
else {
socket.once('connect', onconnect);
this._socket = socket;
}
var noopreq = {
cmd: 'NOOP',
cb: function() {
clearTimeout(self._keepalive);
self._keepalive = setTimeout(donoop, self.options.aliveTimeout);
}
};
function donoop() {
if (!self._socket || !self._socket.writable)
clearTimeout(self._keepalive);
else if (!self._curReq && self._queue.length === 0) {
self._curReq = noopreq;
debug&&debug('[connection] > NOOP');
self._socket.write(bytesNOOP);
} else
noopreq.cb();
}
function onconnect() {
clearTimeout(timer);
clearTimeout(self._keepalive);
self.connected = true;
self._socket = socket; // re-assign for implicit secure connections
var cmd;
if (self._secstate) {
if (self._secstate === 'upgraded-tls' && self.options.secure === true) {
cmd = 'PBSZ';
self._send('PBSZ 0', reentry, true);
} else {
cmd = 'USER';
self._send('USER ' + self.options.user, reentry, true);
}
} else {
self._curReq = {
cmd: '',
cb: reentry
};
}
function reentry(err, text, code) {
if (err && (!cmd || cmd === 'USER' || cmd === 'PASS' || cmd === 'TYPE')) {
self.emit('error', err);
return self._socket && self._socket.end();
}
if ((cmd === 'AUTH TLS' && code !== 234 && self.options.secure !== true)
|| (cmd === 'AUTH SSL' && code !== 334)
|| (cmd === 'PBSZ' && code !== 200)
|| (cmd === 'PROT' && code !== 200)) {
self.emit('error', makeError(code, 'Unable to secure connection(s)'));
return self._socket && self._socket.end();
}
if (!cmd) {
// sometimes the initial greeting can contain useful information
// about authorized use, other limits, etc.
self.emit('greeting', text);
if (self.options.secure && self.options.secure !== 'implicit') {
cmd = 'AUTH TLS';
self._send(cmd, reentry, true);
} else {
cmd = 'USER';
self._send('USER ' + self.options.user, reentry, true);
}
} else if (cmd === 'USER') {
if (code !== 230) {
// password required
if (!self.options.password) {
self.emit('error', makeError(code, 'Password required'));
return self._socket && self._socket.end();
}
cmd = 'PASS';
self._send('PASS ' + self.options.password, reentry, true);
} else {
// no password required
cmd = 'PASS';
reentry(undefined, text, code);
}
} else if (cmd === 'PASS') {
cmd = 'FEAT';
self._send(cmd, reentry, true);
} else if (cmd === 'FEAT') {
if (!err)
self._feat = Parser.parseFeat(text);
cmd = 'TYPE';
self._send('TYPE I', reentry, true);
} else if (cmd === 'TYPE')
self.emit('ready');
else if (cmd === 'PBSZ') {
cmd = 'PROT';
self._send('PROT P', reentry, true);
} else if (cmd === 'PROT') {
cmd = 'USER';
self._send('USER ' + self.options.user, reentry, true);
} else if (cmd.substr(0, 4) === 'AUTH') {
if (cmd === 'AUTH TLS' && code !== 234) {
cmd = 'AUTH SSL';
return self._send(cmd, reentry, true);
} else if (cmd === 'AUTH TLS')
self._secstate = 'upgraded-tls';
else if (cmd === 'AUTH SSL')
self._secstate = 'upgraded-ssl';
socket.removeAllListeners('data');
socket.removeAllListeners('error');
socket._decoder = null;
self._curReq = null; // prevent queue from being processed during
// TLS/SSL negotiation
secureOptions.socket = self._socket;
secureOptions.session = undefined;
socket = tls.connect(secureOptions, onconnect);
socket.setEncoding('binary');
socket.on('data', ondata);
socket.once('end', onend);
socket.on('error', onerror);
}
}
}
socket.on('data', ondata);
function ondata(chunk) {
debug&&debug('[connection] < ' + inspect(chunk.toString('binary')));
if (self._parser)
self._parser.write(chunk);
}
socket.on('error', onerror);
function onerror(err) {
clearTimeout(timer);
clearTimeout(self._keepalive);
self.emit('error', err);
}
socket.once('end', onend);
function onend() {
ondone();
self.emit('end');
}
socket.once('close', function(had_err) {
ondone();
self.emit('close', had_err);
});
var hasReset = false;
function ondone() {
if (!hasReset) {
hasReset = true;
clearTimeout(timer);
self._reset();
}
}
var timer = setTimeout(function() {
self.emit('error', new Error('Timeout while connecting to server'));
self._socket && self._socket.destroy();
self._reset();
}, this.options.connTimeout);
this._socket.connect(this.options.port, this.options.host);
};
FTP.prototype.end = function() {
if (this._queue.length)
this._ending = true;
else
this._reset();
};
FTP.prototype.destroy = function() {
this._reset();
};
// "Standard" (RFC 959) commands
FTP.prototype.ascii = function(cb) {
return this._send('TYPE A', cb);
};
FTP.prototype.binary = function(cb) {
return this._send('TYPE I', cb);
};
FTP.prototype.abort = function(immediate, cb) {
if (typeof immediate === 'function') {
cb = immediate;
immediate = true;
}
if (immediate)
this._send('ABOR', cb, true);
else
this._send('ABOR', cb);
};
FTP.prototype.cwd = function(path, cb, promote) {
this._send('CWD ' + path, function(err, text, code) {
if (err)
return cb(err);
var m = RE_WD.exec(text);
cb(undefined, m ? m[1] : undefined);
}, promote);
};
FTP.prototype.delete = function(path, cb) {
this._send('DELE ' + path, cb);
};
FTP.prototype.site = function(cmd, cb) {
this._send('SITE ' + cmd, cb);
};
FTP.prototype.status = function(cb) {
this._send('STAT', cb);
};
FTP.prototype.rename = function(from, to, cb) {
var self = this;
this._send('RNFR ' + from, function(err) {
if (err)
return cb(err);
self._send('RNTO ' + to, cb, true);
});
};
FTP.prototype.logout = function(cb) {
this._send('QUIT', cb);
};
FTP.prototype.listSafe = function(path, zcomp, cb) {
if (typeof path === 'string') {
var self = this;
// store current path
this.pwd(function(err, origpath) {
if (err) return cb(err);
// change to destination path
self.cwd(path, function(err) {
if (err) return cb(err);
// get dir listing
self.list(zcomp || false, function(err, list) {
// change back to original path
if (err) return self.cwd(origpath, cb);
self.cwd(origpath, function(err) {
if (err) return cb(err);
cb(err, list);
});
});
});
});
} else
this.list(path, zcomp, cb);
};
FTP.prototype.list = function(path, zcomp, cb) {
var self = this, cmd;
if (typeof path === 'function') {
// list(function() {})
cb = path;
path = undefined;
cmd = 'LIST';
zcomp = false;
} else if (typeof path === 'boolean') {
// list(true, function() {})
cb = zcomp;
zcomp = path;
path = undefined;
cmd = 'LIST';
} else if (typeof zcomp === 'function') {
// list('/foo', function() {})
cb = zcomp;
cmd = 'LIST ' + path;
zcomp = false;
} else
cmd = 'LIST ' + path;
this._pasv(function(err, sock) {
if (err)
return cb(err);
if (self._queue[0] && self._queue[0].cmd === 'ABOR') {
sock.destroy();
return cb();
}
var sockerr, done = false, replies = 0, entries, buffer = '', source = sock;
if (zcomp) {
source = zlib.createInflate();
sock.pipe(source);
}
source.on('data', function(chunk) { buffer += chunk.toString('binary'); });
source.once('error', function(err) {
if (!sock.aborting)
sockerr = err;
});
source.once('end', ondone);
source.once('close', ondone);
function ondone() {
done = true;
final();
}
function final() {
if (done && replies === 2) {
replies = 3;
if (sockerr)
return cb(new Error('Unexpected data connection error: ' + sockerr));
if (sock.aborting)
return cb();
// process received data
entries = buffer.split(RE_EOL);
entries.pop(); // ending EOL
var parsed = [];
for (var i = 0, len = entries.length; i < len; ++i) {
var parsedVal = Parser.parseListEntry(entries[i]);
if (parsedVal !== null)
parsed.push(parsedVal);
}
if (zcomp) {
self._send('MODE S', function() {
cb(undefined, parsed);
}, true);
} else
cb(undefined, parsed);
}
}
if (zcomp) {
self._send('MODE Z', function(err, text, code) {
if (err) {
sock.destroy();
return cb(makeError(code, 'Compression not supported'));
}
sendList();
}, true);
} else
sendList();
function sendList() {
// this callback will be executed multiple times, the first is when server
// replies with 150 and then a final reply to indicate whether the
// transfer was actually a success or not
self._send(cmd, function(err, text, code) {
if (err) {
sock.destroy();
if (zcomp) {
self._send('MODE S', function() {
cb(err);
}, true);
} else
cb(err);
return;
}
// some servers may not open a data connection for empty directories
if (++replies === 1 && code === 226) {
replies = 2;
sock.destroy();
final();
} else if (replies === 2)
final();
}, true);
}
});
};
FTP.prototype.get = function(path, zcomp, cb) {
var self = this;
if (typeof zcomp === 'function') {
cb = zcomp;
zcomp = false;
}
this._pasv(function(err, sock) {
if (err)
return cb(err);
if (self._queue[0] && self._queue[0].cmd === 'ABOR') {
sock.destroy();
return cb();
}
// modify behavior of socket events so that we can emit 'error' once for
// either a TCP-level error OR an FTP-level error response that we get when
// the socket is closed (e.g. the server ran out of space).
var sockerr, started = false, lastreply = false, done = false,
source = sock;
if (zcomp) {
source = zlib.createInflate();
sock.pipe(source);
sock._emit = sock.emit;
sock.emit = function(ev, arg1) {
if (ev === 'error') {
if (!sockerr)
sockerr = arg1;
return;
}
sock._emit.apply(sock, Array.prototype.slice.call(arguments));
};
}
source._emit = source.emit;
source.emit = function(ev, arg1) {
if (ev === 'error') {
if (!sockerr)
sockerr = arg1;
return;
} else if (ev === 'end' || ev === 'close') {
if (!done) {
done = true;
ondone();
}
return;
}
source._emit.apply(source, Array.prototype.slice.call(arguments));
};
function ondone() {
if (done && lastreply) {
self._send('MODE S', function() {
source._emit('end');
source._emit('close');
}, true);
}
}
sock.pause();
if (zcomp) {
self._send('MODE Z', function(err, text, code) {
if (err) {
sock.destroy();
return cb(makeError(code, 'Compression not supported'));
}
sendRetr();
}, true);
} else
sendRetr();
function sendRetr() {
// this callback will be executed multiple times, the first is when server
// replies with 150, then a final reply after the data connection closes
// to indicate whether the transfer was actually a success or not
self._send('RETR ' + path, function(err, text, code) {
if (sockerr || err) {
sock.destroy();
if (!started) {
if (zcomp) {
self._send('MODE S', function() {
cb(sockerr || err);
}, true);
} else
cb(sockerr || err);
} else {
source._emit('error', sockerr || err);
source._emit('close', true);
}
return;
}
// server returns 125 when data connection is already open; we treat it
// just like a 150
if (code === 150 || code === 125) {
started = true;
cb(undefined, source);
sock.resume();
} else {
lastreply = true;
ondone();
}
}, true);
}
});
};
FTP.prototype.put = function(input, path, zcomp, cb) {
this._store('STOR ' + path, input, zcomp, cb);
};
FTP.prototype.append = function(input, path, zcomp, cb) {
this._store('APPE ' + path, input, zcomp, cb);
};
FTP.prototype.pwd = function(cb) { // PWD is optional
var self = this;
this._send('PWD', function(err, text, code) {
if (code === 502) {
return self.cwd('.', function(cwderr, cwd) {
if (cwderr)
return cb(cwderr);
if (cwd === undefined)
cb(err);
else
cb(undefined, cwd);
}, true);
} else if (err)
return cb(err);
cb(undefined, RE_WD.exec(text)[1]);
});
};
FTP.prototype.cdup = function(cb) { // CDUP is optional
var self = this;
this._send('CDUP', function(err, text, code) {
if (code === 502)
self.cwd('..', cb, true);
else
cb(err);
});
};
FTP.prototype.mkdir = function(path, recursive, cb) { // MKD is optional
if (typeof recursive === 'function') {
cb = recursive;
recursive = false;
}
if (!recursive)
this._send('MKD ' + path, cb);
else {
var self = this, owd, abs, dirs, dirslen, i = -1, searching = true;
abs = (path[0] === '/');
var nextDir = function() {
if (++i === dirslen) {
// return to original working directory
return self._send('CWD ' + owd, cb, true);
}
if (searching) {
self._send('CWD ' + dirs[i], function(err, text, code) {
if (code === 550) {
searching = false;
--i;
} else if (err) {
// return to original working directory
return self._send('CWD ' + owd, function() {
cb(err);
}, true);
}
nextDir();
}, true);
} else {
self._send('MKD ' + dirs[i], function(err, text, code) {
if (err) {
// return to original working directory
return self._send('CWD ' + owd, function() {
cb(err);
}, true);
}
self._send('CWD ' + dirs[i], nextDir, true);
}, true);
}
};
this.pwd(function(err, cwd) {
if (err)
return cb(err);
owd = cwd;
if (abs)
path = path.substr(1);
if (path[path.length - 1] === '/')
path = path.substring(0, path.length - 1);
dirs = path.split('/');
dirslen = dirs.length;
if (abs)
self._send('CWD /', function(err) {
if (err)
return cb(err);
nextDir();
}, true);
else
nextDir();
});
}
};
FTP.prototype.rmdir = function(path, recursive, cb) { // RMD is optional
if (typeof recursive === 'function') {
cb = recursive;
recursive = false;
}
if (!recursive) {
return this._send('RMD ' + path, cb);
}
var self = this;
this.list(path, function(err, list) {
if (err) return cb(err);
var idx = 0;
// this function will be called once per listing entry
var deleteNextEntry;
deleteNextEntry = function(err) {
if (err) return cb(err);
if (idx >= list.length) {
if (list[0] && list[0].name === path) {
return cb(null);
} else {
return self.rmdir(path, cb);
}
}
var entry = list[idx++];
// get the path to the file
var subpath = null;
if (entry.name[0] === '/') {
// this will be the case when you call deleteRecursively() and pass
// the path to a plain file
subpath = entry.name;
} else {
if (path[path.length - 1] == '/') {
subpath = path + entry.name;
} else {
subpath = path + '/' + entry.name
}
}
// delete the entry (recursively) according to its type
if (entry.type === 'd') {
if (entry.name === "." || entry.name === "..") {
return deleteNextEntry();
}
self.rmdir(subpath, true, deleteNextEntry);
} else {
self.delete(subpath, deleteNextEntry);
}
}
deleteNextEntry();
});
};
FTP.prototype.system = function(cb) { // SYST is optional
this._send('SYST', function(err, text) {
if (err)
return cb(err);
cb(undefined, RE_SYST.exec(text)[1]);
});
};
// "Extended" (RFC 3659) commands
FTP.prototype.size = function(path, cb) {
var self = this;
this._send('SIZE ' + path, function(err, text, code) {
if (code === 502) {
// Note: this may cause a problem as list() is _appended_ to the queue
return self.list(path, function(err, list) {
if (err)
return cb(err);
if (list.length === 1)
cb(undefined, list[0].size);
else {
// path could have been a directory and we got a listing of its
// contents, but here we echo the behavior of the real SIZE and
// return 'File not found' for directories
cb(new Error('File not found'));
}
}, true);
} else if (err)
return cb(err);
cb(undefined, parseInt(text, 10));
});
};
FTP.prototype.lastMod = function(path, cb) {
var self = this;
this._send('MDTM ' + path, function(err, text, code) {
if (code === 502) {
return self.list(path, function(err, list) {
if (err)
return cb(err);
if (list.length === 1)
cb(undefined, list[0].date);
else
cb(new Error('File not found'));
}, true);
} else if (err)
return cb(err);
var val = XRegExp.exec(text, REX_TIMEVAL), ret;
if (!val)
return cb(new Error('Invalid date/time format from server'));
ret = new Date(val.year + '-' + val.month + '-' + val.date + 'T' + val.hour
+ ':' + val.minute + ':' + val.second);
cb(undefined, ret);
});
};
FTP.prototype.restart = function(offset, cb) {
this._send('REST ' + offset, cb);
};
// Private/Internal methods
FTP.prototype._pasv = function(cb) {
var self = this, first = true, ip, port;
this._send('PASV', function reentry(err, text) {
if (err)
return cb(err);
self._curReq = undefined;
if (first) {
var m = RE_PASV.exec(text);
if (!m)
return cb(new Error('Unable to parse PASV server response'));
ip = m[1];
ip += '.';
ip += m[2];
ip += '.';
ip += m[3];
ip += '.';
ip += m[4];
port = (parseInt(m[5], 10) * 256) + parseInt(m[6], 10);
first = false;
}
self._pasvConnect(ip, port, function(err, sock) {
if (err) {
// try the IP of the control connection if the server was somehow
// misconfigured and gave for example a LAN IP instead of WAN IP over
// the Internet
if (self._socket && ip !== self._socket.remoteAddress) {
ip = self._socket.remoteAddress;
return reentry();
}
// automatically abort PASV mode
self._send('ABOR', function() {
cb(err);
self._send();
}, true);
return;
}
cb(undefined, sock);
self._send();
});
});
};
FTP.prototype._pasvConnect = function(ip, port, cb) {
var self = this,
socket = new Socket(),
sockerr,
timedOut = false,
timer = setTimeout(function() {
timedOut = true;
socket.destroy();
cb(new Error('Timed out while making data connection'));
}, this.options.pasvTimeout);
socket.setTimeout(0);
socket.once('connect', function() {
self._debug&&self._debug('[connection] PASV socket connected');
if (self.options.secure === true) {
self.options.secureOptions.socket = socket;
self.options.secureOptions.session = self._socket.getSession();
//socket.removeAllListeners('error');
socket = tls.connect(self.options.secureOptions);
//socket.once('error', onerror);
socket.setTimeout(0);
}
clearTimeout(timer);
self._pasvSocket = socket;
cb(undefined, socket);
});
socket.once('error', onerror);
function onerror(err) {
sockerr = err;
}
socket.once('end', function() {
clearTimeout(timer);
});
socket.once('close', function(had_err) {
clearTimeout(timer);
if (!self._pasvSocket && !timedOut) {
var errmsg = 'Unable to make data connection';
if (sockerr) {
errmsg += '( ' + sockerr + ')';
sockerr = undefined;
}
cb(new Error(errmsg));
}
self._pasvSocket = undefined;
});
socket.connect(port, ip);
};
FTP.prototype._store = function(cmd, input, zcomp, cb) {
var isBuffer = Buffer.isBuffer(input);
if (!isBuffer && input.pause !== undefined)
input.pause();
if (typeof zcomp === 'function') {
cb = zcomp;
zcomp = false;
}
var self = this;
this._pasv(function(err, sock) {
if (err)
return cb(err);
if (self._queue[0] && self._queue[0].cmd === 'ABOR') {
sock.destroy();
return cb();
}
var sockerr, dest = sock;
sock.once('error', function(err) {
sockerr = err;
});
if (zcomp) {
self._send('MODE Z', function(err, text, code) {
if (err) {
sock.destroy();
return cb(makeError(code, 'Compression not supported'));
}
// draft-preston-ftpext-deflate-04 says min of 8 should be supported
dest = zlib.createDeflate({ level: 8 });
dest.pipe(sock);
sendStore();
}, true);
} else
sendStore();
function sendStore() {
// this callback will be executed multiple times, the first is when server
// replies with 150, then a final reply after the data connection closes
// to indicate whether the transfer was actually a success or not
self._send(cmd, function(err, text, code) {
if (sockerr || err) {
if (zcomp) {
self._send('MODE S', function() {
cb(sockerr || err);
}, true);
} else
cb(sockerr || err);
return;
}
if (code === 150 || code === 125) {
if (isBuffer)
dest.end(input);
else if (typeof input === 'string') {
// check if input is a file path or just string data to store
fs.stat(input, function(err, stats) {
if (err)
dest.end(input);
else
fs.createReadStream(input).pipe(dest);
});
} else {
input.pipe(dest);
input.resume();
}
} else {
if (zcomp)
self._send('MODE S', cb, true);
else
cb();
}
}, true);
}
});
};
FTP.prototype._send = function(cmd, cb, promote) {
clearTimeout(this._keepalive);
if (cmd !== undefined) {
if (promote)
this._queue.unshift({ cmd: cmd, cb: cb });
else
this._queue.push({ cmd: cmd, cb: cb });
}
var queueLen = this._queue.length;
if (!this._curReq && queueLen && this._socket && this._socket.readable) {
this._curReq = this._queue.shift();
if (this._curReq.cmd === 'ABOR' && this._pasvSocket)
this._pasvSocket.aborting = true;
this._debug&&this._debug('[connection] > ' + inspect(this._curReq.cmd));
this._socket.write(this._curReq.cmd + '\r\n');
} else if (!this._curReq && !queueLen && this._ending)
this._reset();
};
FTP.prototype._reset = function() {
if (this._pasvSock && this._pasvSock.writable)
this._pasvSock.end();
if (this._socket && this._socket.writable)
this._socket.end();
this._socket = undefined;
this._pasvSock = undefined;
this._feat = undefined;
this._curReq = undefined;
this._secstate = undefined;
clearTimeout(this._keepalive);
this._keepalive = undefined;
this._queue = [];
this._ending = false;
this._parser = undefined;
this.options.host = this.options.port = this.options.user
= this.options.password = this.options.secure
= this.options.connTimeout = this.options.pasvTimeout
= this.options.keepalive = this._debug = undefined;
this.connected = false;
};
// Utility functions
function makeError(code, text) {
var err = new Error(text);
err.code = code;
return err;
}
/***/ }),
/***/ 69330:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var WritableStream = __nccwpck_require__(92413).Writable
|| __nccwpck_require__(51642).Writable,
inherits = __nccwpck_require__(31669).inherits,
inspect = __nccwpck_require__(31669).inspect;
var XRegExp = __nccwpck_require__(56155)/* .XRegExp */ .d;
var REX_LISTUNIX = XRegExp.cache('^(?<type>[\\-ld])(?<permission>([\\-r][\\-w][\\-xstT]){3})(?<acl>(\\+))?\\s+(?<inodes>\\d+)\\s+(?<owner>\\S+)\\s+(?<group>\\S+)\\s+(?<size>\\d+)\\s+(?<timestamp>((?<month1>\\w{3})\\s+(?<date1>\\d{1,2})\\s+(?<hour>\\d{1,2}):(?<minute>\\d{2}))|((?<month2>\\w{3})\\s+(?<date2>\\d{1,2})\\s+(?<year>\\d{4})))\\s+(?<name>.+)$'),
REX_LISTMSDOS = XRegExp.cache('^(?<month>\\d{2})(?:\\-|\\/)(?<date>\\d{2})(?:\\-|\\/)(?<year>\\d{2,4})\\s+(?<hour>\\d{2}):(?<minute>\\d{2})\\s{0,1}(?<ampm>[AaMmPp]{1,2})\\s+(?:(?<size>\\d+)|(?<isdir>\\<DIR\\>))\\s+(?<name>.+)$'),
RE_ENTRY_TOTAL = /^total/,
RE_RES_END = /(?:^|\r?\n)(\d{3}) [^\r\n]*\r?\n/,
RE_EOL = /\r?\n/g,
RE_DASH = /\-/g;
var MONTHS = {
jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6,
jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12
};
function Parser(options) {
if (!(this instanceof Parser))
return new Parser(options);
WritableStream.call(this);
this._buffer = '';
this._debug = options.debug;
}
inherits(Parser, WritableStream);
Parser.prototype._write = function(chunk, encoding, cb) {
var m, code, reRmLeadCode, rest = '', debug = this._debug;
this._buffer += chunk.toString('binary');
while (m = RE_RES_END.exec(this._buffer)) {
// support multiple terminating responses in the buffer
rest = this._buffer.substring(m.index + m[0].length);
if (rest.length)
this._buffer = this._buffer.substring(0, m.index + m[0].length);
debug&&debug('[parser] < ' + inspect(this._buffer));
// we have a terminating response line
code = parseInt(m[1], 10);
// RFC 959 does not require each line in a multi-line response to begin
// with '<code>-', but many servers will do this.
//
// remove this leading '<code>-' (or '<code> ' from last line) from each
// line in the response ...
reRmLeadCode = '(^|\\r?\\n)';
reRmLeadCode += m[1];
reRmLeadCode += '(?: |\\-)';
reRmLeadCode = new RegExp(reRmLeadCode, 'g');
var text = this._buffer.replace(reRmLeadCode, '$1').trim();
this._buffer = rest;
debug&&debug('[parser] Response: code=' + code + ', buffer=' + inspect(text));
this.emit('response', code, text);
}
cb();
};
Parser.parseFeat = function(text) {
var lines = text.split(RE_EOL);
lines.shift(); // initial response line
lines.pop(); // final response line
for (var i = 0, len = lines.length; i < len; ++i)
lines[i] = lines[i].trim();
// just return the raw lines for now
return lines;
};
Parser.parseListEntry = function(line) {
var ret,
info,
month, day, year,
hour, mins;
if (ret = XRegExp.exec(line, REX_LISTUNIX)) {
info = {
type: ret.type,
name: undefined,
target: undefined,
sticky: false,
rights: {
user: ret.permission.substr(0, 3).replace(RE_DASH, ''),
group: ret.permission.substr(3, 3).replace(RE_DASH, ''),
other: ret.permission.substr(6, 3).replace(RE_DASH, '')
},
acl: (ret.acl === '+'),
owner: ret.owner,
group: ret.group,
size: parseInt(ret.size, 10),
date: undefined
};
// check for sticky bit
var lastbit = info.rights.other.slice(-1);
if (lastbit === 't') {
info.rights.other = info.rights.other.slice(0, -1) + 'x';
info.sticky = true;
} else if (lastbit === 'T') {
info.rights.other = info.rights.other.slice(0, -1);
info.sticky = true;
}
if (ret.month1 !== undefined) {
month = parseInt(MONTHS[ret.month1.toLowerCase()], 10);
day = parseInt(ret.date1, 10);
year = (new Date()).getFullYear();
hour = parseInt(ret.hour, 10);
mins = parseInt(ret.minute, 10);
if (month < 10)
month = '0' + month;
if (day < 10)
day = '0' + day;
if (hour < 10)
hour = '0' + hour;
if (mins < 10)
mins = '0' + mins;
info.date = new Date(year + '-'
+ month + '-'
+ day + 'T'
+ hour + ':'
+ mins);
// If the date is in the past but no more than 6 months old, year
// isn't displayed and doesn't have to be the current year.
//
// If the date is in the future (less than an hour from now), year
// isn't displayed and doesn't have to be the current year.
// That second case is much more rare than the first and less annoying.
// It's impossible to fix without knowing about the server's timezone,
// so we just don't do anything about it.
//
// If we're here with a time that is more than 28 hours into the
// future (1 hour + maximum timezone offset which is 27 hours),
// there is a problem -- we should be in the second conditional block
if (info.date.getTime() - Date.now() > 100800000) {
info.date = new Date((year - 1) + '-'
+ month + '-'
+ day + 'T'
+ hour + ':'
+ mins);
}
// If we're here with a time that is more than 6 months old, there's
// a problem as well.
// Maybe local & remote servers aren't on the same timezone (with remote
// ahead of local)
// For instance, remote is in 2014 while local is still in 2013. In
// this case, a date like 01/01/13 02:23 could be detected instead of
// 01/01/14 02:23
// Our trigger point will be 3600*24*31*6 (since we already use 31
// as an upper bound, no need to add the 27 hours timezone offset)
if (Date.now() - info.date.getTime() > 16070400000) {
info.date = new Date((year + 1) + '-'
+ month + '-'
+ day + 'T'
+ hour + ':'
+ mins);
}
} else if (ret.month2 !== undefined) {
month = parseInt(MONTHS[ret.month2.toLowerCase()], 10);
day = parseInt(ret.date2, 10);
year = parseInt(ret.year, 10);
if (month < 10)
month = '0' + month;
if (day < 10)
day = '0' + day;
info.date = new Date(year + '-' + month + '-' + day);
}
if (ret.type === 'l') {
var pos = ret.name.indexOf(' -> ');
info.name = ret.name.substring(0, pos);
info.target = ret.name.substring(pos+4);
} else
info.name = ret.name;
ret = info;
} else if (ret = XRegExp.exec(line, REX_LISTMSDOS)) {
info = {
name: ret.name,
type: (ret.isdir ? 'd' : '-'),
size: (ret.isdir ? 0 : parseInt(ret.size, 10)),
date: undefined,
};
month = parseInt(ret.month, 10),
day = parseInt(ret.date, 10),
year = parseInt(ret.year, 10),
hour = parseInt(ret.hour, 10),
mins = parseInt(ret.minute, 10);
if (year < 70)
year += 2000;
else
year += 1900;
if (ret.ampm[0].toLowerCase() === 'p' && hour < 12)
hour += 12;
else if (ret.ampm[0].toLowerCase() === 'a' && hour === 12)
hour = 0;
info.date = new Date(year, month - 1, day, hour, mins);
ret = info;
} else if (!RE_ENTRY_TOTAL.test(line))
ret = line; // could not parse, so at least give the end user a chance to
// look at the raw listing themselves
return ret;
};
module.exports = Parser;
/***/ }),
/***/ 15525:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const stream_1 = __nccwpck_require__(92413);
const crypto_1 = __nccwpck_require__(76417);
const data_uri_to_buffer_1 = __importDefault(__nccwpck_require__(92371));
const notmodified_1 = __importDefault(__nccwpck_require__(70186));
const debug = debug_1.default('get-uri:data');
class DataReadable extends stream_1.Readable {
constructor(hash, buf) {
super();
this.push(buf);
this.push(null);
this.hash = hash;
}
}
/**
* Returns a Readable stream from a "data:" URI.
*/
function get({ href: uri }, { cache }) {
return __awaiter(this, void 0, void 0, function* () {
// need to create a SHA1 hash of the URI string, for cacheability checks
// in future `getUri()` calls with the same data URI passed in.
const shasum = crypto_1.createHash('sha1');
shasum.update(uri);
const hash = shasum.digest('hex');
debug('generated SHA1 hash for "data:" URI: %o', hash);
// check if the cache is the same "data:" URI that was previously passed in.
if (cache && cache.hash === hash) {
debug('got matching cache SHA1 hash: %o', hash);
throw new notmodified_1.default();
}
else {
debug('creating Readable stream from "data:" URI buffer');
const buf = data_uri_to_buffer_1.default(uri);
return new DataReadable(hash, buf);
}
});
}
exports.default = get;
//# sourceMappingURL=data.js.map
/***/ }),
/***/ 50878:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const fs_1 = __nccwpck_require__(35747);
const fs_extra_1 = __nccwpck_require__(5630);
const file_uri_to_path_1 = __importDefault(__nccwpck_require__(91683));
const notfound_1 = __importDefault(__nccwpck_require__(25767));
const notmodified_1 = __importDefault(__nccwpck_require__(70186));
const debug = debug_1.default('get-uri:file');
/**
* Returns a `fs.ReadStream` instance from a "file:" URI.
*/
function get({ href: uri }, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { cache, flags = 'r', mode = 438 // =0666
} = opts;
try {
// Convert URI → Path
const filepath = file_uri_to_path_1.default(uri);
debug('Normalized pathname: %o', filepath);
// `open()` first to get a file descriptor and ensure that the file
// exists.
const fd = yield fs_extra_1.open(filepath, flags, mode);
// Now `fstat()` to check the `mtime` and store the stat object for
// the cache.
const stat = yield fs_extra_1.fstat(fd);
// if a `cache` was provided, check if the file has not been modified
if (cache && cache.stat && stat && isNotModified(cache.stat, stat)) {
throw new notmodified_1.default();
}
// `fs.ReadStream` takes care of calling `fs.close()` on the
// fd after it's done reading
// @ts-ignore - `@types/node` doesn't allow `null` as file path :/
const rs = fs_1.createReadStream(null, Object.assign(Object.assign({ autoClose: true }, opts), { fd }));
rs.stat = stat;
return rs;
}
catch (err) {
if (err.code === 'ENOENT') {
throw new notfound_1.default();
}
throw err;
}
});
}
exports.default = get;
// returns `true` if the `mtime` of the 2 stat objects are equal
function isNotModified(prev, curr) {
return +prev.mtime === +curr.mtime;
}
//# sourceMappingURL=file.js.map
/***/ }),
/***/ 49886:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const once_1 = __importDefault(__nccwpck_require__(81040));
const ftp_1 = __importDefault(__nccwpck_require__(79203));
const path_1 = __nccwpck_require__(85622);
const debug_1 = __importDefault(__nccwpck_require__(38237));
const notfound_1 = __importDefault(__nccwpck_require__(25767));
const notmodified_1 = __importDefault(__nccwpck_require__(70186));
const debug = debug_1.default('get-uri:ftp');
/**
* Returns a Readable stream from an "ftp:" URI.
*/
function get(parsed, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { cache } = opts;
const filepath = parsed.pathname;
let lastModified = null;
if (!filepath) {
throw new TypeError('No "pathname"!');
}
const client = new ftp_1.default();
client.once('greeting', (greeting) => {
debug('FTP greeting: %o', greeting);
});
function onend() {
// close the FTP client socket connection
client.end();
}
try {
opts.host = parsed.hostname || parsed.host || 'localhost';
opts.port = parseInt(parsed.port || '0', 10) || 21;
opts.debug = debug;
if (parsed.auth) {
const [user, password] = parsed.auth.split(':');
opts.user = user;
opts.password = password;
}
// await cb(_ => client.connect(opts, _));
const readyPromise = once_1.default(client, 'ready');
client.connect(opts);
yield readyPromise;
// first we have to figure out the Last Modified date.
// try the MDTM command first, which is an optional extension command.
try {
lastModified = yield new Promise((resolve, reject) => {
client.lastMod(filepath, (err, res) => {
return err ? reject(err) : resolve(res);
});
});
}
catch (err) {
// handle the "file not found" error code
if (err.code === 550) {
throw new notfound_1.default();
}
}
if (!lastModified) {
// Try to get the last modified date via the LIST command (uses
// more bandwidth, but is more compatible with older FTP servers
const list = yield new Promise((resolve, reject) => {
client.list(path_1.dirname(filepath), (err, res) => {
return err ? reject(err) : resolve(res);
});
});
// attempt to find the "entry" with a matching "name"
const name = path_1.basename(filepath);
const entry = list.find(e => e.name === name);
if (entry) {
lastModified = entry.date;
}
}
if (lastModified) {
if (isNotModified()) {
throw new notmodified_1.default();
}
}
else {
throw new notfound_1.default();
}
// XXX: a small timeout seemed necessary otherwise FTP servers
// were returning empty sockets for the file occasionally
// setTimeout(client.get.bind(client, filepath, onfile), 10);
const rs = (yield new Promise((resolve, reject) => {
client.get(filepath, (err, res) => {
return err ? reject(err) : resolve(res);
});
}));
rs.once('end', onend);
rs.lastModified = lastModified;
return rs;
}
catch (err) {
client.destroy();
throw err;
}
// called when `lastModified` is set, and a "cache" stream was provided
function isNotModified() {
if (cache && cache.lastModified && lastModified) {
return +cache.lastModified === +lastModified;
}
return false;
}
});
}
exports.default = get;
//# sourceMappingURL=ftp.js.map
/***/ }),
/***/ 8558:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const http_1 = __nccwpck_require__(98605);
/**
* Error subclass to use when an HTTP application error has occurred.
*/
class HTTPError extends Error {
constructor(statusCode, message = http_1.STATUS_CODES[statusCode]) {
super(message);
Object.setPrototypeOf(this, new.target.prototype);
this.statusCode = statusCode;
this.code = `E${String(message)
.toUpperCase()
.replace(/\s+/g, '')}`;
}
}
exports.default = HTTPError;
//# sourceMappingURL=http-error.js.map
/***/ }),
/***/ 33582:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const http_1 = __importDefault(__nccwpck_require__(98605));
const https_1 = __importDefault(__nccwpck_require__(57211));
const once_1 = __importDefault(__nccwpck_require__(81040));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const url_1 = __nccwpck_require__(78835);
const http_error_1 = __importDefault(__nccwpck_require__(8558));
const notfound_1 = __importDefault(__nccwpck_require__(25767));
const notmodified_1 = __importDefault(__nccwpck_require__(70186));
const debug = debug_1.default('get-uri:http');
/**
* Returns a Readable stream from an "http:" URI.
*/
function get(parsed, opts) {
return __awaiter(this, void 0, void 0, function* () {
debug('GET %o', parsed.href);
const cache = getCache(parsed, opts.cache);
// first check the previous Expires and/or Cache-Control headers
// of a previous response if a `cache` was provided
if (cache && isFresh(cache) && typeof cache.statusCode === 'number') {
// check for a 3xx "redirect" status code on the previous cache
const type = (cache.statusCode / 100) | 0;
if (type === 3 && cache.headers.location) {
debug('cached redirect');
throw new Error('TODO: implement cached redirects!');
}
// otherwise we assume that it's the destination endpoint,
// since there's nowhere else to redirect to
throw new notmodified_1.default();
}
// 5 redirects allowed by default
const maxRedirects = typeof opts.maxRedirects === 'number' ? opts.maxRedirects : 5;
debug('allowing %o max redirects', maxRedirects);
let mod;
if (opts.http) {
// the `https` module passed in from the "http.js" file
mod = opts.http;
debug('using secure `https` core module');
}
else {
mod = http_1.default;
debug('using `http` core module');
}
const options = Object.assign(Object.assign({}, opts), parsed);
// add "cache validation" headers if a `cache` was provided
if (cache) {
if (!options.headers) {
options.headers = {};
}
const lastModified = cache.headers['last-modified'];
if (lastModified) {
options.headers['If-Modified-Since'] = lastModified;
debug('added "If-Modified-Since" request header: %o', lastModified);
}
const etag = cache.headers.etag;
if (etag) {
options.headers['If-None-Match'] = etag;
debug('added "If-None-Match" request header: %o', etag);
}
}
const req = mod.get(options);
const res = yield once_1.default(req, 'response');
const code = res.statusCode || 0;
// assign a Date to this response for the "Cache-Control" delta calculation
res.date = Date.now();
res.parsed = parsed;
debug('got %o response status code', code);
// any 2xx response is a "success" code
let type = (code / 100) | 0;
// check for a 3xx "redirect" status code
let location = res.headers.location;
if (type === 3 && location) {
if (!opts.redirects)
opts.redirects = [];
let redirects = opts.redirects;
if (redirects.length < maxRedirects) {
debug('got a "redirect" status code with Location: %o', location);
// flush this response - we're not going to use it
res.resume();
// hang on to this Response object for the "redirects" Array
redirects.push(res);
let newUri = url_1.resolve(parsed.href, location);
debug('resolved redirect URL: %o', newUri);
let left = maxRedirects - redirects.length;
debug('%o more redirects allowed after this one', left);
// check if redirecting to a different protocol
let parsedUrl = url_1.parse(newUri);
if (parsedUrl.protocol !== parsed.protocol) {
opts.http = parsedUrl.protocol === 'https:' ? https_1.default : undefined;
}
return get(parsedUrl, opts);
}
}
// if we didn't get a 2xx "success" status code, then create an Error object
if (type !== 2) {
res.resume();
if (code === 304) {
throw new notmodified_1.default();
}
else if (code === 404) {
throw new notfound_1.default();
}
// other HTTP-level error
throw new http_error_1.default(code);
}
if (opts.redirects) {
// store a reference to the "redirects" Array on the Response object so that
// they can be inspected during a subsequent call to GET the same URI
res.redirects = opts.redirects;
}
return res;
});
}
exports.default = get;
/**
* Returns `true` if the provided cache's "freshness" is valid. That is, either
* the Cache-Control header or Expires header values are still within the allowed
* time period.
*
* @return {Boolean}
* @api private
*/
function isFresh(cache) {
let fresh = false;
let expires = parseInt(cache.headers.expires || '', 10);
const cacheControl = cache.headers['cache-control'];
if (cacheControl) {
// for Cache-Control rules, see: http://www.mnot.net/cache_docs/#CACHE-CONTROL
debug('Cache-Control: %o', cacheControl);
const parts = cacheControl.split(/,\s*?\b/);
for (let i = 0; i < parts.length; i++) {
const part = parts[i];
const subparts = part.split('=');
const name = subparts[0];
switch (name) {
case 'max-age':
expires = (cache.date || 0) + parseInt(subparts[1], 10) * 1000;
fresh = Date.now() < expires;
if (fresh) {
debug('cache is "fresh" due to previous %o Cache-Control param', part);
}
return fresh;
case 'must-revalidate':
// XXX: what we supposed to do here?
break;
case 'no-cache':
case 'no-store':
debug('cache is "stale" due to explicit %o Cache-Control param', name);
return false;
default:
// ignore unknown cache value
break;
}
}
}
else if (expires) {
// for Expires rules, see: http://www.mnot.net/cache_docs/#EXPIRES
debug('Expires: %o', expires);
fresh = Date.now() < expires;
if (fresh) {
debug('cache is "fresh" due to previous Expires response header');
}
return fresh;
}
return false;
}
/**
* Attempts to return a previous Response object from a previous GET call to the
* same URI.
*
* @api private
*/
function getCache(parsed, cache) {
if (cache) {
if (cache.parsed && cache.parsed.href === parsed.href) {
return cache;
}
if (cache.redirects) {
for (let i = 0; i < cache.redirects.length; i++) {
const c = getCache(parsed, cache.redirects[i]);
if (c) {
return c;
}
}
}
}
return null;
}
//# sourceMappingURL=http.js.map
/***/ }),
/***/ 15227:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const https_1 = __importDefault(__nccwpck_require__(57211));
const http_1 = __importDefault(__nccwpck_require__(33582));
/**
* Returns a Readable stream from an "https:" URI.
*/
function get(parsed, opts) {
return http_1.default(parsed, Object.assign(Object.assign({}, opts), { http: https_1.default }));
}
exports.default = get;
//# sourceMappingURL=https.js.map
/***/ }),
/***/ 11792:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const debug_1 = __importDefault(__nccwpck_require__(38237));
const url_1 = __nccwpck_require__(78835);
// Built-in protocols
const data_1 = __importDefault(__nccwpck_require__(15525));
const file_1 = __importDefault(__nccwpck_require__(50878));
const ftp_1 = __importDefault(__nccwpck_require__(49886));
const http_1 = __importDefault(__nccwpck_require__(33582));
const https_1 = __importDefault(__nccwpck_require__(15227));
const debug = debug_1.default('get-uri');
function getUri(uri, opts, fn) {
const p = new Promise((resolve, reject) => {
debug('getUri(%o)', uri);
if (typeof opts === 'function') {
fn = opts;
opts = undefined;
}
if (!uri) {
reject(new TypeError('Must pass in a URI to "get"'));
return;
}
const parsed = url_1.parse(uri);
// Strip trailing `:`
const protocol = (parsed.protocol || '').replace(/:$/, '');
if (!protocol) {
reject(new TypeError(`URI does not contain a protocol: ${uri}`));
return;
}
const getter = getUri.protocols[protocol];
if (typeof getter !== 'function') {
throw new TypeError(`Unsupported protocol "${protocol}" specified in URI: ${uri}`);
}
resolve(getter(parsed, opts || {}));
});
if (typeof fn === 'function') {
p.then(rtn => fn(null, rtn), err => fn(err));
}
else {
return p;
}
}
(function (getUri) {
getUri.protocols = {
data: data_1.default,
file: file_1.default,
ftp: ftp_1.default,
http: http_1.default,
https: https_1.default
};
})(getUri || (getUri = {}));
module.exports = getUri;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 25767:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Error subclass to use when the source does not exist at the specified endpoint.
*
* @param {String} message optional "message" property to set
* @api protected
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
class NotFoundError extends Error {
constructor(message) {
super(message || 'File does not exist at the specified endpoint');
this.code = 'ENOTFOUND';
Object.setPrototypeOf(this, new.target.prototype);
}
}
exports.default = NotFoundError;
//# sourceMappingURL=notfound.js.map
/***/ }),
/***/ 70186:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* Error subclass to use when the source has not been modified.
*
* @param {String} message optional "message" property to set
* @api protected
*/
class NotModifiedError extends Error {
constructor(message) {
super(message ||
'Source has not been modified since the provied "cache", re-use previous results');
this.code = 'ENOTMODIFIED';
Object.setPrototypeOf(this, new.target.prototype);
}
}
exports.default = NotModifiedError;
//# sourceMappingURL=notmodified.js.map
/***/ }),
/***/ 31621:
/***/ ((module) => {
"use strict";
module.exports = (flag, argv = process.argv) => {
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
const position = argv.indexOf(prefix + flag);
const terminatorPosition = argv.indexOf('--');
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
};
/***/ }),
/***/ 95193:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
/*!
* http-errors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module dependencies.
* @private
*/
var deprecate = __nccwpck_require__(18883)('http-errors')
var setPrototypeOf = __nccwpck_require__(40414)
var statuses = __nccwpck_require__(57415)
var inherits = __nccwpck_require__(44124)
var toIdentifier = __nccwpck_require__(46399)
/**
* Module exports.
* @public
*/
module.exports = createError
module.exports.HttpError = createHttpErrorConstructor()
module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError)
// Populate exports for all constructors
populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError)
/**
* Get the code class of a status code.
* @private
*/
function codeClass (status) {
return Number(String(status).charAt(0) + '00')
}
/**
* Create a new HTTP Error.
*
* @returns {Error}
* @public
*/
function createError () {
// so much arity going on ~_~
var err
var msg
var status = 500
var props = {}
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i]
if (arg instanceof Error) {
err = arg
status = err.status || err.statusCode || status
continue
}
switch (typeof arg) {
case 'string':
msg = arg
break
case 'number':
status = arg
if (i !== 0) {
deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)')
}
break
case 'object':
props = arg
break
}
}
if (typeof status === 'number' && (status < 400 || status >= 600)) {
deprecate('non-error status code; use only 4xx or 5xx status codes')
}
if (typeof status !== 'number' ||
(!statuses[status] && (status < 400 || status >= 600))) {
status = 500
}
// constructor
var HttpError = createError[status] || createError[codeClass(status)]
if (!err) {
// create error
err = HttpError
? new HttpError(msg)
: new Error(msg || statuses[status])
Error.captureStackTrace(err, createError)
}
if (!HttpError || !(err instanceof HttpError) || err.status !== status) {
// add properties to generic error
err.expose = status < 500
err.status = err.statusCode = status
}
for (var key in props) {
if (key !== 'status' && key !== 'statusCode') {
err[key] = props[key]
}
}
return err
}
/**
* Create HTTP error abstract base class.
* @private
*/
function createHttpErrorConstructor () {
function HttpError () {
throw new TypeError('cannot construct abstract class')
}
inherits(HttpError, Error)
return HttpError
}
/**
* Create a constructor for a client error.
* @private
*/
function createClientErrorConstructor (HttpError, name, code) {
var className = toClassName(name)
function ClientError (message) {
// create the error object
var msg = message != null ? message : statuses[code]
var err = new Error(msg)
// capture a stack trace to the construction point
Error.captureStackTrace(err, ClientError)
// adjust the [[Prototype]]
setPrototypeOf(err, ClientError.prototype)
// redefine the error message
Object.defineProperty(err, 'message', {
enumerable: true,
configurable: true,
value: msg,
writable: true
})
// redefine the error name
Object.defineProperty(err, 'name', {
enumerable: false,
configurable: true,
value: className,
writable: true
})
return err
}
inherits(ClientError, HttpError)
nameFunc(ClientError, className)
ClientError.prototype.status = code
ClientError.prototype.statusCode = code
ClientError.prototype.expose = true
return ClientError
}
/**
* Create function to test is a value is a HttpError.
* @private
*/
function createIsHttpErrorFunction (HttpError) {
return function isHttpError (val) {
if (!val || typeof val !== 'object') {
return false
}
if (val instanceof HttpError) {
return true
}
return val instanceof Error &&
typeof val.expose === 'boolean' &&
typeof val.statusCode === 'number' && val.status === val.statusCode
}
}
/**
* Create a constructor for a server error.
* @private
*/
function createServerErrorConstructor (HttpError, name, code) {
var className = toClassName(name)
function ServerError (message) {
// create the error object
var msg = message != null ? message : statuses[code]
var err = new Error(msg)
// capture a stack trace to the construction point
Error.captureStackTrace(err, ServerError)
// adjust the [[Prototype]]
setPrototypeOf(err, ServerError.prototype)
// redefine the error message
Object.defineProperty(err, 'message', {
enumerable: true,
configurable: true,
value: msg,
writable: true
})
// redefine the error name
Object.defineProperty(err, 'name', {
enumerable: false,
configurable: true,
value: className,
writable: true
})
return err
}
inherits(ServerError, HttpError)
nameFunc(ServerError, className)
ServerError.prototype.status = code
ServerError.prototype.statusCode = code
ServerError.prototype.expose = false
return ServerError
}
/**
* Set the name of a function, if possible.
* @private
*/
function nameFunc (func, name) {
var desc = Object.getOwnPropertyDescriptor(func, 'name')
if (desc && desc.configurable) {
desc.value = name
Object.defineProperty(func, 'name', desc)
}
}
/**
* Populate the exports object with constructors for every error class.
* @private
*/
function populateConstructorExports (exports, codes, HttpError) {
codes.forEach(function forEachCode (code) {
var CodeError
var name = toIdentifier(statuses[code])
switch (codeClass(code)) {
case 400:
CodeError = createClientErrorConstructor(HttpError, name, code)
break
case 500:
CodeError = createServerErrorConstructor(HttpError, name, code)
break
}
if (CodeError) {
// export the constructor
exports[code] = CodeError
exports[name] = CodeError
}
})
// backwards-compatibility
exports["I'mateapot"] = deprecate.function(exports.ImATeapot,
'"I\'mateapot"; use "ImATeapot" instead')
}
/**
* Get a class name from a name identifier.
* @private
*/
function toClassName (name) {
return name.substr(-5) !== 'Error'
? name + 'Error'
: name
}
/***/ }),
/***/ 77492:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const net_1 = __importDefault(__nccwpck_require__(11631));
const tls_1 = __importDefault(__nccwpck_require__(4016));
const url_1 = __importDefault(__nccwpck_require__(78835));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const once_1 = __importDefault(__nccwpck_require__(81040));
const agent_base_1 = __nccwpck_require__(49690);
const debug = debug_1.default('http-proxy-agent');
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
/**
* The `HttpProxyAgent` implements an HTTP Agent subclass that connects
* to the specified "HTTP proxy server" in order to proxy HTTP requests.
*
* @api public
*/
class HttpProxyAgent extends agent_base_1.Agent {
constructor(_opts) {
let opts;
if (typeof _opts === 'string') {
opts = url_1.default.parse(_opts);
}
else {
opts = _opts;
}
if (!opts) {
throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
}
debug('Creating new HttpProxyAgent instance: %o', opts);
super(opts);
const proxy = Object.assign({}, opts);
// If `true`, then connect to the proxy server over TLS.
// Defaults to `false`.
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
// Prefer `hostname` over `host`, and set the `port` if needed.
proxy.host = proxy.hostname || proxy.host;
if (typeof proxy.port === 'string') {
proxy.port = parseInt(proxy.port, 10);
}
if (!proxy.port && proxy.host) {
proxy.port = this.secureProxy ? 443 : 80;
}
if (proxy.host && proxy.path) {
// If both a `host` and `path` are specified then it's most likely
// the result of a `url.parse()` call... we need to remove the
// `path` portion so that `net.connect()` doesn't attempt to open
// that as a Unix socket file.
delete proxy.path;
delete proxy.pathname;
}
this.proxy = proxy;
}
/**
* Called when the node-core HTTP client library is creating a
* new HTTP request.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { proxy, secureProxy } = this;
const parsed = url_1.default.parse(req.path);
if (!parsed.protocol) {
parsed.protocol = 'http:';
}
if (!parsed.hostname) {
parsed.hostname = opts.hostname || opts.host || null;
}
if (parsed.port == null && typeof opts.port) {
parsed.port = String(opts.port);
}
if (parsed.port === '80') {
// if port is 80, then we can remove the port so that the
// ":80" portion is not on the produced URL
delete parsed.port;
}
// Change the `http.ClientRequest` instance's "path" field
// to the absolute path of the URL that will be requested.
req.path = url_1.default.format(parsed);
// Inject the `Proxy-Authorization` header if necessary.
if (proxy.auth) {
req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`);
}
// Create a socket connection to the proxy server.
let socket;
if (secureProxy) {
debug('Creating `tls.Socket`: %o', proxy);
socket = tls_1.default.connect(proxy);
}
else {
debug('Creating `net.Socket`: %o', proxy);
socket = net_1.default.connect(proxy);
}
// At this point, the http ClientRequest's internal `_header` field
// might have already been set. If this is the case then we'll need
// to re-generate the string since we just changed the `req.path`.
if (req._header) {
let first;
let endOfHeaders;
debug('Regenerating stored HTTP header string for request');
req._header = null;
req._implicitHeader();
if (req.output && req.output.length > 0) {
// Node < 12
debug('Patching connection write() output buffer with updated header');
first = req.output[0];
endOfHeaders = first.indexOf('\r\n\r\n') + 4;
req.output[0] = req._header + first.substring(endOfHeaders);
debug('Output buffer: %o', req.output);
}
else if (req.outputData && req.outputData.length > 0) {
// Node >= 12
debug('Patching connection write() output buffer with updated header');
first = req.outputData[0].data;
endOfHeaders = first.indexOf('\r\n\r\n') + 4;
req.outputData[0].data =
req._header + first.substring(endOfHeaders);
debug('Output buffer: %o', req.outputData[0].data);
}
}
// Wait for the socket's `connect` event, so that this `callback()`
// function throws instead of the `http` request machinery. This is
// important for i.e. `PacProxyAgent` which determines a failed proxy
// connection via the `callback()` function throwing.
yield once_1.default(socket, 'connect');
return socket;
});
}
}
exports.default = HttpProxyAgent;
//# sourceMappingURL=agent.js.map
/***/ }),
/***/ 23764:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const agent_1 = __importDefault(__nccwpck_require__(77492));
function createHttpProxyAgent(opts) {
return new agent_1.default(opts);
}
(function (createHttpProxyAgent) {
createHttpProxyAgent.HttpProxyAgent = agent_1.default;
createHttpProxyAgent.prototype = agent_1.default.prototype;
})(createHttpProxyAgent || (createHttpProxyAgent = {}));
module.exports = createHttpProxyAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 15098:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const net_1 = __importDefault(__nccwpck_require__(11631));
const tls_1 = __importDefault(__nccwpck_require__(4016));
const url_1 = __importDefault(__nccwpck_require__(78835));
const assert_1 = __importDefault(__nccwpck_require__(42357));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const agent_base_1 = __nccwpck_require__(49690);
const parse_proxy_response_1 = __importDefault(__nccwpck_require__(595));
const debug = debug_1.default('https-proxy-agent:agent');
/**
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
* the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
*
* Outgoing HTTP requests are first tunneled through the proxy server using the
* `CONNECT` HTTP request method to establish a connection to the proxy server,
* and then the proxy server connects to the destination target and issues the
* HTTP request from the proxy server.
*
* `https:` requests have their socket connection upgraded to TLS once
* the connection to the proxy server has been established.
*
* @api public
*/
class HttpsProxyAgent extends agent_base_1.Agent {
constructor(_opts) {
let opts;
if (typeof _opts === 'string') {
opts = url_1.default.parse(_opts);
}
else {
opts = _opts;
}
if (!opts) {
throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
}
debug('creating new HttpsProxyAgent instance: %o', opts);
super(opts);
const proxy = Object.assign({}, opts);
// If `true`, then connect to the proxy server over TLS.
// Defaults to `false`.
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
// Prefer `hostname` over `host`, and set the `port` if needed.
proxy.host = proxy.hostname || proxy.host;
if (typeof proxy.port === 'string') {
proxy.port = parseInt(proxy.port, 10);
}
if (!proxy.port && proxy.host) {
proxy.port = this.secureProxy ? 443 : 80;
}
// ALPN is supported by Node.js >= v5.
// attempt to negotiate http/1.1 for proxy servers that support http/2
if (this.secureProxy && !('ALPNProtocols' in proxy)) {
proxy.ALPNProtocols = ['http 1.1'];
}
if (proxy.host && proxy.path) {
// If both a `host` and `path` are specified then it's most likely
// the result of a `url.parse()` call... we need to remove the
// `path` portion so that `net.connect()` doesn't attempt to open
// that as a Unix socket file.
delete proxy.path;
delete proxy.pathname;
}
this.proxy = proxy;
}
/**
* Called when the node-core HTTP client library is creating a
* new HTTP request.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { proxy, secureProxy } = this;
// Create a socket connection to the proxy server.
let socket;
if (secureProxy) {
debug('Creating `tls.Socket`: %o', proxy);
socket = tls_1.default.connect(proxy);
}
else {
debug('Creating `net.Socket`: %o', proxy);
socket = net_1.default.connect(proxy);
}
const headers = Object.assign({}, proxy.headers);
const hostname = `${opts.host}:${opts.port}`;
let payload = `CONNECT ${hostname} HTTP/1.1\r\n`;
// Inject the `Proxy-Authorization` header if necessary.
if (proxy.auth) {
headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`;
}
// The `Host` header should only include the port
// number when it is not the default port.
let { host, port, secureEndpoint } = opts;
if (!isDefaultPort(port, secureEndpoint)) {
host += `:${port}`;
}
headers.Host = host;
headers.Connection = 'close';
for (const name of Object.keys(headers)) {
payload += `${name}: ${headers[name]}\r\n`;
}
const proxyResponsePromise = parse_proxy_response_1.default(socket);
socket.write(`${payload}\r\n`);
const { statusCode, buffered } = yield proxyResponsePromise;
if (statusCode === 200) {
req.once('socket', resume);
if (opts.secureEndpoint) {
const servername = opts.servername || opts.host;
if (!servername) {
throw new Error('Could not determine "servername"');
}
// The proxy is connecting to a TLS server, so upgrade
// this socket connection to a TLS connection.
debug('Upgrading socket connection to TLS');
return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
servername }));
}
return socket;
}
// Some other status code that's not 200... need to re-play the HTTP
// header "data" events onto the socket once the HTTP machinery is
// attached so that the node core `http` can parse and handle the
// error status code.
// Close the original socket, and a new "fake" socket is returned
// instead, so that the proxy doesn't get the HTTP request
// written to it (which may contain `Authorization` headers or other
// sensitive data).
//
// See: https://hackerone.com/reports/541502
socket.destroy();
const fakeSocket = new net_1.default.Socket();
fakeSocket.readable = true;
// Need to wait for the "socket" event to re-play the "data" events.
req.once('socket', (s) => {
debug('replaying proxy buffer for failed request');
assert_1.default(s.listenerCount('data') > 0);
// Replay the "buffered" Buffer onto the fake `socket`, since at
// this point the HTTP module machinery has been hooked up for
// the user.
s.push(buffered);
s.push(null);
});
return fakeSocket;
});
}
}
exports.default = HttpsProxyAgent;
function resume(socket) {
socket.resume();
}
function isDefaultPort(port, secure) {
return Boolean((!secure && port === 80) || (secure && port === 443));
}
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
function omit(obj, ...keys) {
const ret = {};
let key;
for (key in obj) {
if (!keys.includes(key)) {
ret[key] = obj[key];
}
}
return ret;
}
//# sourceMappingURL=agent.js.map
/***/ }),
/***/ 77219:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const agent_1 = __importDefault(__nccwpck_require__(15098));
function createHttpsProxyAgent(opts) {
return new agent_1.default(opts);
}
(function (createHttpsProxyAgent) {
createHttpsProxyAgent.HttpsProxyAgent = agent_1.default;
createHttpsProxyAgent.prototype = agent_1.default.prototype;
})(createHttpsProxyAgent || (createHttpsProxyAgent = {}));
module.exports = createHttpsProxyAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 595:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const debug = debug_1.default('https-proxy-agent:parse-proxy-response');
function parseProxyResponse(socket) {
return new Promise((resolve, reject) => {
// we need to buffer any HTTP traffic that happens with the proxy before we get
// the CONNECT response, so that if the response is anything other than an "200"
// response code, then we can re-play the "data" events on the socket once the
// HTTP parser is hooked up...
let buffersLength = 0;
const buffers = [];
function read() {
const b = socket.read();
if (b)
ondata(b);
else
socket.once('readable', read);
}
function cleanup() {
socket.removeListener('end', onend);
socket.removeListener('error', onerror);
socket.removeListener('close', onclose);
socket.removeListener('readable', read);
}
function onclose(err) {
debug('onclose had error %o', err);
}
function onend() {
debug('onend');
}
function onerror(err) {
cleanup();
debug('onerror %o', err);
reject(err);
}
function ondata(b) {
buffers.push(b);
buffersLength += b.length;
const buffered = Buffer.concat(buffers, buffersLength);
const endOfHeaders = buffered.indexOf('\r\n\r\n');
if (endOfHeaders === -1) {
// keep buffering
debug('have not received end of HTTP headers yet...');
read();
return;
}
const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n'));
const statusCode = +firstLine.split(' ')[1];
debug('got proxy server response: %o', firstLine);
resolve({
statusCode,
buffered
});
}
socket.on('error', onerror);
socket.on('close', onclose);
socket.on('end', onend);
read();
});
}
exports.default = parseProxyResponse;
//# sourceMappingURL=parse-proxy-response.js.map
/***/ }),
/***/ 39695:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(15118).Buffer;
// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
// To save memory and loading time, we read table files only when requested.
exports._dbcs = DBCSCodec;
var UNASSIGNED = -1,
GB18030_CODE = -2,
SEQ_START = -10,
NODE_START = -1000,
UNASSIGNED_NODE = new Array(0x100),
DEF_CHAR = -1;
for (var i = 0; i < 0x100; i++)
UNASSIGNED_NODE[i] = UNASSIGNED;
// Class DBCSCodec reads and initializes mapping tables.
function DBCSCodec(codecOptions, iconv) {
this.encodingName = codecOptions.encodingName;
if (!codecOptions)
throw new Error("DBCS codec is called without the data.")
if (!codecOptions.table)
throw new Error("Encoding '" + this.encodingName + "' has no data.");
// Load tables.
var mappingTable = codecOptions.table();
// Decode tables: MBCS -> Unicode.
// decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
// Trie root is decodeTables[0].
// Values: >= 0 -> unicode character code. can be > 0xFFFF
// == UNASSIGNED -> unknown/unassigned sequence.
// == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
// <= NODE_START -> index of the next node in our trie to process next byte.
// <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
this.decodeTables = [];
this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
// Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
this.decodeTableSeq = [];
// Actual mapping tables consist of chunks. Use them to fill up decode tables.
for (var i = 0; i < mappingTable.length; i++)
this._addDecodeChunk(mappingTable[i]);
this.defaultCharUnicode = iconv.defaultCharUnicode;
// Encode tables: Unicode -> DBCS.
// `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
// Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
// Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
// == UNASSIGNED -> no conversion found. Output a default char.
// <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
this.encodeTable = [];
// `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
// objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
// means end of sequence (needed when one sequence is a strict subsequence of another).
// Objects are kept separately from encodeTable to increase performance.
this.encodeTableSeq = [];
// Some chars can be decoded, but need not be encoded.
var skipEncodeChars = {};
if (codecOptions.encodeSkipVals)
for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
var val = codecOptions.encodeSkipVals[i];
if (typeof val === 'number')
skipEncodeChars[val] = true;
else
for (var j = val.from; j <= val.to; j++)
skipEncodeChars[j] = true;
}
// Use decode trie to recursively fill out encode tables.
this._fillEncodeTable(0, 0, skipEncodeChars);
// Add more encoding pairs when needed.
if (codecOptions.encodeAdd) {
for (var uChar in codecOptions.encodeAdd)
if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
}
this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
// Load & create GB18030 tables when needed.
if (typeof codecOptions.gb18030 === 'function') {
this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
// Add GB18030 decode tables.
var thirdByteNodeIdx = this.decodeTables.length;
var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);
var fourthByteNodeIdx = this.decodeTables.length;
var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);
for (var i = 0x81; i <= 0xFE; i++) {
var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];
var secondByteNode = this.decodeTables[secondByteNodeIdx];
for (var j = 0x30; j <= 0x39; j++)
secondByteNode[j] = NODE_START - thirdByteNodeIdx;
}
for (var i = 0x81; i <= 0xFE; i++)
thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
for (var i = 0x30; i <= 0x39; i++)
fourthByteNode[i] = GB18030_CODE
}
}
DBCSCodec.prototype.encoder = DBCSEncoder;
DBCSCodec.prototype.decoder = DBCSDecoder;
// Decoder helpers
DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
var bytes = [];
for (; addr > 0; addr >>= 8)
bytes.push(addr & 0xFF);
if (bytes.length == 0)
bytes.push(0);
var node = this.decodeTables[0];
for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
var val = node[bytes[i]];
if (val == UNASSIGNED) { // Create new node.
node[bytes[i]] = NODE_START - this.decodeTables.length;
this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
}
else if (val <= NODE_START) { // Existing node.
node = this.decodeTables[NODE_START - val];
}
else
throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
}
return node;
}
DBCSCodec.prototype._addDecodeChunk = function(chunk) {
// First element of chunk is the hex mbcs code where we start.
var curAddr = parseInt(chunk[0], 16);
// Choose the decoding node where we'll write our chars.
var writeTable = this._getDecodeTrieNode(curAddr);
curAddr = curAddr & 0xFF;
// Write all other elements of the chunk to the table.
for (var k = 1; k < chunk.length; k++) {
var part = chunk[k];
if (typeof part === "string") { // String, write as-is.
for (var l = 0; l < part.length;) {
var code = part.charCodeAt(l++);
if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
var codeTrail = part.charCodeAt(l++);
if (0xDC00 <= codeTrail && codeTrail < 0xE000)
writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
else
throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
}
else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
var len = 0xFFF - code + 2;
var seq = [];
for (var m = 0; m < len; m++)
seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
this.decodeTableSeq.push(seq);
}
else
writeTable[curAddr++] = code; // Basic char
}
}
else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
var charCode = writeTable[curAddr - 1] + 1;
for (var l = 0; l < part; l++)
writeTable[curAddr++] = charCode++;
}
else
throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
}
if (curAddr > 0xFF)
throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
}
// Encoder helpers
DBCSCodec.prototype._getEncodeBucket = function(uCode) {
var high = uCode >> 8; // This could be > 0xFF because of astral characters.
if (this.encodeTable[high] === undefined)
this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
return this.encodeTable[high];
}
DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
var bucket = this._getEncodeBucket(uCode);
var low = uCode & 0xFF;
if (bucket[low] <= SEQ_START)
this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
else if (bucket[low] == UNASSIGNED)
bucket[low] = dbcsCode;
}
DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
// Get the root of character tree according to first character of the sequence.
var uCode = seq[0];
var bucket = this._getEncodeBucket(uCode);
var low = uCode & 0xFF;
var node;
if (bucket[low] <= SEQ_START) {
// There's already a sequence with - use it.
node = this.encodeTableSeq[SEQ_START-bucket[low]];
}
else {
// There was no sequence object - allocate a new one.
node = {};
if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
bucket[low] = SEQ_START - this.encodeTableSeq.length;
this.encodeTableSeq.push(node);
}
// Traverse the character tree, allocating new nodes as needed.
for (var j = 1; j < seq.length-1; j++) {
var oldVal = node[uCode];
if (typeof oldVal === 'object')
node = oldVal;
else {
node = node[uCode] = {}
if (oldVal !== undefined)
node[DEF_CHAR] = oldVal
}
}
// Set the leaf to given dbcsCode.
uCode = seq[seq.length-1];
node[uCode] = dbcsCode;
}
DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
var node = this.decodeTables[nodeIdx];
for (var i = 0; i < 0x100; i++) {
var uCode = node[i];
var mbCode = prefix + i;
if (skipEncodeChars[mbCode])
continue;
if (uCode >= 0)
this._setEncodeChar(uCode, mbCode);
else if (uCode <= NODE_START)
this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);
else if (uCode <= SEQ_START)
this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
}
}
// == Encoder ==================================================================
function DBCSEncoder(options, codec) {
// Encoder state
this.leadSurrogate = -1;
this.seqObj = undefined;
// Static data
this.encodeTable = codec.encodeTable;
this.encodeTableSeq = codec.encodeTableSeq;
this.defaultCharSingleByte = codec.defCharSB;
this.gb18030 = codec.gb18030;
}
DBCSEncoder.prototype.write = function(str) {
var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),
leadSurrogate = this.leadSurrogate,
seqObj = this.seqObj, nextChar = -1,
i = 0, j = 0;
while (true) {
// 0. Get next character.
if (nextChar === -1) {
if (i == str.length) break;
var uCode = str.charCodeAt(i++);
}
else {
var uCode = nextChar;
nextChar = -1;
}
// 1. Handle surrogates.
if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
if (uCode < 0xDC00) { // We've got lead surrogate.
if (leadSurrogate === -1) {
leadSurrogate = uCode;
continue;
} else {
leadSurrogate = uCode;
// Double lead surrogate found.
uCode = UNASSIGNED;
}
} else { // We've got trail surrogate.
if (leadSurrogate !== -1) {
uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
leadSurrogate = -1;
} else {
// Incomplete surrogate pair - only trail surrogate found.
uCode = UNASSIGNED;
}
}
}
else if (leadSurrogate !== -1) {
// Incomplete surrogate pair - only lead surrogate found.
nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
leadSurrogate = -1;
}
// 2. Convert uCode character.
var dbcsCode = UNASSIGNED;
if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
var resCode = seqObj[uCode];
if (typeof resCode === 'object') { // Sequence continues.
seqObj = resCode;
continue;
} else if (typeof resCode == 'number') { // Sequence finished. Write it.
dbcsCode = resCode;
} else if (resCode == undefined) { // Current character is not part of the sequence.
// Try default character for this sequence
resCode = seqObj[DEF_CHAR];
if (resCode !== undefined) {
dbcsCode = resCode; // Found. Write it.
nextChar = uCode; // Current character will be written too in the next iteration.
} else {
// TODO: What if we have no default? (resCode == undefined)
// Then, we should write first char of the sequence as-is and try the rest recursively.
// Didn't do it for now because no encoding has this situation yet.
// Currently, just skip the sequence and write current char.
}
}
seqObj = undefined;
}
else if (uCode >= 0) { // Regular character
var subtable = this.encodeTable[uCode >> 8];
if (subtable !== undefined)
dbcsCode = subtable[uCode & 0xFF];
if (dbcsCode <= SEQ_START) { // Sequence start
seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
continue;
}
if (dbcsCode == UNASSIGNED && this.gb18030) {
// Use GB18030 algorithm to find character(s) to write.
var idx = findIdx(this.gb18030.uChars, uCode);
if (idx != -1) {
var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
newBuf[j++] = 0x30 + dbcsCode;
continue;
}
}
}
// 3. Write dbcsCode character.
if (dbcsCode === UNASSIGNED)
dbcsCode = this.defaultCharSingleByte;
if (dbcsCode < 0x100) {
newBuf[j++] = dbcsCode;
}
else if (dbcsCode < 0x10000) {
newBuf[j++] = dbcsCode >> 8; // high byte
newBuf[j++] = dbcsCode & 0xFF; // low byte
}
else {
newBuf[j++] = dbcsCode >> 16;
newBuf[j++] = (dbcsCode >> 8) & 0xFF;
newBuf[j++] = dbcsCode & 0xFF;
}
}
this.seqObj = seqObj;
this.leadSurrogate = leadSurrogate;
return newBuf.slice(0, j);
}
DBCSEncoder.prototype.end = function() {
if (this.leadSurrogate === -1 && this.seqObj === undefined)
return; // All clean. Most often case.
var newBuf = Buffer.alloc(10), j = 0;
if (this.seqObj) { // We're in the sequence.
var dbcsCode = this.seqObj[DEF_CHAR];
if (dbcsCode !== undefined) { // Write beginning of the sequence.
if (dbcsCode < 0x100) {
newBuf[j++] = dbcsCode;
}
else {
newBuf[j++] = dbcsCode >> 8; // high byte
newBuf[j++] = dbcsCode & 0xFF; // low byte
}
} else {
// See todo above.
}
this.seqObj = undefined;
}
if (this.leadSurrogate !== -1) {
// Incomplete surrogate pair - only lead surrogate found.
newBuf[j++] = this.defaultCharSingleByte;
this.leadSurrogate = -1;
}
return newBuf.slice(0, j);
}
// Export for testing
DBCSEncoder.prototype.findIdx = findIdx;
// == Decoder ==================================================================
function DBCSDecoder(options, codec) {
// Decoder state
this.nodeIdx = 0;
this.prevBuf = Buffer.alloc(0);
// Static data
this.decodeTables = codec.decodeTables;
this.decodeTableSeq = codec.decodeTableSeq;
this.defaultCharUnicode = codec.defaultCharUnicode;
this.gb18030 = codec.gb18030;
}
DBCSDecoder.prototype.write = function(buf) {
var newBuf = Buffer.alloc(buf.length*2),
nodeIdx = this.nodeIdx,
prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
uCode;
if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
for (var i = 0, j = 0; i < buf.length; i++) {
var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
// Lookup in current trie node.
var uCode = this.decodeTables[nodeIdx][curByte];
if (uCode >= 0) {
// Normal character, just use it.
}
else if (uCode === UNASSIGNED) { // Unknown char.
// TODO: Callback with seq.
//var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).
uCode = this.defaultCharUnicode.charCodeAt(0);
}
else if (uCode === GB18030_CODE) {
var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);
var idx = findIdx(this.gb18030.gbChars, ptr);
uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
}
else if (uCode <= NODE_START) { // Go to next trie node.
nodeIdx = NODE_START - uCode;
continue;
}
else if (uCode <= SEQ_START) { // Output a sequence of chars.
var seq = this.decodeTableSeq[SEQ_START - uCode];
for (var k = 0; k < seq.length - 1; k++) {
uCode = seq[k];
newBuf[j++] = uCode & 0xFF;
newBuf[j++] = uCode >> 8;
}
uCode = seq[seq.length-1];
}
else
throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
// Write the character to buffer, handling higher planes using surrogate pair.
if (uCode > 0xFFFF) {
uCode -= 0x10000;
var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
newBuf[j++] = uCodeLead & 0xFF;
newBuf[j++] = uCodeLead >> 8;
uCode = 0xDC00 + uCode % 0x400;
}
newBuf[j++] = uCode & 0xFF;
newBuf[j++] = uCode >> 8;
// Reset trie node.
nodeIdx = 0; seqStart = i+1;
}
this.nodeIdx = nodeIdx;
this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
return newBuf.slice(0, j).toString('ucs2');
}
DBCSDecoder.prototype.end = function() {
var ret = '';
// Try to parse all remaining chars.
while (this.prevBuf.length > 0) {
// Skip 1 character in the buffer.
ret += this.defaultCharUnicode;
var buf = this.prevBuf.slice(1);
// Parse remaining as usual.
this.prevBuf = Buffer.alloc(0);
this.nodeIdx = 0;
if (buf.length > 0)
ret += this.write(buf);
}
this.nodeIdx = 0;
return ret;
}
// Binary search for GB18030. Returns largest i such that table[i] <= val.
function findIdx(table, val) {
if (table[0] > val)
return -1;
var l = 0, r = table.length;
while (l < r-1) { // always table[l] <= val < table[r]
var mid = l + Math.floor((r-l+1)/2);
if (table[mid] <= val)
l = mid;
else
r = mid;
}
return l;
}
/***/ }),
/***/ 91386:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
// Description of supported double byte encodings and aliases.
// Tables are not require()-d until they are needed to speed up library load.
// require()-s are direct to support Browserify.
module.exports = {
// == Japanese/ShiftJIS ====================================================
// All japanese encodings are based on JIS X set of standards:
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
// JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
// Has several variations in 1978, 1983, 1990 and 1997.
// JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
// JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
// 2 planes, first is superset of 0208, second - revised 0212.
// Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
// Byte encodings are:
// * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
// encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
// Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
// * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
// 0x00-0x7F - lower part of 0201
// 0x8E, 0xA1-0xDF - upper part of 0201
// (0xA1-0xFE)x2 - 0208 plane (94x94).
// 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
// * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
// Used as-is in ISO2022 family.
// * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
// 0201-1976 Roman, 0208-1978, 0208-1983.
// * ISO2022-JP-1: Adds esc seq for 0212-1990.
// * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
// * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
// * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
//
// After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
//
// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
'shiftjis': {
type: '_dbcs',
table: function() { return __nccwpck_require__(64108) },
encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
encodeSkipVals: [{from: 0xED40, to: 0xF940}],
},
'csshiftjis': 'shiftjis',
'mskanji': 'shiftjis',
'sjis': 'shiftjis',
'windows31j': 'shiftjis',
'ms31j': 'shiftjis',
'xsjis': 'shiftjis',
'windows932': 'shiftjis',
'ms932': 'shiftjis',
'932': 'shiftjis',
'cp932': 'shiftjis',
'eucjp': {
type: '_dbcs',
table: function() { return __nccwpck_require__(72417) },
encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
},
// TODO: KDDI extension to Shift_JIS
// TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
// TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
// == Chinese/GBK ==========================================================
// http://en.wikipedia.org/wiki/GBK
// We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
// Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
'gb2312': 'cp936',
'gb231280': 'cp936',
'gb23121980': 'cp936',
'csgb2312': 'cp936',
'csiso58gb231280': 'cp936',
'euccn': 'cp936',
// Microsoft's CP936 is a subset and approximation of GBK.
'windows936': 'cp936',
'ms936': 'cp936',
'936': 'cp936',
'cp936': {
type: '_dbcs',
table: function() { return __nccwpck_require__(97803) },
},
// GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
'gbk': {
type: '_dbcs',
table: function() { return __nccwpck_require__(97803).concat(__nccwpck_require__(37419)) },
},
'xgbk': 'gbk',
'isoir58': 'gbk',
// GB18030 is an algorithmic extension of GBK.
// Main source: https://www.w3.org/TR/encoding/#gbk-encoder
// http://icu-project.org/docs/papers/gb18030.html
// http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
// http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
'gb18030': {
type: '_dbcs',
table: function() { return __nccwpck_require__(97803).concat(__nccwpck_require__(37419)) },
gb18030: function() { return __nccwpck_require__(86351) },
encodeSkipVals: [0x80],
encodeAdd: {'€': 0xA2E3},
},
'chinese': 'gb18030',
// == Korean ===============================================================
// EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
'windows949': 'cp949',
'ms949': 'cp949',
'949': 'cp949',
'cp949': {
type: '_dbcs',
table: function() { return __nccwpck_require__(87013) },
},
'cseuckr': 'cp949',
'csksc56011987': 'cp949',
'euckr': 'cp949',
'isoir149': 'cp949',
'korean': 'cp949',
'ksc56011987': 'cp949',
'ksc56011989': 'cp949',
'ksc5601': 'cp949',
// == Big5/Taiwan/Hong Kong ================================================
// There are lots of tables for Big5 and cp950. Please see the following links for history:
// http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
// Variations, in roughly number of defined chars:
// * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
// * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
// * Big5-2003 (Taiwan standard) almost superset of cp950.
// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
// * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
// many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
// Plus, it has 4 combining sequences.
// Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
// because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
// Implementations are not consistent within browsers; sometimes labeled as just big5.
// MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
// Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
// Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
// http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
//
// Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
'windows950': 'cp950',
'ms950': 'cp950',
'950': 'cp950',
'cp950': {
type: '_dbcs',
table: function() { return __nccwpck_require__(33104) },
},
// Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
'big5': 'big5hkscs',
'big5hkscs': {
type: '_dbcs',
table: function() { return __nccwpck_require__(33104).concat(__nccwpck_require__(43612)) },
encodeSkipVals: [0xa2cc],
},
'cnbig5': 'big5hkscs',
'csbig5': 'big5hkscs',
'xxbig5': 'big5hkscs',
};
/***/ }),
/***/ 82733:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
// Update this array if you add/rename/remove files in this directory.
// We support Browserify by skipping automatic module discovery and requiring modules directly.
var modules = [
__nccwpck_require__(12376),
__nccwpck_require__(11155),
__nccwpck_require__(51644),
__nccwpck_require__(26657),
__nccwpck_require__(41080),
__nccwpck_require__(21012),
__nccwpck_require__(39695),
__nccwpck_require__(91386),
];
// Put all encoding/alias/codec definitions to single object and export it.
for (var i = 0; i < modules.length; i++) {
var module = modules[i];
for (var enc in module)
if (Object.prototype.hasOwnProperty.call(module, enc))
exports[enc] = module[enc];
}
/***/ }),
/***/ 12376:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(15118).Buffer;
// Export Node.js internal encodings.
module.exports = {
// Encodings
utf8: { type: "_internal", bomAware: true},
cesu8: { type: "_internal", bomAware: true},
unicode11utf8: "utf8",
ucs2: { type: "_internal", bomAware: true},
utf16le: "ucs2",
binary: { type: "_internal" },
base64: { type: "_internal" },
hex: { type: "_internal" },
// Codec.
_internal: InternalCodec,
};
//------------------------------------------------------------------------------
function InternalCodec(codecOptions, iconv) {
this.enc = codecOptions.encodingName;
this.bomAware = codecOptions.bomAware;
if (this.enc === "base64")
this.encoder = InternalEncoderBase64;
else if (this.enc === "cesu8") {
this.enc = "utf8"; // Use utf8 for decoding.
this.encoder = InternalEncoderCesu8;
// Add decoder for versions of Node not supporting CESU-8
if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {
this.decoder = InternalDecoderCesu8;
this.defaultCharUnicode = iconv.defaultCharUnicode;
}
}
}
InternalCodec.prototype.encoder = InternalEncoder;
InternalCodec.prototype.decoder = InternalDecoder;
//------------------------------------------------------------------------------
// We use node.js internal decoder. Its signature is the same as ours.
var StringDecoder = __nccwpck_require__(24304).StringDecoder;
if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
StringDecoder.prototype.end = function() {};
function InternalDecoder(options, codec) {
StringDecoder.call(this, codec.enc);
}
InternalDecoder.prototype = StringDecoder.prototype;
//------------------------------------------------------------------------------
// Encoder is mostly trivial
function InternalEncoder(options, codec) {
this.enc = codec.enc;
}
InternalEncoder.prototype.write = function(str) {
return Buffer.from(str, this.enc);
}
InternalEncoder.prototype.end = function() {
}
//------------------------------------------------------------------------------
// Except base64 encoder, which must keep its state.
function InternalEncoderBase64(options, codec) {
this.prevStr = '';
}
InternalEncoderBase64.prototype.write = function(str) {
str = this.prevStr + str;
var completeQuads = str.length - (str.length % 4);
this.prevStr = str.slice(completeQuads);
str = str.slice(0, completeQuads);
return Buffer.from(str, "base64");
}
InternalEncoderBase64.prototype.end = function() {
return Buffer.from(this.prevStr, "base64");
}
//------------------------------------------------------------------------------
// CESU-8 encoder is also special.
function InternalEncoderCesu8(options, codec) {
}
InternalEncoderCesu8.prototype.write = function(str) {
var buf = Buffer.alloc(str.length * 3), bufIdx = 0;
for (var i = 0; i < str.length; i++) {
var charCode = str.charCodeAt(i);
// Naive implementation, but it works because CESU-8 is especially easy
// to convert from UTF-16 (which all JS strings are encoded in).
if (charCode < 0x80)
buf[bufIdx++] = charCode;
else if (charCode < 0x800) {
buf[bufIdx++] = 0xC0 + (charCode >>> 6);
buf[bufIdx++] = 0x80 + (charCode & 0x3f);
}
else { // charCode will always be < 0x10000 in javascript.
buf[bufIdx++] = 0xE0 + (charCode >>> 12);
buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
buf[bufIdx++] = 0x80 + (charCode & 0x3f);
}
}
return buf.slice(0, bufIdx);
}
InternalEncoderCesu8.prototype.end = function() {
}
//------------------------------------------------------------------------------
// CESU-8 decoder is not implemented in Node v4.0+
function InternalDecoderCesu8(options, codec) {
this.acc = 0;
this.contBytes = 0;
this.accBytes = 0;
this.defaultCharUnicode = codec.defaultCharUnicode;
}
InternalDecoderCesu8.prototype.write = function(buf) {
var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
res = '';
for (var i = 0; i < buf.length; i++) {
var curByte = buf[i];
if ((curByte & 0xC0) !== 0x80) { // Leading byte
if (contBytes > 0) { // Previous code is invalid
res += this.defaultCharUnicode;
contBytes = 0;
}
if (curByte < 0x80) { // Single-byte code
res += String.fromCharCode(curByte);
} else if (curByte < 0xE0) { // Two-byte code
acc = curByte & 0x1F;
contBytes = 1; accBytes = 1;
} else if (curByte < 0xF0) { // Three-byte code
acc = curByte & 0x0F;
contBytes = 2; accBytes = 1;
} else { // Four or more are not supported for CESU-8.
res += this.defaultCharUnicode;
}
} else { // Continuation byte
if (contBytes > 0) { // We're waiting for it.
acc = (acc << 6) | (curByte & 0x3f);
contBytes--; accBytes++;
if (contBytes === 0) {
// Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
if (accBytes === 2 && acc < 0x80 && acc > 0)
res += this.defaultCharUnicode;
else if (accBytes === 3 && acc < 0x800)
res += this.defaultCharUnicode;
else
// Actually add character.
res += String.fromCharCode(acc);
}
} else { // Unexpected continuation byte
res += this.defaultCharUnicode;
}
}
}
this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
return res;
}
InternalDecoderCesu8.prototype.end = function() {
var res = 0;
if (this.contBytes > 0)
res += this.defaultCharUnicode;
return res;
}
/***/ }),
/***/ 26657:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(15118).Buffer;
// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
// correspond to encoded bytes (if 128 - then lower half is ASCII).
exports._sbcs = SBCSCodec;
function SBCSCodec(codecOptions, iconv) {
if (!codecOptions)
throw new Error("SBCS codec is called without the data.")
// Prepare char buffer for decoding.
if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
if (codecOptions.chars.length === 128) {
var asciiString = "";
for (var i = 0; i < 128; i++)
asciiString += String.fromCharCode(i);
codecOptions.chars = asciiString + codecOptions.chars;
}
this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
// Encoding buffer.
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
for (var i = 0; i < codecOptions.chars.length; i++)
encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
this.encodeBuf = encodeBuf;
}
SBCSCodec.prototype.encoder = SBCSEncoder;
SBCSCodec.prototype.decoder = SBCSDecoder;
function SBCSEncoder(options, codec) {
this.encodeBuf = codec.encodeBuf;
}
SBCSEncoder.prototype.write = function(str) {
var buf = Buffer.alloc(str.length);
for (var i = 0; i < str.length; i++)
buf[i] = this.encodeBuf[str.charCodeAt(i)];
return buf;
}
SBCSEncoder.prototype.end = function() {
}
function SBCSDecoder(options, codec) {
this.decodeBuf = codec.decodeBuf;
}
SBCSDecoder.prototype.write = function(buf) {
// Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
var decodeBuf = this.decodeBuf;
var newBuf = Buffer.alloc(buf.length*2);
var idx1 = 0, idx2 = 0;
for (var i = 0; i < buf.length; i++) {
idx1 = buf[i]*2; idx2 = i*2;
newBuf[idx2] = decodeBuf[idx1];
newBuf[idx2+1] = decodeBuf[idx1+1];
}
return newBuf.toString('ucs2');
}
SBCSDecoder.prototype.end = function() {
}
/***/ }),
/***/ 21012:
/***/ ((module) => {
"use strict";
// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
module.exports = {
"437": "cp437",
"737": "cp737",
"775": "cp775",
"850": "cp850",
"852": "cp852",
"855": "cp855",
"856": "cp856",
"857": "cp857",
"858": "cp858",
"860": "cp860",
"861": "cp861",
"862": "cp862",
"863": "cp863",
"864": "cp864",
"865": "cp865",
"866": "cp866",
"869": "cp869",
"874": "windows874",
"922": "cp922",
"1046": "cp1046",
"1124": "cp1124",
"1125": "cp1125",
"1129": "cp1129",
"1133": "cp1133",
"1161": "cp1161",
"1162": "cp1162",
"1163": "cp1163",
"1250": "windows1250",
"1251": "windows1251",
"1252": "windows1252",
"1253": "windows1253",
"1254": "windows1254",
"1255": "windows1255",
"1256": "windows1256",
"1257": "windows1257",
"1258": "windows1258",
"28591": "iso88591",
"28592": "iso88592",
"28593": "iso88593",
"28594": "iso88594",
"28595": "iso88595",
"28596": "iso88596",
"28597": "iso88597",
"28598": "iso88598",
"28599": "iso88599",
"28600": "iso885910",
"28601": "iso885911",
"28603": "iso885913",
"28604": "iso885914",
"28605": "iso885915",
"28606": "iso885916",
"windows874": {
"type": "_sbcs",
"chars": "€<><E282AC><EFBFBD><EFBFBD><EFBFBD><E280A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>“”•<E28093><E28094><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู<E0B8B9><E0B8BA><EFBFBD><EFBFBD>฿เแโใไๅๆ็่้๊๋์ํ๎๏๑๒๓๔๕๖๗๘๙๚๛<E0B99A><E0B99B><EFBFBD><EFBFBD>"
},
"win874": "windows874",
"cp874": "windows874",
"windows1250": {
"type": "_sbcs",
"chars": "€<><EFBFBD>„…†‡<E280A0>‰ŠŚŤŽŹ<C5BD>“”•<E28093>™šśťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
},
"win1250": "windows1250",
"cp1250": "windows1250",
"windows1251": {
"type": "_sbcs",
"chars": "ЂЃѓ„…†‡€‰ЉЊЌЋЏђ“”•<E28093>™љњќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
},
"win1251": "windows1251",
"cp1251": "windows1251",
"windows1252": {
"type": "_sbcs",
"chars": "€<>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
},
"win1252": "windows1252",
"cp1252": "windows1252",
"windows1253": {
"type": "_sbcs",
"chars": "€<>ƒ„…†‡<E280A0><EFBFBD><EFBFBD><E280B9><EFBFBD><EFBFBD><EFBFBD>“”•<E28093><EFBFBD><EFBFBD><E280BA><EFBFBD><EFBFBD> ΅Ά£¤¥¦§¨©<C2A8>«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ<CEA0>ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ<CF8D>"
},
"win1253": "windows1253",
"cp1253": "windows1253",
"windows1254": {
"type": "_sbcs",
"chars": "€<>ƒ„…†‡ˆ‰ŠŒ<E280B9><C592><EFBFBD><EFBFBD>“”•˜™šœ<E280BA><C593>Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
},
"win1254": "windows1254",
"cp1254": "windows1254",
"windows1255": {
"type": "_sbcs",
"chars": "€<>ƒ„…†‡ˆ<CB86><EFBFBD><E280B9><EFBFBD><EFBFBD><EFBFBD>“”•˜<CB9C><EFBFBD><E280BA><EFBFBD><EFBFBD> ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״<D7B3><D7B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>אבגדהוזחטיךכלםמןנסעףפץצקרשת<D7A9><D7AA><E2808E>"
},
"win1255": "windows1255",
"cp1255": "windows1255",
"windows1256": {
"type": "_sbcs",
"chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے"
},
"win1256": "windows1256",
"cp1256": "windows1256",
"windows1257": {
"type": "_sbcs",
"chars": "€<><EFBFBD>„…†‡<E280A0><EFBFBD><EFBFBD>¨ˇ¸<CB87>“”•<E28093><EFBFBD><EFBFBD>¯˛<C2AF> <EFBFBD>¢£¤<C2A3>¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙"
},
"win1257": "windows1257",
"cp1257": "windows1257",
"windows1258": {
"type": "_sbcs",
"chars": "€<>ƒ„…†‡ˆ<CB86>Œ<E280B9><C592><EFBFBD><EFBFBD>“”•˜<CB9C>œ<E280BA><C593>Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
},
"win1258": "windows1258",
"cp1258": "windows1258",
"iso88591": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
},
"cp28591": "iso88591",
"iso88592": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
},
"cp28592": "iso88592",
"iso88593": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤<C2A3>Ĥ§¨İŞĞĴ­<C4B4>Ż°ħ²³´µĥ·¸ışğĵ½<C4B5>żÀÁÂ<C381>ÄĊĈÇÈÉÊËÌÍÎÏ<C38E>ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ<C3A1>äċĉçèéêëìíîï<C3AE>ñòóôġö÷ĝùúûüŭŝ˙"
},
"cp28593": "iso88593",
"iso88594": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙"
},
"cp28594": "iso88594",
"iso88595": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ"
},
"cp28595": "iso88595",
"iso88596": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ <C29F><C2A0><EFBFBD>¤<EFBFBD><C2A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>،­<D88C><C2AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؛<EFBFBD><D89B><EFBFBD>؟<EFBFBD>ءآأؤإئابةتثجحخدذرزسشصضطظعغ<D8B9><D8BA><EFBFBD><EFBFBD><EFBFBD>ـفقكلمنهوىيًٌٍَُِّْ<D991><D992><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
},
"cp28596": "iso88596",
"iso88597": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ £€₯¦§¨©ͺ«¬­<C2AC>―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ<CEA0>ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ<CF8D>"
},
"cp28597": "iso88597",
"iso88598": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ <C29F>¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾<C2BD><C2BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>‗אבגדהוזחטיךכלםמןנסעףפץצקרשת<D7A9><D7AA><E2808E>"
},
"cp28598": "iso88598",
"iso88599": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
},
"cp28599": "iso88599",
"iso885910": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ"
},
"cp28600": "iso885910",
"iso885911": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู<E0B8B9><E0B8BA><EFBFBD><EFBFBD>฿เแโใไๅๆ็่้๊๋์ํ๎๏๑๒๓๔๕๖๗๘๙๚๛<E0B99A><E0B99B><EFBFBD><EFBFBD>"
},
"cp28601": "iso885911",
"iso885913": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’"
},
"cp28603": "iso885913",
"iso885914": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
},
"cp28604": "iso885914",
"iso885915": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
},
"cp28605": "iso885915",
"iso885916": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
},
"cp28606": "iso885916",
"cp437": {
"type": "_sbcs",
"chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
"ibm437": "cp437",
"csibm437": "cp437",
"cp737": {
"type": "_sbcs",
"chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ "
},
"ibm737": "cp737",
"csibm737": "cp737",
"cp775": {
"type": "_sbcs",
"chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ "
},
"ibm775": "cp775",
"csibm775": "cp775",
"cp850": {
"type": "_sbcs",
"chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
},
"ibm850": "cp850",
"csibm850": "cp850",
"cp852": {
"type": "_sbcs",
"chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ "
},
"ibm852": "cp852",
"csibm852": "cp852",
"cp855": {
"type": "_sbcs",
"chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ "
},
"ibm855": "cp855",
"csibm855": "cp855",
"cp856": {
"type": "_sbcs",
"chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת<D7A9>£<EFBFBD>×<EFBFBD><C397><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>®¬½¼<C2BD>«»░▒▓│┤<E29482><E294A4><EFBFBD>©╣║╗╝¢¥┐└┴┬├─┼<E29480><E294BC>╚╔╩╦╠═╬¤<E295AC><C2A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>┘┌█▄¦<E29684><EFBFBD><E29680><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¯´­±‗¾¶§÷¸°¨·¹³²■ "
},
"ibm856": "cp856",
"csibm856": "cp856",
"cp857": {
"type": "_sbcs",
"chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ<C38B>ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ<C395>×ÚÛÙìÿ¯´­±<C2AD>¾¶§÷¸°¨·¹³²■ "
},
"ibm857": "cp857",
"csibm857": "cp857",
"cp858": {
"type": "_sbcs",
"chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
},
"ibm858": "cp858",
"csibm858": "cp858",
"cp860": {
"type": "_sbcs",
"chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
"ibm860": "cp860",
"csibm860": "cp860",
"cp861": {
"type": "_sbcs",
"chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
"ibm861": "cp861",
"csibm861": "cp861",
"cp862": {
"type": "_sbcs",
"chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
"ibm862": "cp862",
"csibm862": "cp862",
"cp863": {
"type": "_sbcs",
"chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
"ibm863": "cp863",
"csibm863": "cp863",
"cp864": {
"type": "_sbcs",
"chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ<EFBBB7><EFBBB8>ﻻﻼ<EFBBBB> ­ﺂ£¤ﺄ<C2A4><EFBA84>ﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻰﻲﻐﻕﻵﻶﻝﻙﻱ■<EFBBB1>"
},
"ibm864": "cp864",
"csibm864": "cp864",
"cp865": {
"type": "_sbcs",
"chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
"ibm865": "cp865",
"csibm865": "cp865",
"cp866": {
"type": "_sbcs",
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "
},
"ibm866": "cp866",
"csibm866": "cp866",
"cp869": {
"type": "_sbcs",
"chars": "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ά<EFBFBD>·¬¦Έ―ΉΊΪΌ<CEAA><CE8C>ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "
},
"ibm869": "cp869",
"csibm869": "cp869",
"cp922": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
},
"ibm922": "cp922",
"csibm922": "cp922",
"cp1046": {
"type": "_sbcs",
"chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧ<EFBBAC>"
},
"ibm1046": "cp1046",
"csibm1046": "cp1046",
"cp1124": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"
},
"ibm1124": "cp1124",
"csibm1124": "cp1124",
"cp1125": {
"type": "_sbcs",
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "
},
"ibm1125": "cp1125",
"csibm1125": "cp1125",
"cp1129": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
},
"ibm1129": "cp1129",
"csibm1129": "cp1129",
"cp1133": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ<E0BAAD><E0BAAE><EFBFBD>ຯະາຳິີຶືຸູຼັົຽ<E0BABB><E0BABD><EFBFBD>ເແໂໃໄ່້໊໋໌ໍໆ<E0BB8D>ໜໝ₭<E0BB9D><E282AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>໑໒໓໔໕໖໗໘໙<E0BB98><E0BB99>¢¬¦<C2AC>"
},
"ibm1133": "cp1133",
"csibm1133": "cp1133",
"cp1161": {
"type": "_sbcs",
"chars": "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "
},
"ibm1161": "cp1161",
"csibm1161": "cp1161",
"cp1162": {
"type": "_sbcs",
"chars": "€‚ƒ„†‡ˆ‰Š‹ŒŽ“”•˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู<E0B8B9><E0B8BA><EFBFBD><EFBFBD>฿เแโใไๅๆ็่้๊๋์ํ๎๏๑๒๓๔๕๖๗๘๙๚๛<E0B99A><E0B99B><EFBFBD><EFBFBD>"
},
"ibm1162": "cp1162",
"csibm1162": "cp1162",
"cp1163": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
},
"ibm1163": "cp1163",
"csibm1163": "cp1163",
"maccroatian": {
"type": "_sbcs",
"chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”÷◊<C3B7>©¤Æ»·„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
},
"maccyrillic": {
"type": "_sbcs",
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
},
"macgreek": {
"type": "_sbcs",
"chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡΤ«»… ΥΧΆΈœ―“”÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ<CE90>"
},
"maciceland": {
"type": "_sbcs",
"chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ—“”÷◊ÿŸ¤ÐðÞþý·„‰ÂÊÁËÈÍÎÏÌÓÔ<C393>ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
},
"macroman": {
"type": "_sbcs",
"chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ—“”÷◊ÿŸ¤fifl‡·„‰ÂÊÁËÈÍÎÏÌÓÔ<C393>ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
},
"macromania": {
"type": "_sbcs",
"chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ—“”÷◊ÿŸ¤Ţţ‡·„‰ÂÊÁËÈÍÎÏÌÓÔ<C393>ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
},
"macthai": {
"type": "_sbcs",
"chars": "«»…“”<E2809D>•<E28098> กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู—฿เแโใไๅๆ็่้๊๋์ํ™๏๑๒๓๔๕๖๗๘๙®©<C2AE><C2A9><EFBFBD><EFBFBD>"
},
"macturkish": {
"type": "_sbcs",
"chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ—“”÷◊ÿŸĞğİıŞş‡·„‰ÂÊÁËÈÍÎÏÌÓÔ<C393>ÒÚÛÙ<C39B>ˆ˜¯˘˙˚¸˝˛ˇ"
},
"macukraine": {
"type": "_sbcs",
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
},
"koi8r": {
"type": "_sbcs",
"chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
},
"koi8u": {
"type": "_sbcs",
"chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
},
"koi8ru": {
"type": "_sbcs",
"chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
},
"koi8t": {
"type": "_sbcs",
"chars": "қғҒ„…†‡<E280A0>‰ҳҲҷҶ<D2B7>Қ“”•<E28093><EFBFBD><EFBFBD><E280BA><EFBFBD><EFBFBD><EFBFBD>ӯӮё¤ӣ¦§<C2A6><C2A7><EFBFBD>«¬­®<C2AD>°±²Ё<C2B2>Ӣ¶·<C2B6><EFBFBD>»<EFBFBD><C2BB><EFBFBD>©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
},
"armscii8": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ <C29F>և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚<D686>"
},
"rk1048": {
"type": "_sbcs",
"chars": "ЂЃѓ„…†‡€‰ЉЊҚҺЏђ“”•<E28093>™љњқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
},
"tcvn": {
"type": "_sbcs",
"chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ"
},
"georgianacademy": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
},
"georgianps": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
},
"pt154": {
"type": "_sbcs",
"chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
},
"viscii": {
"type": "_sbcs",
"chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ"
},
"iso646cn": {
"type": "_sbcs",
"chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾<E280BE><7F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
},
"iso646jp": {
"type": "_sbcs",
"chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾<E280BE><7F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
},
"hproman8": {
"type": "_sbcs",
"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±<C2BB>"
},
"macintosh": {
"type": "_sbcs",
"chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ—“”÷◊ÿŸ¤fifl‡·„‰ÂÊÁËÈÍÎÏÌÓÔ<C393>ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
},
"ascii": {
"type": "_sbcs",
"chars": "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
},
"tis620": {
"type": "_sbcs",
"chars": "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู<E0B8B9><E0B8BA><EFBFBD><EFBFBD>฿เแโใไๅๆ็่้๊๋์ํ๎๏๑๒๓๔๕๖๗๘๙๚๛<E0B99A><E0B99B><EFBFBD><EFBFBD>"
}
}
/***/ }),
/***/ 41080:
/***/ ((module) => {
"use strict";
// Manually added data to be used by sbcs codec in addition to generated one.
module.exports = {
// Not supported by iconv, not sure why.
"10029": "maccenteuro",
"maccenteuro": {
"type": "_sbcs",
"chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
},
"808": "cp808",
"ibm808": "cp808",
"cp808": {
"type": "_sbcs",
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
},
"mik": {
"type": "_sbcs",
"chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
},
// Aliases of generated encodings.
"ascii8bit": "ascii",
"usascii": "ascii",
"ansix34": "ascii",
"ansix341968": "ascii",
"ansix341986": "ascii",
"csascii": "ascii",
"cp367": "ascii",
"ibm367": "ascii",
"isoir6": "ascii",
"iso646us": "ascii",
"iso646irv": "ascii",
"us": "ascii",
"latin1": "iso88591",
"latin2": "iso88592",
"latin3": "iso88593",
"latin4": "iso88594",
"latin5": "iso88599",
"latin6": "iso885910",
"latin7": "iso885913",
"latin8": "iso885914",
"latin9": "iso885915",
"latin10": "iso885916",
"csisolatin1": "iso88591",
"csisolatin2": "iso88592",
"csisolatin3": "iso88593",
"csisolatin4": "iso88594",
"csisolatincyrillic": "iso88595",
"csisolatinarabic": "iso88596",
"csisolatingreek" : "iso88597",
"csisolatinhebrew": "iso88598",
"csisolatin5": "iso88599",
"csisolatin6": "iso885910",
"l1": "iso88591",
"l2": "iso88592",
"l3": "iso88593",
"l4": "iso88594",
"l5": "iso88599",
"l6": "iso885910",
"l7": "iso885913",
"l8": "iso885914",
"l9": "iso885915",
"l10": "iso885916",
"isoir14": "iso646jp",
"isoir57": "iso646cn",
"isoir100": "iso88591",
"isoir101": "iso88592",
"isoir109": "iso88593",
"isoir110": "iso88594",
"isoir144": "iso88595",
"isoir127": "iso88596",
"isoir126": "iso88597",
"isoir138": "iso88598",
"isoir148": "iso88599",
"isoir157": "iso885910",
"isoir166": "tis620",
"isoir179": "iso885913",
"isoir199": "iso885914",
"isoir203": "iso885915",
"isoir226": "iso885916",
"cp819": "iso88591",
"ibm819": "iso88591",
"cyrillic": "iso88595",
"arabic": "iso88596",
"arabic8": "iso88596",
"ecma114": "iso88596",
"asmo708": "iso88596",
"greek" : "iso88597",
"greek8" : "iso88597",
"ecma118" : "iso88597",
"elot928" : "iso88597",
"hebrew": "iso88598",
"hebrew8": "iso88598",
"turkish": "iso88599",
"turkish8": "iso88599",
"thai": "iso885911",
"thai8": "iso885911",
"celtic": "iso885914",
"celtic8": "iso885914",
"isoceltic": "iso885914",
"tis6200": "tis620",
"tis62025291": "tis620",
"tis62025330": "tis620",
"10000": "macroman",
"10006": "macgreek",
"10007": "maccyrillic",
"10079": "maciceland",
"10081": "macturkish",
"cspc8codepage437": "cp437",
"cspc775baltic": "cp775",
"cspc850multilingual": "cp850",
"cspcp852": "cp852",
"cspc862latinhebrew": "cp862",
"cpgr": "cp869",
"msee": "cp1250",
"mscyrl": "cp1251",
"msansi": "cp1252",
"msgreek": "cp1253",
"msturk": "cp1254",
"mshebr": "cp1255",
"msarab": "cp1256",
"winbaltrim": "cp1257",
"cp20866": "koi8r",
"20866": "koi8r",
"ibm878": "koi8r",
"cskoi8r": "koi8r",
"cp21866": "koi8u",
"21866": "koi8u",
"ibm1168": "koi8u",
"strk10482002": "rk1048",
"tcvn5712": "tcvn",
"tcvn57121": "tcvn",
"gb198880": "iso646cn",
"cn": "iso646cn",
"csiso14jisc6220ro": "iso646jp",
"jisc62201969ro": "iso646jp",
"jp": "iso646jp",
"cshproman8": "hproman8",
"r8": "hproman8",
"roman8": "hproman8",
"xroman8": "hproman8",
"ibm1051": "hproman8",
"mac": "macintosh",
"csmacintosh": "macintosh",
};
/***/ }),
/***/ 11155:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(15118).Buffer;
// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
// == UTF16-BE codec. ==========================================================
exports.utf16be = Utf16BECodec;
function Utf16BECodec() {
}
Utf16BECodec.prototype.encoder = Utf16BEEncoder;
Utf16BECodec.prototype.decoder = Utf16BEDecoder;
Utf16BECodec.prototype.bomAware = true;
// -- Encoding
function Utf16BEEncoder() {
}
Utf16BEEncoder.prototype.write = function(str) {
var buf = Buffer.from(str, 'ucs2');
for (var i = 0; i < buf.length; i += 2) {
var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
}
return buf;
}
Utf16BEEncoder.prototype.end = function() {
}
// -- Decoding
function Utf16BEDecoder() {
this.overflowByte = -1;
}
Utf16BEDecoder.prototype.write = function(buf) {
if (buf.length == 0)
return '';
var buf2 = Buffer.alloc(buf.length + 1),
i = 0, j = 0;
if (this.overflowByte !== -1) {
buf2[0] = buf[0];
buf2[1] = this.overflowByte;
i = 1; j = 2;
}
for (; i < buf.length-1; i += 2, j+= 2) {
buf2[j] = buf[i+1];
buf2[j+1] = buf[i];
}
this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
return buf2.slice(0, j).toString('ucs2');
}
Utf16BEDecoder.prototype.end = function() {
}
// == UTF-16 codec =============================================================
// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
// Defaults to UTF-16LE, as it's prevalent and default in Node.
// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
exports.utf16 = Utf16Codec;
function Utf16Codec(codecOptions, iconv) {
this.iconv = iconv;
}
Utf16Codec.prototype.encoder = Utf16Encoder;
Utf16Codec.prototype.decoder = Utf16Decoder;
// -- Encoding (pass-through)
function Utf16Encoder(options, codec) {
options = options || {};
if (options.addBOM === undefined)
options.addBOM = true;
this.encoder = codec.iconv.getEncoder('utf-16le', options);
}
Utf16Encoder.prototype.write = function(str) {
return this.encoder.write(str);
}
Utf16Encoder.prototype.end = function() {
return this.encoder.end();
}
// -- Decoding
function Utf16Decoder(options, codec) {
this.decoder = null;
this.initialBytes = [];
this.initialBytesLen = 0;
this.options = options || {};
this.iconv = codec.iconv;
}
Utf16Decoder.prototype.write = function(buf) {
if (!this.decoder) {
// Codec is not chosen yet. Accumulate initial bytes.
this.initialBytes.push(buf);
this.initialBytesLen += buf.length;
if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)
return '';
// We have enough bytes -> detect endianness.
var buf = Buffer.concat(this.initialBytes),
encoding = detectEncoding(buf, this.options.defaultEncoding);
this.decoder = this.iconv.getDecoder(encoding, this.options);
this.initialBytes.length = this.initialBytesLen = 0;
}
return this.decoder.write(buf);
}
Utf16Decoder.prototype.end = function() {
if (!this.decoder) {
var buf = Buffer.concat(this.initialBytes),
encoding = detectEncoding(buf, this.options.defaultEncoding);
this.decoder = this.iconv.getDecoder(encoding, this.options);
var res = this.decoder.write(buf),
trail = this.decoder.end();
return trail ? (res + trail) : res;
}
return this.decoder.end();
}
function detectEncoding(buf, defaultEncoding) {
var enc = defaultEncoding || 'utf-16le';
if (buf.length >= 2) {
// Check BOM.
if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM
enc = 'utf-16be';
else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM
enc = 'utf-16le';
else {
// No BOM found. Try to deduce encoding from initial content.
// Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
// So, we count ASCII as if it was LE or BE, and decide from that.
var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions
_len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.
for (var i = 0; i < _len; i += 2) {
if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++;
if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++;
}
if (asciiCharsBE > asciiCharsLE)
enc = 'utf-16be';
else if (asciiCharsBE < asciiCharsLE)
enc = 'utf-16le';
}
}
return enc;
}
/***/ }),
/***/ 51644:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(15118).Buffer;
// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
exports.utf7 = Utf7Codec;
exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
function Utf7Codec(codecOptions, iconv) {
this.iconv = iconv;
};
Utf7Codec.prototype.encoder = Utf7Encoder;
Utf7Codec.prototype.decoder = Utf7Decoder;
Utf7Codec.prototype.bomAware = true;
// -- Encoding
var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
function Utf7Encoder(options, codec) {
this.iconv = codec.iconv;
}
Utf7Encoder.prototype.write = function(str) {
// Naive implementation.
// Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
return Buffer.from(str.replace(nonDirectChars, function(chunk) {
return "+" + (chunk === '+' ? '' :
this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
+ "-";
}.bind(this)));
}
Utf7Encoder.prototype.end = function() {
}
// -- Decoding
function Utf7Decoder(options, codec) {
this.iconv = codec.iconv;
this.inBase64 = false;
this.base64Accum = '';
}
var base64Regex = /[A-Za-z0-9\/+]/;
var base64Chars = [];
for (var i = 0; i < 256; i++)
base64Chars[i] = base64Regex.test(String.fromCharCode(i));
var plusChar = '+'.charCodeAt(0),
minusChar = '-'.charCodeAt(0),
andChar = '&'.charCodeAt(0);
Utf7Decoder.prototype.write = function(buf) {
var res = "", lastI = 0,
inBase64 = this.inBase64,
base64Accum = this.base64Accum;
// The decoder is more involved as we must handle chunks in stream.
for (var i = 0; i < buf.length; i++) {
if (!inBase64) { // We're in direct mode.
// Write direct chars until '+'
if (buf[i] == plusChar) {
res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
lastI = i+1;
inBase64 = true;
}
} else { // We decode base64.
if (!base64Chars[buf[i]]) { // Base64 ended.
if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
res += "+";
} else {
var b64str = base64Accum + buf.slice(lastI, i).toString();
res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
}
if (buf[i] != minusChar) // Minus is absorbed after base64.
i--;
lastI = i+1;
inBase64 = false;
base64Accum = '';
}
}
}
if (!inBase64) {
res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
} else {
var b64str = base64Accum + buf.slice(lastI).toString();
var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
b64str = b64str.slice(0, canBeDecoded);
res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
}
this.inBase64 = inBase64;
this.base64Accum = base64Accum;
return res;
}
Utf7Decoder.prototype.end = function() {
var res = "";
if (this.inBase64 && this.base64Accum.length > 0)
res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
this.inBase64 = false;
this.base64Accum = '';
return res;
}
// UTF-7-IMAP codec.
// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
// Differences:
// * Base64 part is started by "&" instead of "+"
// * Direct characters are 0x20-0x7E, except "&" (0x26)
// * In Base64, "," is used instead of "/"
// * Base64 must not be used to represent direct characters.
// * No implicit shift back from Base64 (should always end with '-')
// * String must end in non-shifted position.
// * "-&" while in base64 is not allowed.
exports.utf7imap = Utf7IMAPCodec;
function Utf7IMAPCodec(codecOptions, iconv) {
this.iconv = iconv;
};
Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
Utf7IMAPCodec.prototype.bomAware = true;
// -- Encoding
function Utf7IMAPEncoder(options, codec) {
this.iconv = codec.iconv;
this.inBase64 = false;
this.base64Accum = Buffer.alloc(6);
this.base64AccumIdx = 0;
}
Utf7IMAPEncoder.prototype.write = function(str) {
var inBase64 = this.inBase64,
base64Accum = this.base64Accum,
base64AccumIdx = this.base64AccumIdx,
buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0;
for (var i = 0; i < str.length; i++) {
var uChar = str.charCodeAt(i);
if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
if (inBase64) {
if (base64AccumIdx > 0) {
bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
base64AccumIdx = 0;
}
buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
inBase64 = false;
}
if (!inBase64) {
buf[bufIdx++] = uChar; // Write direct character
if (uChar === andChar) // Ampersand -> '&-'
buf[bufIdx++] = minusChar;
}
} else { // Non-direct character
if (!inBase64) {
buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
inBase64 = true;
}
if (inBase64) {
base64Accum[base64AccumIdx++] = uChar >> 8;
base64Accum[base64AccumIdx++] = uChar & 0xFF;
if (base64AccumIdx == base64Accum.length) {
bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
base64AccumIdx = 0;
}
}
}
}
this.inBase64 = inBase64;
this.base64AccumIdx = base64AccumIdx;
return buf.slice(0, bufIdx);
}
Utf7IMAPEncoder.prototype.end = function() {
var buf = Buffer.alloc(10), bufIdx = 0;
if (this.inBase64) {
if (this.base64AccumIdx > 0) {
bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
this.base64AccumIdx = 0;
}
buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
this.inBase64 = false;
}
return buf.slice(0, bufIdx);
}
// -- Decoding
function Utf7IMAPDecoder(options, codec) {
this.iconv = codec.iconv;
this.inBase64 = false;
this.base64Accum = '';
}
var base64IMAPChars = base64Chars.slice();
base64IMAPChars[','.charCodeAt(0)] = true;
Utf7IMAPDecoder.prototype.write = function(buf) {
var res = "", lastI = 0,
inBase64 = this.inBase64,
base64Accum = this.base64Accum;
// The decoder is more involved as we must handle chunks in stream.
// It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
for (var i = 0; i < buf.length; i++) {
if (!inBase64) { // We're in direct mode.
// Write direct chars until '&'
if (buf[i] == andChar) {
res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
lastI = i+1;
inBase64 = true;
}
} else { // We decode base64.
if (!base64IMAPChars[buf[i]]) { // Base64 ended.
if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
res += "&";
} else {
var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
}
if (buf[i] != minusChar) // Minus may be absorbed after base64.
i--;
lastI = i+1;
inBase64 = false;
base64Accum = '';
}
}
}
if (!inBase64) {
res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
} else {
var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
b64str = b64str.slice(0, canBeDecoded);
res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
}
this.inBase64 = inBase64;
this.base64Accum = base64Accum;
return res;
}
Utf7IMAPDecoder.prototype.end = function() {
var res = "";
if (this.inBase64 && this.base64Accum.length > 0)
res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
this.inBase64 = false;
this.base64Accum = '';
return res;
}
/***/ }),
/***/ 67961:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
var BOMChar = '\uFEFF';
exports.PrependBOM = PrependBOMWrapper
function PrependBOMWrapper(encoder, options) {
this.encoder = encoder;
this.addBOM = true;
}
PrependBOMWrapper.prototype.write = function(str) {
if (this.addBOM) {
str = BOMChar + str;
this.addBOM = false;
}
return this.encoder.write(str);
}
PrependBOMWrapper.prototype.end = function() {
return this.encoder.end();
}
//------------------------------------------------------------------------------
exports.StripBOM = StripBOMWrapper;
function StripBOMWrapper(decoder, options) {
this.decoder = decoder;
this.pass = false;
this.options = options || {};
}
StripBOMWrapper.prototype.write = function(buf) {
var res = this.decoder.write(buf);
if (this.pass || !res)
return res;
if (res[0] === BOMChar) {
res = res.slice(1);
if (typeof this.options.stripBOM === 'function')
this.options.stripBOM();
}
this.pass = true;
return res;
}
StripBOMWrapper.prototype.end = function() {
return this.decoder.end();
}
/***/ }),
/***/ 30393:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(64293).Buffer;
// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer
// == Extend Node primitives to use iconv-lite =================================
module.exports = function (iconv) {
var original = undefined; // Place to keep original methods.
// Node authors rewrote Buffer internals to make it compatible with
// Uint8Array and we cannot patch key functions since then.
// Note: this does use older Buffer API on a purpose
iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array);
iconv.extendNodeEncodings = function extendNodeEncodings() {
if (original) return;
original = {};
if (!iconv.supportsNodeEncodingsExtension) {
console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node");
console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");
return;
}
var nodeNativeEncodings = {
'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,
};
Buffer.isNativeEncoding = function(enc) {
return enc && nodeNativeEncodings[enc.toLowerCase()];
}
// -- SlowBuffer -----------------------------------------------------------
var SlowBuffer = __nccwpck_require__(64293).SlowBuffer;
original.SlowBufferToString = SlowBuffer.prototype.toString;
SlowBuffer.prototype.toString = function(encoding, start, end) {
encoding = String(encoding || 'utf8').toLowerCase();
// Use native conversion when possible
if (Buffer.isNativeEncoding(encoding))
return original.SlowBufferToString.call(this, encoding, start, end);
// Otherwise, use our decoding method.
if (typeof start == 'undefined') start = 0;
if (typeof end == 'undefined') end = this.length;
return iconv.decode(this.slice(start, end), encoding);
}
original.SlowBufferWrite = SlowBuffer.prototype.write;
SlowBuffer.prototype.write = function(string, offset, length, encoding) {
// Support both (string, offset, length, encoding)
// and the legacy (string, encoding, offset, length)
if (isFinite(offset)) {
if (!isFinite(length)) {
encoding = length;
length = undefined;
}
} else { // legacy
var swap = encoding;
encoding = offset;
offset = length;
length = swap;
}
offset = +offset || 0;
var remaining = this.length - offset;
if (!length) {
length = remaining;
} else {
length = +length;
if (length > remaining) {
length = remaining;
}
}
encoding = String(encoding || 'utf8').toLowerCase();
// Use native conversion when possible
if (Buffer.isNativeEncoding(encoding))
return original.SlowBufferWrite.call(this, string, offset, length, encoding);
if (string.length > 0 && (length < 0 || offset < 0))
throw new RangeError('attempt to write beyond buffer bounds');
// Otherwise, use our encoding method.
var buf = iconv.encode(string, encoding);
if (buf.length < length) length = buf.length;
buf.copy(this, offset, 0, length);
return length;
}
// -- Buffer ---------------------------------------------------------------
original.BufferIsEncoding = Buffer.isEncoding;
Buffer.isEncoding = function(encoding) {
return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
}
original.BufferByteLength = Buffer.byteLength;
Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
encoding = String(encoding || 'utf8').toLowerCase();
// Use native conversion when possible
if (Buffer.isNativeEncoding(encoding))
return original.BufferByteLength.call(this, str, encoding);
// Slow, I know, but we don't have a better way yet.
return iconv.encode(str, encoding).length;
}
original.BufferToString = Buffer.prototype.toString;
Buffer.prototype.toString = function(encoding, start, end) {
encoding = String(encoding || 'utf8').toLowerCase();
// Use native conversion when possible
if (Buffer.isNativeEncoding(encoding))
return original.BufferToString.call(this, encoding, start, end);
// Otherwise, use our decoding method.
if (typeof start == 'undefined') start = 0;
if (typeof end == 'undefined') end = this.length;
return iconv.decode(this.slice(start, end), encoding);
}
original.BufferWrite = Buffer.prototype.write;
Buffer.prototype.write = function(string, offset, length, encoding) {
var _offset = offset, _length = length, _encoding = encoding;
// Support both (string, offset, length, encoding)
// and the legacy (string, encoding, offset, length)
if (isFinite(offset)) {
if (!isFinite(length)) {
encoding = length;
length = undefined;
}
} else { // legacy
var swap = encoding;
encoding = offset;
offset = length;
length = swap;
}
encoding = String(encoding || 'utf8').toLowerCase();
// Use native conversion when possible
if (Buffer.isNativeEncoding(encoding))
return original.BufferWrite.call(this, string, _offset, _length, _encoding);
offset = +offset || 0;
var remaining = this.length - offset;
if (!length) {
length = remaining;
} else {
length = +length;
if (length > remaining) {
length = remaining;
}
}
if (string.length > 0 && (length < 0 || offset < 0))
throw new RangeError('attempt to write beyond buffer bounds');
// Otherwise, use our encoding method.
var buf = iconv.encode(string, encoding);
if (buf.length < length) length = buf.length;
buf.copy(this, offset, 0, length);
return length;
// TODO: Set _charsWritten.
}
// -- Readable -------------------------------------------------------------
if (iconv.supportsStreams) {
var Readable = __nccwpck_require__(92413).Readable;
original.ReadableSetEncoding = Readable.prototype.setEncoding;
Readable.prototype.setEncoding = function setEncoding(enc, options) {
// Use our own decoder, it has the same interface.
// We cannot use original function as it doesn't handle BOM-s.
this._readableState.decoder = iconv.getDecoder(enc, options);
this._readableState.encoding = enc;
}
Readable.prototype.collect = iconv._collect;
}
}
// Remove iconv-lite Node primitive extensions.
iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
if (!iconv.supportsNodeEncodingsExtension)
return;
if (!original)
throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.")
delete Buffer.isNativeEncoding;
var SlowBuffer = __nccwpck_require__(64293).SlowBuffer;
SlowBuffer.prototype.toString = original.SlowBufferToString;
SlowBuffer.prototype.write = original.SlowBufferWrite;
Buffer.isEncoding = original.BufferIsEncoding;
Buffer.byteLength = original.BufferByteLength;
Buffer.prototype.toString = original.BufferToString;
Buffer.prototype.write = original.BufferWrite;
if (iconv.supportsStreams) {
var Readable = __nccwpck_require__(92413).Readable;
Readable.prototype.setEncoding = original.ReadableSetEncoding;
delete Readable.prototype.collect;
}
original = undefined;
}
}
/***/ }),
/***/ 19032:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
// Some environments don't have global Buffer (e.g. React Native).
// Solution would be installing npm modules "buffer" and "stream" explicitly.
var Buffer = __nccwpck_require__(15118).Buffer;
var bomHandling = __nccwpck_require__(67961),
iconv = module.exports;
// All codecs and aliases are kept here, keyed by encoding name/alias.
// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
iconv.encodings = null;
// Characters emitted in case of error.
iconv.defaultCharUnicode = '<27>';
iconv.defaultCharSingleByte = '?';
// Public API.
iconv.encode = function encode(str, encoding, options) {
str = "" + (str || ""); // Ensure string.
var encoder = iconv.getEncoder(encoding, options);
var res = encoder.write(str);
var trail = encoder.end();
return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
}
iconv.decode = function decode(buf, encoding, options) {
if (typeof buf === 'string') {
if (!iconv.skipDecodeWarning) {
console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
iconv.skipDecodeWarning = true;
}
buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer.
}
var decoder = iconv.getDecoder(encoding, options);
var res = decoder.write(buf);
var trail = decoder.end();
return trail ? (res + trail) : res;
}
iconv.encodingExists = function encodingExists(enc) {
try {
iconv.getCodec(enc);
return true;
} catch (e) {
return false;
}
}
// Legacy aliases to convert functions
iconv.toEncoding = iconv.encode;
iconv.fromEncoding = iconv.decode;
// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
iconv._codecDataCache = {};
iconv.getCodec = function getCodec(encoding) {
if (!iconv.encodings)
iconv.encodings = __nccwpck_require__(82733); // Lazy load all encoding definitions.
// Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
var enc = iconv._canonicalizeEncoding(encoding);
// Traverse iconv.encodings to find actual codec.
var codecOptions = {};
while (true) {
var codec = iconv._codecDataCache[enc];
if (codec)
return codec;
var codecDef = iconv.encodings[enc];
switch (typeof codecDef) {
case "string": // Direct alias to other encoding.
enc = codecDef;
break;
case "object": // Alias with options. Can be layered.
for (var key in codecDef)
codecOptions[key] = codecDef[key];
if (!codecOptions.encodingName)
codecOptions.encodingName = enc;
enc = codecDef.type;
break;
case "function": // Codec itself.
if (!codecOptions.encodingName)
codecOptions.encodingName = enc;
// The codec function must load all tables and return object with .encoder and .decoder methods.
// It'll be called only once (for each different options object).
codec = new codecDef(codecOptions, iconv);
iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.
return codec;
default:
throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
}
}
}
iconv._canonicalizeEncoding = function(encoding) {
// Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
}
iconv.getEncoder = function getEncoder(encoding, options) {
var codec = iconv.getCodec(encoding),
encoder = new codec.encoder(options, codec);
if (codec.bomAware && options && options.addBOM)
encoder = new bomHandling.PrependBOM(encoder, options);
return encoder;
}
iconv.getDecoder = function getDecoder(encoding, options) {
var codec = iconv.getCodec(encoding),
decoder = new codec.decoder(options, codec);
if (codec.bomAware && !(options && options.stripBOM === false))
decoder = new bomHandling.StripBOM(decoder, options);
return decoder;
}
// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.
var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;
if (nodeVer) {
// Load streaming support in Node v0.10+
var nodeVerArr = nodeVer.split(".").map(Number);
if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {
__nccwpck_require__(76409)(iconv);
}
// Load Node primitive extensions.
__nccwpck_require__(30393)(iconv);
}
if (false) {}
/***/ }),
/***/ 76409:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var Buffer = __nccwpck_require__(64293).Buffer,
Transform = __nccwpck_require__(92413).Transform;
// == Exports ==================================================================
module.exports = function(iconv) {
// Additional Public API.
iconv.encodeStream = function encodeStream(encoding, options) {
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
}
iconv.decodeStream = function decodeStream(encoding, options) {
return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
}
iconv.supportsStreams = true;
// Not published yet.
iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
iconv._collect = IconvLiteDecoderStream.prototype.collect;
};
// == Encoder stream =======================================================
function IconvLiteEncoderStream(conv, options) {
this.conv = conv;
options = options || {};
options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
Transform.call(this, options);
}
IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
constructor: { value: IconvLiteEncoderStream }
});
IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
if (typeof chunk != 'string')
return done(new Error("Iconv encoding stream needs strings as its input."));
try {
var res = this.conv.write(chunk);
if (res && res.length) this.push(res);
done();
}
catch (e) {
done(e);
}
}
IconvLiteEncoderStream.prototype._flush = function(done) {
try {
var res = this.conv.end();
if (res && res.length) this.push(res);
done();
}
catch (e) {
done(e);
}
}
IconvLiteEncoderStream.prototype.collect = function(cb) {
var chunks = [];
this.on('error', cb);
this.on('data', function(chunk) { chunks.push(chunk); });
this.on('end', function() {
cb(null, Buffer.concat(chunks));
});
return this;
}
// == Decoder stream =======================================================
function IconvLiteDecoderStream(conv, options) {
this.conv = conv;
options = options || {};
options.encoding = this.encoding = 'utf8'; // We output strings.
Transform.call(this, options);
}
IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
constructor: { value: IconvLiteDecoderStream }
});
IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
if (!Buffer.isBuffer(chunk))
return done(new Error("Iconv decoding stream needs buffers as its input."));
try {
var res = this.conv.write(chunk);
if (res && res.length) this.push(res, this.encoding);
done();
}
catch (e) {
done(e);
}
}
IconvLiteDecoderStream.prototype._flush = function(done) {
try {
var res = this.conv.end();
if (res && res.length) this.push(res, this.encoding);
done();
}
catch (e) {
done(e);
}
}
IconvLiteDecoderStream.prototype.collect = function(cb) {
var res = '';
this.on('error', cb);
this.on('data', function(chunk) { res += chunk; });
this.on('end', function() {
cb(null, res);
});
return this;
}
/***/ }),
/***/ 44124:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
try {
var util = __nccwpck_require__(31669);
/* 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
}
}
}
/***/ }),
/***/ 87547:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var ip = exports;
var Buffer = __nccwpck_require__(64293).Buffer;
var os = __nccwpck_require__(12087);
ip.toBuffer = function(ip, buff, offset) {
offset = ~~offset;
var result;
if (this.isV4Format(ip)) {
result = buff || new Buffer(offset + 4);
ip.split(/\./g).map(function(byte) {
result[offset++] = parseInt(byte, 10) & 0xff;
});
} else if (this.isV6Format(ip)) {
var sections = ip.split(':', 8);
var i;
for (i = 0; i < sections.length; i++) {
var isv4 = this.isV4Format(sections[i]);
var v4Buffer;
if (isv4) {
v4Buffer = this.toBuffer(sections[i]);
sections[i] = v4Buffer.slice(0, 2).toString('hex');
}
if (v4Buffer && ++i < 8) {
sections.splice(i, 0, v4Buffer.slice(2, 4).toString('hex'));
}
}
if (sections[0] === '') {
while (sections.length < 8) sections.unshift('0');
} else if (sections[sections.length - 1] === '') {
while (sections.length < 8) sections.push('0');
} else if (sections.length < 8) {
for (i = 0; i < sections.length && sections[i] !== ''; i++);
var argv = [ i, 1 ];
for (i = 9 - sections.length; i > 0; i--) {
argv.push('0');
}
sections.splice.apply(sections, argv);
}
result = buff || new Buffer(offset + 16);
for (i = 0; i < sections.length; i++) {
var word = parseInt(sections[i], 16);
result[offset++] = (word >> 8) & 0xff;
result[offset++] = word & 0xff;
}
}
if (!result) {
throw Error('Invalid ip address: ' + ip);
}
return result;
};
ip.toString = function(buff, offset, length) {
offset = ~~offset;
length = length || (buff.length - offset);
var result = [];
if (length === 4) {
// IPv4
for (var i = 0; i < length; i++) {
result.push(buff[offset + i]);
}
result = result.join('.');
} else if (length === 16) {
// IPv6
for (var i = 0; i < length; i += 2) {
result.push(buff.readUInt16BE(offset + i).toString(16));
}
result = result.join(':');
result = result.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3');
result = result.replace(/:{3,4}/, '::');
}
return result;
};
var ipv4Regex = /^(\d{1,3}\.){3,3}\d{1,3}$/;
var ipv6Regex =
/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;
ip.isV4Format = function(ip) {
return ipv4Regex.test(ip);
};
ip.isV6Format = function(ip) {
return ipv6Regex.test(ip);
};
function _normalizeFamily(family) {
return family ? family.toLowerCase() : 'ipv4';
}
ip.fromPrefixLen = function(prefixlen, family) {
if (prefixlen > 32) {
family = 'ipv6';
} else {
family = _normalizeFamily(family);
}
var len = 4;
if (family === 'ipv6') {
len = 16;
}
var buff = new Buffer(len);
for (var i = 0, n = buff.length; i < n; ++i) {
var bits = 8;
if (prefixlen < 8) {
bits = prefixlen;
}
prefixlen -= bits;
buff[i] = ~(0xff >> bits) & 0xff;
}
return ip.toString(buff);
};
ip.mask = function(addr, mask) {
addr = ip.toBuffer(addr);
mask = ip.toBuffer(mask);
var result = new Buffer(Math.max(addr.length, mask.length));
var i = 0;
// Same protocol - do bitwise and
if (addr.length === mask.length) {
for (i = 0; i < addr.length; i++) {
result[i] = addr[i] & mask[i];
}
} else if (mask.length === 4) {
// IPv6 address and IPv4 mask
// (Mask low bits)
for (i = 0; i < mask.length; i++) {
result[i] = addr[addr.length - 4 + i] & mask[i];
}
} else {
// IPv6 mask and IPv4 addr
for (var i = 0; i < result.length - 6; i++) {
result[i] = 0;
}
// ::ffff:ipv4
result[10] = 0xff;
result[11] = 0xff;
for (i = 0; i < addr.length; i++) {
result[i + 12] = addr[i] & mask[i + 12];
}
i = i + 12;
}
for (; i < result.length; i++)
result[i] = 0;
return ip.toString(result);
};
ip.cidr = function(cidrString) {
var cidrParts = cidrString.split('/');
var addr = cidrParts[0];
if (cidrParts.length !== 2)
throw new Error('invalid CIDR subnet: ' + addr);
var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10));
return ip.mask(addr, mask);
};
ip.subnet = function(addr, mask) {
var networkAddress = ip.toLong(ip.mask(addr, mask));
// Calculate the mask's length.
var maskBuffer = ip.toBuffer(mask);
var maskLength = 0;
for (var i = 0; i < maskBuffer.length; i++) {
if (maskBuffer[i] === 0xff) {
maskLength += 8;
} else {
var octet = maskBuffer[i] & 0xff;
while (octet) {
octet = (octet << 1) & 0xff;
maskLength++;
}
}
}
var numberOfAddresses = Math.pow(2, 32 - maskLength);
return {
networkAddress: ip.fromLong(networkAddress),
firstAddress: numberOfAddresses <= 2 ?
ip.fromLong(networkAddress) :
ip.fromLong(networkAddress + 1),
lastAddress: numberOfAddresses <= 2 ?
ip.fromLong(networkAddress + numberOfAddresses - 1) :
ip.fromLong(networkAddress + numberOfAddresses - 2),
broadcastAddress: ip.fromLong(networkAddress + numberOfAddresses - 1),
subnetMask: mask,
subnetMaskLength: maskLength,
numHosts: numberOfAddresses <= 2 ?
numberOfAddresses : numberOfAddresses - 2,
length: numberOfAddresses,
contains: function(other) {
return networkAddress === ip.toLong(ip.mask(other, mask));
}
};
};
ip.cidrSubnet = function(cidrString) {
var cidrParts = cidrString.split('/');
var addr = cidrParts[0];
if (cidrParts.length !== 2)
throw new Error('invalid CIDR subnet: ' + addr);
var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10));
return ip.subnet(addr, mask);
};
ip.not = function(addr) {
var buff = ip.toBuffer(addr);
for (var i = 0; i < buff.length; i++) {
buff[i] = 0xff ^ buff[i];
}
return ip.toString(buff);
};
ip.or = function(a, b) {
a = ip.toBuffer(a);
b = ip.toBuffer(b);
// same protocol
if (a.length === b.length) {
for (var i = 0; i < a.length; ++i) {
a[i] |= b[i];
}
return ip.toString(a);
// mixed protocols
} else {
var buff = a;
var other = b;
if (b.length > a.length) {
buff = b;
other = a;
}
var offset = buff.length - other.length;
for (var i = offset; i < buff.length; ++i) {
buff[i] |= other[i - offset];
}
return ip.toString(buff);
}
};
ip.isEqual = function(a, b) {
a = ip.toBuffer(a);
b = ip.toBuffer(b);
// Same protocol
if (a.length === b.length) {
for (var i = 0; i < a.length; i++) {
if (a[i] !== b[i]) return false;
}
return true;
}
// Swap
if (b.length === 4) {
var t = b;
b = a;
a = t;
}
// a - IPv4, b - IPv6
for (var i = 0; i < 10; i++) {
if (b[i] !== 0) return false;
}
var word = b.readUInt16BE(10);
if (word !== 0 && word !== 0xffff) return false;
for (var i = 0; i < 4; i++) {
if (a[i] !== b[i + 12]) return false;
}
return true;
};
ip.isPrivate = function(addr) {
return /^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i
.test(addr) ||
/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) ||
/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i
.test(addr) ||
/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) ||
/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) ||
/^f[cd][0-9a-f]{2}:/i.test(addr) ||
/^fe80:/i.test(addr) ||
/^::1$/.test(addr) ||
/^::$/.test(addr);
};
ip.isPublic = function(addr) {
return !ip.isPrivate(addr);
};
ip.isLoopback = function(addr) {
return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/
.test(addr) ||
/^fe80::1$/.test(addr) ||
/^::1$/.test(addr) ||
/^::$/.test(addr);
};
ip.loopback = function(family) {
//
// Default to `ipv4`
//
family = _normalizeFamily(family);
if (family !== 'ipv4' && family !== 'ipv6') {
throw new Error('family must be ipv4 or ipv6');
}
return family === 'ipv4' ? '127.0.0.1' : 'fe80::1';
};
//
// ### function address (name, family)
// #### @name {string|'public'|'private'} **Optional** Name or security
// of the network interface.
// #### @family {ipv4|ipv6} **Optional** IP family of the address (defaults
// to ipv4).
//
// Returns the address for the network interface on the current system with
// the specified `name`:
// * String: First `family` address of the interface.
// If not found see `undefined`.
// * 'public': the first public ip address of family.
// * 'private': the first private ip address of family.
// * undefined: First address with `ipv4` or loopback address `127.0.0.1`.
//
ip.address = function(name, family) {
var interfaces = os.networkInterfaces();
var all;
//
// Default to `ipv4`
//
family = _normalizeFamily(family);
//
// If a specific network interface has been named,
// return the address.
//
if (name && name !== 'private' && name !== 'public') {
var res = interfaces[name].filter(function(details) {
var itemFamily = details.family.toLowerCase();
return itemFamily === family;
});
if (res.length === 0)
return undefined;
return res[0].address;
}
var all = Object.keys(interfaces).map(function (nic) {
//
// Note: name will only be `public` or `private`
// when this is called.
//
var addresses = interfaces[nic].filter(function (details) {
details.family = details.family.toLowerCase();
if (details.family !== family || ip.isLoopback(details.address)) {
return false;
} else if (!name) {
return true;
}
return name === 'public' ? ip.isPrivate(details.address) :
ip.isPublic(details.address);
});
return addresses.length ? addresses[0].address : undefined;
}).filter(Boolean);
return !all.length ? ip.loopback(family) : all[0];
};
ip.toLong = function(ip) {
var ipl = 0;
ip.split('.').forEach(function(octet) {
ipl <<= 8;
ipl += parseInt(octet);
});
return(ipl >>> 0);
};
ip.fromLong = function(ipl) {
return ((ipl >>> 24) + '.' +
(ipl >> 16 & 255) + '.' +
(ipl >> 8 & 255) + '.' +
(ipl & 255) );
};
/***/ }),
/***/ 20893:
/***/ ((module) => {
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ 26160:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var _fs
try {
_fs = __nccwpck_require__(17017)
} catch (_) {
_fs = __nccwpck_require__(35747)
}
function readFile (file, options, callback) {
if (callback == null) {
callback = options
options = {}
}
if (typeof options === 'string') {
options = {encoding: options}
}
options = options || {}
var fs = options.fs || _fs
var shouldThrow = true
if ('throws' in options) {
shouldThrow = options.throws
}
fs.readFile(file, options, function (err, data) {
if (err) return callback(err)
data = stripBom(data)
var obj
try {
obj = JSON.parse(data, options ? options.reviver : null)
} catch (err2) {
if (shouldThrow) {
err2.message = file + ': ' + err2.message
return callback(err2)
} else {
return callback(null, null)
}
}
callback(null, obj)
})
}
function readFileSync (file, options) {
options = options || {}
if (typeof options === 'string') {
options = {encoding: options}
}
var fs = options.fs || _fs
var shouldThrow = true
if ('throws' in options) {
shouldThrow = options.throws
}
try {
var content = fs.readFileSync(file, options)
content = stripBom(content)
return JSON.parse(content, options.reviver)
} catch (err) {
if (shouldThrow) {
err.message = file + ': ' + err.message
throw err
} else {
return null
}
}
}
function stringify (obj, options) {
var spaces
var EOL = '\n'
if (typeof options === 'object' && options !== null) {
if (options.spaces) {
spaces = options.spaces
}
if (options.EOL) {
EOL = options.EOL
}
}
var str = JSON.stringify(obj, options ? options.replacer : null, spaces)
return str.replace(/\n/g, EOL) + EOL
}
function writeFile (file, obj, options, callback) {
if (callback == null) {
callback = options
options = {}
}
options = options || {}
var fs = options.fs || _fs
var str = ''
try {
str = stringify(obj, options)
} catch (err) {
// Need to return whether a callback was passed or not
if (callback) callback(err, null)
return
}
fs.writeFile(file, str, options, callback)
}
function writeFileSync (file, obj, options) {
options = options || {}
var fs = options.fs || _fs
var str = stringify(obj, options)
// not sure if fs.writeFileSync returns anything, but just in case
return fs.writeFileSync(file, str, options)
}
function stripBom (content) {
// we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
if (Buffer.isBuffer(content)) content = content.toString('utf8')
content = content.replace(/^\uFEFF/, '')
return content
}
var jsonfile = {
readFile: readFile,
readFileSync: readFileSync,
writeFile: writeFile,
writeFileSync: writeFileSync
}
module.exports = jsonfile
/***/ }),
/***/ 87466:
/***/ ((module) => {
"use strict";
module.exports = clone
var getPrototypeOf = Object.getPrototypeOf || function (obj) {
return obj.__proto__
}
function clone (obj) {
if (obj === null || typeof obj !== 'object')
return obj
if (obj instanceof Object)
var copy = { __proto__: getPrototypeOf(obj) }
else
var copy = Object.create(null)
Object.getOwnPropertyNames(obj).forEach(function (key) {
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
})
return copy
}
/***/ }),
/***/ 17017:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var fs = __nccwpck_require__(35747)
var polyfills = __nccwpck_require__(36194)
var legacy = __nccwpck_require__(89217)
var clone = __nccwpck_require__(87466)
var util = __nccwpck_require__(31669)
/* istanbul ignore next - node 0.x polyfill */
var gracefulQueue
var previousSymbol
/* istanbul ignore else - node 0.x polyfill */
if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
gracefulQueue = Symbol.for('graceful-fs.queue')
// This is used in testing by future versions
previousSymbol = Symbol.for('graceful-fs.previous')
} else {
gracefulQueue = '___graceful-fs.queue'
previousSymbol = '___graceful-fs.previous'
}
function noop () {}
function publishQueue(context, queue) {
Object.defineProperty(context, gracefulQueue, {
get: function() {
return queue
}
})
}
var debug = noop
if (util.debuglog)
debug = util.debuglog('gfs4')
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
debug = function() {
var m = util.format.apply(util, arguments)
m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
console.error(m)
}
// Once time initialization
if (!fs[gracefulQueue]) {
// This queue can be shared by multiple loaded instances
var queue = global[gracefulQueue] || []
publishQueue(fs, queue)
// Patch fs.close/closeSync to shared queue version, because we need
// to retry() whenever a close happens *anywhere* in the program.
// This is essential when multiple graceful-fs instances are
// in play at the same time.
fs.close = (function (fs$close) {
function close (fd, cb) {
return fs$close.call(fs, fd, function (err) {
// This function uses the graceful-fs shared queue
if (!err) {
resetQueue()
}
if (typeof cb === 'function')
cb.apply(this, arguments)
})
}
Object.defineProperty(close, previousSymbol, {
value: fs$close
})
return close
})(fs.close)
fs.closeSync = (function (fs$closeSync) {
function closeSync (fd) {
// This function uses the graceful-fs shared queue
fs$closeSync.apply(fs, arguments)
resetQueue()
}
Object.defineProperty(closeSync, previousSymbol, {
value: fs$closeSync
})
return closeSync
})(fs.closeSync)
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
process.on('exit', function() {
debug(fs[gracefulQueue])
__nccwpck_require__(42357).equal(fs[gracefulQueue].length, 0)
})
}
}
if (!global[gracefulQueue]) {
publishQueue(global, fs[gracefulQueue]);
}
module.exports = patch(clone(fs))
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
module.exports = patch(fs)
fs.__patched = true;
}
function patch (fs) {
// Everything that references the open() function needs to be in here
polyfills(fs)
fs.gracefulify = patch
fs.createReadStream = createReadStream
fs.createWriteStream = createWriteStream
var fs$readFile = fs.readFile
fs.readFile = readFile
function readFile (path, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$readFile(path, options, cb)
function go$readFile (path, options, cb, startTime) {
return fs$readFile(path, options, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$writeFile = fs.writeFile
fs.writeFile = writeFile
function writeFile (path, data, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$writeFile(path, data, options, cb)
function go$writeFile (path, data, options, cb, startTime) {
return fs$writeFile(path, data, options, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$appendFile = fs.appendFile
if (fs$appendFile)
fs.appendFile = appendFile
function appendFile (path, data, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$appendFile(path, data, options, cb)
function go$appendFile (path, data, options, cb, startTime) {
return fs$appendFile(path, data, options, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$copyFile = fs.copyFile
if (fs$copyFile)
fs.copyFile = copyFile
function copyFile (src, dest, flags, cb) {
if (typeof flags === 'function') {
cb = flags
flags = 0
}
return go$copyFile(src, dest, flags, cb)
function go$copyFile (src, dest, flags, cb, startTime) {
return fs$copyFile(src, dest, flags, function (err) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
var fs$readdir = fs.readdir
fs.readdir = readdir
function readdir (path, options, cb) {
if (typeof options === 'function')
cb = options, options = null
return go$readdir(path, options, cb)
function go$readdir (path, options, cb, startTime) {
return fs$readdir(path, options, function (err, files) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()])
else {
if (files && files.sort)
files.sort()
if (typeof cb === 'function')
cb.call(this, err, files)
}
})
}
}
if (process.version.substr(0, 4) === 'v0.8') {
var legStreams = legacy(fs)
ReadStream = legStreams.ReadStream
WriteStream = legStreams.WriteStream
}
var fs$ReadStream = fs.ReadStream
if (fs$ReadStream) {
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
ReadStream.prototype.open = ReadStream$open
}
var fs$WriteStream = fs.WriteStream
if (fs$WriteStream) {
WriteStream.prototype = Object.create(fs$WriteStream.prototype)
WriteStream.prototype.open = WriteStream$open
}
Object.defineProperty(fs, 'ReadStream', {
get: function () {
return ReadStream
},
set: function (val) {
ReadStream = val
},
enumerable: true,
configurable: true
})
Object.defineProperty(fs, 'WriteStream', {
get: function () {
return WriteStream
},
set: function (val) {
WriteStream = val
},
enumerable: true,
configurable: true
})
// legacy names
var FileReadStream = ReadStream
Object.defineProperty(fs, 'FileReadStream', {
get: function () {
return FileReadStream
},
set: function (val) {
FileReadStream = val
},
enumerable: true,
configurable: true
})
var FileWriteStream = WriteStream
Object.defineProperty(fs, 'FileWriteStream', {
get: function () {
return FileWriteStream
},
set: function (val) {
FileWriteStream = val
},
enumerable: true,
configurable: true
})
function ReadStream (path, options) {
if (this instanceof ReadStream)
return fs$ReadStream.apply(this, arguments), this
else
return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
}
function ReadStream$open () {
var that = this
open(that.path, that.flags, that.mode, function (err, fd) {
if (err) {
if (that.autoClose)
that.destroy()
that.emit('error', err)
} else {
that.fd = fd
that.emit('open', fd)
that.read()
}
})
}
function WriteStream (path, options) {
if (this instanceof WriteStream)
return fs$WriteStream.apply(this, arguments), this
else
return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
}
function WriteStream$open () {
var that = this
open(that.path, that.flags, that.mode, function (err, fd) {
if (err) {
that.destroy()
that.emit('error', err)
} else {
that.fd = fd
that.emit('open', fd)
}
})
}
function createReadStream (path, options) {
return new fs.ReadStream(path, options)
}
function createWriteStream (path, options) {
return new fs.WriteStream(path, options)
}
var fs$open = fs.open
fs.open = open
function open (path, flags, mode, cb) {
if (typeof mode === 'function')
cb = mode, mode = null
return go$open(path, flags, mode, cb)
function go$open (path, flags, mode, cb, startTime) {
return fs$open(path, flags, mode, function (err, fd) {
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])
else {
if (typeof cb === 'function')
cb.apply(this, arguments)
}
})
}
}
return fs
}
function enqueue (elem) {
debug('ENQUEUE', elem[0].name, elem[1])
fs[gracefulQueue].push(elem)
retry()
}
// keep track of the timeout between retry() calls
var retryTimer
// reset the startTime and lastTime to now
// this resets the start of the 60 second overall timeout as well as the
// delay between attempts so that we'll retry these jobs sooner
function resetQueue () {
var now = Date.now()
for (var i = 0; i < fs[gracefulQueue].length; ++i) {
// entries that are only a length of 2 are from an older version, don't
// bother modifying those since they'll be retried anyway.
if (fs[gracefulQueue][i].length > 2) {
fs[gracefulQueue][i][3] = now // startTime
fs[gracefulQueue][i][4] = now // lastTime
}
}
// call retry to make sure we're actively processing the queue
retry()
}
function retry () {
// clear the timer and remove it to help prevent unintended concurrency
clearTimeout(retryTimer)
retryTimer = undefined
if (fs[gracefulQueue].length === 0)
return
var elem = fs[gracefulQueue].shift()
var fn = elem[0]
var args = elem[1]
// these items may be unset if they were added by an older graceful-fs
var err = elem[2]
var startTime = elem[3]
var lastTime = elem[4]
// if we don't have a startTime we have no way of knowing if we've waited
// long enough, so go ahead and retry this item now
if (startTime === undefined) {
debug('RETRY', fn.name, args)
fn.apply(null, args)
} else if (Date.now() - startTime >= 60000) {
// it's been more than 60 seconds total, bail now
debug('TIMEOUT', fn.name, args)
var cb = args.pop()
if (typeof cb === 'function')
cb.call(null, err)
} else {
// the amount of time between the last attempt and right now
var sinceAttempt = Date.now() - lastTime
// the amount of time between when we first tried, and when we last tried
// rounded up to at least 1
var sinceStart = Math.max(lastTime - startTime, 1)
// backoff. wait longer than the total time we've been retrying, but only
// up to a maximum of 100ms
var desiredDelay = Math.min(sinceStart * 1.2, 100)
// it's been long enough since the last retry, do it again
if (sinceAttempt >= desiredDelay) {
debug('RETRY', fn.name, args)
fn.apply(null, args.concat([startTime]))
} else {
// if we can't do this job yet, push it to the end of the queue
// and let the next iteration check again
fs[gracefulQueue].push(elem)
}
}
// schedule our next run if one isn't already scheduled
if (retryTimer === undefined) {
retryTimer = setTimeout(retry, 0)
}
}
/***/ }),
/***/ 89217:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var Stream = __nccwpck_require__(92413).Stream
module.exports = legacy
function legacy (fs) {
return {
ReadStream: ReadStream,
WriteStream: WriteStream
}
function ReadStream (path, options) {
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
Stream.call(this);
var self = this;
this.path = path;
this.fd = null;
this.readable = true;
this.paused = false;
this.flags = 'r';
this.mode = 438; /*=0666*/
this.bufferSize = 64 * 1024;
options = options || {};
// Mixin options into this
var keys = Object.keys(options);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.encoding) this.setEncoding(this.encoding);
if (this.start !== undefined) {
if ('number' !== typeof this.start) {
throw TypeError('start must be a Number');
}
if (this.end === undefined) {
this.end = Infinity;
} else if ('number' !== typeof this.end) {
throw TypeError('end must be a Number');
}
if (this.start > this.end) {
throw new Error('start must be <= end');
}
this.pos = this.start;
}
if (this.fd !== null) {
process.nextTick(function() {
self._read();
});
return;
}
fs.open(this.path, this.flags, this.mode, function (err, fd) {
if (err) {
self.emit('error', err);
self.readable = false;
return;
}
self.fd = fd;
self.emit('open', fd);
self._read();
})
}
function WriteStream (path, options) {
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
Stream.call(this);
this.path = path;
this.fd = null;
this.writable = true;
this.flags = 'w';
this.encoding = 'binary';
this.mode = 438; /*=0666*/
this.bytesWritten = 0;
options = options || {};
// Mixin options into this
var keys = Object.keys(options);
for (var index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.start !== undefined) {
if ('number' !== typeof this.start) {
throw TypeError('start must be a Number');
}
if (this.start < 0) {
throw new Error('start must be >= zero');
}
this.pos = this.start;
}
this.busy = false;
this._queue = [];
if (this.fd === null) {
this._open = fs.open;
this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
this.flush();
}
}
}
/***/ }),
/***/ 36194:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var constants = __nccwpck_require__(27619)
var origCwd = process.cwd
var cwd = null
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process)
return cwd
}
try {
process.cwd()
} catch (er) {}
// This check is needed until node.js 12 is required
if (typeof process.chdir === 'function') {
var chdir = process.chdir
process.chdir = function (d) {
cwd = null
chdir.call(process, d)
}
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)
}
module.exports = patch
function patch (fs) {
// (re-)implement some things that are known busted or missing.
// lchmod, broken prior to 0.6.2
// back-port the fix here.
if (constants.hasOwnProperty('O_SYMLINK') &&
process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
patchLchmod(fs)
}
// lutimes implementation, or no-op
if (!fs.lutimes) {
patchLutimes(fs)
}
// https://github.com/isaacs/node-graceful-fs/issues/4
// Chown should not fail on einval or eperm if non-root.
// It should not fail on enosys ever, as this just indicates
// that a fs doesn't support the intended operation.
fs.chown = chownFix(fs.chown)
fs.fchown = chownFix(fs.fchown)
fs.lchown = chownFix(fs.lchown)
fs.chmod = chmodFix(fs.chmod)
fs.fchmod = chmodFix(fs.fchmod)
fs.lchmod = chmodFix(fs.lchmod)
fs.chownSync = chownFixSync(fs.chownSync)
fs.fchownSync = chownFixSync(fs.fchownSync)
fs.lchownSync = chownFixSync(fs.lchownSync)
fs.chmodSync = chmodFixSync(fs.chmodSync)
fs.fchmodSync = chmodFixSync(fs.fchmodSync)
fs.lchmodSync = chmodFixSync(fs.lchmodSync)
fs.stat = statFix(fs.stat)
fs.fstat = statFix(fs.fstat)
fs.lstat = statFix(fs.lstat)
fs.statSync = statFixSync(fs.statSync)
fs.fstatSync = statFixSync(fs.fstatSync)
fs.lstatSync = statFixSync(fs.lstatSync)
// if lchmod/lchown do not exist, then make them no-ops
if (!fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
if (cb) process.nextTick(cb)
}
fs.lchmodSync = function () {}
}
if (!fs.lchown) {
fs.lchown = function (path, uid, gid, cb) {
if (cb) process.nextTick(cb)
}
fs.lchownSync = function () {}
}
// on Windows, A/V software can lock the directory, causing this
// to fail with an EACCES or EPERM if the directory contains newly
// created files. Try again on failure, for up to 60 seconds.
// Set the timeout this long because some Windows Anti-Virus, such as Parity
// bit9, may lock files for up to a minute, causing npm package install
// failures. Also, take care to yield the scheduler. Windows scheduling gives
// CPU to a busy looping process, which can cause the program causing the lock
// contention to be starved of CPU by node, so the contention doesn't resolve.
if (platform === "win32") {
fs.rename = (function (fs$rename) { return function (from, to, cb) {
var start = Date.now()
var backoff = 0;
fs$rename(from, to, function CB (er) {
if (er
&& (er.code === "EACCES" || er.code === "EPERM")
&& Date.now() - start < 60000) {
setTimeout(function() {
fs.stat(to, function (stater, st) {
if (stater && stater.code === "ENOENT")
fs$rename(from, to, CB);
else
cb(er)
})
}, backoff)
if (backoff < 100)
backoff += 10;
return;
}
if (cb) cb(er)
})
}})(fs.rename)
}
// if read() returns EAGAIN, then just try it again.
fs.read = (function (fs$read) {
function read (fd, buffer, offset, length, position, callback_) {
var callback
if (callback_ && typeof callback_ === 'function') {
var eagCounter = 0
callback = function (er, _, __) {
if (er && er.code === 'EAGAIN' && eagCounter < 10) {
eagCounter ++
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
}
callback_.apply(this, arguments)
}
}
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
}
// This ensures `util.promisify` works as it does for native `fs.read`.
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)
return read
})(fs.read)
fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
var eagCounter = 0
while (true) {
try {
return fs$readSync.call(fs, fd, buffer, offset, length, position)
} catch (er) {
if (er.code === 'EAGAIN' && eagCounter < 10) {
eagCounter ++
continue
}
throw er
}
}
}})(fs.readSync)
function patchLchmod (fs) {
fs.lchmod = function (path, mode, callback) {
fs.open( path
, constants.O_WRONLY | constants.O_SYMLINK
, mode
, function (err, fd) {
if (err) {
if (callback) callback(err)
return
}
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function (err) {
fs.close(fd, function(err2) {
if (callback) callback(err || err2)
})
})
})
}
fs.lchmodSync = function (path, mode) {
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
var threw = true
var ret
try {
ret = fs.fchmodSync(fd, mode)
threw = false
} finally {
if (threw) {
try {
fs.closeSync(fd)
} catch (er) {}
} else {
fs.closeSync(fd)
}
}
return ret
}
}
function patchLutimes (fs) {
if (constants.hasOwnProperty("O_SYMLINK")) {
fs.lutimes = function (path, at, mt, cb) {
fs.open(path, constants.O_SYMLINK, function (er, fd) {
if (er) {
if (cb) cb(er)
return
}
fs.futimes(fd, at, mt, function (er) {
fs.close(fd, function (er2) {
if (cb) cb(er || er2)
})
})
})
}
fs.lutimesSync = function (path, at, mt) {
var fd = fs.openSync(path, constants.O_SYMLINK)
var ret
var threw = true
try {
ret = fs.futimesSync(fd, at, mt)
threw = false
} finally {
if (threw) {
try {
fs.closeSync(fd)
} catch (er) {}
} else {
fs.closeSync(fd)
}
}
return ret
}
} else {
fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
fs.lutimesSync = function () {}
}
}
function chmodFix (orig) {
if (!orig) return orig
return function (target, mode, cb) {
return orig.call(fs, target, mode, function (er) {
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
})
}
}
function chmodFixSync (orig) {
if (!orig) return orig
return function (target, mode) {
try {
return orig.call(fs, target, mode)
} catch (er) {
if (!chownErOk(er)) throw er
}
}
}
function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
return orig.call(fs, target, uid, gid, function (er) {
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
})
}
}
function chownFixSync (orig) {
if (!orig) return orig
return function (target, uid, gid) {
try {
return orig.call(fs, target, uid, gid)
} catch (er) {
if (!chownErOk(er)) throw er
}
}
}
function statFix (orig) {
if (!orig) return orig
// Older versions of Node erroneously returned signed integers for
// uid + gid.
return function (target, options, cb) {
if (typeof options === 'function') {
cb = options
options = null
}
function callback (er, stats) {
if (stats) {
if (stats.uid < 0) stats.uid += 0x100000000
if (stats.gid < 0) stats.gid += 0x100000000
}
if (cb) cb.apply(this, arguments)
}
return options ? orig.call(fs, target, options, callback)
: orig.call(fs, target, callback)
}
}
function statFixSync (orig) {
if (!orig) return orig
// Older versions of Node erroneously returned signed integers for
// uid + gid.
return function (target, options) {
var stats = options ? orig.call(fs, target, options)
: orig.call(fs, target)
if (stats) {
if (stats.uid < 0) stats.uid += 0x100000000
if (stats.gid < 0) stats.gid += 0x100000000
}
return stats;
}
}
// ENOSYS means that the fs doesn't support the op. Just ignore
// that, because it doesn't matter.
//
// if there's no getuid, or if getuid() is something other
// than 0, and the error is EINVAL or EPERM, then just ignore
// it.
//
// This specific case is a silent failure in cp, install, tar,
// and most other unix tools that manage permissions.
//
// When running as root, or if other types of errors are
// encountered, then it's strict.
function chownErOk (er) {
if (!er)
return true
if (er.code === "ENOSYS")
return true
var nonroot = !process.getuid || process.getuid() !== 0
if (nonroot) {
if (er.code === "EINVAL" || er.code === "EPERM")
return true
}
return false
}
}
/***/ }),
/***/ 7129:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
// A linked list to keep track of recently-used-ness
const Yallist = __nccwpck_require__(40665)
const MAX = Symbol('max')
const LENGTH = Symbol('length')
const LENGTH_CALCULATOR = Symbol('lengthCalculator')
const ALLOW_STALE = Symbol('allowStale')
const MAX_AGE = Symbol('maxAge')
const DISPOSE = Symbol('dispose')
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
const LRU_LIST = Symbol('lruList')
const CACHE = Symbol('cache')
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
const naiveLength = () => 1
// lruList is a yallist where the head is the youngest
// item, and the tail is the oldest. the list contains the Hit
// objects as the entries.
// Each Hit object has a reference to its Yallist.Node. This
// never changes.
//
// cache is a Map (or PseudoMap) that matches the keys to
// the Yallist.Node object.
class LRUCache {
constructor (options) {
if (typeof options === 'number')
options = { max: options }
if (!options)
options = {}
if (options.max && (typeof options.max !== 'number' || options.max < 0))
throw new TypeError('max must be a non-negative number')
// Kind of weird to have a default max of Infinity, but oh well.
const max = this[MAX] = options.max || Infinity
const lc = options.length || naiveLength
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
this[ALLOW_STALE] = options.stale || false
if (options.maxAge && typeof options.maxAge !== 'number')
throw new TypeError('maxAge must be a number')
this[MAX_AGE] = options.maxAge || 0
this[DISPOSE] = options.dispose
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
this.reset()
}
// resize the cache when the max changes.
set max (mL) {
if (typeof mL !== 'number' || mL < 0)
throw new TypeError('max must be a non-negative number')
this[MAX] = mL || Infinity
trim(this)
}
get max () {
return this[MAX]
}
set allowStale (allowStale) {
this[ALLOW_STALE] = !!allowStale
}
get allowStale () {
return this[ALLOW_STALE]
}
set maxAge (mA) {
if (typeof mA !== 'number')
throw new TypeError('maxAge must be a non-negative number')
this[MAX_AGE] = mA
trim(this)
}
get maxAge () {
return this[MAX_AGE]
}
// resize the cache when the lengthCalculator changes.
set lengthCalculator (lC) {
if (typeof lC !== 'function')
lC = naiveLength
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC
this[LENGTH] = 0
this[LRU_LIST].forEach(hit => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
this[LENGTH] += hit.length
})
}
trim(this)
}
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
get length () { return this[LENGTH] }
get itemCount () { return this[LRU_LIST].length }
rforEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].tail; walker !== null;) {
const prev = walker.prev
forEachStep(this, fn, walker, thisp)
walker = prev
}
}
forEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].head; walker !== null;) {
const next = walker.next
forEachStep(this, fn, walker, thisp)
walker = next
}
}
keys () {
return this[LRU_LIST].toArray().map(k => k.key)
}
values () {
return this[LRU_LIST].toArray().map(k => k.value)
}
reset () {
if (this[DISPOSE] &&
this[LRU_LIST] &&
this[LRU_LIST].length) {
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
}
this[CACHE] = new Map() // hash of items by key
this[LRU_LIST] = new Yallist() // list of items in order of use recency
this[LENGTH] = 0 // length of items in the list
}
dump () {
return this[LRU_LIST].map(hit =>
isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter(h => h)
}
dumpLru () {
return this[LRU_LIST]
}
set (key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE]
if (maxAge && typeof maxAge !== 'number')
throw new TypeError('maxAge must be a number')
const now = maxAge ? Date.now() : 0
const len = this[LENGTH_CALCULATOR](value, key)
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key))
return false
}
const node = this[CACHE].get(key)
const item = node.value
// dispose of the old one before overwriting
// split out into 2 ifs for better coverage tracking
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value)
}
item.now = now
item.maxAge = maxAge
item.value = value
this[LENGTH] += len - item.length
item.length = len
this.get(key)
trim(this)
return true
}
const hit = new Entry(key, value, len, now, maxAge)
// oversized objects fall out of cache automatically.
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value)
return false
}
this[LENGTH] += hit.length
this[LRU_LIST].unshift(hit)
this[CACHE].set(key, this[LRU_LIST].head)
trim(this)
return true
}
has (key) {
if (!this[CACHE].has(key)) return false
const hit = this[CACHE].get(key).value
return !isStale(this, hit)
}
get (key) {
return get(this, key, true)
}
peek (key) {
return get(this, key, false)
}
pop () {
const node = this[LRU_LIST].tail
if (!node)
return null
del(this, node)
return node.value
}
del (key) {
del(this, this[CACHE].get(key))
}
load (arr) {
// reset the cache
this.reset()
const now = Date.now()
// A previous serialized cache has the most recent items first
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l]
const expiresAt = hit.e || 0
if (expiresAt === 0)
// the item was created without expiration in a non aged cache
this.set(hit.k, hit.v)
else {
const maxAge = expiresAt - now
// dont add already expired items
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge)
}
}
}
}
prune () {
this[CACHE].forEach((value, key) => get(this, key, false))
}
}
const get = (self, key, doUse) => {
const node = self[CACHE].get(key)
if (node) {
const hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
return undefined
} else {
if (doUse) {
if (self[UPDATE_AGE_ON_GET])
node.value.now = Date.now()
self[LRU_LIST].unshiftNode(node)
}
}
return hit.value
}
}
const isStale = (self, hit) => {
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
return false
const diff = Date.now() - hit.now
return hit.maxAge ? diff > hit.maxAge
: self[MAX_AGE] && (diff > self[MAX_AGE])
}
const trim = self => {
if (self[LENGTH] > self[MAX]) {
for (let walker = self[LRU_LIST].tail;
self[LENGTH] > self[MAX] && walker !== null;) {
// We know that we're about to delete this one, and also
// what the next least recently used key will be, so just
// go ahead and set it now.
const prev = walker.prev
del(self, walker)
walker = prev
}
}
}
const del = (self, node) => {
if (node) {
const hit = node.value
if (self[DISPOSE])
self[DISPOSE](hit.key, hit.value)
self[LENGTH] -= hit.length
self[CACHE].delete(hit.key)
self[LRU_LIST].removeNode(node)
}
}
class Entry {
constructor (key, value, length, now, maxAge) {
this.key = key
this.value = value
this.length = length
this.now = now
this.maxAge = maxAge || 0
}
}
const forEachStep = (self, fn, node, thisp) => {
let hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
hit = undefined
}
if (hit)
fn.call(thisp, hit.value, hit.key, self)
}
module.exports = LRUCache
/***/ }),
/***/ 80900:
/***/ ((module) => {
/**
* Helpers.
*/
var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var w = d * 7;
var y = d * 365.25;
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} [options]
* @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
module.exports = function(val, options) {
options = options || {};
var type = typeof val;
if (type === 'string' && val.length > 0) {
return parse(val);
} else if (type === 'number' && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
'val is not a non-empty string or a valid number. val=' +
JSON.stringify(val)
);
};
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
return;
}
var n = parseFloat(match[1]);
var type = (match[2] || 'ms').toLowerCase();
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
return n * y;
case 'weeks':
case 'week':
case 'w':
return n * w;
case 'days':
case 'day':
case 'd':
return n * d;
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
return n * h;
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
return n * m;
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
return n * s;
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
return n;
default:
return undefined;
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtShort(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return Math.round(ms / d) + 'd';
}
if (msAbs >= h) {
return Math.round(ms / h) + 'h';
}
if (msAbs >= m) {
return Math.round(ms / m) + 'm';
}
if (msAbs >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtLong(ms) {
var msAbs = Math.abs(ms);
if (msAbs >= d) {
return plural(ms, msAbs, d, 'day');
}
if (msAbs >= h) {
return plural(ms, msAbs, h, 'hour');
}
if (msAbs >= m) {
return plural(ms, msAbs, m, 'minute');
}
if (msAbs >= s) {
return plural(ms, msAbs, s, 'second');
}
return ms + ' ms';
}
/**
* Pluralization helper.
*/
function plural(ms, msAbs, n, name) {
var isPlural = msAbs >= n * 1.5;
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}
/***/ }),
/***/ 11494:
/***/ (function(__unused_webpack_module, exports) {
// Generated by CoffeeScript 1.12.7
(function() {
var Netmask, atob, chr, chr0, chrA, chra, ip2long, long2ip;
long2ip = function(long) {
var a, b, c, d;
a = (long & (0xff << 24)) >>> 24;
b = (long & (0xff << 16)) >>> 16;
c = (long & (0xff << 8)) >>> 8;
d = long & 0xff;
return [a, b, c, d].join('.');
};
ip2long = function(ip) {
var b, c, i, j, n, ref;
b = [];
for (i = j = 0; j <= 3; i = ++j) {
if (ip.length === 0) {
break;
}
if (i > 0) {
if (ip[0] !== '.') {
throw new Error('Invalid IP');
}
ip = ip.substring(1);
}
ref = atob(ip), n = ref[0], c = ref[1];
ip = ip.substring(c);
b.push(n);
}
if (ip.length !== 0) {
throw new Error('Invalid IP');
}
switch (b.length) {
case 1:
if (b[0] > 0xFFFFFFFF) {
throw new Error('Invalid IP');
}
return b[0] >>> 0;
case 2:
if (b[0] > 0xFF || b[1] > 0xFFFFFF) {
throw new Error('Invalid IP');
}
return (b[0] << 24 | b[1]) >>> 0;
case 3:
if (b[0] > 0xFF || b[1] > 0xFF || b[2] > 0xFFFF) {
throw new Error('Invalid IP');
}
return (b[0] << 24 | b[1] << 16 | b[2]) >>> 0;
case 4:
if (b[0] > 0xFF || b[1] > 0xFF || b[2] > 0xFF || b[3] > 0xFF) {
throw new Error('Invalid IP');
}
return (b[0] << 24 | b[1] << 16 | b[2] << 8 | b[3]) >>> 0;
default:
throw new Error('Invalid IP');
}
};
chr = function(b) {
return b.charCodeAt(0);
};
chr0 = chr('0');
chra = chr('a');
chrA = chr('A');
atob = function(s) {
var base, dmax, i, n, start;
n = 0;
base = 10;
dmax = '9';
i = 0;
if (s.length > 1 && s[i] === '0') {
if (s[i + 1] === 'x' || s[i + 1] === 'X') {
i += 2;
base = 16;
} else if ('0' <= s[i + 1] && s[i + 1] <= '9') {
i++;
base = 8;
dmax = '7';
}
}
start = i;
while (i < s.length) {
if ('0' <= s[i] && s[i] <= dmax) {
n = (n * base + (chr(s[i]) - chr0)) >>> 0;
} else if (base === 16) {
if ('a' <= s[i] && s[i] <= 'f') {
n = (n * base + (10 + chr(s[i]) - chra)) >>> 0;
} else if ('A' <= s[i] && s[i] <= 'F') {
n = (n * base + (10 + chr(s[i]) - chrA)) >>> 0;
} else {
break;
}
} else {
break;
}
if (n > 0xFFFFFFFF) {
throw new Error('too large');
}
i++;
}
if (i === start) {
throw new Error('empty octet');
}
return [n, i];
};
Netmask = (function() {
function Netmask(net, mask) {
var error, i, j, ref;
if (typeof net !== 'string') {
throw new Error("Missing `net' parameter");
}
if (!mask) {
ref = net.split('/', 2), net = ref[0], mask = ref[1];
}
if (!mask) {
mask = 32;
}
if (typeof mask === 'string' && mask.indexOf('.') > -1) {
try {
this.maskLong = ip2long(mask);
} catch (error1) {
error = error1;
throw new Error("Invalid mask: " + mask);
}
for (i = j = 32; j >= 0; i = --j) {
if (this.maskLong === (0xffffffff << (32 - i)) >>> 0) {
this.bitmask = i;
break;
}
}
} else if (mask || mask === 0) {
this.bitmask = parseInt(mask, 10);
this.maskLong = 0;
if (this.bitmask > 0) {
this.maskLong = (0xffffffff << (32 - this.bitmask)) >>> 0;
}
} else {
throw new Error("Invalid mask: empty");
}
try {
this.netLong = (ip2long(net) & this.maskLong) >>> 0;
} catch (error1) {
error = error1;
throw new Error("Invalid net address: " + net);
}
if (!(this.bitmask <= 32)) {
throw new Error("Invalid mask for ip4: " + mask);
}
this.size = Math.pow(2, 32 - this.bitmask);
this.base = long2ip(this.netLong);
this.mask = long2ip(this.maskLong);
this.hostmask = long2ip(~this.maskLong);
this.first = this.bitmask <= 30 ? long2ip(this.netLong + 1) : this.base;
this.last = this.bitmask <= 30 ? long2ip(this.netLong + this.size - 2) : long2ip(this.netLong + this.size - 1);
this.broadcast = this.bitmask <= 30 ? long2ip(this.netLong + this.size - 1) : void 0;
}
Netmask.prototype.contains = function(ip) {
if (typeof ip === 'string' && (ip.indexOf('/') > 0 || ip.split('.').length !== 4)) {
ip = new Netmask(ip);
}
if (ip instanceof Netmask) {
return this.contains(ip.base) && this.contains(ip.broadcast || ip.last);
} else {
return (ip2long(ip) & this.maskLong) >>> 0 === (this.netLong & this.maskLong) >>> 0;
}
};
Netmask.prototype.next = function(count) {
if (count == null) {
count = 1;
}
return new Netmask(long2ip(this.netLong + (this.size * count)), this.mask);
};
Netmask.prototype.forEach = function(fn) {
var index, lastLong, long;
long = ip2long(this.first);
lastLong = ip2long(this.last);
index = 0;
while (long <= lastLong) {
fn(long2ip(long), long, index);
index++;
long++;
}
};
Netmask.prototype.toString = function() {
return this.base + "/" + this.bitmask;
};
return Netmask;
})();
exports.ip2long = ip2long;
exports.long2ip = long2ip;
exports.Netmask = Netmask;
}).call(this);
/***/ }),
/***/ 18476:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const net_1 = __importDefault(__nccwpck_require__(11631));
const tls_1 = __importDefault(__nccwpck_require__(4016));
const once_1 = __importDefault(__nccwpck_require__(81040));
const crypto_1 = __importDefault(__nccwpck_require__(76417));
const get_uri_1 = __importDefault(__nccwpck_require__(11792));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const raw_body_1 = __importDefault(__nccwpck_require__(47742));
const url_1 = __nccwpck_require__(78835);
const http_proxy_agent_1 = __nccwpck_require__(23764);
const https_proxy_agent_1 = __nccwpck_require__(77219);
const socks_proxy_agent_1 = __nccwpck_require__(25038);
const pac_resolver_1 = __importDefault(__nccwpck_require__(37055));
const agent_base_1 = __nccwpck_require__(49690);
const debug = debug_1.default('pac-proxy-agent');
/**
* The `PacProxyAgent` class.
*
* A few different "protocol" modes are supported (supported protocols are
* backed by the `get-uri` module):
*
* - "pac+data", "data" - refers to an embedded "data:" URI
* - "pac+file", "file" - refers to a local file
* - "pac+ftp", "ftp" - refers to a file located on an FTP server
* - "pac+http", "http" - refers to an HTTP endpoint
* - "pac+https", "https" - refers to an HTTPS endpoint
*
* @api public
*/
class PacProxyAgent extends agent_base_1.Agent {
constructor(uri, opts = {}) {
super(opts);
this.clearResolverPromise = () => {
this.resolverPromise = undefined;
};
debug('Creating PacProxyAgent with URI %o and options %o', uri, opts);
// Strip the "pac+" prefix
this.uri = uri.replace(/^pac\+/i, '');
this.opts = Object.assign({}, opts);
this.cache = undefined;
this.resolver = undefined;
this.resolverHash = '';
this.resolverPromise = undefined;
// For `PacResolver`
if (!this.opts.filename) {
this.opts.filename = uri;
}
}
/**
* Loads the PAC proxy file from the source if necessary, and returns
* a generated `FindProxyForURL()` resolver function to use.
*
* @api private
*/
getResolver() {
if (!this.resolverPromise) {
this.resolverPromise = this.loadResolver();
this.resolverPromise.then(this.clearResolverPromise, this.clearResolverPromise);
}
return this.resolverPromise;
}
loadResolver() {
return __awaiter(this, void 0, void 0, function* () {
try {
// (Re)load the contents of the PAC file URI
const code = yield this.loadPacFile();
// Create a sha1 hash of the JS code
const hash = crypto_1.default
.createHash('sha1')
.update(code)
.digest('hex');
if (this.resolver && this.resolverHash === hash) {
debug('Same sha1 hash for code - contents have not changed, reusing previous proxy resolver');
return this.resolver;
}
// Cache the resolver
debug('Creating new proxy resolver instance');
this.resolver = pac_resolver_1.default(code, this.opts);
// Store that sha1 hash for future comparison purposes
this.resolverHash = hash;
return this.resolver;
}
catch (err) {
if (this.resolver && err.code === 'ENOTMODIFIED') {
debug('Got ENOTMODIFIED response, reusing previous proxy resolver');
return this.resolver;
}
throw err;
}
});
}
/**
* Loads the contents of the PAC proxy file.
*
* @api private
*/
loadPacFile() {
return __awaiter(this, void 0, void 0, function* () {
debug('Loading PAC file: %o', this.uri);
const rs = yield get_uri_1.default(this.uri, { cache: this.cache });
debug('Got `Readable` instance for URI');
this.cache = rs;
const buf = yield raw_body_1.default(rs);
debug('Read %o byte PAC file from URI', buf.length);
return buf.toString('utf8');
});
}
/**
* Called when the node-core HTTP client library is creating a new HTTP request.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { secureEndpoint } = opts;
// First, get a generated `FindProxyForURL()` function,
// either cached or retrieved from the source
const resolver = yield this.getResolver();
// Calculate the `url` parameter
const defaultPort = secureEndpoint ? 443 : 80;
let path = req.path;
let search = null;
const firstQuestion = path.indexOf('?');
if (firstQuestion !== -1) {
search = path.substring(firstQuestion);
path = path.substring(0, firstQuestion);
}
const urlOpts = Object.assign(Object.assign({}, opts), { protocol: secureEndpoint ? 'https:' : 'http:', pathname: path, search,
// need to use `hostname` instead of `host` otherwise `port` is ignored
hostname: opts.host, host: null, href: null,
// set `port` to null when it is the protocol default port (80 / 443)
port: defaultPort === opts.port ? null : opts.port });
const url = url_1.format(urlOpts);
debug('url: %o', url);
let result = yield resolver(url);
// Default to "DIRECT" if a falsey value was returned (or nothing)
if (!result) {
result = 'DIRECT';
}
const proxies = String(result)
.trim()
.split(/\s*;\s*/g)
.filter(Boolean);
if (this.opts.fallbackToDirect && !proxies.includes('DIRECT')) {
proxies.push('DIRECT');
}
for (const proxy of proxies) {
let agent = null;
let socket = null;
const [type, target] = proxy.split(/\s+/);
debug('Attempting to use proxy: %o', proxy);
if (type === 'DIRECT') {
// Direct connection to the destination endpoint
socket = secureEndpoint ? tls_1.default.connect(opts) : net_1.default.connect(opts);
}
else if (type === 'SOCKS' || type === 'SOCKS5') {
// Use a SOCKSv5h proxy
agent = new socks_proxy_agent_1.SocksProxyAgent(`socks://${target}`);
}
else if (type === 'SOCKS4') {
// Use a SOCKSv4a proxy
agent = new socks_proxy_agent_1.SocksProxyAgent(`socks4a://${target}`);
}
else if (type === 'PROXY' ||
type === 'HTTP' ||
type === 'HTTPS') {
// Use an HTTP or HTTPS proxy
// http://dev.chromium.org/developers/design-documents/secure-web-proxy
const proxyURL = `${type === 'HTTPS' ? 'https' : 'http'}://${target}`;
const proxyOpts = Object.assign(Object.assign({}, this.opts), url_1.parse(proxyURL));
if (secureEndpoint) {
agent = new https_proxy_agent_1.HttpsProxyAgent(proxyOpts);
}
else {
agent = new http_proxy_agent_1.HttpProxyAgent(proxyOpts);
}
}
try {
if (socket) {
// "DIRECT" connection, wait for connection confirmation
yield once_1.default(socket, 'connect');
req.emit('proxy', { proxy, socket });
return socket;
}
if (agent) {
const s = yield agent.callback(req, opts);
req.emit('proxy', { proxy, socket: s });
return s;
}
throw new Error(`Could not determine proxy type for: ${proxy}`);
}
catch (err) {
debug('Got error for proxy %o: %o', proxy, err);
req.emit('proxy', { proxy, error: err });
}
}
throw new Error(`Failed to establish a socket connection to proxies: ${JSON.stringify(proxies)}`);
});
}
}
exports.default = PacProxyAgent;
//# sourceMappingURL=agent.js.map
/***/ }),
/***/ 26338:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const get_uri_1 = __importDefault(__nccwpck_require__(11792));
const url_1 = __nccwpck_require__(78835);
const agent_1 = __importDefault(__nccwpck_require__(18476));
function createPacProxyAgent(uri, opts) {
// was an options object passed in first?
if (typeof uri === 'object') {
opts = uri;
// result of a url.parse() call?
if (opts.href) {
if (opts.path && !opts.pathname) {
opts.pathname = opts.path;
}
opts.slashes = true;
uri = url_1.format(opts);
}
else {
uri = opts.uri;
}
}
if (!opts) {
opts = {};
}
if (typeof uri !== 'string') {
throw new TypeError('a PAC file URI must be specified!');
}
return new agent_1.default(uri, opts);
}
(function (createPacProxyAgent) {
createPacProxyAgent.PacProxyAgent = agent_1.default;
/**
* Supported "protocols". Delegates out to the `get-uri` module.
*/
createPacProxyAgent.protocols = Object.keys(get_uri_1.default.protocols);
createPacProxyAgent.prototype = agent_1.default.prototype;
})(createPacProxyAgent || (createPacProxyAgent = {}));
module.exports = createPacProxyAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 14001:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* If only a single value is specified (from each category: day, month, year), the
* function returns a true value only on days that match that specification. If
* both values are specified, the result is true between those times, including
* bounds.
*
* Even though the examples don't show, the "GMT" parameter can be specified
* in any of the 9 different call profiles, always as the last parameter.
*
* Examples:
*
* ``` js
* dateRange(1)
* true on the first day of each month, local timezone.
*
* dateRange(1, "GMT")
* true on the first day of each month, GMT timezone.
*
* dateRange(1, 15)
* true on the first half of each month.
*
* dateRange(24, "DEC")
* true on 24th of December each year.
*
* dateRange(24, "DEC", 1995)
* true on 24th of December, 1995.
*
* dateRange("JAN", "MAR")
* true on the first quarter of the year.
*
* dateRange(1, "JUN", 15, "AUG")
* true from June 1st until August 15th, each year (including June 1st and August
* 15th).
*
* dateRange(1, "JUN", 15, 1995, "AUG", 1995)
* true from June 1st, 1995, until August 15th, same year.
*
* dateRange("OCT", 1995, "MAR", 1996)
* true from October 1995 until March 1996 (including the entire month of October
* 1995 and March 1996).
*
* dateRange(1995)
* true during the entire year 1995.
*
* dateRange(1995, 1997)
* true from beginning of year 1995 until the end of year 1997.
* ```
*
* dateRange(day)
* dateRange(day1, day2)
* dateRange(mon)
* dateRange(month1, month2)
* dateRange(year)
* dateRange(year1, year2)
* dateRange(day1, month1, day2, month2)
* dateRange(month1, year1, month2, year2)
* dateRange(day1, month1, year1, day2, month2, year2)
* dateRange(day1, month1, year1, day2, month2, year2, gmt)
*
* @param {String} day is the day of month between 1 and 31 (as an integer).
* @param {String} month is one of the month strings: JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
* @param {String} year is the full year number, for example 1995 (but not 95). Integer.
* @param {String} gmt is either the string "GMT", which makes time comparison occur in GMT timezone; if left unspecified, times are taken to be in the local timezone.
* @return {Boolean}
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
function dateRange() {
// TODO: implement me!
return false;
}
exports.default = dateRange;
//# sourceMappingURL=dateRange.js.map
/***/ }),
/***/ 20936:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* Returns true iff the domain of hostname matches.
*
* Examples:
*
* ``` js
* dnsDomainIs("www.netscape.com", ".netscape.com")
* // is true.
*
* dnsDomainIs("www", ".netscape.com")
* // is false.
*
* dnsDomainIs("www.mcom.com", ".netscape.com")
* // is false.
* ```
*
*
* @param {String} host is the hostname from the URL.
* @param {String} domain is the domain name to test the hostname against.
* @return {Boolean} true iff the domain of the hostname matches.
*/
function dnsDomainIs(host, domain) {
host = String(host);
domain = String(domain);
return host.substr(domain.length * -1) === domain;
}
exports.default = dnsDomainIs;
//# sourceMappingURL=dnsDomainIs.js.map
/***/ }),
/***/ 58595:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* Returns the number (integer) of DNS domain levels (number of dots) in the
* hostname.
*
* Examples:
*
* ``` js
* dnsDomainLevels("www")
* // returns 0.
* dnsDomainLevels("www.netscape.com")
* // returns 2.
* ```
*
* @param {String} host is the hostname from the URL.
* @return {Number} number of domain levels
*/
function dnsDomainLevels(host) {
var match = String(host).match(/\./g);
var levels = 0;
if (match) {
levels = match.length;
}
return levels;
}
exports.default = dnsDomainLevels;
//# sourceMappingURL=dnsDomainLevels.js.map
/***/ }),
/***/ 87685:
/***/ (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 }));
const util_1 = __nccwpck_require__(52754);
/**
* Resolves the given DNS hostname into an IP address, and returns it in the dot
* separated format as a string.
*
* Example:
*
* ``` js
* dnsResolve("home.netscape.com")
* // returns the string "198.95.249.79".
* ```
*
* @param {String} host hostname to resolve
* @return {String} resolved IP address
*/
function dnsResolve(host) {
return __awaiter(this, void 0, void 0, function* () {
const family = 4;
try {
const r = yield util_1.dnsLookup(host, { family });
if (typeof r === 'string') {
return r;
}
}
catch (err) {
// @ignore
}
return null;
});
}
exports.default = dnsResolve;
//# sourceMappingURL=dnsResolve.js.map
/***/ }),
/***/ 37055:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const url_1 = __nccwpck_require__(78835);
const degenerator_1 = __nccwpck_require__(64033);
/**
* Built-in PAC functions.
*/
const dateRange_1 = __importDefault(__nccwpck_require__(14001));
const dnsDomainIs_1 = __importDefault(__nccwpck_require__(20936));
const dnsDomainLevels_1 = __importDefault(__nccwpck_require__(58595));
const dnsResolve_1 = __importDefault(__nccwpck_require__(87685));
const isInNet_1 = __importDefault(__nccwpck_require__(83815));
const isPlainHostName_1 = __importDefault(__nccwpck_require__(96423));
const isResolvable_1 = __importDefault(__nccwpck_require__(87541));
const localHostOrDomainIs_1 = __importDefault(__nccwpck_require__(32586));
const myIpAddress_1 = __importDefault(__nccwpck_require__(6494));
const shExpMatch_1 = __importDefault(__nccwpck_require__(84693));
const timeRange_1 = __importDefault(__nccwpck_require__(49547));
const weekdayRange_1 = __importDefault(__nccwpck_require__(79281));
/**
* Returns an asynchronous `FindProxyForURL()` function
* from the given JS string (from a PAC file).
*
* @param {String} str JS string
* @param {Object} opts optional "options" object
* @return {Function} async resolver function
*/
function createPacResolver(_str, _opts = {}) {
const str = Buffer.isBuffer(_str) ? _str.toString('utf8') : _str;
// The sandbox to use for the `vm` context.
const sandbox = Object.assign(Object.assign({}, createPacResolver.sandbox), _opts.sandbox);
const opts = Object.assign(Object.assign({ filename: 'proxy.pac' }, _opts), { sandbox });
// Construct the array of async function names to add `await` calls to.
const names = Object.keys(sandbox).filter((k) => isAsyncFunction(sandbox[k]));
// Compile the JS `FindProxyForURL()` function into an async function.
const resolver = degenerator_1.compile(str, 'FindProxyForURL', names, opts);
function FindProxyForURL(url, _host, _callback) {
let host = null;
let callback = null;
if (typeof _callback === 'function') {
callback = _callback;
}
if (typeof _host === 'string') {
host = _host;
}
else if (typeof _host === 'function') {
callback = _host;
}
if (!host) {
host = url_1.parse(url).hostname;
}
if (!host) {
throw new TypeError('Could not determine `host`');
}
const promise = resolver(url, host);
if (typeof callback === 'function') {
toCallback(promise, callback);
}
else {
return promise;
}
}
Object.defineProperty(FindProxyForURL, 'toString', {
value: () => resolver.toString(),
enumerable: false,
});
return FindProxyForURL;
}
(function (createPacResolver) {
createPacResolver.sandbox = Object.freeze({
alert: (message = '') => console.log('%s', message),
dateRange: dateRange_1.default,
dnsDomainIs: dnsDomainIs_1.default,
dnsDomainLevels: dnsDomainLevels_1.default,
dnsResolve: dnsResolve_1.default,
isInNet: isInNet_1.default,
isPlainHostName: isPlainHostName_1.default,
isResolvable: isResolvable_1.default,
localHostOrDomainIs: localHostOrDomainIs_1.default,
myIpAddress: myIpAddress_1.default,
shExpMatch: shExpMatch_1.default,
timeRange: timeRange_1.default,
weekdayRange: weekdayRange_1.default,
});
})(createPacResolver || (createPacResolver = {}));
function toCallback(promise, callback) {
promise.then((rtn) => callback(null, rtn), callback);
}
function isAsyncFunction(v) {
if (typeof v !== 'function')
return false;
// Native `AsyncFunction`
if (v.constructor.name === 'AsyncFunction')
return true;
// TypeScript compiled
if (String(v).indexOf('__awaiter(') !== -1)
return true;
// Legacy behavior - set `async` property on the function
return Boolean(v.async);
}
module.exports = createPacResolver;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 83815:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
/**
* Module dependencies.
*/
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 }));
const netmask_1 = __nccwpck_require__(11494);
const util_1 = __nccwpck_require__(52754);
/**
* True iff the IP address of the host matches the specified IP address pattern.
*
* Pattern and mask specification is done the same way as for SOCKS configuration.
*
* Examples:
*
* ``` js
* isInNet(host, "198.95.249.79", "255.255.255.255")
* // is true iff the IP address of host matches exactly 198.95.249.79.
*
* isInNet(host, "198.95.0.0", "255.255.0.0")
* // is true iff the IP address of the host matches 198.95.*.*.
* ```
*
* @param {String} host a DNS hostname, or IP address. If a hostname is passed,
* it will be resoved into an IP address by this function.
* @param {String} pattern an IP address pattern in the dot-separated format mask.
* @param {String} mask for the IP address pattern informing which parts of the
* IP address should be matched against. 0 means ignore, 255 means match.
* @return {Boolean}
*/
function isInNet(host, pattern, mask) {
return __awaiter(this, void 0, void 0, function* () {
const family = 4;
try {
const ip = yield util_1.dnsLookup(host, { family });
if (typeof ip === 'string') {
const netmask = new netmask_1.Netmask(pattern, mask);
return netmask.contains(ip);
}
}
catch (err) { }
return false;
});
}
exports.default = isInNet;
//# sourceMappingURL=isInNet.js.map
/***/ }),
/***/ 96423:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* True iff there is no domain name in the hostname (no dots).
*
* Examples:
*
* ``` js
* isPlainHostName("www")
* // is true.
*
* isPlainHostName("www.netscape.com")
* // is false.
* ```
*
* @param {String} host The hostname from the URL (excluding port number).
* @return {Boolean}
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
function isPlainHostName(host) {
return !/\./.test(host);
}
exports.default = isPlainHostName;
//# sourceMappingURL=isPlainHostName.js.map
/***/ }),
/***/ 87541:
/***/ (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 }));
const util_1 = __nccwpck_require__(52754);
/**
* Tries to resolve the hostname. Returns true if succeeds.
*
* @param {String} host is the hostname from the URL.
* @return {Boolean}
*/
function isResolvable(host) {
return __awaiter(this, void 0, void 0, function* () {
const family = 4;
try {
if (yield util_1.dnsLookup(host, { family })) {
return true;
}
}
catch (err) {
// ignore
}
return false;
});
}
exports.default = isResolvable;
//# sourceMappingURL=isResolvable.js.map
/***/ }),
/***/ 32586:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* Is true if the hostname matches exactly the specified hostname, or if there is
* no domain name part in the hostname, but the unqualified hostname matches.
*
* Examples:
*
* ``` js
* localHostOrDomainIs("www.netscape.com", "www.netscape.com")
* // is true (exact match).
*
* localHostOrDomainIs("www", "www.netscape.com")
* // is true (hostname match, domain not specified).
*
* localHostOrDomainIs("www.mcom.com", "www.netscape.com")
* // is false (domain name mismatch).
*
* localHostOrDomainIs("home.netscape.com", "www.netscape.com")
* // is false (hostname mismatch).
* ```
*
* @param {String} host the hostname from the URL.
* @param {String} hostdom fully qualified hostname to match against.
* @return {Boolean}
*/
function localHostOrDomainIs(host, hostdom) {
const parts = host.split('.');
const domparts = hostdom.split('.');
let matches = true;
for (let i = 0; i < parts.length; i++) {
if (parts[i] !== domparts[i]) {
matches = false;
break;
}
}
return matches;
}
exports.default = localHostOrDomainIs;
//# sourceMappingURL=localHostOrDomainIs.js.map
/***/ }),
/***/ 6494:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const ip_1 = __importDefault(__nccwpck_require__(87547));
const net_1 = __importDefault(__nccwpck_require__(11631));
/**
* Returns the IP address of the host that the Navigator is running on, as
* a string in the dot-separated integer format.
*
* Example:
*
* ``` js
* myIpAddress()
* // would return the string "198.95.249.79" if you were running the
* // Navigator on that host.
* ```
*
* @return {String} external IP address
*/
function myIpAddress() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
// 8.8.8.8:53 is "Google Public DNS":
// https://developers.google.com/speed/public-dns/
const socket = net_1.default.connect({ host: '8.8.8.8', port: 53 });
const onError = (err) => {
// if we fail to access Google DNS (as in firewall blocks access),
// fallback to querying IP locally
resolve(ip_1.default.address());
};
socket.once('error', onError);
socket.once('connect', () => {
socket.removeListener('error', onError);
const addr = socket.address();
socket.destroy();
if (typeof addr === 'string') {
resolve(addr);
}
else if (addr.address) {
resolve(addr.address);
}
else {
reject(new Error('Expected a `string`'));
}
});
});
});
}
exports.default = myIpAddress;
//# sourceMappingURL=myIpAddress.js.map
/***/ }),
/***/ 84693:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Returns true if the string matches the specified shell
* expression.
*
* Actually, currently the patterns are shell expressions,
* not regular expressions.
*
* Examples:
*
* ``` js
* shExpMatch("http://home.netscape.com/people/ari/index.html", "*\/ari/*")
* // is true.
*
* shExpMatch("http://home.netscape.com/people/montulli/index.html", "*\/ari/*")
* // is false.
* ```
*
* @param {String} str is any string to compare (e.g. the URL, or the hostname).
* @param {String} shexp is a shell expression to compare against.
* @return {Boolean} true if the string matches the shell expression.
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
function shExpMatch(str, shexp) {
var re = toRegExp(shexp);
return re.test(str);
}
exports.default = shExpMatch;
/**
* Converts a "shell expression" to a JavaScript RegExp.
*
* @api private
*/
function toRegExp(str) {
str = String(str)
.replace(/\./g, '\\.')
.replace(/\?/g, '.')
.replace(/\*/g, '.*');
return new RegExp('^' + str + '$');
}
//# sourceMappingURL=shExpMatch.js.map
/***/ }),
/***/ 49547:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* True during (or between) the specified time(s).
*
* Even though the examples don't show it, this parameter may be present in
* each of the different parameter profiles, always as the last parameter.
*
*
* Examples:
*
* ``` js
* timerange(12)
* true from noon to 1pm.
*
* timerange(12, 13)
* same as above.
*
* timerange(12, "GMT")
* true from noon to 1pm, in GMT timezone.
*
* timerange(9, 17)
* true from 9am to 5pm.
*
* timerange(8, 30, 17, 00)
* true from 8:30am to 5:00pm.
*
* timerange(0, 0, 0, 0, 0, 30)
* true between midnight and 30 seconds past midnight.
* ```
*
* timeRange(hour)
* timeRange(hour1, hour2)
* timeRange(hour1, min1, hour2, min2)
* timeRange(hour1, min1, sec1, hour2, min2, sec2)
* timeRange(hour1, min1, sec1, hour2, min2, sec2, gmt)
*
* @param {String} hour is the hour from 0 to 23. (0 is midnight, 23 is 11 pm.)
* @param {String} min minutes from 0 to 59.
* @param {String} sec seconds from 0 to 59.
* @param {String} gmt either the string "GMT" for GMT timezone, or not specified, for local timezone.
* @return {Boolean}
*/
Object.defineProperty(exports, "__esModule", ({ value: true }));
function timeRange() {
var args = Array.prototype.slice.call(arguments), lastArg = args.pop(), useGMTzone = lastArg == 'GMT', currentDate = new Date();
if (!useGMTzone) {
args.push(lastArg);
}
var noOfArgs = args.length, result = false, numericArgs = args.map(function (n) {
return parseInt(n);
});
// timeRange(hour)
if (noOfArgs == 1) {
result = getCurrentHour(useGMTzone, currentDate) == numericArgs[0];
// timeRange(hour1, hour2)
}
else if (noOfArgs == 2) {
var currentHour = getCurrentHour(useGMTzone, currentDate);
result = numericArgs[0] <= currentHour && currentHour < numericArgs[1];
// timeRange(hour1, min1, hour2, min2)
}
else if (noOfArgs == 4) {
result = valueInRange(secondsElapsedToday(numericArgs[0], numericArgs[1], 0), secondsElapsedToday(getCurrentHour(useGMTzone, currentDate), getCurrentMinute(useGMTzone, currentDate), 0), secondsElapsedToday(numericArgs[2], numericArgs[3], 59));
// timeRange(hour1, min1, sec1, hour2, min2, sec2)
}
else if (noOfArgs == 6) {
result = valueInRange(secondsElapsedToday(numericArgs[0], numericArgs[1], numericArgs[2]), secondsElapsedToday(getCurrentHour(useGMTzone, currentDate), getCurrentMinute(useGMTzone, currentDate), getCurrentSecond(useGMTzone, currentDate)), secondsElapsedToday(numericArgs[3], numericArgs[4], numericArgs[5]));
}
return result;
}
exports.default = timeRange;
function secondsElapsedToday(hh, mm, ss) {
return hh * 3600 + mm * 60 + ss;
}
function getCurrentHour(gmt, currentDate) {
return gmt ? currentDate.getUTCHours() : currentDate.getHours();
}
function getCurrentMinute(gmt, currentDate) {
return gmt ? currentDate.getUTCMinutes() : currentDate.getMinutes();
}
function getCurrentSecond(gmt, currentDate) {
return gmt ? currentDate.getUTCSeconds() : currentDate.getSeconds();
}
// start <= value <= finish
function valueInRange(start, value, finish) {
return start <= value && value <= finish;
}
//# sourceMappingURL=timeRange.js.map
/***/ }),
/***/ 52754:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isGMT = exports.dnsLookup = void 0;
const dns_1 = __nccwpck_require__(40881);
function dnsLookup(host, opts) {
return new Promise((resolve, reject) => {
dns_1.lookup(host, opts, (err, res) => {
if (err) {
reject(err);
}
else {
resolve(res);
}
});
});
}
exports.dnsLookup = dnsLookup;
function isGMT(v) {
return v === 'GMT';
}
exports.isGMT = isGMT;
//# sourceMappingURL=util.js.map
/***/ }),
/***/ 79281:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const util_1 = __nccwpck_require__(52754);
const weekdays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
/**
* Only the first parameter is mandatory. Either the second, the third, or both
* may be left out.
*
* If only one parameter is present, the function yeilds a true value on the
* weekday that the parameter represents. If the string "GMT" is specified as
* a second parameter, times are taken to be in GMT, otherwise in local timezone.
*
* If both wd1 and wd1 are defined, the condition is true if the current weekday
* is in between those two weekdays. Bounds are inclusive. If the "GMT" parameter
* is specified, times are taken to be in GMT, otherwise the local timezone is
* used.
*
* Valid "weekday strings" are:
*
* SUN MON TUE WED THU FRI SAT
*
* Examples:
*
* ``` js
* weekdayRange("MON", "FRI")
* true Monday trhough Friday (local timezone).
*
* weekdayRange("MON", "FRI", "GMT")
* same as above, but GMT timezone.
*
* weekdayRange("SAT")
* true on Saturdays local time.
*
* weekdayRange("SAT", "GMT")
* true on Saturdays GMT time.
*
* weekdayRange("FRI", "MON")
* true Friday through Monday (note, order does matter!).
* ```
*
*
* @param {String} wd1 one of the weekday strings.
* @param {String} wd2 one of the weekday strings.
* @param {String} gmt is either the string: GMT or is left out.
* @return {Boolean}
*/
function weekdayRange(wd1, wd2, gmt) {
let useGMTzone = false;
let wd1Index = -1;
let wd2Index = -1;
let wd2IsGmt = false;
if (util_1.isGMT(gmt)) {
useGMTzone = true;
}
else if (util_1.isGMT(wd2)) {
useGMTzone = true;
wd2IsGmt = true;
}
wd1Index = weekdays.indexOf(wd1);
if (!wd2IsGmt && isWeekday(wd2)) {
wd2Index = weekdays.indexOf(wd2);
}
let todaysDay = getTodaysDay(useGMTzone);
let result = false;
if (wd2Index < 0) {
result = todaysDay == wd1Index;
}
else {
if (wd1Index <= wd2Index) {
result = valueInRange(wd1Index, todaysDay, wd2Index);
}
else {
result =
valueInRange(wd1Index, todaysDay, 6) ||
valueInRange(0, todaysDay, wd2Index);
}
}
return result;
}
exports.default = weekdayRange;
function getTodaysDay(gmt) {
return gmt ? new Date().getUTCDay() : new Date().getDay();
}
// start <= value <= finish
function valueInRange(start, value, finish) {
return start <= value && value <= finish;
}
function isWeekday(v) {
return weekdays.indexOf(v) !== -1;
}
//# sourceMappingURL=weekdayRange.js.map
/***/ }),
/***/ 67367:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
/**
* Module dependencies.
*/
var url = __nccwpck_require__(78835);
var LRU = __nccwpck_require__(7129);
var Agent = __nccwpck_require__(49690);
var inherits = __nccwpck_require__(31669).inherits;
var debug = __nccwpck_require__(38237)('proxy-agent');
var getProxyForUrl = __nccwpck_require__(63329)/* .getProxyForUrl */ .j;
var http = __nccwpck_require__(98605);
var https = __nccwpck_require__(57211);
var PacProxyAgent = __nccwpck_require__(26338);
var HttpProxyAgent = __nccwpck_require__(23764);
var HttpsProxyAgent = __nccwpck_require__(77219);
var SocksProxyAgent = __nccwpck_require__(25038);
/**
* Module exports.
*/
exports = module.exports = ProxyAgent;
/**
* Number of `http.Agent` instances to cache.
*
* This value was arbitrarily chosen... a better
* value could be conceived with some benchmarks.
*/
var cacheSize = 20;
/**
* Cache for `http.Agent` instances.
*/
exports.cache = new LRU(cacheSize);
/**
* Built-in proxy types.
*/
exports.proxies = Object.create(null);
exports.proxies.http = httpOrHttpsProxy;
exports.proxies.https = httpOrHttpsProxy;
exports.proxies.socks = SocksProxyAgent;
exports.proxies.socks4 = SocksProxyAgent;
exports.proxies.socks4a = SocksProxyAgent;
exports.proxies.socks5 = SocksProxyAgent;
exports.proxies.socks5h = SocksProxyAgent;
PacProxyAgent.protocols.forEach(function (protocol) {
exports.proxies['pac+' + protocol] = PacProxyAgent;
});
function httpOrHttps(opts, secureEndpoint) {
if (secureEndpoint) {
// HTTPS
return https.globalAgent;
} else {
// HTTP
return http.globalAgent;
}
}
function httpOrHttpsProxy(opts, secureEndpoint) {
if (secureEndpoint) {
// HTTPS
return new HttpsProxyAgent(opts);
} else {
// HTTP
return new HttpProxyAgent(opts);
}
}
function mapOptsToProxy(opts) {
// NO_PROXY case
if (!opts) {
return {
uri: 'no proxy',
fn: httpOrHttps
};
}
if ('string' == typeof opts) opts = url.parse(opts);
var proxies;
if (opts.proxies) {
proxies = Object.assign({}, exports.proxies, opts.proxies);
} else {
proxies = exports.proxies;
}
// get the requested proxy "protocol"
var protocol = opts.protocol;
if (!protocol) {
throw new TypeError('You must specify a "protocol" for the ' +
'proxy type (' + Object.keys(proxies).join(', ') + ')');
}
// strip the trailing ":" if present
if (':' == protocol[protocol.length - 1]) {
protocol = protocol.substring(0, protocol.length - 1);
}
// get the proxy `http.Agent` creation function
var proxyFn = proxies[protocol];
if ('function' != typeof proxyFn) {
throw new TypeError('unsupported proxy protocol: "' + protocol + '"');
}
// format the proxy info back into a URI, since an opts object
// could have been passed in originally. This generated URI is used
// as part of the "key" for the LRU cache
return {
opts: opts,
uri: url.format({
protocol: protocol + ':',
slashes: true,
auth: opts.auth,
hostname: opts.hostname || opts.host,
port: opts.port
}),
fn: proxyFn,
}
}
/**
* Attempts to get an `http.Agent` instance based off of the given proxy URI
* information, and the `secure` flag.
*
* An LRU cache is used, to prevent unnecessary creation of proxy
* `http.Agent` instances.
*
* @param {String} uri proxy url
* @param {Boolean} secure true if this is for an HTTPS request, false for HTTP
* @return {http.Agent}
* @api public
*/
function ProxyAgent (opts) {
if (!(this instanceof ProxyAgent)) return new ProxyAgent(opts);
debug('creating new ProxyAgent instance: %o', opts);
Agent.call(this);
if (opts) {
var proxy = mapOptsToProxy(opts);
this.proxy = proxy.opts;
this.proxyUri = proxy.uri;
this.proxyFn = proxy.fn;
}
}
inherits(ProxyAgent, Agent);
/**
*
*/
ProxyAgent.prototype.callback = function(req, opts, fn) {
var proxyOpts = this.proxy;
var proxyUri = this.proxyUri;
var proxyFn = this.proxyFn;
// if we did not instantiate with a proxy, set one per request
if (!proxyOpts) {
var urlOpts = getProxyForUrl(opts);
var proxy = mapOptsToProxy(urlOpts, opts);
proxyOpts = proxy.opts;
proxyUri = proxy.uri;
proxyFn = proxy.fn;
}
// create the "key" for the LRU cache
var key = proxyUri;
if (opts.secureEndpoint) key += ' secure';
// attempt to get a cached `http.Agent` instance first
var agent = exports.cache.get(key);
if (!agent) {
// get an `http.Agent` instance from protocol-specific agent function
agent = proxyFn(proxyOpts, opts.secureEndpoint);
if (agent) {
exports.cache.set(key, agent);
}
} else {
debug('cache hit with key: %o', key);
}
if (!proxyOpts) {
agent.addRequest(req, opts);
} else {
// XXX: agent.callback() is an agent-base-ism
agent.callback(req, opts)
.then(function(socket) { fn(null, socket); })
.catch(function(error) { fn(error); });
}
}
/***/ }),
/***/ 63329:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var parseUrl = __nccwpck_require__(78835).parse;
var DEFAULT_PORTS = {
ftp: 21,
gopher: 70,
http: 80,
https: 443,
ws: 80,
wss: 443,
};
var stringEndsWith = String.prototype.endsWith || function(s) {
return s.length <= this.length &&
this.indexOf(s, this.length - s.length) !== -1;
};
/**
* @param {string|object} url - The URL, or the result from url.parse.
* @return {string} The URL of the proxy that should handle the request to the
* given URL. If no proxy is set, this will be an empty string.
*/
function getProxyForUrl(url) {
var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {};
var proto = parsedUrl.protocol;
var hostname = parsedUrl.host;
var port = parsedUrl.port;
if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') {
return ''; // Don't proxy URLs without a valid scheme or host.
}
proto = proto.split(':', 1)[0];
// Stripping ports in this way instead of using parsedUrl.hostname to make
// sure that the brackets around IPv6 addresses are kept.
hostname = hostname.replace(/:\d*$/, '');
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
if (!shouldProxy(hostname, port)) {
return ''; // Don't proxy URLs that match NO_PROXY.
}
var proxy =
getEnv('npm_config_' + proto + '_proxy') ||
getEnv(proto + '_proxy') ||
getEnv('npm_config_proxy') ||
getEnv('all_proxy');
if (proxy && proxy.indexOf('://') === -1) {
// Missing scheme in proxy, default to the requested URL's scheme.
proxy = proto + '://' + proxy;
}
return proxy;
}
/**
* Determines whether a given URL should be proxied.
*
* @param {string} hostname - The host name of the URL.
* @param {number} port - The effective port of the URL.
* @returns {boolean} Whether the given URL should be proxied.
* @private
*/
function shouldProxy(hostname, port) {
var NO_PROXY =
(getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase();
if (!NO_PROXY) {
return true; // Always proxy if NO_PROXY is not set.
}
if (NO_PROXY === '*') {
return false; // Never proxy if wildcard is set.
}
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
if (!proxy) {
return true; // Skip zero-length hosts.
}
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
if (parsedProxyPort && parsedProxyPort !== port) {
return true; // Skip if ports don't match.
}
if (!/^[.*]/.test(parsedProxyHostname)) {
// No wildcards, so stop proxying if there is an exact match.
return hostname !== parsedProxyHostname;
}
if (parsedProxyHostname.charAt(0) === '*') {
// Remove leading wildcard.
parsedProxyHostname = parsedProxyHostname.slice(1);
}
// Stop proxying if the hostname ends with the no_proxy host.
return !stringEndsWith.call(hostname, parsedProxyHostname);
});
}
/**
* Get the value for an environment variable.
*
* @param {string} key - The name of the environment variable.
* @return {string} The value of the environment variable.
* @private
*/
function getEnv(key) {
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
}
exports.j = getProxyForUrl;
/***/ }),
/***/ 47742:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
/*!
* raw-body
* Copyright(c) 2013-2014 Jonathan Ong
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module dependencies.
* @private
*/
var bytes = __nccwpck_require__(86966)
var createError = __nccwpck_require__(95193)
var iconv = __nccwpck_require__(19032)
var unpipe = __nccwpck_require__(3124)
/**
* Module exports.
* @public
*/
module.exports = getRawBody
/**
* Module variables.
* @private
*/
var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /
/**
* Get the decoder for a given encoding.
*
* @param {string} encoding
* @private
*/
function getDecoder (encoding) {
if (!encoding) return null
try {
return iconv.getDecoder(encoding)
} catch (e) {
// error getting decoder
if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e
// the encoding was not found
throw createError(415, 'specified encoding unsupported', {
encoding: encoding,
type: 'encoding.unsupported'
})
}
}
/**
* Get the raw body of a stream (typically HTTP).
*
* @param {object} stream
* @param {object|string|function} [options]
* @param {function} [callback]
* @public
*/
function getRawBody (stream, options, callback) {
var done = callback
var opts = options || {}
if (options === true || typeof options === 'string') {
// short cut for encoding
opts = {
encoding: options
}
}
if (typeof options === 'function') {
done = options
opts = {}
}
// validate callback is a function, if provided
if (done !== undefined && typeof done !== 'function') {
throw new TypeError('argument callback must be a function')
}
// require the callback without promises
if (!done && !global.Promise) {
throw new TypeError('argument callback is required')
}
// get encoding
var encoding = opts.encoding !== true
? opts.encoding
: 'utf-8'
// convert the limit to an integer
var limit = bytes.parse(opts.limit)
// convert the expected length to an integer
var length = opts.length != null && !isNaN(opts.length)
? parseInt(opts.length, 10)
: null
if (done) {
// classic callback style
return readStream(stream, encoding, length, limit, done)
}
return new Promise(function executor (resolve, reject) {
readStream(stream, encoding, length, limit, function onRead (err, buf) {
if (err) return reject(err)
resolve(buf)
})
})
}
/**
* Halt a stream.
*
* @param {Object} stream
* @private
*/
function halt (stream) {
// unpipe everything from the stream
unpipe(stream)
// pause stream
if (typeof stream.pause === 'function') {
stream.pause()
}
}
/**
* Read the data from the stream.
*
* @param {object} stream
* @param {string} encoding
* @param {number} length
* @param {number} limit
* @param {function} callback
* @public
*/
function readStream (stream, encoding, length, limit, callback) {
var complete = false
var sync = true
// check the length and limit options.
// note: we intentionally leave the stream paused,
// so users should handle the stream themselves.
if (limit !== null && length !== null && length > limit) {
return done(createError(413, 'request entity too large', {
expected: length,
length: length,
limit: limit,
type: 'entity.too.large'
}))
}
// streams1: assert request encoding is buffer.
// streams2+: assert the stream encoding is buffer.
// stream._decoder: streams1
// state.encoding: streams2
// state.decoder: streams2, specifically < 0.10.6
var state = stream._readableState
if (stream._decoder || (state && (state.encoding || state.decoder))) {
// developer error
return done(createError(500, 'stream encoding should not be set', {
type: 'stream.encoding.set'
}))
}
var received = 0
var decoder
try {
decoder = getDecoder(encoding)
} catch (err) {
return done(err)
}
var buffer = decoder
? ''
: []
// attach listeners
stream.on('aborted', onAborted)
stream.on('close', cleanup)
stream.on('data', onData)
stream.on('end', onEnd)
stream.on('error', onEnd)
// mark sync section complete
sync = false
function done () {
var args = new Array(arguments.length)
// copy arguments
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i]
}
// mark complete
complete = true
if (sync) {
process.nextTick(invokeCallback)
} else {
invokeCallback()
}
function invokeCallback () {
cleanup()
if (args[0]) {
// halt the stream on error
halt(stream)
}
callback.apply(null, args)
}
}
function onAborted () {
if (complete) return
done(createError(400, 'request aborted', {
code: 'ECONNABORTED',
expected: length,
length: length,
received: received,
type: 'request.aborted'
}))
}
function onData (chunk) {
if (complete) return
received += chunk.length
if (limit !== null && received > limit) {
done(createError(413, 'request entity too large', {
limit: limit,
received: received,
type: 'entity.too.large'
}))
} else if (decoder) {
buffer += decoder.write(chunk)
} else {
buffer.push(chunk)
}
}
function onEnd (err) {
if (complete) return
if (err) return done(err)
if (length !== null && received !== length) {
done(createError(400, 'request size did not match content length', {
expected: length,
length: length,
received: received,
type: 'request.size.invalid'
}))
} else {
var string = decoder
? buffer + (decoder.end() || '')
: Buffer.concat(buffer)
done(null, string)
}
}
function cleanup () {
buffer = null
stream.removeListener('aborted', onAborted)
stream.removeListener('data', onData)
stream.removeListener('end', onEnd)
stream.removeListener('error', onEnd)
stream.removeListener('close', cleanup)
}
}
/***/ }),
/***/ 41359:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
module.exports = Duplex;
/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
}
/*</replacement>*/
/*<replacement>*/
var util = __nccwpck_require__(95898);
util.inherits = __nccwpck_require__(44124);
/*</replacement>*/
var Readable = __nccwpck_require__(51433);
var Writable = __nccwpck_require__(26993);
util.inherits(Duplex, Readable);
forEach(objectKeys(Writable.prototype), function(method) {
if (!Duplex.prototype[method])
Duplex.prototype[method] = Writable.prototype[method];
});
function Duplex(options) {
if (!(this instanceof Duplex))
return new Duplex(options);
Readable.call(this, options);
Writable.call(this, options);
if (options && options.readable === false)
this.readable = false;
if (options && options.writable === false)
this.writable = false;
this.allowHalfOpen = true;
if (options && options.allowHalfOpen === false)
this.allowHalfOpen = false;
this.once('end', onend);
}
// the no-half-open enforcer
function onend() {
// if we allow half-open state, or if the writable side ended,
// then we're ok.
if (this.allowHalfOpen || this._writableState.ended)
return;
// no more data can be written.
// But allow more writes to happen in this tick.
process.nextTick(this.end.bind(this));
}
function forEach (xs, f) {
for (var i = 0, l = xs.length; i < l; i++) {
f(xs[i], i);
}
}
/***/ }),
/***/ 81542:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
module.exports = PassThrough;
var Transform = __nccwpck_require__(34415);
/*<replacement>*/
var util = __nccwpck_require__(95898);
util.inherits = __nccwpck_require__(44124);
/*</replacement>*/
util.inherits(PassThrough, Transform);
function PassThrough(options) {
if (!(this instanceof PassThrough))
return new PassThrough(options);
Transform.call(this, options);
}
PassThrough.prototype._transform = function(chunk, encoding, cb) {
cb(null, chunk);
};
/***/ }),
/***/ 51433:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
module.exports = Readable;
/*<replacement>*/
var isArray = __nccwpck_require__(20893);
/*</replacement>*/
/*<replacement>*/
var Buffer = __nccwpck_require__(64293).Buffer;
/*</replacement>*/
Readable.ReadableState = ReadableState;
var EE = __nccwpck_require__(28614).EventEmitter;
/*<replacement>*/
if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
return emitter.listeners(type).length;
};
/*</replacement>*/
var Stream = __nccwpck_require__(92413);
/*<replacement>*/
var util = __nccwpck_require__(95898);
util.inherits = __nccwpck_require__(44124);
/*</replacement>*/
var StringDecoder;
/*<replacement>*/
var debug = __nccwpck_require__(31669);
if (debug && debug.debuglog) {
debug = debug.debuglog('stream');
} else {
debug = function () {};
}
/*</replacement>*/
util.inherits(Readable, Stream);
function ReadableState(options, stream) {
var Duplex = __nccwpck_require__(41359);
options = options || {};
// the point at which it stops calling _read() to fill the buffer
// Note: 0 is a valid value, means "don't call _read preemptively ever"
var hwm = options.highWaterMark;
var defaultHwm = options.objectMode ? 16 : 16 * 1024;
this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
// cast to ints.
this.highWaterMark = ~~this.highWaterMark;
this.buffer = [];
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
this.flowing = null;
this.ended = false;
this.endEmitted = false;
this.reading = false;
// a flag to be able to tell if the onwrite cb is called immediately,
// or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
// whenever we return null, then we set a flag to say
// that we're awaiting a 'readable' event emission.
this.needReadable = false;
this.emittedReadable = false;
this.readableListening = false;
// object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
this.objectMode = !!options.objectMode;
if (stream instanceof Duplex)
this.objectMode = this.objectMode || !!options.readableObjectMode;
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
// when piping, we only care about 'readable' events that happen
// after read()ing all the bytes and not getting any pushback.
this.ranOut = false;
// the number of writers that are awaiting a drain event in .pipe()s
this.awaitDrain = 0;
// if true, a maybeReadMore has been scheduled
this.readingMore = false;
this.decoder = null;
this.encoding = null;
if (options.encoding) {
if (!StringDecoder)
StringDecoder = __nccwpck_require__(60674)/* .StringDecoder */ .s;
this.decoder = new StringDecoder(options.encoding);
this.encoding = options.encoding;
}
}
function Readable(options) {
var Duplex = __nccwpck_require__(41359);
if (!(this instanceof Readable))
return new Readable(options);
this._readableState = new ReadableState(options, this);
// legacy
this.readable = true;
Stream.call(this);
}
// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function(chunk, encoding) {
var state = this._readableState;
if (util.isString(chunk) && !state.objectMode) {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
chunk = new Buffer(chunk, encoding);
encoding = '';
}
}
return readableAddChunk(this, state, chunk, encoding, false);
};
// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function(chunk) {
var state = this._readableState;
return readableAddChunk(this, state, chunk, '', true);
};
function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var er = chunkInvalid(state, chunk);
if (er) {
stream.emit('error', er);
} else if (util.isNullOrUndefined(chunk)) {
state.reading = false;
if (!state.ended)
onEofChunk(stream, state);
} else if (state.objectMode || chunk && chunk.length > 0) {
if (state.ended && !addToFront) {
var e = new Error('stream.push() after EOF');
stream.emit('error', e);
} else if (state.endEmitted && addToFront) {
var e = new Error('stream.unshift() after end event');
stream.emit('error', e);
} else {
if (state.decoder && !addToFront && !encoding)
chunk = state.decoder.write(chunk);
if (!addToFront)
state.reading = false;
// if we want the data now, just emit it.
if (state.flowing && state.length === 0 && !state.sync) {
stream.emit('data', chunk);
stream.read(0);
} else {
// update the buffer info.
state.length += state.objectMode ? 1 : chunk.length;
if (addToFront)
state.buffer.unshift(chunk);
else
state.buffer.push(chunk);
if (state.needReadable)
emitReadable(stream);
}
maybeReadMore(stream, state);
}
} else if (!addToFront) {
state.reading = false;
}
return needMoreData(state);
}
// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes. This is to work around cases where hwm=0,
// such as the repl. Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
return !state.ended &&
(state.needReadable ||
state.length < state.highWaterMark ||
state.length === 0);
}
// backwards compatibility.
Readable.prototype.setEncoding = function(enc) {
if (!StringDecoder)
StringDecoder = __nccwpck_require__(60674)/* .StringDecoder */ .s;
this._readableState.decoder = new StringDecoder(enc);
this._readableState.encoding = enc;
return this;
};
// Don't raise the hwm > 128MB
var MAX_HWM = 0x800000;
function roundUpToNextPowerOf2(n) {
if (n >= MAX_HWM) {
n = MAX_HWM;
} else {
// Get the next highest power of 2
n--;
for (var p = 1; p < 32; p <<= 1) n |= n >> p;
n++;
}
return n;
}
function howMuchToRead(n, state) {
if (state.length === 0 && state.ended)
return 0;
if (state.objectMode)
return n === 0 ? 0 : 1;
if (isNaN(n) || util.isNull(n)) {
// only flow one buffer at a time
if (state.flowing && state.buffer.length)
return state.buffer[0].length;
else
return state.length;
}
if (n <= 0)
return 0;
// If we're asking for more than the target buffer level,
// then raise the water mark. Bump up to the next highest
// power of 2, to prevent increasing it excessively in tiny
// amounts.
if (n > state.highWaterMark)
state.highWaterMark = roundUpToNextPowerOf2(n);
// don't have that much. return null, unless we've ended.
if (n > state.length) {
if (!state.ended) {
state.needReadable = true;
return 0;
} else
return state.length;
}
return n;
}
// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function(n) {
debug('read', n);
var state = this._readableState;
var nOrig = n;
if (!util.isNumber(n) || n > 0)
state.emittedReadable = false;
// if we're doing read(0) to trigger a readable event, but we
// already have a bunch of data in the buffer, then just trigger
// the 'readable' event and move on.
if (n === 0 &&
state.needReadable &&
(state.length >= state.highWaterMark || state.ended)) {
debug('read: emitReadable', state.length, state.ended);
if (state.length === 0 && state.ended)
endReadable(this);
else
emitReadable(this);
return null;
}
n = howMuchToRead(n, state);
// if we've ended, and we're now clear, then finish it up.
if (n === 0 && state.ended) {
if (state.length === 0)
endReadable(this);
return null;
}
// All the actual chunk generation logic needs to be
// *below* the call to _read. The reason is that in certain
// synthetic stream cases, such as passthrough streams, _read
// may be a completely synchronous operation which may change
// the state of the read buffer, providing enough data when
// before there was *not* enough.
//
// So, the steps are:
// 1. Figure out what the state of things will be after we do
// a read from the buffer.
//
// 2. If that resulting state will trigger a _read, then call _read.
// Note that this may be asynchronous, or synchronous. Yes, it is
// deeply ugly to write APIs this way, but that still doesn't mean
// that the Readable class should behave improperly, as streams are
// designed to be sync/async agnostic.
// Take note if the _read call is sync or async (ie, if the read call
// has returned yet), so that we know whether or not it's safe to emit
// 'readable' etc.
//
// 3. Actually pull the requested chunks out of the buffer and return.
// if we need a readable event, then we need to do some reading.
var doRead = state.needReadable;
debug('need readable', doRead);
// if we currently have less than the highWaterMark, then also read some
if (state.length === 0 || state.length - n < state.highWaterMark) {
doRead = true;
debug('length less than watermark', doRead);
}
// however, if we've ended, then there's no point, and if we're already
// reading, then it's unnecessary.
if (state.ended || state.reading) {
doRead = false;
debug('reading or ended', doRead);
}
if (doRead) {
debug('do read');
state.reading = true;
state.sync = true;
// if the length is currently zero, then we *need* a readable event.
if (state.length === 0)
state.needReadable = true;
// call internal read method
this._read(state.highWaterMark);
state.sync = false;
}
// If _read pushed data synchronously, then `reading` will be false,
// and we need to re-evaluate how much data we can return to the user.
if (doRead && !state.reading)
n = howMuchToRead(nOrig, state);
var ret;
if (n > 0)
ret = fromList(n, state);
else
ret = null;
if (util.isNull(ret)) {
state.needReadable = true;
n = 0;
}
state.length -= n;
// If we have nothing in the buffer, then we want to know
// as soon as we *do* get something into the buffer.
if (state.length === 0 && !state.ended)
state.needReadable = true;
// If we tried to read() past the EOF, then emit end on the next tick.
if (nOrig !== n && state.ended && state.length === 0)
endReadable(this);
if (!util.isNull(ret))
this.emit('data', ret);
return ret;
};
function chunkInvalid(state, chunk) {
var er = null;
if (!util.isBuffer(chunk) &&
!util.isString(chunk) &&
!util.isNullOrUndefined(chunk) &&
!state.objectMode) {
er = new TypeError('Invalid non-string/buffer chunk');
}
return er;
}
function onEofChunk(stream, state) {
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length;
}
}
state.ended = true;
// emit 'readable' now to make sure it gets picked up.
emitReadable(stream);
}
// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow. This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
var state = stream._readableState;
state.needReadable = false;
if (!state.emittedReadable) {
debug('emitReadable', state.flowing);
state.emittedReadable = true;
if (state.sync)
process.nextTick(function() {
emitReadable_(stream);
});
else
emitReadable_(stream);
}
}
function emitReadable_(stream) {
debug('emit readable');
stream.emit('readable');
flow(stream);
}
// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data. that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
if (!state.readingMore) {
state.readingMore = true;
process.nextTick(function() {
maybeReadMore_(stream, state);
});
}
}
function maybeReadMore_(stream, state) {
var len = state.length;
while (!state.reading && !state.flowing && !state.ended &&
state.length < state.highWaterMark) {
debug('maybeReadMore read 0');
stream.read(0);
if (len === state.length)
// didn't get any data, stop spinning.
break;
else
len = state.length;
}
state.readingMore = false;
}
// abstract method. to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function(n) {
this.emit('error', new Error('not implemented'));
};
Readable.prototype.pipe = function(dest, pipeOpts) {
var src = this;
var state = this._readableState;
switch (state.pipesCount) {
case 0:
state.pipes = dest;
break;
case 1:
state.pipes = [state.pipes, dest];
break;
default:
state.pipes.push(dest);
break;
}
state.pipesCount += 1;
debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
dest !== process.stdout &&
dest !== process.stderr;
var endFn = doEnd ? onend : cleanup;
if (state.endEmitted)
process.nextTick(endFn);
else
src.once('end', endFn);
dest.on('unpipe', onunpipe);
function onunpipe(readable) {
debug('onunpipe');
if (readable === src) {
cleanup();
}
}
function onend() {
debug('onend');
dest.end();
}
// when the dest drains, it reduces the awaitDrain counter
// on the source. This would be more elegant with a .once()
// handler in flow(), but adding and removing repeatedly is
// too slow.
var ondrain = pipeOnDrain(src);
dest.on('drain', ondrain);
function cleanup() {
debug('cleanup');
// cleanup event handlers once the pipe is broken
dest.removeListener('close', onclose);
dest.removeListener('finish', onfinish);
dest.removeListener('drain', ondrain);
dest.removeListener('error', onerror);
dest.removeListener('unpipe', onunpipe);
src.removeListener('end', onend);
src.removeListener('end', cleanup);
src.removeListener('data', ondata);
// if the reader is waiting for a drain event from this
// specific writer, then it would cause it to never start
// flowing again.
// So, if this is awaiting a drain, then we just call it now.
// If we don't know, then assume that we are waiting for one.
if (state.awaitDrain &&
(!dest._writableState || dest._writableState.needDrain))
ondrain();
}
src.on('data', ondata);
function ondata(chunk) {
debug('ondata');
var ret = dest.write(chunk);
if (false === ret) {
debug('false write response, pause',
src._readableState.awaitDrain);
src._readableState.awaitDrain++;
src.pause();
}
}
// if the dest has an error, then stop piping into it.
// however, don't suppress the throwing behavior for this.
function onerror(er) {
debug('onerror', er);
unpipe();
dest.removeListener('error', onerror);
if (EE.listenerCount(dest, 'error') === 0)
dest.emit('error', er);
}
// This is a brutally ugly hack to make sure that our error handler
// is attached before any userland ones. NEVER DO THIS.
if (!dest._events || !dest._events.error)
dest.on('error', onerror);
else if (isArray(dest._events.error))
dest._events.error.unshift(onerror);
else
dest._events.error = [onerror, dest._events.error];
// Both close and finish should trigger unpipe, but only once.
function onclose() {
dest.removeListener('finish', onfinish);
unpipe();
}
dest.once('close', onclose);
function onfinish() {
debug('onfinish');
dest.removeListener('close', onclose);
unpipe();
}
dest.once('finish', onfinish);
function unpipe() {
debug('unpipe');
src.unpipe(dest);
}
// tell the dest that it's being piped to
dest.emit('pipe', src);
// start the flow if it hasn't been started already.
if (!state.flowing) {
debug('pipe resume');
src.resume();
}
return dest;
};
function pipeOnDrain(src) {
return function() {
var state = src._readableState;
debug('pipeOnDrain', state.awaitDrain);
if (state.awaitDrain)
state.awaitDrain--;
if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
state.flowing = true;
flow(src);
}
};
}
Readable.prototype.unpipe = function(dest) {
var state = this._readableState;
// if we're not piping anywhere, then do nothing.
if (state.pipesCount === 0)
return this;
// just one destination. most common case.
if (state.pipesCount === 1) {
// passed in one, but it's not the right one.
if (dest && dest !== state.pipes)
return this;
if (!dest)
dest = state.pipes;
// got a match.
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
if (dest)
dest.emit('unpipe', this);
return this;
}
// slow case. multiple pipe destinations.
if (!dest) {
// remove all.
var dests = state.pipes;
var len = state.pipesCount;
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
for (var i = 0; i < len; i++)
dests[i].emit('unpipe', this);
return this;
}
// try to find the right one.
var i = indexOf(state.pipes, dest);
if (i === -1)
return this;
state.pipes.splice(i, 1);
state.pipesCount -= 1;
if (state.pipesCount === 1)
state.pipes = state.pipes[0];
dest.emit('unpipe', this);
return this;
};
// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function(ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
// If listening to data, and it has not explicitly been paused,
// then call resume to start the flow of data on the next tick.
if (ev === 'data' && false !== this._readableState.flowing) {
this.resume();
}
if (ev === 'readable' && this.readable) {
var state = this._readableState;
if (!state.readableListening) {
state.readableListening = true;
state.emittedReadable = false;
state.needReadable = true;
if (!state.reading) {
var self = this;
process.nextTick(function() {
debug('readable nexttick read 0');
self.read(0);
});
} else if (state.length) {
emitReadable(this, state);
}
}
}
return res;
};
Readable.prototype.addListener = Readable.prototype.on;
// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function() {
var state = this._readableState;
if (!state.flowing) {
debug('resume');
state.flowing = true;
if (!state.reading) {
debug('resume read 0');
this.read(0);
}
resume(this, state);
}
return this;
};
function resume(stream, state) {
if (!state.resumeScheduled) {
state.resumeScheduled = true;
process.nextTick(function() {
resume_(stream, state);
});
}
}
function resume_(stream, state) {
state.resumeScheduled = false;
stream.emit('resume');
flow(stream);
if (state.flowing && !state.reading)
stream.read(0);
}
Readable.prototype.pause = function() {
debug('call pause flowing=%j', this._readableState.flowing);
if (false !== this._readableState.flowing) {
debug('pause');
this._readableState.flowing = false;
this.emit('pause');
}
return this;
};
function flow(stream) {
var state = stream._readableState;
debug('flow', state.flowing);
if (state.flowing) {
do {
var chunk = stream.read();
} while (null !== chunk && state.flowing);
}
}
// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function(stream) {
var state = this._readableState;
var paused = false;
var self = this;
stream.on('end', function() {
debug('wrapped end');
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length)
self.push(chunk);
}
self.push(null);
});
stream.on('data', function(chunk) {
debug('wrapped data');
if (state.decoder)
chunk = state.decoder.write(chunk);
if (!chunk || !state.objectMode && !chunk.length)
return;
var ret = self.push(chunk);
if (!ret) {
paused = true;
stream.pause();
}
});
// proxy all the other methods.
// important when wrapping filters and duplexes.
for (var i in stream) {
if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
this[i] = function(method) { return function() {
return stream[method].apply(stream, arguments);
}}(i);
}
}
// proxy certain important events.
var events = ['error', 'close', 'destroy', 'pause', 'resume'];
forEach(events, function(ev) {
stream.on(ev, self.emit.bind(self, ev));
});
// when we try to consume some more bytes, simply unpause the
// underlying stream.
self._read = function(n) {
debug('wrapped _read', n);
if (paused) {
paused = false;
stream.resume();
}
};
return self;
};
// exposed for testing purposes only.
Readable._fromList = fromList;
// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
function fromList(n, state) {
var list = state.buffer;
var length = state.length;
var stringMode = !!state.decoder;
var objectMode = !!state.objectMode;
var ret;
// nothing in the list, definitely empty.
if (list.length === 0)
return null;
if (length === 0)
ret = null;
else if (objectMode)
ret = list.shift();
else if (!n || n >= length) {
// read it all, truncate the array.
if (stringMode)
ret = list.join('');
else
ret = Buffer.concat(list, length);
list.length = 0;
} else {
// read just some of it.
if (n < list[0].length) {
// just take a part of the first list item.
// slice is the same for buffers and strings.
var buf = list[0];
ret = buf.slice(0, n);
list[0] = buf.slice(n);
} else if (n === list[0].length) {
// first list is a perfect match
ret = list.shift();
} else {
// complex case.
// we have enough to cover it, but it spans past the first buffer.
if (stringMode)
ret = '';
else
ret = new Buffer(n);
var c = 0;
for (var i = 0, l = list.length; i < l && c < n; i++) {
var buf = list[0];
var cpy = Math.min(n - c, buf.length);
if (stringMode)
ret += buf.slice(0, cpy);
else
buf.copy(ret, c, 0, cpy);
if (cpy < buf.length)
list[0] = buf.slice(cpy);
else
list.shift();
c += cpy;
}
}
}
return ret;
}
function endReadable(stream) {
var state = stream._readableState;
// If we get here before consuming all the bytes, then that is a
// bug in node. Should never happen.
if (state.length > 0)
throw new Error('endReadable called on non-empty stream');
if (!state.endEmitted) {
state.ended = true;
process.nextTick(function() {
// Check that we didn't get one last unshift.
if (!state.endEmitted && state.length === 0) {
state.endEmitted = true;
stream.readable = false;
stream.emit('end');
}
});
}
}
function forEach (xs, f) {
for (var i = 0, l = xs.length; i < l; i++) {
f(xs[i], i);
}
}
function indexOf (xs, x) {
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) return i;
}
return -1;
}
/***/ }),
/***/ 34415:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored. (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation. For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes. When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up. When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer. When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks. If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk. However,
// a pathological inflate type of transform can cause excessive buffering
// here. For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output. In this case, you could write a very small
// amount of input, and end up with a very large amount of output. In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform. A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.
module.exports = Transform;
var Duplex = __nccwpck_require__(41359);
/*<replacement>*/
var util = __nccwpck_require__(95898);
util.inherits = __nccwpck_require__(44124);
/*</replacement>*/
util.inherits(Transform, Duplex);
function TransformState(options, stream) {
this.afterTransform = function(er, data) {
return afterTransform(stream, er, data);
};
this.needTransform = false;
this.transforming = false;
this.writecb = null;
this.writechunk = null;
}
function afterTransform(stream, er, data) {
var ts = stream._transformState;
ts.transforming = false;
var cb = ts.writecb;
if (!cb)
return stream.emit('error', new Error('no writecb in Transform class'));
ts.writechunk = null;
ts.writecb = null;
if (!util.isNullOrUndefined(data))
stream.push(data);
if (cb)
cb(er);
var rs = stream._readableState;
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
stream._read(rs.highWaterMark);
}
}
function Transform(options) {
if (!(this instanceof Transform))
return new Transform(options);
Duplex.call(this, options);
this._transformState = new TransformState(options, this);
// when the writable side finishes, then flush out anything remaining.
var stream = this;
// start out asking for a readable event once data is transformed.
this._readableState.needReadable = true;
// we have implemented the _read method, and done the other things
// that Readable wants before the first _read call, so unset the
// sync guard flag.
this._readableState.sync = false;
this.once('prefinish', function() {
if (util.isFunction(this._flush))
this._flush(function(er) {
done(stream, er);
});
else
done(stream);
});
}
Transform.prototype.push = function(chunk, encoding) {
this._transformState.needTransform = false;
return Duplex.prototype.push.call(this, chunk, encoding);
};
// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side. You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function(chunk, encoding, cb) {
throw new Error('not implemented');
};
Transform.prototype._write = function(chunk, encoding, cb) {
var ts = this._transformState;
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
if (!ts.transforming) {
var rs = this._readableState;
if (ts.needTransform ||
rs.needReadable ||
rs.length < rs.highWaterMark)
this._read(rs.highWaterMark);
}
};
// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
var ts = this._transformState;
if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
ts.transforming = true;
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
} else {
// mark that we need a transform, so that any data that comes in
// will get processed, now that we've asked for it.
ts.needTransform = true;
}
};
function done(stream, er) {
if (er)
return stream.emit('error', er);
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
var ws = stream._writableState;
var ts = stream._transformState;
if (ws.length)
throw new Error('calling transform done when ws.length != 0');
if (ts.transforming)
throw new Error('calling transform done when still transforming');
return stream.push(null);
}
/***/ }),
/***/ 26993:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// A bit simpler than readable streams.
// Implement an async ._write(chunk, cb), and it'll handle all
// the drain event emission and buffering.
module.exports = Writable;
/*<replacement>*/
var Buffer = __nccwpck_require__(64293).Buffer;
/*</replacement>*/
Writable.WritableState = WritableState;
/*<replacement>*/
var util = __nccwpck_require__(95898);
util.inherits = __nccwpck_require__(44124);
/*</replacement>*/
var Stream = __nccwpck_require__(92413);
util.inherits(Writable, Stream);
function WriteReq(chunk, encoding, cb) {
this.chunk = chunk;
this.encoding = encoding;
this.callback = cb;
}
function WritableState(options, stream) {
var Duplex = __nccwpck_require__(41359);
options = options || {};
// the point at which write() starts returning false
// Note: 0 is a valid value, means that we always return false if
// the entire buffer is not flushed immediately on write()
var hwm = options.highWaterMark;
var defaultHwm = options.objectMode ? 16 : 16 * 1024;
this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
// object stream flag to indicate whether or not this stream
// contains buffers or objects.
this.objectMode = !!options.objectMode;
if (stream instanceof Duplex)
this.objectMode = this.objectMode || !!options.writableObjectMode;
// cast to ints.
this.highWaterMark = ~~this.highWaterMark;
this.needDrain = false;
// at the start of calling end()
this.ending = false;
// when end() has been called, and returned
this.ended = false;
// when 'finish' is emitted
this.finished = false;
// should we decode strings into buffers before passing to _write?
// this is here so that some node-core streams can optimize string
// handling at a lower level.
var noDecode = options.decodeStrings === false;
this.decodeStrings = !noDecode;
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
// not an actual buffer we keep track of, but a measurement
// of how much we're waiting to get pushed to some underlying
// socket or file.
this.length = 0;
// a flag to see when we're in the middle of a write.
this.writing = false;
// when true all writes will be buffered until .uncork() call
this.corked = 0;
// a flag to be able to tell if the onwrite cb is called immediately,
// or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
// a flag to know if we're processing previously buffered items, which
// may call the _write() callback in the same tick, so that we don't
// end up in an overlapped onwrite situation.
this.bufferProcessing = false;
// the callback that's passed to _write(chunk,cb)
this.onwrite = function(er) {
onwrite(stream, er);
};
// the callback that the user supplies to write(chunk,encoding,cb)
this.writecb = null;
// the amount that is being written when _write is called.
this.writelen = 0;
this.buffer = [];
// number of pending user-supplied write callbacks
// this must be 0 before 'finish' can be emitted
this.pendingcb = 0;
// emit prefinish if the only thing we're waiting for is _write cbs
// This is relevant for synchronous Transform streams
this.prefinished = false;
// True if the error was already emitted and should not be thrown again
this.errorEmitted = false;
}
function Writable(options) {
var Duplex = __nccwpck_require__(41359);
// Writable ctor is applied to Duplexes, though they're not
// instanceof Writable, they're instanceof Readable.
if (!(this instanceof Writable) && !(this instanceof Duplex))
return new Writable(options);
this._writableState = new WritableState(options, this);
// legacy.
this.writable = true;
Stream.call(this);
}
// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function() {
this.emit('error', new Error('Cannot pipe. Not readable.'));
};
function writeAfterEnd(stream, state, cb) {
var er = new Error('write after end');
// TODO: defer error events consistently everywhere, not just the cb
stream.emit('error', er);
process.nextTick(function() {
cb(er);
});
}
// If we get something that is not a buffer, string, null, or undefined,
// and we're not in objectMode, then that's an error.
// Otherwise stream chunks are all considered to be of length=1, and the
// watermarks determine how many objects to keep in the buffer, rather than
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
var valid = true;
if (!util.isBuffer(chunk) &&
!util.isString(chunk) &&
!util.isNullOrUndefined(chunk) &&
!state.objectMode) {
var er = new TypeError('Invalid non-string/buffer chunk');
stream.emit('error', er);
process.nextTick(function() {
cb(er);
});
valid = false;
}
return valid;
}
Writable.prototype.write = function(chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
if (util.isFunction(encoding)) {
cb = encoding;
encoding = null;
}
if (util.isBuffer(chunk))
encoding = 'buffer';
else if (!encoding)
encoding = state.defaultEncoding;
if (!util.isFunction(cb))
cb = function() {};
if (state.ended)
writeAfterEnd(this, state, cb);
else if (validChunk(this, state, chunk, cb)) {
state.pendingcb++;
ret = writeOrBuffer(this, state, chunk, encoding, cb);
}
return ret;
};
Writable.prototype.cork = function() {
var state = this._writableState;
state.corked++;
};
Writable.prototype.uncork = function() {
var state = this._writableState;
if (state.corked) {
state.corked--;
if (!state.writing &&
!state.corked &&
!state.finished &&
!state.bufferProcessing &&
state.buffer.length)
clearBuffer(this, state);
}
};
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode &&
state.decodeStrings !== false &&
util.isString(chunk)) {
chunk = new Buffer(chunk, encoding);
}
return chunk;
}
// if we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) {
chunk = decodeChunk(state, chunk, encoding);
if (util.isBuffer(chunk))
encoding = 'buffer';
var len = state.objectMode ? 1 : chunk.length;
state.length += len;
var ret = state.length < state.highWaterMark;
// we must ensure that previous needDrain will not be reset to false.
if (!ret)
state.needDrain = true;
if (state.writing || state.corked)
state.buffer.push(new WriteReq(chunk, encoding, cb));
else
doWrite(stream, state, false, len, chunk, encoding, cb);
return ret;
}
function doWrite(stream, state, writev, len, chunk, encoding, cb) {
state.writelen = len;
state.writecb = cb;
state.writing = true;
state.sync = true;
if (writev)
stream._writev(chunk, state.onwrite);
else
stream._write(chunk, encoding, state.onwrite);
state.sync = false;
}
function onwriteError(stream, state, sync, er, cb) {
if (sync)
process.nextTick(function() {
state.pendingcb--;
cb(er);
});
else {
state.pendingcb--;
cb(er);
}
stream._writableState.errorEmitted = true;
stream.emit('error', er);
}
function onwriteStateUpdate(state) {
state.writing = false;
state.writecb = null;
state.length -= state.writelen;
state.writelen = 0;
}
function onwrite(stream, er) {
var state = stream._writableState;
var sync = state.sync;
var cb = state.writecb;
onwriteStateUpdate(state);
if (er)
onwriteError(stream, state, sync, er, cb);
else {
// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(stream, state);
if (!finished &&
!state.corked &&
!state.bufferProcessing &&
state.buffer.length) {
clearBuffer(stream, state);
}
if (sync) {
process.nextTick(function() {
afterWrite(stream, state, finished, cb);
});
} else {
afterWrite(stream, state, finished, cb);
}
}
}
function afterWrite(stream, state, finished, cb) {
if (!finished)
onwriteDrain(stream, state);
state.pendingcb--;
cb();
finishMaybe(stream, state);
}
// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
if (state.length === 0 && state.needDrain) {
state.needDrain = false;
stream.emit('drain');
}
}
// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
state.bufferProcessing = true;
if (stream._writev && state.buffer.length > 1) {
// Fast case, write everything using _writev()
var cbs = [];
for (var c = 0; c < state.buffer.length; c++)
cbs.push(state.buffer[c].callback);
// count the one we are adding, as well.
// TODO(isaacs) clean this up
state.pendingcb++;
doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
for (var i = 0; i < cbs.length; i++) {
state.pendingcb--;
cbs[i](err);
}
});
// Clear buffer
state.buffer = [];
} else {
// Slow case, write chunks one-by-one
for (var c = 0; c < state.buffer.length; c++) {
var entry = state.buffer[c];
var chunk = entry.chunk;
var encoding = entry.encoding;
var cb = entry.callback;
var len = state.objectMode ? 1 : chunk.length;
doWrite(stream, state, false, len, chunk, encoding, cb);
// if we didn't call the onwrite immediately, then
// it means that we need to wait until it does.
// also, that means that the chunk and cb are currently
// being processed, so move the buffer counter past them.
if (state.writing) {
c++;
break;
}
}
if (c < state.buffer.length)
state.buffer = state.buffer.slice(c);
else
state.buffer.length = 0;
}
state.bufferProcessing = false;
}
Writable.prototype._write = function(chunk, encoding, cb) {
cb(new Error('not implemented'));
};
Writable.prototype._writev = null;
Writable.prototype.end = function(chunk, encoding, cb) {
var state = this._writableState;
if (util.isFunction(chunk)) {
cb = chunk;
chunk = null;
encoding = null;
} else if (util.isFunction(encoding)) {
cb = encoding;
encoding = null;
}
if (!util.isNullOrUndefined(chunk))
this.write(chunk, encoding);
// .end() fully uncorks
if (state.corked) {
state.corked = 1;
this.uncork();
}
// ignore unnecessary end() calls.
if (!state.ending && !state.finished)
endWritable(this, state, cb);
};
function needFinish(stream, state) {
return (state.ending &&
state.length === 0 &&
!state.finished &&
!state.writing);
}
function prefinish(stream, state) {
if (!state.prefinished) {
state.prefinished = true;
stream.emit('prefinish');
}
}
function finishMaybe(stream, state) {
var need = needFinish(stream, state);
if (need) {
if (state.pendingcb === 0) {
prefinish(stream, state);
state.finished = true;
stream.emit('finish');
} else
prefinish(stream, state);
}
return need;
}
function endWritable(stream, state, cb) {
state.ending = true;
finishMaybe(stream, state);
if (cb) {
if (state.finished)
process.nextTick(cb);
else
stream.once('finish', cb);
}
state.ended = true;
}
/***/ }),
/***/ 51642:
/***/ ((module, exports, __nccwpck_require__) => {
exports = module.exports = __nccwpck_require__(51433);
exports.Stream = __nccwpck_require__(92413);
exports.Readable = exports;
exports.Writable = __nccwpck_require__(26993);
exports.Duplex = __nccwpck_require__(41359);
exports.Transform = __nccwpck_require__(34415);
exports.PassThrough = __nccwpck_require__(81542);
if (!process.browser && process.env.READABLE_STREAM === 'disable') {
module.exports = __nccwpck_require__(92413);
}
/***/ }),
/***/ 15118:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
/* eslint-disable node/no-deprecated-api */
var buffer = __nccwpck_require__(64293)
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
/***/ }),
/***/ 40414:
/***/ ((module) => {
"use strict";
/* eslint no-proto: 0 */
module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties)
function setProtoOf (obj, proto) {
obj.__proto__ = proto
return obj
}
function mixinProperties (obj, proto) {
for (var prop in proto) {
if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
obj[prop] = proto[prop]
}
}
return obj
}
/***/ }),
/***/ 71062:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const utils_1 = __nccwpck_require__(98132);
// The default Buffer size if one is not provided.
const DEFAULT_SMARTBUFFER_SIZE = 4096;
// The default string encoding to use for reading/writing strings.
const DEFAULT_SMARTBUFFER_ENCODING = 'utf8';
class SmartBuffer {
/**
* Creates a new SmartBuffer instance.
*
* @param options { SmartBufferOptions } The SmartBufferOptions to apply to this instance.
*/
constructor(options) {
this.length = 0;
this._encoding = DEFAULT_SMARTBUFFER_ENCODING;
this._writeOffset = 0;
this._readOffset = 0;
if (SmartBuffer.isSmartBufferOptions(options)) {
// Checks for encoding
if (options.encoding) {
utils_1.checkEncoding(options.encoding);
this._encoding = options.encoding;
}
// Checks for initial size length
if (options.size) {
if (utils_1.isFiniteInteger(options.size) && options.size > 0) {
this._buff = Buffer.allocUnsafe(options.size);
}
else {
throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_SIZE);
}
// Check for initial Buffer
}
else if (options.buff) {
if (Buffer.isBuffer(options.buff)) {
this._buff = options.buff;
this.length = options.buff.length;
}
else {
throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_BUFFER);
}
}
else {
this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
}
}
else {
// If something was passed but it's not a SmartBufferOptions object
if (typeof options !== 'undefined') {
throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_OBJECT);
}
// Otherwise default to sane options
this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
}
}
/**
* Creates a new SmartBuffer instance with the provided internal Buffer size and optional encoding.
*
* @param size { Number } The size of the internal Buffer.
* @param encoding { String } The BufferEncoding to use for strings.
*
* @return { SmartBuffer }
*/
static fromSize(size, encoding) {
return new this({
size: size,
encoding: encoding
});
}
/**
* Creates a new SmartBuffer instance with the provided Buffer and optional encoding.
*
* @param buffer { Buffer } The Buffer to use as the internal Buffer value.
* @param encoding { String } The BufferEncoding to use for strings.
*
* @return { SmartBuffer }
*/
static fromBuffer(buff, encoding) {
return new this({
buff: buff,
encoding: encoding
});
}
/**
* Creates a new SmartBuffer instance with the provided SmartBufferOptions options.
*
* @param options { SmartBufferOptions } The options to use when creating the SmartBuffer instance.
*/
static fromOptions(options) {
return new this(options);
}
/**
* Type checking function that determines if an object is a SmartBufferOptions object.
*/
static isSmartBufferOptions(options) {
const castOptions = options;
return (castOptions &&
(castOptions.encoding !== undefined || castOptions.size !== undefined || castOptions.buff !== undefined));
}
// Signed integers
/**
* Reads an Int8 value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readInt8(offset) {
return this._readNumberValue(Buffer.prototype.readInt8, 1, offset);
}
/**
* Reads an Int16BE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readInt16BE(offset) {
return this._readNumberValue(Buffer.prototype.readInt16BE, 2, offset);
}
/**
* Reads an Int16LE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readInt16LE(offset) {
return this._readNumberValue(Buffer.prototype.readInt16LE, 2, offset);
}
/**
* Reads an Int32BE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readInt32BE(offset) {
return this._readNumberValue(Buffer.prototype.readInt32BE, 4, offset);
}
/**
* Reads an Int32LE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readInt32LE(offset) {
return this._readNumberValue(Buffer.prototype.readInt32LE, 4, offset);
}
/**
* Reads a BigInt64BE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { BigInt }
*/
readBigInt64BE(offset) {
utils_1.bigIntAndBufferInt64Check('readBigInt64BE');
return this._readNumberValue(Buffer.prototype.readBigInt64BE, 8, offset);
}
/**
* Reads a BigInt64LE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { BigInt }
*/
readBigInt64LE(offset) {
utils_1.bigIntAndBufferInt64Check('readBigInt64LE');
return this._readNumberValue(Buffer.prototype.readBigInt64LE, 8, offset);
}
/**
* Writes an Int8 value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeInt8(value, offset) {
this._writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset);
return this;
}
/**
* Inserts an Int8 value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertInt8(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset);
}
/**
* Writes an Int16BE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeInt16BE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset);
}
/**
* Inserts an Int16BE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertInt16BE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset);
}
/**
* Writes an Int16LE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeInt16LE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset);
}
/**
* Inserts an Int16LE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertInt16LE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset);
}
/**
* Writes an Int32BE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeInt32BE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset);
}
/**
* Inserts an Int32BE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertInt32BE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset);
}
/**
* Writes an Int32LE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeInt32LE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset);
}
/**
* Inserts an Int32LE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertInt32LE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset);
}
/**
* Writes a BigInt64BE value to the current write position (or at optional offset).
*
* @param value { BigInt } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeBigInt64BE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigInt64BE');
return this._writeNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset);
}
/**
* Inserts a BigInt64BE value at the given offset value.
*
* @param value { BigInt } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertBigInt64BE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigInt64BE');
return this._insertNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset);
}
/**
* Writes a BigInt64LE value to the current write position (or at optional offset).
*
* @param value { BigInt } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeBigInt64LE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigInt64LE');
return this._writeNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset);
}
/**
* Inserts a Int64LE value at the given offset value.
*
* @param value { BigInt } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertBigInt64LE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigInt64LE');
return this._insertNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset);
}
// Unsigned Integers
/**
* Reads an UInt8 value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readUInt8(offset) {
return this._readNumberValue(Buffer.prototype.readUInt8, 1, offset);
}
/**
* Reads an UInt16BE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readUInt16BE(offset) {
return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, offset);
}
/**
* Reads an UInt16LE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readUInt16LE(offset) {
return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, offset);
}
/**
* Reads an UInt32BE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readUInt32BE(offset) {
return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, offset);
}
/**
* Reads an UInt32LE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readUInt32LE(offset) {
return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, offset);
}
/**
* Reads a BigUInt64BE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { BigInt }
*/
readBigUInt64BE(offset) {
utils_1.bigIntAndBufferInt64Check('readBigUInt64BE');
return this._readNumberValue(Buffer.prototype.readBigUInt64BE, 8, offset);
}
/**
* Reads a BigUInt64LE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { BigInt }
*/
readBigUInt64LE(offset) {
utils_1.bigIntAndBufferInt64Check('readBigUInt64LE');
return this._readNumberValue(Buffer.prototype.readBigUInt64LE, 8, offset);
}
/**
* Writes an UInt8 value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeUInt8(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset);
}
/**
* Inserts an UInt8 value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertUInt8(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset);
}
/**
* Writes an UInt16BE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeUInt16BE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset);
}
/**
* Inserts an UInt16BE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertUInt16BE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset);
}
/**
* Writes an UInt16LE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeUInt16LE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset);
}
/**
* Inserts an UInt16LE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertUInt16LE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset);
}
/**
* Writes an UInt32BE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeUInt32BE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset);
}
/**
* Inserts an UInt32BE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertUInt32BE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset);
}
/**
* Writes an UInt32LE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeUInt32LE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset);
}
/**
* Inserts an UInt32LE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertUInt32LE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset);
}
/**
* Writes a BigUInt64BE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeBigUInt64BE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigUInt64BE');
return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset);
}
/**
* Inserts a BigUInt64BE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertBigUInt64BE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigUInt64BE');
return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset);
}
/**
* Writes a BigUInt64LE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeBigUInt64LE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigUInt64LE');
return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset);
}
/**
* Inserts a BigUInt64LE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertBigUInt64LE(value, offset) {
utils_1.bigIntAndBufferInt64Check('writeBigUInt64LE');
return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset);
}
// Floating Point
/**
* Reads an FloatBE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readFloatBE(offset) {
return this._readNumberValue(Buffer.prototype.readFloatBE, 4, offset);
}
/**
* Reads an FloatLE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readFloatLE(offset) {
return this._readNumberValue(Buffer.prototype.readFloatLE, 4, offset);
}
/**
* Writes a FloatBE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeFloatBE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset);
}
/**
* Inserts a FloatBE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertFloatBE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset);
}
/**
* Writes a FloatLE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeFloatLE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset);
}
/**
* Inserts a FloatLE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertFloatLE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset);
}
// Double Floating Point
/**
* Reads an DoublEBE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readDoubleBE(offset) {
return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, offset);
}
/**
* Reads an DoubleLE value from the current read position or an optionally provided offset.
*
* @param offset { Number } The offset to read data from (optional)
* @return { Number }
*/
readDoubleLE(offset) {
return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, offset);
}
/**
* Writes a DoubleBE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeDoubleBE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset);
}
/**
* Inserts a DoubleBE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertDoubleBE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset);
}
/**
* Writes a DoubleLE value to the current write position (or at optional offset).
*
* @param value { Number } The value to write.
* @param offset { Number } The offset to write the value at.
*
* @return this
*/
writeDoubleLE(value, offset) {
return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset);
}
/**
* Inserts a DoubleLE value at the given offset value.
*
* @param value { Number } The value to insert.
* @param offset { Number } The offset to insert the value at.
*
* @return this
*/
insertDoubleLE(value, offset) {
return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset);
}
// Strings
/**
* Reads a String from the current read position.
*
* @param arg1 { Number | String } The number of bytes to read as a String, or the BufferEncoding to use for
* the string (Defaults to instance level encoding).
* @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding).
*
* @return { String }
*/
readString(arg1, encoding) {
let lengthVal;
// Length provided
if (typeof arg1 === 'number') {
utils_1.checkLengthValue(arg1);
lengthVal = Math.min(arg1, this.length - this._readOffset);
}
else {
encoding = arg1;
lengthVal = this.length - this._readOffset;
}
// Check encoding
if (typeof encoding !== 'undefined') {
utils_1.checkEncoding(encoding);
}
const value = this._buff.slice(this._readOffset, this._readOffset + lengthVal).toString(encoding || this._encoding);
this._readOffset += lengthVal;
return value;
}
/**
* Inserts a String
*
* @param value { String } The String value to insert.
* @param offset { Number } The offset to insert the string at.
* @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
*
* @return this
*/
insertString(value, offset, encoding) {
utils_1.checkOffsetValue(offset);
return this._handleString(value, true, offset, encoding);
}
/**
* Writes a String
*
* @param value { String } The String value to write.
* @param arg2 { Number | String } The offset to write the string at, or the BufferEncoding to use.
* @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
*
* @return this
*/
writeString(value, arg2, encoding) {
return this._handleString(value, false, arg2, encoding);
}
/**
* Reads a null-terminated String from the current read position.
*
* @param encoding { String } The BufferEncoding to use for the string (Defaults to instance level encoding).
*
* @return { String }
*/
readStringNT(encoding) {
if (typeof encoding !== 'undefined') {
utils_1.checkEncoding(encoding);
}
// Set null character position to the end SmartBuffer instance.
let nullPos = this.length;
// Find next null character (if one is not found, default from above is used)
for (let i = this._readOffset; i < this.length; i++) {
if (this._buff[i] === 0x00) {
nullPos = i;
break;
}
}
// Read string value
const value = this._buff.slice(this._readOffset, nullPos);
// Increment internal Buffer read offset
this._readOffset = nullPos + 1;
return value.toString(encoding || this._encoding);
}
/**
* Inserts a null-terminated String.
*
* @param value { String } The String value to write.
* @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use.
* @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
*
* @return this
*/
insertStringNT(value, offset, encoding) {
utils_1.checkOffsetValue(offset);
// Write Values
this.insertString(value, offset, encoding);
this.insertUInt8(0x00, offset + value.length);
return this;
}
/**
* Writes a null-terminated String.
*
* @param value { String } The String value to write.
* @param arg2 { Number | String } The offset to write the string to, or the BufferEncoding to use.
* @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
*
* @return this
*/
writeStringNT(value, arg2, encoding) {
// Write Values
this.writeString(value, arg2, encoding);
this.writeUInt8(0x00, typeof arg2 === 'number' ? arg2 + value.length : this.writeOffset);
return this;
}
// Buffers
/**
* Reads a Buffer from the internal read position.
*
* @param length { Number } The length of data to read as a Buffer.
*
* @return { Buffer }
*/
readBuffer(length) {
if (typeof length !== 'undefined') {
utils_1.checkLengthValue(length);
}
const lengthVal = typeof length === 'number' ? length : this.length;
const endPoint = Math.min(this.length, this._readOffset + lengthVal);
// Read buffer value
const value = this._buff.slice(this._readOffset, endPoint);
// Increment internal Buffer read offset
this._readOffset = endPoint;
return value;
}
/**
* Writes a Buffer to the current write position.
*
* @param value { Buffer } The Buffer to write.
* @param offset { Number } The offset to write the Buffer to.
*
* @return this
*/
insertBuffer(value, offset) {
utils_1.checkOffsetValue(offset);
return this._handleBuffer(value, true, offset);
}
/**
* Writes a Buffer to the current write position.
*
* @param value { Buffer } The Buffer to write.
* @param offset { Number } The offset to write the Buffer to.
*
* @return this
*/
writeBuffer(value, offset) {
return this._handleBuffer(value, false, offset);
}
/**
* Reads a null-terminated Buffer from the current read poisiton.
*
* @return { Buffer }
*/
readBufferNT() {
// Set null character position to the end SmartBuffer instance.
let nullPos = this.length;
// Find next null character (if one is not found, default from above is used)
for (let i = this._readOffset; i < this.length; i++) {
if (this._buff[i] === 0x00) {
nullPos = i;
break;
}
}
// Read value
const value = this._buff.slice(this._readOffset, nullPos);
// Increment internal Buffer read offset
this._readOffset = nullPos + 1;
return value;
}
/**
* Inserts a null-terminated Buffer.
*
* @param value { Buffer } The Buffer to write.
* @param offset { Number } The offset to write the Buffer to.
*
* @return this
*/
insertBufferNT(value, offset) {
utils_1.checkOffsetValue(offset);
// Write Values
this.insertBuffer(value, offset);
this.insertUInt8(0x00, offset + value.length);
return this;
}
/**
* Writes a null-terminated Buffer.
*
* @param value { Buffer } The Buffer to write.
* @param offset { Number } The offset to write the Buffer to.
*
* @return this
*/
writeBufferNT(value, offset) {
// Checks for valid numberic value;
if (typeof offset !== 'undefined') {
utils_1.checkOffsetValue(offset);
}
// Write Values
this.writeBuffer(value, offset);
this.writeUInt8(0x00, typeof offset === 'number' ? offset + value.length : this._writeOffset);
return this;
}
/**
* Clears the SmartBuffer instance to its original empty state.
*/
clear() {
this._writeOffset = 0;
this._readOffset = 0;
this.length = 0;
return this;
}
/**
* Gets the remaining data left to be read from the SmartBuffer instance.
*
* @return { Number }
*/
remaining() {
return this.length - this._readOffset;
}
/**
* Gets the current read offset value of the SmartBuffer instance.
*
* @return { Number }
*/
get readOffset() {
return this._readOffset;
}
/**
* Sets the read offset value of the SmartBuffer instance.
*
* @param offset { Number } - The offset value to set.
*/
set readOffset(offset) {
utils_1.checkOffsetValue(offset);
// Check for bounds.
utils_1.checkTargetOffset(offset, this);
this._readOffset = offset;
}
/**
* Gets the current write offset value of the SmartBuffer instance.
*
* @return { Number }
*/
get writeOffset() {
return this._writeOffset;
}
/**
* Sets the write offset value of the SmartBuffer instance.
*
* @param offset { Number } - The offset value to set.
*/
set writeOffset(offset) {
utils_1.checkOffsetValue(offset);
// Check for bounds.
utils_1.checkTargetOffset(offset, this);
this._writeOffset = offset;
}
/**
* Gets the currently set string encoding of the SmartBuffer instance.
*
* @return { BufferEncoding } The string Buffer encoding currently set.
*/
get encoding() {
return this._encoding;
}
/**
* Sets the string encoding of the SmartBuffer instance.
*
* @param encoding { BufferEncoding } The string Buffer encoding to set.
*/
set encoding(encoding) {
utils_1.checkEncoding(encoding);
this._encoding = encoding;
}
/**
* Gets the underlying internal Buffer. (This includes unmanaged data in the Buffer)
*
* @return { Buffer } The Buffer value.
*/
get internalBuffer() {
return this._buff;
}
/**
* Gets the value of the internal managed Buffer (Includes managed data only)
*
* @param { Buffer }
*/
toBuffer() {
return this._buff.slice(0, this.length);
}
/**
* Gets the String value of the internal managed Buffer
*
* @param encoding { String } The BufferEncoding to display the Buffer as (defaults to instance level encoding).
*/
toString(encoding) {
const encodingVal = typeof encoding === 'string' ? encoding : this._encoding;
// Check for invalid encoding.
utils_1.checkEncoding(encodingVal);
return this._buff.toString(encodingVal, 0, this.length);
}
/**
* Destroys the SmartBuffer instance.
*/
destroy() {
this.clear();
return this;
}
/**
* Handles inserting and writing strings.
*
* @param value { String } The String value to insert.
* @param isInsert { Boolean } True if inserting a string, false if writing.
* @param arg2 { Number | String } The offset to insert the string at, or the BufferEncoding to use.
* @param encoding { String } The BufferEncoding to use for writing strings (defaults to instance encoding).
*/
_handleString(value, isInsert, arg3, encoding) {
let offsetVal = this._writeOffset;
let encodingVal = this._encoding;
// Check for offset
if (typeof arg3 === 'number') {
offsetVal = arg3;
// Check for encoding
}
else if (typeof arg3 === 'string') {
utils_1.checkEncoding(arg3);
encodingVal = arg3;
}
// Check for encoding (third param)
if (typeof encoding === 'string') {
utils_1.checkEncoding(encoding);
encodingVal = encoding;
}
// Calculate bytelength of string.
const byteLength = Buffer.byteLength(value, encodingVal);
// Ensure there is enough internal Buffer capacity.
if (isInsert) {
this.ensureInsertable(byteLength, offsetVal);
}
else {
this._ensureWriteable(byteLength, offsetVal);
}
// Write value
this._buff.write(value, offsetVal, byteLength, encodingVal);
// Increment internal Buffer write offset;
if (isInsert) {
this._writeOffset += byteLength;
}
else {
// If an offset was given, check to see if we wrote beyond the current writeOffset.
if (typeof arg3 === 'number') {
this._writeOffset = Math.max(this._writeOffset, offsetVal + byteLength);
}
else {
// If no offset was given, we wrote to the end of the SmartBuffer so increment writeOffset.
this._writeOffset += byteLength;
}
}
return this;
}
/**
* Handles writing or insert of a Buffer.
*
* @param value { Buffer } The Buffer to write.
* @param offset { Number } The offset to write the Buffer to.
*/
_handleBuffer(value, isInsert, offset) {
const offsetVal = typeof offset === 'number' ? offset : this._writeOffset;
// Ensure there is enough internal Buffer capacity.
if (isInsert) {
this.ensureInsertable(value.length, offsetVal);
}
else {
this._ensureWriteable(value.length, offsetVal);
}
// Write buffer value
value.copy(this._buff, offsetVal);
// Increment internal Buffer write offset;
if (isInsert) {
this._writeOffset += value.length;
}
else {
// If an offset was given, check to see if we wrote beyond the current writeOffset.
if (typeof offset === 'number') {
this._writeOffset = Math.max(this._writeOffset, offsetVal + value.length);
}
else {
// If no offset was given, we wrote to the end of the SmartBuffer so increment writeOffset.
this._writeOffset += value.length;
}
}
return this;
}
/**
* Ensures that the internal Buffer is large enough to read data.
*
* @param length { Number } The length of the data that needs to be read.
* @param offset { Number } The offset of the data that needs to be read.
*/
ensureReadable(length, offset) {
// Offset value defaults to managed read offset.
let offsetVal = this._readOffset;
// If an offset was provided, use it.
if (typeof offset !== 'undefined') {
// Checks for valid numberic value;
utils_1.checkOffsetValue(offset);
// Overide with custom offset.
offsetVal = offset;
}
// Checks if offset is below zero, or the offset+length offset is beyond the total length of the managed data.
if (offsetVal < 0 || offsetVal + length > this.length) {
throw new Error(utils_1.ERRORS.INVALID_READ_BEYOND_BOUNDS);
}
}
/**
* Ensures that the internal Buffer is large enough to insert data.
*
* @param dataLength { Number } The length of the data that needs to be written.
* @param offset { Number } The offset of the data to be written.
*/
ensureInsertable(dataLength, offset) {
// Checks for valid numberic value;
utils_1.checkOffsetValue(offset);
// Ensure there is enough internal Buffer capacity.
this._ensureCapacity(this.length + dataLength);
// If an offset was provided and its not the very end of the buffer, copy data into appropriate location in regards to the offset.
if (offset < this.length) {
this._buff.copy(this._buff, offset + dataLength, offset, this._buff.length);
}
// Adjust tracked smart buffer length
if (offset + dataLength > this.length) {
this.length = offset + dataLength;
}
else {
this.length += dataLength;
}
}
/**
* Ensures that the internal Buffer is large enough to write data.
*
* @param dataLength { Number } The length of the data that needs to be written.
* @param offset { Number } The offset of the data to be written (defaults to writeOffset).
*/
_ensureWriteable(dataLength, offset) {
const offsetVal = typeof offset === 'number' ? offset : this._writeOffset;
// Ensure enough capacity to write data.
this._ensureCapacity(offsetVal + dataLength);
// Adjust SmartBuffer length (if offset + length is larger than managed length, adjust length)
if (offsetVal + dataLength > this.length) {
this.length = offsetVal + dataLength;
}
}
/**
* Ensures that the internal Buffer is large enough to write at least the given amount of data.
*
* @param minLength { Number } The minimum length of the data needs to be written.
*/
_ensureCapacity(minLength) {
const oldLength = this._buff.length;
if (minLength > oldLength) {
let data = this._buff;
let newLength = (oldLength * 3) / 2 + 1;
if (newLength < minLength) {
newLength = minLength;
}
this._buff = Buffer.allocUnsafe(newLength);
data.copy(this._buff, 0, 0, oldLength);
}
}
/**
* Reads a numeric number value using the provided function.
*
* @typeparam T { number | bigint } The type of the value to be read
*
* @param func { Function(offset: number) => number } The function to read data on the internal Buffer with.
* @param byteSize { Number } The number of bytes read.
* @param offset { Number } The offset to read from (optional). When this is not provided, the managed readOffset is used instead.
*
* @returns { T } the number value
*/
_readNumberValue(func, byteSize, offset) {
this.ensureReadable(byteSize, offset);
// Call Buffer.readXXXX();
const value = func.call(this._buff, typeof offset === 'number' ? offset : this._readOffset);
// Adjust internal read offset if an optional read offset was not provided.
if (typeof offset === 'undefined') {
this._readOffset += byteSize;
}
return value;
}
/**
* Inserts a numeric number value based on the given offset and value.
*
* @typeparam T { number | bigint } The type of the value to be written
*
* @param func { Function(offset: T, offset?) => number} The function to write data on the internal Buffer with.
* @param byteSize { Number } The number of bytes written.
* @param value { T } The number value to write.
* @param offset { Number } the offset to write the number at (REQUIRED).
*
* @returns SmartBuffer this buffer
*/
_insertNumberValue(func, byteSize, value, offset) {
// Check for invalid offset values.
utils_1.checkOffsetValue(offset);
// Ensure there is enough internal Buffer capacity. (raw offset is passed)
this.ensureInsertable(byteSize, offset);
// Call buffer.writeXXXX();
func.call(this._buff, value, offset);
// Adjusts internally managed write offset.
this._writeOffset += byteSize;
return this;
}
/**
* Writes a numeric number value based on the given offset and value.
*
* @typeparam T { number | bigint } The type of the value to be written
*
* @param func { Function(offset: T, offset?) => number} The function to write data on the internal Buffer with.
* @param byteSize { Number } The number of bytes written.
* @param value { T } The number value to write.
* @param offset { Number } the offset to write the number at (REQUIRED).
*
* @returns SmartBuffer this buffer
*/
_writeNumberValue(func, byteSize, value, offset) {
// If an offset was provided, validate it.
if (typeof offset === 'number') {
// Check if we're writing beyond the bounds of the managed data.
if (offset < 0) {
throw new Error(utils_1.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);
}
utils_1.checkOffsetValue(offset);
}
// Default to writeOffset if no offset value was given.
const offsetVal = typeof offset === 'number' ? offset : this._writeOffset;
// Ensure there is enough internal Buffer capacity. (raw offset is passed)
this._ensureWriteable(byteSize, offsetVal);
func.call(this._buff, value, offsetVal);
// If an offset was given, check to see if we wrote beyond the current writeOffset.
if (typeof offset === 'number') {
this._writeOffset = Math.max(this._writeOffset, offsetVal + byteSize);
}
else {
// If no numeric offset was given, we wrote to the end of the SmartBuffer so increment writeOffset.
this._writeOffset += byteSize;
}
return this;
}
}
exports.SmartBuffer = SmartBuffer;
//# sourceMappingURL=smartbuffer.js.map
/***/ }),
/***/ 98132:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const buffer_1 = __nccwpck_require__(64293);
/**
* Error strings
*/
const ERRORS = {
INVALID_ENCODING: 'Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.',
INVALID_SMARTBUFFER_SIZE: 'Invalid size provided. Size must be a valid integer greater than zero.',
INVALID_SMARTBUFFER_BUFFER: 'Invalid Buffer provided in SmartBufferOptions.',
INVALID_SMARTBUFFER_OBJECT: 'Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.',
INVALID_OFFSET: 'An invalid offset value was provided.',
INVALID_OFFSET_NON_NUMBER: 'An invalid offset value was provided. A numeric value is required.',
INVALID_LENGTH: 'An invalid length value was provided.',
INVALID_LENGTH_NON_NUMBER: 'An invalid length value was provived. A numeric value is required.',
INVALID_TARGET_OFFSET: 'Target offset is beyond the bounds of the internal SmartBuffer data.',
INVALID_TARGET_LENGTH: 'Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.',
INVALID_READ_BEYOND_BOUNDS: 'Attempted to read beyond the bounds of the managed data.',
INVALID_WRITE_BEYOND_BOUNDS: 'Attempted to write beyond the bounds of the managed data.'
};
exports.ERRORS = ERRORS;
/**
* Checks if a given encoding is a valid Buffer encoding. (Throws an exception if check fails)
*
* @param { String } encoding The encoding string to check.
*/
function checkEncoding(encoding) {
if (!buffer_1.Buffer.isEncoding(encoding)) {
throw new Error(ERRORS.INVALID_ENCODING);
}
}
exports.checkEncoding = checkEncoding;
/**
* Checks if a given number is a finite integer. (Throws an exception if check fails)
*
* @param { Number } value The number value to check.
*/
function isFiniteInteger(value) {
return typeof value === 'number' && isFinite(value) && isInteger(value);
}
exports.isFiniteInteger = isFiniteInteger;
/**
* Checks if an offset/length value is valid. (Throws an exception if check fails)
*
* @param value The value to check.
* @param offset True if checking an offset, false if checking a length.
*/
function checkOffsetOrLengthValue(value, offset) {
if (typeof value === 'number') {
// Check for non finite/non integers
if (!isFiniteInteger(value) || value < 0) {
throw new Error(offset ? ERRORS.INVALID_OFFSET : ERRORS.INVALID_LENGTH);
}
}
else {
throw new Error(offset ? ERRORS.INVALID_OFFSET_NON_NUMBER : ERRORS.INVALID_LENGTH_NON_NUMBER);
}
}
/**
* Checks if a length value is valid. (Throws an exception if check fails)
*
* @param { Number } length The value to check.
*/
function checkLengthValue(length) {
checkOffsetOrLengthValue(length, false);
}
exports.checkLengthValue = checkLengthValue;
/**
* Checks if a offset value is valid. (Throws an exception if check fails)
*
* @param { Number } offset The value to check.
*/
function checkOffsetValue(offset) {
checkOffsetOrLengthValue(offset, true);
}
exports.checkOffsetValue = checkOffsetValue;
/**
* Checks if a target offset value is out of bounds. (Throws an exception if check fails)
*
* @param { Number } offset The offset value to check.
* @param { SmartBuffer } buff The SmartBuffer instance to check against.
*/
function checkTargetOffset(offset, buff) {
if (offset < 0 || offset > buff.length) {
throw new Error(ERRORS.INVALID_TARGET_OFFSET);
}
}
exports.checkTargetOffset = checkTargetOffset;
/**
* Determines whether a given number is a integer.
* @param value The number to check.
*/
function isInteger(value) {
return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
}
/**
* Throws if Node.js version is too low to support bigint
*/
function bigIntAndBufferInt64Check(bufferMethod) {
if (typeof BigInt === 'undefined') {
throw new Error('Platform does not support JS BigInt type.');
}
if (typeof buffer_1.Buffer.prototype[bufferMethod] === 'undefined') {
throw new Error(`Platform does not support Buffer.prototype.${bufferMethod}.`);
}
}
exports.bigIntAndBufferInt64Check = bigIntAndBufferInt64Check;
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ 32938:
/***/ (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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const dns_1 = __importDefault(__nccwpck_require__(40881));
const tls_1 = __importDefault(__nccwpck_require__(4016));
const url_1 = __importDefault(__nccwpck_require__(78835));
const debug_1 = __importDefault(__nccwpck_require__(38237));
const agent_base_1 = __nccwpck_require__(49690);
const socks_1 = __nccwpck_require__(54754);
const debug = debug_1.default('socks-proxy-agent');
function dnsLookup(host) {
return new Promise((resolve, reject) => {
dns_1.default.lookup(host, (err, res) => {
if (err) {
reject(err);
}
else {
resolve(res);
}
});
});
}
function parseSocksProxy(opts) {
let port = 0;
let lookup = false;
let type = 5;
// Prefer `hostname` over `host`, because of `url.parse()`
const host = opts.hostname || opts.host;
if (!host) {
throw new TypeError('No "host"');
}
if (typeof opts.port === 'number') {
port = opts.port;
}
else if (typeof opts.port === 'string') {
port = parseInt(opts.port, 10);
}
// From RFC 1928, Section 3: https://tools.ietf.org/html/rfc1928#section-3
// "The SOCKS service is conventionally located on TCP port 1080"
if (!port) {
port = 1080;
}
// figure out if we want socks v4 or v5, based on the "protocol" used.
// Defaults to 5.
if (opts.protocol) {
switch (opts.protocol.replace(':', '')) {
case 'socks4':
lookup = true;
// pass through
case 'socks4a':
type = 4;
break;
case 'socks5':
lookup = true;
// pass through
case 'socks': // no version specified, default to 5h
case 'socks5h':
type = 5;
break;
default:
throw new TypeError(`A "socks" protocol must be specified! Got: ${opts.protocol}`);
}
}
if (typeof opts.type !== 'undefined') {
if (opts.type === 4 || opts.type === 5) {
type = opts.type;
}
else {
throw new TypeError(`"type" must be 4 or 5, got: ${opts.type}`);
}
}
const proxy = {
host,
port,
type
};
let userId = opts.userId || opts.username;
let password = opts.password;
if (opts.auth) {
const auth = opts.auth.split(':');
userId = auth[0];
password = auth[1];
}
if (userId) {
Object.defineProperty(proxy, 'userId', {
value: userId,
enumerable: false
});
}
if (password) {
Object.defineProperty(proxy, 'password', {
value: password,
enumerable: false
});
}
return { lookup, proxy };
}
/**
* The `SocksProxyAgent`.
*
* @api public
*/
class SocksProxyAgent extends agent_base_1.Agent {
constructor(_opts) {
let opts;
if (typeof _opts === 'string') {
opts = url_1.default.parse(_opts);
}
else {
opts = _opts;
}
if (!opts) {
throw new TypeError('a SOCKS proxy server `host` and `port` must be specified!');
}
super(opts);
const parsedProxy = parseSocksProxy(opts);
this.lookup = parsedProxy.lookup;
this.proxy = parsedProxy.proxy;
}
/**
* Initiates a SOCKS connection to the specified SOCKS proxy server,
* which in turn connects to the specified remote host and port.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { lookup, proxy } = this;
let { host, port, timeout } = opts;
if (!host) {
throw new Error('No `host` defined!');
}
if (lookup) {
// Client-side DNS resolution for "4" and "5" socks proxy versions.
host = yield dnsLookup(host);
}
const socksOpts = {
proxy,
destination: { host, port },
command: 'connect',
timeout
};
debug('Creating socks proxy connection: %o', socksOpts);
const { socket } = yield socks_1.SocksClient.createConnection(socksOpts);
debug('Successfully created socks proxy connection');
if (opts.secureEndpoint) {
// The proxy is connecting to a TLS server, so upgrade
// this socket connection to a TLS connection.
debug('Upgrading socket connection to TLS');
const servername = opts.servername || host;
return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
servername }));
}
return socket;
});
}
}
exports.default = SocksProxyAgent;
function omit(obj, ...keys) {
const ret = {};
let key;
for (key in obj) {
if (!keys.includes(key)) {
ret[key] = obj[key];
}
}
return ret;
}
//# sourceMappingURL=agent.js.map
/***/ }),
/***/ 25038:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const agent_1 = __importDefault(__nccwpck_require__(32938));
function createSocksProxyAgent(opts) {
return new agent_1.default(opts);
}
(function (createSocksProxyAgent) {
createSocksProxyAgent.SocksProxyAgent = agent_1.default;
createSocksProxyAgent.prototype = agent_1.default.prototype;
})(createSocksProxyAgent || (createSocksProxyAgent = {}));
module.exports = createSocksProxyAgent;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 36127:
/***/ (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.SocksClientError = exports.SocksClient = void 0;
const events_1 = __nccwpck_require__(28614);
const net = __nccwpck_require__(11631);
const ip = __nccwpck_require__(87547);
const smart_buffer_1 = __nccwpck_require__(71062);
const constants_1 = __nccwpck_require__(49647);
const helpers_1 = __nccwpck_require__(74324);
const receivebuffer_1 = __nccwpck_require__(39740);
const util_1 = __nccwpck_require__(75523);
Object.defineProperty(exports, "SocksClientError", ({ enumerable: true, get: function () { return util_1.SocksClientError; } }));
class SocksClient extends events_1.EventEmitter {
constructor(options) {
super();
this.options = Object.assign({}, options);
// Validate SocksClientOptions
(0, helpers_1.validateSocksClientOptions)(options);
// Default state
this.setState(constants_1.SocksClientState.Created);
}
/**
* Creates a new SOCKS connection.
*
* Note: Supports callbacks and promises. Only supports the connect command.
* @param options { SocksClientOptions } Options.
* @param callback { Function } An optional callback function.
* @returns { Promise }
*/
static createConnection(options, callback) {
return new Promise((resolve, reject) => {
// Validate SocksClientOptions
try {
(0, helpers_1.validateSocksClientOptions)(options, ['connect']);
}
catch (err) {
if (typeof callback === 'function') {
callback(err);
return resolve(err); // Resolves pending promise (prevents memory leaks).
}
else {
return reject(err);
}
}
const client = new SocksClient(options);
client.connect(options.existing_socket);
client.once('established', (info) => {
client.removeAllListeners();
if (typeof callback === 'function') {
callback(null, info);
resolve(info); // Resolves pending promise (prevents memory leaks).
}
else {
resolve(info);
}
});
// Error occurred, failed to establish connection.
client.once('error', (err) => {
client.removeAllListeners();
if (typeof callback === 'function') {
callback(err);
resolve(err); // Resolves pending promise (prevents memory leaks).
}
else {
reject(err);
}
});
});
}
/**
* Creates a new SOCKS connection chain to a destination host through 2 or more SOCKS proxies.
*
* Note: Supports callbacks and promises. Only supports the connect method.
* Note: Implemented via createConnection() factory function.
* @param options { SocksClientChainOptions } Options
* @param callback { Function } An optional callback function.
* @returns { Promise }
*/
static createConnectionChain(options, callback) {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
// Validate SocksClientChainOptions
try {
(0, helpers_1.validateSocksClientChainOptions)(options);
}
catch (err) {
if (typeof callback === 'function') {
callback(err);
return resolve(err); // Resolves pending promise (prevents memory leaks).
}
else {
return reject(err);
}
}
let sock;
// Shuffle proxies
if (options.randomizeChain) {
(0, util_1.shuffleArray)(options.proxies);
}
try {
// tslint:disable-next-line:no-increment-decrement
for (let i = 0; i < options.proxies.length; i++) {
const nextProxy = options.proxies[i];
// If we've reached the last proxy in the chain, the destination is the actual destination, otherwise it's the next proxy.
const nextDestination = i === options.proxies.length - 1
? options.destination
: {
host: options.proxies[i + 1].host ||
options.proxies[i + 1].ipaddress,
port: options.proxies[i + 1].port,
};
// Creates the next connection in the chain.
const result = yield SocksClient.createConnection({
command: 'connect',
proxy: nextProxy,
destination: nextDestination,
// Initial connection ignores this as sock is undefined. Subsequent connections re-use the first proxy socket to form a chain.
});
// If sock is undefined, assign it here.
if (!sock) {
sock = result.socket;
}
}
if (typeof callback === 'function') {
callback(null, { socket: sock });
resolve({ socket: sock }); // Resolves pending promise (prevents memory leaks).
}
else {
resolve({ socket: sock });
}
}
catch (err) {
if (typeof callback === 'function') {
callback(err);
resolve(err); // Resolves pending promise (prevents memory leaks).
}
else {
reject(err);
}
}
}));
}
/**
* Creates a SOCKS UDP Frame.
* @param options
*/
static createUDPFrame(options) {
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt16BE(0);
buff.writeUInt8(options.frameNumber || 0);
// IPv4/IPv6/Hostname
if (net.isIPv4(options.remoteHost.host)) {
buff.writeUInt8(constants_1.Socks5HostType.IPv4);
buff.writeUInt32BE(ip.toLong(options.remoteHost.host));
}
else if (net.isIPv6(options.remoteHost.host)) {
buff.writeUInt8(constants_1.Socks5HostType.IPv6);
buff.writeBuffer(ip.toBuffer(options.remoteHost.host));
}
else {
buff.writeUInt8(constants_1.Socks5HostType.Hostname);
buff.writeUInt8(Buffer.byteLength(options.remoteHost.host));
buff.writeString(options.remoteHost.host);
}
// Port
buff.writeUInt16BE(options.remoteHost.port);
// Data
buff.writeBuffer(options.data);
return buff.toBuffer();
}
/**
* Parses a SOCKS UDP frame.
* @param data
*/
static parseUDPFrame(data) {
const buff = smart_buffer_1.SmartBuffer.fromBuffer(data);
buff.readOffset = 2;
const frameNumber = buff.readUInt8();
const hostType = buff.readUInt8();
let remoteHost;
if (hostType === constants_1.Socks5HostType.IPv4) {
remoteHost = ip.fromLong(buff.readUInt32BE());
}
else if (hostType === constants_1.Socks5HostType.IPv6) {
remoteHost = ip.toString(buff.readBuffer(16));
}
else {
remoteHost = buff.readString(buff.readUInt8());
}
const remotePort = buff.readUInt16BE();
return {
frameNumber,
remoteHost: {
host: remoteHost,
port: remotePort,
},
data: buff.readBuffer(),
};
}
/**
* Internal state setter. If the SocksClient is in an error state, it cannot be changed to a non error state.
*/
setState(newState) {
if (this.state !== constants_1.SocksClientState.Error) {
this.state = newState;
}
}
/**
* Starts the connection establishment to the proxy and destination.
* @param existingSocket Connected socket to use instead of creating a new one (internal use).
*/
connect(existingSocket) {
this.onDataReceived = (data) => this.onDataReceivedHandler(data);
this.onClose = () => this.onCloseHandler();
this.onError = (err) => this.onErrorHandler(err);
this.onConnect = () => this.onConnectHandler();
// Start timeout timer (defaults to 30 seconds)
const timer = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || constants_1.DEFAULT_TIMEOUT);
// check whether unref is available as it differs from browser to NodeJS (#33)
if (timer.unref && typeof timer.unref === 'function') {
timer.unref();
}
// If an existing socket is provided, use it to negotiate SOCKS handshake. Otherwise create a new Socket.
if (existingSocket) {
this.socket = existingSocket;
}
else {
this.socket = new net.Socket();
}
// Attach Socket error handlers.
this.socket.once('close', this.onClose);
this.socket.once('error', this.onError);
this.socket.once('connect', this.onConnect);
this.socket.on('data', this.onDataReceived);
this.setState(constants_1.SocksClientState.Connecting);
this.receiveBuffer = new receivebuffer_1.ReceiveBuffer();
if (existingSocket) {
this.socket.emit('connect');
}
else {
this.socket.connect(this.getSocketOptions());
if (this.options.set_tcp_nodelay !== undefined &&
this.options.set_tcp_nodelay !== null) {
this.socket.setNoDelay(!!this.options.set_tcp_nodelay);
}
}
// Listen for established event so we can re-emit any excess data received during handshakes.
this.prependOnceListener('established', (info) => {
setImmediate(() => {
if (this.receiveBuffer.length > 0) {
const excessData = this.receiveBuffer.get(this.receiveBuffer.length);
info.socket.emit('data', excessData);
}
info.socket.resume();
});
});
}
// Socket options (defaults host/port to options.proxy.host/options.proxy.port)
getSocketOptions() {
return Object.assign(Object.assign({}, this.options.socket_options), { host: this.options.proxy.host || this.options.proxy.ipaddress, port: this.options.proxy.port });
}
/**
* Handles internal Socks timeout callback.
* Note: If the Socks client is not BoundWaitingForConnection or Established, the connection will be closed.
*/
onEstablishedTimeout() {
if (this.state !== constants_1.SocksClientState.Established &&
this.state !== constants_1.SocksClientState.BoundWaitingForConnection) {
this.closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut);
}
}
/**
* Handles Socket connect event.
*/
onConnectHandler() {
this.setState(constants_1.SocksClientState.Connected);
// Send initial handshake.
if (this.options.proxy.type === 4) {
this.sendSocks4InitialHandshake();
}
else {
this.sendSocks5InitialHandshake();
}
this.setState(constants_1.SocksClientState.SentInitialHandshake);
}
/**
* Handles Socket data event.
* @param data
*/
onDataReceivedHandler(data) {
/*
All received data is appended to a ReceiveBuffer.
This makes sure that all the data we need is received before we attempt to process it.
*/
this.receiveBuffer.append(data);
// Process data that we have.
this.processData();
}
/**
* Handles processing of the data we have received.
*/
processData() {
// If we have enough data to process the next step in the SOCKS handshake, proceed.
while (this.state !== constants_1.SocksClientState.Established &&
this.state !== constants_1.SocksClientState.Error &&
this.receiveBuffer.length >= this.nextRequiredPacketBufferSize) {
// Sent initial handshake, waiting for response.
if (this.state === constants_1.SocksClientState.SentInitialHandshake) {
if (this.options.proxy.type === 4) {
// Socks v4 only has one handshake response.
this.handleSocks4FinalHandshakeResponse();
}
else {
// Socks v5 has two handshakes, handle initial one here.
this.handleInitialSocks5HandshakeResponse();
}
// Sent auth request for Socks v5, waiting for response.
}
else if (this.state === constants_1.SocksClientState.SentAuthentication) {
this.handleInitialSocks5AuthenticationHandshakeResponse();
// Sent final Socks v5 handshake, waiting for final response.
}
else if (this.state === constants_1.SocksClientState.SentFinalHandshake) {
this.handleSocks5FinalHandshakeResponse();
// Socks BIND established. Waiting for remote connection via proxy.
}
else if (this.state === constants_1.SocksClientState.BoundWaitingForConnection) {
if (this.options.proxy.type === 4) {
this.handleSocks4IncomingConnectionResponse();
}
else {
this.handleSocks5IncomingConnectionResponse();
}
}
else {
this.closeSocket(constants_1.ERRORS.InternalError);
break;
}
}
}
/**
* Handles Socket close event.
* @param had_error
*/
onCloseHandler() {
this.closeSocket(constants_1.ERRORS.SocketClosed);
}
/**
* Handles Socket error event.
* @param err
*/
onErrorHandler(err) {
this.closeSocket(err.message);
}
/**
* Removes internal event listeners on the underlying Socket.
*/
removeInternalSocketHandlers() {
// Pauses data flow of the socket (this is internally resumed after 'established' is emitted)
this.socket.pause();
this.socket.removeListener('data', this.onDataReceived);
this.socket.removeListener('close', this.onClose);
this.socket.removeListener('error', this.onError);
this.socket.removeListener('connect', this.onConnect);
}
/**
* Closes and destroys the underlying Socket. Emits an error event.
* @param err { String } An error string to include in error event.
*/
closeSocket(err) {
// Make sure only one 'error' event is fired for the lifetime of this SocksClient instance.
if (this.state !== constants_1.SocksClientState.Error) {
// Set internal state to Error.
this.setState(constants_1.SocksClientState.Error);
// Destroy Socket
this.socket.destroy();
// Remove internal listeners
this.removeInternalSocketHandlers();
// Fire 'error' event.
this.emit('error', new util_1.SocksClientError(err, this.options));
}
}
/**
* Sends initial Socks v4 handshake request.
*/
sendSocks4InitialHandshake() {
const userId = this.options.proxy.userId || '';
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt8(0x04);
buff.writeUInt8(constants_1.SocksCommand[this.options.command]);
buff.writeUInt16BE(this.options.destination.port);
// Socks 4 (IPv4)
if (net.isIPv4(this.options.destination.host)) {
buff.writeBuffer(ip.toBuffer(this.options.destination.host));
buff.writeStringNT(userId);
// Socks 4a (hostname)
}
else {
buff.writeUInt8(0x00);
buff.writeUInt8(0x00);
buff.writeUInt8(0x00);
buff.writeUInt8(0x01);
buff.writeStringNT(userId);
buff.writeStringNT(this.options.destination.host);
}
this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks4Response;
this.socket.write(buff.toBuffer());
}
/**
* Handles Socks v4 handshake response.
* @param data
*/
handleSocks4FinalHandshakeResponse() {
const data = this.receiveBuffer.get(8);
if (data[1] !== constants_1.Socks4Response.Granted) {
this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data[1]]})`);
}
else {
// Bind response
if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) {
const buff = smart_buffer_1.SmartBuffer.fromBuffer(data);
buff.readOffset = 2;
const remoteHost = {
port: buff.readUInt16BE(),
host: ip.fromLong(buff.readUInt32BE()),
};
// If host is 0.0.0.0, set to proxy host.
if (remoteHost.host === '0.0.0.0') {
remoteHost.host = this.options.proxy.ipaddress;
}
this.setState(constants_1.SocksClientState.BoundWaitingForConnection);
this.emit('bound', { remoteHost, socket: this.socket });
// Connect response
}
else {
this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
this.emit('established', { socket: this.socket });
}
}
}
/**
* Handles Socks v4 incoming connection request (BIND)
* @param data
*/
handleSocks4IncomingConnectionResponse() {
const data = this.receiveBuffer.get(8);
if (data[1] !== constants_1.Socks4Response.Granted) {
this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data[1]]})`);
}
else {
const buff = smart_buffer_1.SmartBuffer.fromBuffer(data);
buff.readOffset = 2;
const remoteHost = {
port: buff.readUInt16BE(),
host: ip.fromLong(buff.readUInt32BE()),
};
this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
this.emit('established', { remoteHost, socket: this.socket });
}
}
/**
* Sends initial Socks v5 handshake request.
*/
sendSocks5InitialHandshake() {
const buff = new smart_buffer_1.SmartBuffer();
// By default we always support no auth.
const supportedAuthMethods = [constants_1.Socks5Auth.NoAuth];
// We should only tell the proxy we support user/pass auth if auth info is actually provided.
// Note: As of Tor v0.3.5.7+, if user/pass auth is an option from the client, by default it will always take priority.
if (this.options.proxy.userId || this.options.proxy.password) {
supportedAuthMethods.push(constants_1.Socks5Auth.UserPass);
}
// Custom auth method?
if (this.options.proxy.custom_auth_method !== undefined) {
supportedAuthMethods.push(this.options.proxy.custom_auth_method);
}
// Build handshake packet
buff.writeUInt8(0x05);
buff.writeUInt8(supportedAuthMethods.length);
for (const authMethod of supportedAuthMethods) {
buff.writeUInt8(authMethod);
}
this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse;
this.socket.write(buff.toBuffer());
this.setState(constants_1.SocksClientState.SentInitialHandshake);
}
/**
* Handles initial Socks v5 handshake response.
* @param data
*/
handleInitialSocks5HandshakeResponse() {
const data = this.receiveBuffer.get(2);
if (data[0] !== 0x05) {
this.closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);
}
else if (data[1] === constants_1.SOCKS5_NO_ACCEPTABLE_AUTH) {
this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);
}
else {
// If selected Socks v5 auth method is no auth, send final handshake request.
if (data[1] === constants_1.Socks5Auth.NoAuth) {
this.socks5ChosenAuthType = constants_1.Socks5Auth.NoAuth;
this.sendSocks5CommandRequest();
// If selected Socks v5 auth method is user/password, send auth handshake.
}
else if (data[1] === constants_1.Socks5Auth.UserPass) {
this.socks5ChosenAuthType = constants_1.Socks5Auth.UserPass;
this.sendSocks5UserPassAuthentication();
// If selected Socks v5 auth method is the custom_auth_method, send custom handshake.
}
else if (data[1] === this.options.proxy.custom_auth_method) {
this.socks5ChosenAuthType = this.options.proxy.custom_auth_method;
this.sendSocks5CustomAuthentication();
}
else {
this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType);
}
}
}
/**
* Sends Socks v5 user & password auth handshake.
*
* Note: No auth and user/pass are currently supported.
*/
sendSocks5UserPassAuthentication() {
const userId = this.options.proxy.userId || '';
const password = this.options.proxy.password || '';
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt8(0x01);
buff.writeUInt8(Buffer.byteLength(userId));
buff.writeString(userId);
buff.writeUInt8(Buffer.byteLength(password));
buff.writeString(password);
this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse;
this.socket.write(buff.toBuffer());
this.setState(constants_1.SocksClientState.SentAuthentication);
}
sendSocks5CustomAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
this.nextRequiredPacketBufferSize =
this.options.proxy.custom_auth_response_size;
this.socket.write(yield this.options.proxy.custom_auth_request_handler());
this.setState(constants_1.SocksClientState.SentAuthentication);
});
}
handleSocks5CustomAuthHandshakeResponse(data) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.options.proxy.custom_auth_response_handler(data);
});
}
handleSocks5AuthenticationNoAuthHandshakeResponse(data) {
return __awaiter(this, void 0, void 0, function* () {
return data[1] === 0x00;
});
}
handleSocks5AuthenticationUserPassHandshakeResponse(data) {
return __awaiter(this, void 0, void 0, function* () {
return data[1] === 0x00;
});
}
/**
* Handles Socks v5 auth handshake response.
* @param data
*/
handleInitialSocks5AuthenticationHandshakeResponse() {
return __awaiter(this, void 0, void 0, function* () {
this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse);
let authResult = false;
if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) {
authResult = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));
}
else if (this.socks5ChosenAuthType === constants_1.Socks5Auth.UserPass) {
authResult =
yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2));
}
else if (this.socks5ChosenAuthType === this.options.proxy.custom_auth_method) {
authResult = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size));
}
if (!authResult) {
this.closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed);
}
else {
this.sendSocks5CommandRequest();
}
});
}
/**
* Sends Socks v5 final handshake request.
*/
sendSocks5CommandRequest() {
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt8(0x05);
buff.writeUInt8(constants_1.SocksCommand[this.options.command]);
buff.writeUInt8(0x00);
// ipv4, ipv6, domain?
if (net.isIPv4(this.options.destination.host)) {
buff.writeUInt8(constants_1.Socks5HostType.IPv4);
buff.writeBuffer(ip.toBuffer(this.options.destination.host));
}
else if (net.isIPv6(this.options.destination.host)) {
buff.writeUInt8(constants_1.Socks5HostType.IPv6);
buff.writeBuffer(ip.toBuffer(this.options.destination.host));
}
else {
buff.writeUInt8(constants_1.Socks5HostType.Hostname);
buff.writeUInt8(this.options.destination.host.length);
buff.writeString(this.options.destination.host);
}
buff.writeUInt16BE(this.options.destination.port);
this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;
this.socket.write(buff.toBuffer());
this.setState(constants_1.SocksClientState.SentFinalHandshake);
}
/**
* Handles Socks v5 final handshake response.
* @param data
*/
handleSocks5FinalHandshakeResponse() {
// Peek at available data (we need at least 5 bytes to get the hostname length)
const header = this.receiveBuffer.peek(5);
if (header[0] !== 0x05 || header[1] !== constants_1.Socks5Response.Granted) {
this.closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`);
}
else {
// Read address type
const addressType = header[3];
let remoteHost;
let buff;
// IPv4
if (addressType === constants_1.Socks5HostType.IPv4) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
if (this.receiveBuffer.length < dataNeeded) {
this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.fromLong(buff.readUInt32BE()),
port: buff.readUInt16BE(),
};
// If given host is 0.0.0.0, assume remote proxy ip instead.
if (remoteHost.host === '0.0.0.0') {
remoteHost.host = this.options.proxy.ipaddress;
}
// Hostname
}
else if (addressType === constants_1.Socks5HostType.Hostname) {
const hostLength = header[4];
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); // header + host length + host + port
// Check if data is available.
if (this.receiveBuffer.length < dataNeeded) {
this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5));
remoteHost = {
host: buff.readString(hostLength),
port: buff.readUInt16BE(),
};
// IPv6
}
else if (addressType === constants_1.Socks5HostType.IPv6) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
if (this.receiveBuffer.length < dataNeeded) {
this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.toString(buff.readBuffer(16)),
port: buff.readUInt16BE(),
};
}
// We have everything we need
this.setState(constants_1.SocksClientState.ReceivedFinalResponse);
// If using CONNECT, the client is now in the established state.
if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.connect) {
this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
this.emit('established', { remoteHost, socket: this.socket });
}
else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) {
/* If using BIND, the Socks client is now in BoundWaitingForConnection state.
This means that the remote proxy server is waiting for a remote connection to the bound port. */
this.setState(constants_1.SocksClientState.BoundWaitingForConnection);
this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;
this.emit('bound', { remoteHost, socket: this.socket });
/*
If using Associate, the Socks client is now Established. And the proxy server is now accepting UDP packets at the
given bound port. This initial Socks TCP connection must remain open for the UDP relay to continue to work.
*/
}
else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.associate) {
this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
this.emit('established', {
remoteHost,
socket: this.socket,
});
}
}
}
/**
* Handles Socks v5 incoming connection request (BIND).
*/
handleSocks5IncomingConnectionResponse() {
// Peek at available data (we need at least 5 bytes to get the hostname length)
const header = this.receiveBuffer.peek(5);
if (header[0] !== 0x05 || header[1] !== constants_1.Socks5Response.Granted) {
this.closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`);
}
else {
// Read address type
const addressType = header[3];
let remoteHost;
let buff;
// IPv4
if (addressType === constants_1.Socks5HostType.IPv4) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
if (this.receiveBuffer.length < dataNeeded) {
this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.fromLong(buff.readUInt32BE()),
port: buff.readUInt16BE(),
};
// If given host is 0.0.0.0, assume remote proxy ip instead.
if (remoteHost.host === '0.0.0.0') {
remoteHost.host = this.options.proxy.ipaddress;
}
// Hostname
}
else if (addressType === constants_1.Socks5HostType.Hostname) {
const hostLength = header[4];
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); // header + host length + port
// Check if data is available.
if (this.receiveBuffer.length < dataNeeded) {
this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5));
remoteHost = {
host: buff.readString(hostLength),
port: buff.readUInt16BE(),
};
// IPv6
}
else if (addressType === constants_1.Socks5HostType.IPv6) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
if (this.receiveBuffer.length < dataNeeded) {
this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.toString(buff.readBuffer(16)),
port: buff.readUInt16BE(),
};
}
this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
this.emit('established', { remoteHost, socket: this.socket });
}
}
get socksClientOptions() {
return Object.assign({}, this.options);
}
}
exports.SocksClient = SocksClient;
//# sourceMappingURL=socksclient.js.map
/***/ }),
/***/ 49647:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SOCKS5_NO_ACCEPTABLE_AUTH = exports.SOCKS5_CUSTOM_AUTH_END = exports.SOCKS5_CUSTOM_AUTH_START = exports.SOCKS_INCOMING_PACKET_SIZES = exports.SocksClientState = exports.Socks5Response = exports.Socks5HostType = exports.Socks5Auth = exports.Socks4Response = exports.SocksCommand = exports.ERRORS = exports.DEFAULT_TIMEOUT = void 0;
const DEFAULT_TIMEOUT = 30000;
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
// prettier-ignore
const ERRORS = {
InvalidSocksCommand: 'An invalid SOCKS command was provided. Valid options are connect, bind, and associate.',
InvalidSocksCommandForOperation: 'An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.',
InvalidSocksCommandChain: 'An invalid SOCKS command was provided. Chaining currently only supports the connect command.',
InvalidSocksClientOptionsDestination: 'An invalid destination host was provided.',
InvalidSocksClientOptionsExistingSocket: 'An invalid existing socket was provided. This should be an instance of stream.Duplex.',
InvalidSocksClientOptionsProxy: 'Invalid SOCKS proxy details were provided.',
InvalidSocksClientOptionsTimeout: 'An invalid timeout value was provided. Please enter a value above 0 (in ms).',
InvalidSocksClientOptionsProxiesLength: 'At least two socks proxies must be provided for chaining.',
InvalidSocksClientOptionsCustomAuthRange: 'Custom auth must be a value between 0x80 and 0xFE.',
InvalidSocksClientOptionsCustomAuthOptions: 'When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.',
NegotiationError: 'Negotiation error',
SocketClosed: 'Socket closed',
ProxyConnectionTimedOut: 'Proxy connection timed out',
InternalError: 'SocksClient internal error (this should not happen)',
InvalidSocks4HandshakeResponse: 'Received invalid Socks4 handshake response',
Socks4ProxyRejectedConnection: 'Socks4 Proxy rejected connection',
InvalidSocks4IncomingConnectionResponse: 'Socks4 invalid incoming connection response',
Socks4ProxyRejectedIncomingBoundConnection: 'Socks4 Proxy rejected incoming bound connection',
InvalidSocks5InitialHandshakeResponse: 'Received invalid Socks5 initial handshake response',
InvalidSocks5IntiailHandshakeSocksVersion: 'Received invalid Socks5 initial handshake (invalid socks version)',
InvalidSocks5InitialHandshakeNoAcceptedAuthType: 'Received invalid Socks5 initial handshake (no accepted authentication type)',
InvalidSocks5InitialHandshakeUnknownAuthType: 'Received invalid Socks5 initial handshake (unknown authentication type)',
Socks5AuthenticationFailed: 'Socks5 Authentication failed',
InvalidSocks5FinalHandshake: 'Received invalid Socks5 final handshake response',
InvalidSocks5FinalHandshakeRejected: 'Socks5 proxy rejected connection',
InvalidSocks5IncomingConnectionResponse: 'Received invalid Socks5 incoming connection response',
Socks5ProxyRejectedIncomingBoundConnection: 'Socks5 Proxy rejected incoming bound connection',
};
exports.ERRORS = ERRORS;
const SOCKS_INCOMING_PACKET_SIZES = {
Socks5InitialHandshakeResponse: 2,
Socks5UserPassAuthenticationResponse: 2,
// Command response + incoming connection (bind)
Socks5ResponseHeader: 5,
Socks5ResponseIPv4: 10,
Socks5ResponseIPv6: 22,
Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7,
// Command response + incoming connection (bind)
Socks4Response: 8, // 2 header + 2 port + 4 ip
};
exports.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES;
var SocksCommand;
(function (SocksCommand) {
SocksCommand[SocksCommand["connect"] = 1] = "connect";
SocksCommand[SocksCommand["bind"] = 2] = "bind";
SocksCommand[SocksCommand["associate"] = 3] = "associate";
})(SocksCommand || (SocksCommand = {}));
exports.SocksCommand = SocksCommand;
var Socks4Response;
(function (Socks4Response) {
Socks4Response[Socks4Response["Granted"] = 90] = "Granted";
Socks4Response[Socks4Response["Failed"] = 91] = "Failed";
Socks4Response[Socks4Response["Rejected"] = 92] = "Rejected";
Socks4Response[Socks4Response["RejectedIdent"] = 93] = "RejectedIdent";
})(Socks4Response || (Socks4Response = {}));
exports.Socks4Response = Socks4Response;
var Socks5Auth;
(function (Socks5Auth) {
Socks5Auth[Socks5Auth["NoAuth"] = 0] = "NoAuth";
Socks5Auth[Socks5Auth["GSSApi"] = 1] = "GSSApi";
Socks5Auth[Socks5Auth["UserPass"] = 2] = "UserPass";
})(Socks5Auth || (Socks5Auth = {}));
exports.Socks5Auth = Socks5Auth;
const SOCKS5_CUSTOM_AUTH_START = 0x80;
exports.SOCKS5_CUSTOM_AUTH_START = SOCKS5_CUSTOM_AUTH_START;
const SOCKS5_CUSTOM_AUTH_END = 0xfe;
exports.SOCKS5_CUSTOM_AUTH_END = SOCKS5_CUSTOM_AUTH_END;
const SOCKS5_NO_ACCEPTABLE_AUTH = 0xff;
exports.SOCKS5_NO_ACCEPTABLE_AUTH = SOCKS5_NO_ACCEPTABLE_AUTH;
var Socks5Response;
(function (Socks5Response) {
Socks5Response[Socks5Response["Granted"] = 0] = "Granted";
Socks5Response[Socks5Response["Failure"] = 1] = "Failure";
Socks5Response[Socks5Response["NotAllowed"] = 2] = "NotAllowed";
Socks5Response[Socks5Response["NetworkUnreachable"] = 3] = "NetworkUnreachable";
Socks5Response[Socks5Response["HostUnreachable"] = 4] = "HostUnreachable";
Socks5Response[Socks5Response["ConnectionRefused"] = 5] = "ConnectionRefused";
Socks5Response[Socks5Response["TTLExpired"] = 6] = "TTLExpired";
Socks5Response[Socks5Response["CommandNotSupported"] = 7] = "CommandNotSupported";
Socks5Response[Socks5Response["AddressNotSupported"] = 8] = "AddressNotSupported";
})(Socks5Response || (Socks5Response = {}));
exports.Socks5Response = Socks5Response;
var Socks5HostType;
(function (Socks5HostType) {
Socks5HostType[Socks5HostType["IPv4"] = 1] = "IPv4";
Socks5HostType[Socks5HostType["Hostname"] = 3] = "Hostname";
Socks5HostType[Socks5HostType["IPv6"] = 4] = "IPv6";
})(Socks5HostType || (Socks5HostType = {}));
exports.Socks5HostType = Socks5HostType;
var SocksClientState;
(function (SocksClientState) {
SocksClientState[SocksClientState["Created"] = 0] = "Created";
SocksClientState[SocksClientState["Connecting"] = 1] = "Connecting";
SocksClientState[SocksClientState["Connected"] = 2] = "Connected";
SocksClientState[SocksClientState["SentInitialHandshake"] = 3] = "SentInitialHandshake";
SocksClientState[SocksClientState["ReceivedInitialHandshakeResponse"] = 4] = "ReceivedInitialHandshakeResponse";
SocksClientState[SocksClientState["SentAuthentication"] = 5] = "SentAuthentication";
SocksClientState[SocksClientState["ReceivedAuthenticationResponse"] = 6] = "ReceivedAuthenticationResponse";
SocksClientState[SocksClientState["SentFinalHandshake"] = 7] = "SentFinalHandshake";
SocksClientState[SocksClientState["ReceivedFinalResponse"] = 8] = "ReceivedFinalResponse";
SocksClientState[SocksClientState["BoundWaitingForConnection"] = 9] = "BoundWaitingForConnection";
SocksClientState[SocksClientState["Established"] = 10] = "Established";
SocksClientState[SocksClientState["Disconnected"] = 11] = "Disconnected";
SocksClientState[SocksClientState["Error"] = 99] = "Error";
})(SocksClientState || (SocksClientState = {}));
exports.SocksClientState = SocksClientState;
//# sourceMappingURL=constants.js.map
/***/ }),
/***/ 74324:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.validateSocksClientChainOptions = exports.validateSocksClientOptions = void 0;
const util_1 = __nccwpck_require__(75523);
const constants_1 = __nccwpck_require__(49647);
const stream = __nccwpck_require__(92413);
/**
* Validates the provided SocksClientOptions
* @param options { SocksClientOptions }
* @param acceptedCommands { string[] } A list of accepted SocksProxy commands.
*/
function validateSocksClientOptions(options, acceptedCommands = ['connect', 'bind', 'associate']) {
// Check SOCKs command option.
if (!constants_1.SocksCommand[options.command]) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options);
}
// Check SocksCommand for acceptable command.
if (acceptedCommands.indexOf(options.command) === -1) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandForOperation, options);
}
// Check destination
if (!isValidSocksRemoteHost(options.destination)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options);
}
// Check SOCKS proxy to use
if (!isValidSocksProxy(options.proxy)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options);
}
// Validate custom auth (if set)
validateCustomProxyAuth(options.proxy, options);
// Check timeout
if (options.timeout && !isValidTimeoutValue(options.timeout)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options);
}
// Check existing_socket (if provided)
if (options.existing_socket &&
!(options.existing_socket instanceof stream.Duplex)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsExistingSocket, options);
}
}
exports.validateSocksClientOptions = validateSocksClientOptions;
/**
* Validates the SocksClientChainOptions
* @param options { SocksClientChainOptions }
*/
function validateSocksClientChainOptions(options) {
// Only connect is supported when chaining.
if (options.command !== 'connect') {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandChain, options);
}
// Check destination
if (!isValidSocksRemoteHost(options.destination)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options);
}
// Validate proxies (length)
if (!(options.proxies &&
Array.isArray(options.proxies) &&
options.proxies.length >= 2)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxiesLength, options);
}
// Validate proxies
options.proxies.forEach((proxy) => {
if (!isValidSocksProxy(proxy)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options);
}
// Validate custom auth (if set)
validateCustomProxyAuth(proxy, options);
});
// Check timeout
if (options.timeout && !isValidTimeoutValue(options.timeout)) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options);
}
}
exports.validateSocksClientChainOptions = validateSocksClientChainOptions;
function validateCustomProxyAuth(proxy, options) {
if (proxy.custom_auth_method !== undefined) {
// Invalid auth method range
if (proxy.custom_auth_method < constants_1.SOCKS5_CUSTOM_AUTH_START ||
proxy.custom_auth_method > constants_1.SOCKS5_CUSTOM_AUTH_END) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthRange, options);
}
// Missing custom_auth_request_handler
if (proxy.custom_auth_request_handler === undefined ||
typeof proxy.custom_auth_request_handler !== 'function') {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options);
}
// Missing custom_auth_response_size
if (proxy.custom_auth_response_size === undefined) {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options);
}
// Missing/invalid custom_auth_response_handler
if (proxy.custom_auth_response_handler === undefined ||
typeof proxy.custom_auth_response_handler !== 'function') {
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options);
}
}
}
/**
* Validates a SocksRemoteHost
* @param remoteHost { SocksRemoteHost }
*/
function isValidSocksRemoteHost(remoteHost) {
return (remoteHost &&
typeof remoteHost.host === 'string' &&
typeof remoteHost.port === 'number' &&
remoteHost.port >= 0 &&
remoteHost.port <= 65535);
}
/**
* Validates a SocksProxy
* @param proxy { SocksProxy }
*/
function isValidSocksProxy(proxy) {
return (proxy &&
(typeof proxy.host === 'string' || typeof proxy.ipaddress === 'string') &&
typeof proxy.port === 'number' &&
proxy.port >= 0 &&
proxy.port <= 65535 &&
(proxy.type === 4 || proxy.type === 5));
}
/**
* Validates a timeout value.
* @param value { Number }
*/
function isValidTimeoutValue(value) {
return typeof value === 'number' && value > 0;
}
//# sourceMappingURL=helpers.js.map
/***/ }),
/***/ 39740:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ReceiveBuffer = void 0;
class ReceiveBuffer {
constructor(size = 4096) {
this.buffer = Buffer.allocUnsafe(size);
this.offset = 0;
this.originalSize = size;
}
get length() {
return this.offset;
}
append(data) {
if (!Buffer.isBuffer(data)) {
throw new Error('Attempted to append a non-buffer instance to ReceiveBuffer.');
}
if (this.offset + data.length >= this.buffer.length) {
const tmp = this.buffer;
this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data.length));
tmp.copy(this.buffer);
}
data.copy(this.buffer, this.offset);
return (this.offset += data.length);
}
peek(length) {
if (length > this.offset) {
throw new Error('Attempted to read beyond the bounds of the managed internal data.');
}
return this.buffer.slice(0, length);
}
get(length) {
if (length > this.offset) {
throw new Error('Attempted to read beyond the bounds of the managed internal data.');
}
const value = Buffer.allocUnsafe(length);
this.buffer.slice(0, length).copy(value);
this.buffer.copyWithin(0, length, length + this.offset - length);
this.offset -= length;
return value;
}
}
exports.ReceiveBuffer = ReceiveBuffer;
//# sourceMappingURL=receivebuffer.js.map
/***/ }),
/***/ 75523:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.shuffleArray = exports.SocksClientError = void 0;
/**
* Error wrapper for SocksClient
*/
class SocksClientError extends Error {
constructor(message, options) {
super(message);
this.options = options;
}
}
exports.SocksClientError = SocksClientError;
/**
* Shuffles a given array.
* @param array The array to shuffle.
*/
function shuffleArray(array) {
// tslint:disable-next-line:no-increment-decrement
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
}
exports.shuffleArray = shuffleArray;
//# sourceMappingURL=util.js.map
/***/ }),
/***/ 54754:
/***/ (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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
__exportStar(__nccwpck_require__(36127), exports);
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 26375:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = __nccwpck_require__(12344);
var has = Object.prototype.hasOwnProperty;
var hasNativeMap = typeof Map !== "undefined";
/**
* A data structure which is a combination of an array and a set. Adding a new
* member is O(1), testing for membership is O(1), and finding the index of an
* element is O(1). Removing elements from the set is not supported. Only
* strings are supported for membership.
*/
function ArraySet() {
this._array = [];
this._set = hasNativeMap ? new Map() : Object.create(null);
}
/**
* Static method for creating ArraySet instances from an existing array.
*/
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
var set = new ArraySet();
for (var i = 0, len = aArray.length; i < len; i++) {
set.add(aArray[i], aAllowDuplicates);
}
return set;
};
/**
* Return how many unique items are in this ArraySet. If duplicates have been
* added, than those do not count towards the size.
*
* @returns Number
*/
ArraySet.prototype.size = function ArraySet_size() {
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
};
/**
* Add the given string to this set.
*
* @param String aStr
*/
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
var idx = this._array.length;
if (!isDuplicate || aAllowDuplicates) {
this._array.push(aStr);
}
if (!isDuplicate) {
if (hasNativeMap) {
this._set.set(aStr, idx);
} else {
this._set[sStr] = idx;
}
}
};
/**
* Is the given string a member of this set?
*
* @param String aStr
*/
ArraySet.prototype.has = function ArraySet_has(aStr) {
if (hasNativeMap) {
return this._set.has(aStr);
} else {
var sStr = util.toSetString(aStr);
return has.call(this._set, sStr);
}
};
/**
* What is the index of the given string in the array?
*
* @param String aStr
*/
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
if (hasNativeMap) {
var idx = this._set.get(aStr);
if (idx >= 0) {
return idx;
}
} else {
var sStr = util.toSetString(aStr);
if (has.call(this._set, sStr)) {
return this._set[sStr];
}
}
throw new Error('"' + aStr + '" is not in the set.');
};
/**
* What is the element at the given index?
*
* @param Number aIdx
*/
ArraySet.prototype.at = function ArraySet_at(aIdx) {
if (aIdx >= 0 && aIdx < this._array.length) {
return this._array[aIdx];
}
throw new Error('No element indexed by ' + aIdx);
};
/**
* Returns the array representation of this set (which has the proper indices
* indicated by indexOf). Note that this is a copy of the internal array used
* for storing the members so that no one can mess with internal state.
*/
ArraySet.prototype.toArray = function ArraySet_toArray() {
return this._array.slice();
};
exports.I = ArraySet;
/***/ }),
/***/ 10975:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*
* Based on the Base 64 VLQ implementation in Closure Compiler:
* https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
*
* Copyright 2011 The Closure Compiler Authors. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "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.
*/
var base64 = __nccwpck_require__(6156);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
// the next four bits are the actual value, and the 6th bit is the
// continuation bit. The continuation bit tells us whether there are more
// digits in this value following this digit.
//
// Continuation
// | Sign
// | |
// V V
// 101011
var VLQ_BASE_SHIFT = 5;
// binary: 100000
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
// binary: 011111
var VLQ_BASE_MASK = VLQ_BASE - 1;
// binary: 100000
var VLQ_CONTINUATION_BIT = VLQ_BASE;
/**
* Converts from a two-complement value to a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
*/
function toVLQSigned(aValue) {
return aValue < 0
? ((-aValue) << 1) + 1
: (aValue << 1) + 0;
}
/**
* Converts to a two-complement value from a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
* 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
*/
function fromVLQSigned(aValue) {
var isNegative = (aValue & 1) === 1;
var shifted = aValue >> 1;
return isNegative
? -shifted
: shifted;
}
/**
* Returns the base 64 VLQ encoded value.
*/
exports.encode = function base64VLQ_encode(aValue) {
var encoded = "";
var digit;
var vlq = toVLQSigned(aValue);
do {
digit = vlq & VLQ_BASE_MASK;
vlq >>>= VLQ_BASE_SHIFT;
if (vlq > 0) {
// There are still more digits in this value, so we must make sure the
// continuation bit is marked.
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64.encode(digit);
} while (vlq > 0);
return encoded;
};
/**
* Decodes the next base 64 VLQ value from the given string and returns the
* value and the rest of the string via the out parameter.
*/
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
var strLen = aStr.length;
var result = 0;
var shift = 0;
var continuation, digit;
do {
if (aIndex >= strLen) {
throw new Error("Expected more digits in base 64 VLQ value.");
}
digit = base64.decode(aStr.charCodeAt(aIndex++));
if (digit === -1) {
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
}
continuation = !!(digit & VLQ_CONTINUATION_BIT);
digit &= VLQ_BASE_MASK;
result = result + (digit << shift);
shift += VLQ_BASE_SHIFT;
} while (continuation);
aOutParam.value = fromVLQSigned(result);
aOutParam.rest = aIndex;
};
/***/ }),
/***/ 6156:
/***/ ((__unused_webpack_module, exports) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
/**
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
*/
exports.encode = function (number) {
if (0 <= number && number < intToCharMap.length) {
return intToCharMap[number];
}
throw new TypeError("Must be between 0 and 63: " + number);
};
/**
* Decode a single base 64 character code digit to an integer. Returns -1 on
* failure.
*/
exports.decode = function (charCode) {
var bigA = 65; // 'A'
var bigZ = 90; // 'Z'
var littleA = 97; // 'a'
var littleZ = 122; // 'z'
var zero = 48; // '0'
var nine = 57; // '9'
var plus = 43; // '+'
var slash = 47; // '/'
var littleOffset = 26;
var numberOffset = 52;
// 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
if (bigA <= charCode && charCode <= bigZ) {
return (charCode - bigA);
}
// 26 - 51: abcdefghijklmnopqrstuvwxyz
if (littleA <= charCode && charCode <= littleZ) {
return (charCode - littleA + littleOffset);
}
// 52 - 61: 0123456789
if (zero <= charCode && charCode <= nine) {
return (charCode - zero + numberOffset);
}
// 62: +
if (charCode == plus) {
return 62;
}
// 63: /
if (charCode == slash) {
return 63;
}
// Invalid base64 digit.
return -1;
};
/***/ }),
/***/ 33600:
/***/ ((__unused_webpack_module, exports) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.GREATEST_LOWER_BOUND = 1;
exports.LEAST_UPPER_BOUND = 2;
/**
* Recursive implementation of binary search.
*
* @param aLow Indices here and lower do not contain the needle.
* @param aHigh Indices here and higher do not contain the needle.
* @param aNeedle The element being searched for.
* @param aHaystack The non-empty array being searched.
* @param aCompare Function which takes two elements and returns -1, 0, or 1.
* @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
* 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
* closest element that is smaller than or greater than the one we are
* searching for, respectively, if the exact element cannot be found.
*/
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
// This function terminates when one of the following is true:
//
// 1. We find the exact element we are looking for.
//
// 2. We did not find the exact element, but we can return the index of
// the next-closest element.
//
// 3. We did not find the exact element, and there is no next-closest
// element than the one we are searching for, so we return -1.
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
var cmp = aCompare(aNeedle, aHaystack[mid], true);
if (cmp === 0) {
// Found the element we are looking for.
return mid;
}
else if (cmp > 0) {
// Our needle is greater than aHaystack[mid].
if (aHigh - mid > 1) {
// The element is in the upper half.
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
}
// The exact needle element was not found in this haystack. Determine if
// we are in termination case (3) or (2) and return the appropriate thing.
if (aBias == exports.LEAST_UPPER_BOUND) {
return aHigh < aHaystack.length ? aHigh : -1;
} else {
return mid;
}
}
else {
// Our needle is less than aHaystack[mid].
if (mid - aLow > 1) {
// The element is in the lower half.
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
}
// we are in termination case (3) or (2) and return the appropriate thing.
if (aBias == exports.LEAST_UPPER_BOUND) {
return mid;
} else {
return aLow < 0 ? -1 : aLow;
}
}
}
/**
* This is an implementation of binary search which will always try and return
* the index of the closest element if there is no exact hit. This is because
* mappings between original and generated line/col pairs are single points,
* and there is an implicit region between each of them, so a miss just means
* that you aren't on the very start of a region.
*
* @param aNeedle The element you are looking for.
* @param aHaystack The array that is being searched.
* @param aCompare A function which takes the needle and an element in the
* array and returns -1, 0, or 1 depending on whether the needle is less
* than, equal to, or greater than the element, respectively.
* @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
* 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
* closest element that is smaller than or greater than the one we are
* searching for, respectively, if the exact element cannot be found.
* Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
*/
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
if (aHaystack.length === 0) {
return -1;
}
var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
aCompare, aBias || exports.GREATEST_LOWER_BOUND);
if (index < 0) {
return -1;
}
// We have found either the exact element, or the next-closest element than
// the one we are searching for. However, there may be more than one such
// element. Make sure we always return the smallest of these.
while (index - 1 >= 0) {
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
break;
}
--index;
}
return index;
};
/***/ }),
/***/ 86817:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2014 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = __nccwpck_require__(12344);
/**
* Determine whether mappingB is after mappingA with respect to generated
* position.
*/
function generatedPositionAfter(mappingA, mappingB) {
// Optimized for most common case
var lineA = mappingA.generatedLine;
var lineB = mappingB.generatedLine;
var columnA = mappingA.generatedColumn;
var columnB = mappingB.generatedColumn;
return lineB > lineA || lineB == lineA && columnB >= columnA ||
util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
}
/**
* A data structure to provide a sorted view of accumulated mappings in a
* performance conscious manner. It trades a neglibable overhead in general
* case for a large speedup in case of mappings being added in order.
*/
function MappingList() {
this._array = [];
this._sorted = true;
// Serves as infimum
this._last = {generatedLine: -1, generatedColumn: 0};
}
/**
* Iterate through internal items. This method takes the same arguments that
* `Array.prototype.forEach` takes.
*
* NOTE: The order of the mappings is NOT guaranteed.
*/
MappingList.prototype.unsortedForEach =
function MappingList_forEach(aCallback, aThisArg) {
this._array.forEach(aCallback, aThisArg);
};
/**
* Add the given source mapping.
*
* @param Object aMapping
*/
MappingList.prototype.add = function MappingList_add(aMapping) {
if (generatedPositionAfter(this._last, aMapping)) {
this._last = aMapping;
this._array.push(aMapping);
} else {
this._sorted = false;
this._array.push(aMapping);
}
};
/**
* Returns the flat, sorted array of mappings. The mappings are sorted by
* generated position.
*
* WARNING: This method returns internal data without copying, for
* performance. The return value must NOT be mutated, and should be treated as
* an immutable borrow. If you want to take ownership, you must make your own
* copy.
*/
MappingList.prototype.toArray = function MappingList_toArray() {
if (!this._sorted) {
this._array.sort(util.compareByGeneratedPositionsInflated);
this._sorted = true;
}
return this._array;
};
exports.H = MappingList;
/***/ }),
/***/ 73254:
/***/ ((__unused_webpack_module, exports) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
// It turns out that some (most?) JavaScript engines don't self-host
// `Array.prototype.sort`. This makes sense because C++ will likely remain
// faster than JS when doing raw CPU-intensive sorting. However, when using a
// custom comparator function, calling back and forth between the VM's C++ and
// JIT'd JS is rather slow *and* loses JIT type information, resulting in
// worse generated code for the comparator function than would be optimal. In
// fact, when sorting with a comparator, these costs outweigh the benefits of
// sorting in C++. By using our own JS-implemented Quick Sort (below), we get
// a ~3500ms mean speed-up in `bench/bench.html`.
/**
* Swap the elements indexed by `x` and `y` in the array `ary`.
*
* @param {Array} ary
* The array.
* @param {Number} x
* The index of the first item.
* @param {Number} y
* The index of the second item.
*/
function swap(ary, x, y) {
var temp = ary[x];
ary[x] = ary[y];
ary[y] = temp;
}
/**
* Returns a random integer within the range `low .. high` inclusive.
*
* @param {Number} low
* The lower bound on the range.
* @param {Number} high
* The upper bound on the range.
*/
function randomIntInRange(low, high) {
return Math.round(low + (Math.random() * (high - low)));
}
/**
* The Quick Sort algorithm.
*
* @param {Array} ary
* An array to sort.
* @param {function} comparator
* Function to use to compare two items.
* @param {Number} p
* Start index of the array
* @param {Number} r
* End index of the array
*/
function doQuickSort(ary, comparator, p, r) {
// If our lower bound is less than our upper bound, we (1) partition the
// array into two pieces and (2) recurse on each half. If it is not, this is
// the empty array and our base case.
if (p < r) {
// (1) Partitioning.
//
// The partitioning chooses a pivot between `p` and `r` and moves all
// elements that are less than or equal to the pivot to the before it, and
// all the elements that are greater than it after it. The effect is that
// once partition is done, the pivot is in the exact place it will be when
// the array is put in sorted order, and it will not need to be moved
// again. This runs in O(n) time.
// Always choose a random pivot so that an input array which is reverse
// sorted does not cause O(n^2) running time.
var pivotIndex = randomIntInRange(p, r);
var i = p - 1;
swap(ary, pivotIndex, r);
var pivot = ary[r];
// Immediately after `j` is incremented in this loop, the following hold
// true:
//
// * Every element in `ary[p .. i]` is less than or equal to the pivot.
//
// * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
for (var j = p; j < r; j++) {
if (comparator(ary[j], pivot) <= 0) {
i += 1;
swap(ary, i, j);
}
}
swap(ary, i + 1, j);
var q = i + 1;
// (2) Recurse on each half.
doQuickSort(ary, comparator, p, q - 1);
doQuickSort(ary, comparator, q + 1, r);
}
}
/**
* Sort the given array in-place with the given comparator function.
*
* @param {Array} ary
* An array to sort.
* @param {function} comparator
* Function to use to compare two items.
*/
exports.U = function (ary, comparator) {
doQuickSort(ary, comparator, 0, ary.length - 1);
};
/***/ }),
/***/ 75155:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
var __webpack_unused_export__;
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var util = __nccwpck_require__(12344);
var binarySearch = __nccwpck_require__(33600);
var ArraySet = __nccwpck_require__(26375)/* .ArraySet */ .I;
var base64VLQ = __nccwpck_require__(10975);
var quickSort = __nccwpck_require__(73254)/* .quickSort */ .U;
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = util.parseSourceMapInput(aSourceMap);
}
return sourceMap.sections != null
? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)
: new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
}
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
}
/**
* The version of the source mapping spec that we are consuming.
*/
SourceMapConsumer.prototype._version = 3;
// `__generatedMappings` and `__originalMappings` are arrays that hold the
// parsed mapping coordinates from the source map's "mappings" attribute. They
// are lazily instantiated, accessed via the `_generatedMappings` and
// `_originalMappings` getters respectively, and we only parse the mappings
// and create these arrays once queried for a source location. We jump through
// these hoops because there can be many thousands of mappings, and parsing
// them is expensive, so we only want to do it if we must.
//
// Each object in the arrays is of the form:
//
// {
// generatedLine: The line number in the generated code,
// generatedColumn: The column number in the generated code,
// source: The path to the original source file that generated this
// chunk of code,
// originalLine: The line number in the original source that
// corresponds to this chunk of generated code,
// originalColumn: The column number in the original source that
// corresponds to this chunk of generated code,
// name: The name of the original symbol which generated this chunk of
// code.
// }
//
// All properties except for `generatedLine` and `generatedColumn` can be
// `null`.
//
// `_generatedMappings` is ordered by the generated positions.
//
// `_originalMappings` is ordered by the original positions.
SourceMapConsumer.prototype.__generatedMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
configurable: true,
enumerable: true,
get: function () {
if (!this.__generatedMappings) {
this._parseMappings(this._mappings, this.sourceRoot);
}
return this.__generatedMappings;
}
});
SourceMapConsumer.prototype.__originalMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
configurable: true,
enumerable: true,
get: function () {
if (!this.__originalMappings) {
this._parseMappings(this._mappings, this.sourceRoot);
}
return this.__originalMappings;
}
});
SourceMapConsumer.prototype._charIsMappingSeparator =
function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
var c = aStr.charAt(index);
return c === ";" || c === ",";
};
/**
* Parse the mappings in a string in to a data structure which we can easily
* query (the ordered arrays in the `this.__generatedMappings` and
* `this.__originalMappings` properties).
*/
SourceMapConsumer.prototype._parseMappings =
function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
throw new Error("Subclasses must implement _parseMappings");
};
SourceMapConsumer.GENERATED_ORDER = 1;
SourceMapConsumer.ORIGINAL_ORDER = 2;
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
/**
* Iterate over each mapping between an original source/line/column and a
* generated line/column in this source map.
*
* @param Function aCallback
* The function that is called with each mapping.
* @param Object aContext
* Optional. If specified, this object will be the value of `this` every
* time that `aCallback` is called.
* @param aOrder
* Either `SourceMapConsumer.GENERATED_ORDER` or
* `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
* iterate over the mappings sorted by the generated file's line/column
* order or the original's source/line/column order, respectively. Defaults to
* `SourceMapConsumer.GENERATED_ORDER`.
*/
SourceMapConsumer.prototype.eachMapping =
function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
var context = aContext || null;
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
var mappings;
switch (order) {
case SourceMapConsumer.GENERATED_ORDER:
mappings = this._generatedMappings;
break;
case SourceMapConsumer.ORIGINAL_ORDER:
mappings = this._originalMappings;
break;
default:
throw new Error("Unknown order of iteration.");
}
var sourceRoot = this.sourceRoot;
mappings.map(function (mapping) {
var source = mapping.source === null ? null : this._sources.at(mapping.source);
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
return {
source: source,
generatedLine: mapping.generatedLine,
generatedColumn: mapping.generatedColumn,
originalLine: mapping.originalLine,
originalColumn: mapping.originalColumn,
name: mapping.name === null ? null : this._names.at(mapping.name)
};
}, this).forEach(aCallback, context);
};
/**
* Returns all generated line and column information for the original source,
* line, and column provided. If no column is provided, returns all mappings
* corresponding to a either the line we are searching for or the next
* closest line that has any mappings. Otherwise, returns all mappings
* corresponding to the given line and either the column we are searching for
* or the next closest column that has any offsets.
*
* The only argument is an object with the following properties:
*
* - source: The filename of the original source.
* - line: The line number in the original source. The line number is 1-based.
* - column: Optional. the column number in the original source.
* The column number is 0-based.
*
* and an array of objects is returned, each with the following properties:
*
* - line: The line number in the generated source, or null. The
* line number is 1-based.
* - column: The column number in the generated source, or null.
* The column number is 0-based.
*/
SourceMapConsumer.prototype.allGeneratedPositionsFor =
function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
var line = util.getArg(aArgs, 'line');
// When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
// returns the index of the closest mapping less than the needle. By
// setting needle.originalColumn to 0, we thus find the last mapping for
// the given line, provided such a mapping exists.
var needle = {
source: util.getArg(aArgs, 'source'),
originalLine: line,
originalColumn: util.getArg(aArgs, 'column', 0)
};
needle.source = this._findSourceIndex(needle.source);
if (needle.source < 0) {
return [];
}
var mappings = [];
var index = this._findMapping(needle,
this._originalMappings,
"originalLine",
"originalColumn",
util.compareByOriginalPositions,
binarySearch.LEAST_UPPER_BOUND);
if (index >= 0) {
var mapping = this._originalMappings[index];
if (aArgs.column === undefined) {
var originalLine = mapping.originalLine;
// Iterate until either we run out of mappings, or we run into
// a mapping for a different line than the one we found. Since
// mappings are sorted, this is guaranteed to find all mappings for
// the line we found.
while (mapping && mapping.originalLine === originalLine) {
mappings.push({
line: util.getArg(mapping, 'generatedLine', null),
column: util.getArg(mapping, 'generatedColumn', null),
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
});
mapping = this._originalMappings[++index];
}
} else {
var originalColumn = mapping.originalColumn;
// Iterate until either we run out of mappings, or we run into
// a mapping for a different line than the one we were searching for.
// Since mappings are sorted, this is guaranteed to find all mappings for
// the line we are searching for.
while (mapping &&
mapping.originalLine === line &&
mapping.originalColumn == originalColumn) {
mappings.push({
line: util.getArg(mapping, 'generatedLine', null),
column: util.getArg(mapping, 'generatedColumn', null),
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
});
mapping = this._originalMappings[++index];
}
}
}
return mappings;
};
__webpack_unused_export__ = SourceMapConsumer;
/**
* A BasicSourceMapConsumer instance represents a parsed source map which we can
* query for information about the original file positions by giving it a file
* position in the generated source.
*
* The first parameter is the raw source map (either as a JSON string, or
* already parsed to an object). According to the spec, source maps have the
* following attributes:
*
* - version: Which version of the source map spec this map is following.
* - sources: An array of URLs to the original source files.
* - names: An array of identifiers which can be referrenced by individual mappings.
* - sourceRoot: Optional. The URL root from which all sources are relative.
* - sourcesContent: Optional. An array of contents of the original source files.
* - mappings: A string of base64 VLQs which contain the actual mappings.
* - file: Optional. The generated file this source map is associated with.
*
* Here is an example source map, taken from the source map spec[0]:
*
* {
* version : 3,
* file: "out.js",
* sourceRoot : "",
* sources: ["foo.js", "bar.js"],
* names: ["src", "maps", "are", "fun"],
* mappings: "AA,AB;;ABCDE;"
* }
*
* The second parameter, if given, is a string whose value is the URL
* at which the source map was found. This URL is used to compute the
* sources array.
*
* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
*/
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = util.parseSourceMapInput(aSourceMap);
}
var version = util.getArg(sourceMap, 'version');
var sources = util.getArg(sourceMap, 'sources');
// Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
// requires the array) to play nice here.
var names = util.getArg(sourceMap, 'names', []);
var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
var mappings = util.getArg(sourceMap, 'mappings');
var file = util.getArg(sourceMap, 'file', null);
// Once again, Sass deviates from the spec and supplies the version as a
// string rather than a number, so we use loose equality checking here.
if (version != this._version) {
throw new Error('Unsupported version: ' + version);
}
if (sourceRoot) {
sourceRoot = util.normalize(sourceRoot);
}
sources = sources
.map(String)
// Some source maps produce relative source paths like "./foo.js" instead of
// "foo.js". Normalize these first so that future comparisons will succeed.
// See bugzil.la/1090768.
.map(util.normalize)
// Always ensure that absolute sources are internally stored relative to
// the source root, if the source root is absolute. Not doing this would
// be particularly problematic when the source root is a prefix of the
// source (valid, but why??). See github issue #199 and bugzil.la/1188982.
.map(function (source) {
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
? util.relative(sourceRoot, source)
: source;
});
// Pass `true` below to allow duplicate names and sources. While source maps
// are intended to be compressed and deduplicated, the TypeScript compiler
// sometimes generates source maps with duplicates in them. See Github issue
// #72 and bugzil.la/889492.
this._names = ArraySet.fromArray(names.map(String), true);
this._sources = ArraySet.fromArray(sources, true);
this._absoluteSources = this._sources.toArray().map(function (s) {
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
});
this.sourceRoot = sourceRoot;
this.sourcesContent = sourcesContent;
this._mappings = mappings;
this._sourceMapURL = aSourceMapURL;
this.file = file;
}
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
/**
* Utility function to find the index of a source. Returns -1 if not
* found.
*/
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
var relativeSource = aSource;
if (this.sourceRoot != null) {
relativeSource = util.relative(this.sourceRoot, relativeSource);
}
if (this._sources.has(relativeSource)) {
return this._sources.indexOf(relativeSource);
}
// Maybe aSource is an absolute URL as returned by |sources|. In
// this case we can't simply undo the transform.
var i;
for (i = 0; i < this._absoluteSources.length; ++i) {
if (this._absoluteSources[i] == aSource) {
return i;
}
}
return -1;
};
/**
* Create a BasicSourceMapConsumer from a SourceMapGenerator.
*
* @param SourceMapGenerator aSourceMap
* The source map that will be consumed.
* @param String aSourceMapURL
* The URL at which the source map can be found (optional)
* @returns BasicSourceMapConsumer
*/
BasicSourceMapConsumer.fromSourceMap =
function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
var smc = Object.create(BasicSourceMapConsumer.prototype);
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
smc.sourceRoot = aSourceMap._sourceRoot;
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
smc.sourceRoot);
smc.file = aSourceMap._file;
smc._sourceMapURL = aSourceMapURL;
smc._absoluteSources = smc._sources.toArray().map(function (s) {
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
});
// Because we are modifying the entries (by converting string sources and
// names to indices into the sources and names ArraySets), we have to make
// a copy of the entry or else bad things happen. Shared mutable state
// strikes again! See github issue #191.
var generatedMappings = aSourceMap._mappings.toArray().slice();
var destGeneratedMappings = smc.__generatedMappings = [];
var destOriginalMappings = smc.__originalMappings = [];
for (var i = 0, length = generatedMappings.length; i < length; i++) {
var srcMapping = generatedMappings[i];
var destMapping = new Mapping;
destMapping.generatedLine = srcMapping.generatedLine;
destMapping.generatedColumn = srcMapping.generatedColumn;
if (srcMapping.source) {
destMapping.source = sources.indexOf(srcMapping.source);
destMapping.originalLine = srcMapping.originalLine;
destMapping.originalColumn = srcMapping.originalColumn;
if (srcMapping.name) {
destMapping.name = names.indexOf(srcMapping.name);
}
destOriginalMappings.push(destMapping);
}
destGeneratedMappings.push(destMapping);
}
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
return smc;
};
/**
* The version of the source mapping spec that we are consuming.
*/
BasicSourceMapConsumer.prototype._version = 3;
/**
* The list of original sources.
*/
Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
get: function () {
return this._absoluteSources.slice();
}
});
/**
* Provide the JIT with a nice shape / hidden class.
*/
function Mapping() {
this.generatedLine = 0;
this.generatedColumn = 0;
this.source = null;
this.originalLine = null;
this.originalColumn = null;
this.name = null;
}
/**
* Parse the mappings in a string in to a data structure which we can easily
* query (the ordered arrays in the `this.__generatedMappings` and
* `this.__originalMappings` properties).
*/
BasicSourceMapConsumer.prototype._parseMappings =
function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
var generatedLine = 1;
var previousGeneratedColumn = 0;
var previousOriginalLine = 0;
var previousOriginalColumn = 0;
var previousSource = 0;
var previousName = 0;
var length = aStr.length;
var index = 0;
var cachedSegments = {};
var temp = {};
var originalMappings = [];
var generatedMappings = [];
var mapping, str, segment, end, value;
while (index < length) {
if (aStr.charAt(index) === ';') {
generatedLine++;
index++;
previousGeneratedColumn = 0;
}
else if (aStr.charAt(index) === ',') {
index++;
}
else {
mapping = new Mapping();
mapping.generatedLine = generatedLine;
// Because each offset is encoded relative to the previous one,
// many segments often have the same encoding. We can exploit this
// fact by caching the parsed variable length fields of each segment,
// allowing us to avoid a second parse if we encounter the same
// segment again.
for (end = index; end < length; end++) {
if (this._charIsMappingSeparator(aStr, end)) {
break;
}
}
str = aStr.slice(index, end);
segment = cachedSegments[str];
if (segment) {
index += str.length;
} else {
segment = [];
while (index < end) {
base64VLQ.decode(aStr, index, temp);
value = temp.value;
index = temp.rest;
segment.push(value);
}
if (segment.length === 2) {
throw new Error('Found a source, but no line and column');
}
if (segment.length === 3) {
throw new Error('Found a source and line, but no column');
}
cachedSegments[str] = segment;
}
// Generated column.
mapping.generatedColumn = previousGeneratedColumn + segment[0];
previousGeneratedColumn = mapping.generatedColumn;
if (segment.length > 1) {
// Original source.
mapping.source = previousSource + segment[1];
previousSource += segment[1];
// Original line.
mapping.originalLine = previousOriginalLine + segment[2];
previousOriginalLine = mapping.originalLine;
// Lines are stored 0-based
mapping.originalLine += 1;
// Original column.
mapping.originalColumn = previousOriginalColumn + segment[3];
previousOriginalColumn = mapping.originalColumn;
if (segment.length > 4) {
// Original name.
mapping.name = previousName + segment[4];
previousName += segment[4];
}
}
generatedMappings.push(mapping);
if (typeof mapping.originalLine === 'number') {
originalMappings.push(mapping);
}
}
}
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
this.__generatedMappings = generatedMappings;
quickSort(originalMappings, util.compareByOriginalPositions);
this.__originalMappings = originalMappings;
};
/**
* Find the mapping that best matches the hypothetical "needle" mapping that
* we are searching for in the given "haystack" of mappings.
*/
BasicSourceMapConsumer.prototype._findMapping =
function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
aColumnName, aComparator, aBias) {
// To return the position we are searching for, we must first find the
// mapping for the given position and then return the opposite position it
// points to. Because the mappings are sorted, we can use binary search to
// find the best mapping.
if (aNeedle[aLineName] <= 0) {
throw new TypeError('Line must be greater than or equal to 1, got '
+ aNeedle[aLineName]);
}
if (aNeedle[aColumnName] < 0) {
throw new TypeError('Column must be greater than or equal to 0, got '
+ aNeedle[aColumnName]);
}
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
};
/**
* Compute the last column for each generated mapping. The last column is
* inclusive.
*/
BasicSourceMapConsumer.prototype.computeColumnSpans =
function SourceMapConsumer_computeColumnSpans() {
for (var index = 0; index < this._generatedMappings.length; ++index) {
var mapping = this._generatedMappings[index];
// Mappings do not contain a field for the last generated columnt. We
// can come up with an optimistic estimate, however, by assuming that
// mappings are contiguous (i.e. given two consecutive mappings, the
// first mapping ends where the second one starts).
if (index + 1 < this._generatedMappings.length) {
var nextMapping = this._generatedMappings[index + 1];
if (mapping.generatedLine === nextMapping.generatedLine) {
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
continue;
}
}
// The last mapping for each line spans the entire line.
mapping.lastGeneratedColumn = Infinity;
}
};
/**
* Returns the original source, line, and column information for the generated
* source's line and column positions provided. The only argument is an object
* with the following properties:
*
* - line: The line number in the generated source. The line number
* is 1-based.
* - column: The column number in the generated source. The column
* number is 0-based.
* - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
* 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
* closest element that is smaller than or greater than the one we are
* searching for, respectively, if the exact element cannot be found.
* Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
*
* and an object is returned with the following properties:
*
* - source: The original source file, or null.
* - line: The line number in the original source, or null. The
* line number is 1-based.
* - column: The column number in the original source, or null. The
* column number is 0-based.
* - name: The original identifier, or null.
*/
BasicSourceMapConsumer.prototype.originalPositionFor =
function SourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
var index = this._findMapping(
needle,
this._generatedMappings,
"generatedLine",
"generatedColumn",
util.compareByGeneratedPositionsDeflated,
util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
);
if (index >= 0) {
var mapping = this._generatedMappings[index];
if (mapping.generatedLine === needle.generatedLine) {
var source = util.getArg(mapping, 'source', null);
if (source !== null) {
source = this._sources.at(source);
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
}
var name = util.getArg(mapping, 'name', null);
if (name !== null) {
name = this._names.at(name);
}
return {
source: source,
line: util.getArg(mapping, 'originalLine', null),
column: util.getArg(mapping, 'originalColumn', null),
name: name
};
}
}
return {
source: null,
line: null,
column: null,
name: null
};
};
/**
* Return true if we have the source content for every source in the source
* map, false otherwise.
*/
BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
function BasicSourceMapConsumer_hasContentsOfAllSources() {
if (!this.sourcesContent) {
return false;
}
return this.sourcesContent.length >= this._sources.size() &&
!this.sourcesContent.some(function (sc) { return sc == null; });
};
/**
* Returns the original source content. The only argument is the url of the
* original source file. Returns null if no original source content is
* available.
*/
BasicSourceMapConsumer.prototype.sourceContentFor =
function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
if (!this.sourcesContent) {
return null;
}
var index = this._findSourceIndex(aSource);
if (index >= 0) {
return this.sourcesContent[index];
}
var relativeSource = aSource;
if (this.sourceRoot != null) {
relativeSource = util.relative(this.sourceRoot, relativeSource);
}
var url;
if (this.sourceRoot != null
&& (url = util.urlParse(this.sourceRoot))) {
// XXX: file:// URIs and absolute paths lead to unexpected behavior for
// many users. We can help them out when they expect file:// URIs to
// behave like it would if they were running a local HTTP server. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
if (url.scheme == "file"
&& this._sources.has(fileUriAbsPath)) {
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
}
if ((!url.path || url.path == "/")
&& this._sources.has("/" + relativeSource)) {
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
}
}
// This function is used recursively from
// IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
// don't want to throw if we can't find the source - we just want to
// return null, so we provide a flag to exit gracefully.
if (nullOnMissing) {
return null;
}
else {
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
}
};
/**
* Returns the generated line and column information for the original source,
* line, and column positions provided. The only argument is an object with
* the following properties:
*
* - source: The filename of the original source.
* - line: The line number in the original source. The line number
* is 1-based.
* - column: The column number in the original source. The column
* number is 0-based.
* - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
* 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
* closest element that is smaller than or greater than the one we are
* searching for, respectively, if the exact element cannot be found.
* Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
*
* and an object is returned with the following properties:
*
* - line: The line number in the generated source, or null. The
* line number is 1-based.
* - column: The column number in the generated source, or null.
* The column number is 0-based.
*/
BasicSourceMapConsumer.prototype.generatedPositionFor =
function SourceMapConsumer_generatedPositionFor(aArgs) {
var source = util.getArg(aArgs, 'source');
source = this._findSourceIndex(source);
if (source < 0) {
return {
line: null,
column: null,
lastColumn: null
};
}
var needle = {
source: source,
originalLine: util.getArg(aArgs, 'line'),
originalColumn: util.getArg(aArgs, 'column')
};
var index = this._findMapping(
needle,
this._originalMappings,
"originalLine",
"originalColumn",
util.compareByOriginalPositions,
util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
);
if (index >= 0) {
var mapping = this._originalMappings[index];
if (mapping.source === needle.source) {
return {
line: util.getArg(mapping, 'generatedLine', null),
column: util.getArg(mapping, 'generatedColumn', null),
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
};
}
}
return {
line: null,
column: null,
lastColumn: null
};
};
__webpack_unused_export__ = BasicSourceMapConsumer;
/**
* An IndexedSourceMapConsumer instance represents a parsed source map which
* we can query for information. It differs from BasicSourceMapConsumer in
* that it takes "indexed" source maps (i.e. ones with a "sections" field) as
* input.
*
* The first parameter is a raw source map (either as a JSON string, or already
* parsed to an object). According to the spec for indexed source maps, they
* have the following attributes:
*
* - version: Which version of the source map spec this map is following.
* - file: Optional. The generated file this source map is associated with.
* - sections: A list of section definitions.
*
* Each value under the "sections" field has two fields:
* - offset: The offset into the original specified at which this section
* begins to apply, defined as an object with a "line" and "column"
* field.
* - map: A source map definition. This source map could also be indexed,
* but doesn't have to be.
*
* Instead of the "map" field, it's also possible to have a "url" field
* specifying a URL to retrieve a source map from, but that's currently
* unsupported.
*
* Here's an example source map, taken from the source map spec[0], but
* modified to omit a section which uses the "url" field.
*
* {
* version : 3,
* file: "app.js",
* sections: [{
* offset: {line:100, column:10},
* map: {
* version : 3,
* file: "section.js",
* sources: ["foo.js", "bar.js"],
* names: ["src", "maps", "are", "fun"],
* mappings: "AAAA,E;;ABCDE;"
* }
* }],
* }
*
* The second parameter, if given, is a string whose value is the URL
* at which the source map was found. This URL is used to compute the
* sources array.
*
* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
*/
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = util.parseSourceMapInput(aSourceMap);
}
var version = util.getArg(sourceMap, 'version');
var sections = util.getArg(sourceMap, 'sections');
if (version != this._version) {
throw new Error('Unsupported version: ' + version);
}
this._sources = new ArraySet();
this._names = new ArraySet();
var lastOffset = {
line: -1,
column: 0
};
this._sections = sections.map(function (s) {
if (s.url) {
// The url field will require support for asynchronicity.
// See https://github.com/mozilla/source-map/issues/16
throw new Error('Support for url field in sections not implemented.');
}
var offset = util.getArg(s, 'offset');
var offsetLine = util.getArg(offset, 'line');
var offsetColumn = util.getArg(offset, 'column');
if (offsetLine < lastOffset.line ||
(offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
throw new Error('Section offsets must be ordered and non-overlapping.');
}
lastOffset = offset;
return {
generatedOffset: {
// The offset fields are 0-based, but we use 1-based indices when
// encoding/decoding from VLQ.
generatedLine: offsetLine + 1,
generatedColumn: offsetColumn + 1
},
consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)
}
});
}
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
/**
* The version of the source mapping spec that we are consuming.
*/
IndexedSourceMapConsumer.prototype._version = 3;
/**
* The list of original sources.
*/
Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
get: function () {
var sources = [];
for (var i = 0; i < this._sections.length; i++) {
for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
sources.push(this._sections[i].consumer.sources[j]);
}
}
return sources;
}
});
/**
* Returns the original source, line, and column information for the generated
* source's line and column positions provided. The only argument is an object
* with the following properties:
*
* - line: The line number in the generated source. The line number
* is 1-based.
* - column: The column number in the generated source. The column
* number is 0-based.
*
* and an object is returned with the following properties:
*
* - source: The original source file, or null.
* - line: The line number in the original source, or null. The
* line number is 1-based.
* - column: The column number in the original source, or null. The
* column number is 0-based.
* - name: The original identifier, or null.
*/
IndexedSourceMapConsumer.prototype.originalPositionFor =
function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
// Find the section containing the generated position we're trying to map
// to an original position.
var sectionIndex = binarySearch.search(needle, this._sections,
function(needle, section) {
var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
if (cmp) {
return cmp;
}
return (needle.generatedColumn -
section.generatedOffset.generatedColumn);
});
var section = this._sections[sectionIndex];
if (!section) {
return {
source: null,
line: null,
column: null,
name: null
};
}
return section.consumer.originalPositionFor({
line: needle.generatedLine -
(section.generatedOffset.generatedLine - 1),
column: needle.generatedColumn -
(section.generatedOffset.generatedLine === needle.generatedLine
? section.generatedOffset.generatedColumn - 1
: 0),
bias: aArgs.bias
});
};
/**
* Return true if we have the source content for every source in the source
* map, false otherwise.
*/
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
function IndexedSourceMapConsumer_hasContentsOfAllSources() {
return this._sections.every(function (s) {
return s.consumer.hasContentsOfAllSources();
});
};
/**
* Returns the original source content. The only argument is the url of the
* original source file. Returns null if no original source content is
* available.
*/
IndexedSourceMapConsumer.prototype.sourceContentFor =
function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
var content = section.consumer.sourceContentFor(aSource, true);
if (content) {
return content;
}
}
if (nullOnMissing) {
return null;
}
else {
throw new Error('"' + aSource + '" is not in the SourceMap.');
}
};
/**
* Returns the generated line and column information for the original source,
* line, and column positions provided. The only argument is an object with
* the following properties:
*
* - source: The filename of the original source.
* - line: The line number in the original source. The line number
* is 1-based.
* - column: The column number in the original source. The column
* number is 0-based.
*
* and an object is returned with the following properties:
*
* - line: The line number in the generated source, or null. The
* line number is 1-based.
* - column: The column number in the generated source, or null.
* The column number is 0-based.
*/
IndexedSourceMapConsumer.prototype.generatedPositionFor =
function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
// Only consider this section if the requested source is in the list of
// sources of the consumer.
if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {
continue;
}
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
if (generatedPosition) {
var ret = {
line: generatedPosition.line +
(section.generatedOffset.generatedLine - 1),
column: generatedPosition.column +
(section.generatedOffset.generatedLine === generatedPosition.line
? section.generatedOffset.generatedColumn - 1
: 0)
};
return ret;
}
}
return {
line: null,
column: null
};
};
/**
* Parse the mappings in a string in to a data structure which we can easily
* query (the ordered arrays in the `this.__generatedMappings` and
* `this.__originalMappings` properties).
*/
IndexedSourceMapConsumer.prototype._parseMappings =
function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
this.__generatedMappings = [];
this.__originalMappings = [];
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
var sectionMappings = section.consumer._generatedMappings;
for (var j = 0; j < sectionMappings.length; j++) {
var mapping = sectionMappings[j];
var source = section.consumer._sources.at(mapping.source);
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
this._sources.add(source);
source = this._sources.indexOf(source);
var name = null;
if (mapping.name) {
name = section.consumer._names.at(mapping.name);
this._names.add(name);
name = this._names.indexOf(name);
}
// The mappings coming from the consumer for the section have
// generated positions relative to the start of the section, so we
// need to offset them to be relative to the start of the concatenated
// generated file.
var adjustedMapping = {
source: source,
generatedLine: mapping.generatedLine +
(section.generatedOffset.generatedLine - 1),
generatedColumn: mapping.generatedColumn +
(section.generatedOffset.generatedLine === mapping.generatedLine
? section.generatedOffset.generatedColumn - 1
: 0),
originalLine: mapping.originalLine,
originalColumn: mapping.originalColumn,
name: name
};
this.__generatedMappings.push(adjustedMapping);
if (typeof adjustedMapping.originalLine === 'number') {
this.__originalMappings.push(adjustedMapping);
}
}
}
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
quickSort(this.__originalMappings, util.compareByOriginalPositions);
};
__webpack_unused_export__ = IndexedSourceMapConsumer;
/***/ }),
/***/ 69425:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var base64VLQ = __nccwpck_require__(10975);
var util = __nccwpck_require__(12344);
var ArraySet = __nccwpck_require__(26375)/* .ArraySet */ .I;
var MappingList = __nccwpck_require__(86817)/* .MappingList */ .H;
/**
* An instance of the SourceMapGenerator represents a source map which is
* being built incrementally. You may pass an object with the following
* properties:
*
* - file: The filename of the generated source.
* - sourceRoot: A root for all relative URLs in this source map.
*/
function SourceMapGenerator(aArgs) {
if (!aArgs) {
aArgs = {};
}
this._file = util.getArg(aArgs, 'file', null);
this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
this._sources = new ArraySet();
this._names = new ArraySet();
this._mappings = new MappingList();
this._sourcesContents = null;
}
SourceMapGenerator.prototype._version = 3;
/**
* Creates a new SourceMapGenerator based on a SourceMapConsumer
*
* @param aSourceMapConsumer The SourceMap.
*/
SourceMapGenerator.fromSourceMap =
function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
var sourceRoot = aSourceMapConsumer.sourceRoot;
var generator = new SourceMapGenerator({
file: aSourceMapConsumer.file,
sourceRoot: sourceRoot
});
aSourceMapConsumer.eachMapping(function (mapping) {
var newMapping = {
generated: {
line: mapping.generatedLine,
column: mapping.generatedColumn
}
};
if (mapping.source != null) {
newMapping.source = mapping.source;
if (sourceRoot != null) {
newMapping.source = util.relative(sourceRoot, newMapping.source);
}
newMapping.original = {
line: mapping.originalLine,
column: mapping.originalColumn
};
if (mapping.name != null) {
newMapping.name = mapping.name;
}
}
generator.addMapping(newMapping);
});
aSourceMapConsumer.sources.forEach(function (sourceFile) {
var sourceRelative = sourceFile;
if (sourceRoot !== null) {
sourceRelative = util.relative(sourceRoot, sourceFile);
}
if (!generator._sources.has(sourceRelative)) {
generator._sources.add(sourceRelative);
}
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content != null) {
generator.setSourceContent(sourceFile, content);
}
});
return generator;
};
/**
* Add a single mapping from original source line and column to the generated
* source's line and column for this source map being created. The mapping
* object should have the following properties:
*
* - generated: An object with the generated line and column positions.
* - original: An object with the original line and column positions.
* - source: The original source file (relative to the sourceRoot).
* - name: An optional original token name for this mapping.
*/
SourceMapGenerator.prototype.addMapping =
function SourceMapGenerator_addMapping(aArgs) {
var generated = util.getArg(aArgs, 'generated');
var original = util.getArg(aArgs, 'original', null);
var source = util.getArg(aArgs, 'source', null);
var name = util.getArg(aArgs, 'name', null);
if (!this._skipValidation) {
this._validateMapping(generated, original, source, name);
}
if (source != null) {
source = String(source);
if (!this._sources.has(source)) {
this._sources.add(source);
}
}
if (name != null) {
name = String(name);
if (!this._names.has(name)) {
this._names.add(name);
}
}
this._mappings.add({
generatedLine: generated.line,
generatedColumn: generated.column,
originalLine: original != null && original.line,
originalColumn: original != null && original.column,
source: source,
name: name
});
};
/**
* Set the source content for a source file.
*/
SourceMapGenerator.prototype.setSourceContent =
function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
var source = aSourceFile;
if (this._sourceRoot != null) {
source = util.relative(this._sourceRoot, source);
}
if (aSourceContent != null) {
// Add the source content to the _sourcesContents map.
// Create a new _sourcesContents map if the property is null.
if (!this._sourcesContents) {
this._sourcesContents = Object.create(null);
}
this._sourcesContents[util.toSetString(source)] = aSourceContent;
} else if (this._sourcesContents) {
// Remove the source file from the _sourcesContents map.
// If the _sourcesContents map is empty, set the property to null.
delete this._sourcesContents[util.toSetString(source)];
if (Object.keys(this._sourcesContents).length === 0) {
this._sourcesContents = null;
}
}
};
/**
* Applies the mappings of a sub-source-map for a specific source file to the
* source map being generated. Each mapping to the supplied source file is
* rewritten using the supplied source map. Note: The resolution for the
* resulting mappings is the minimium of this map and the supplied map.
*
* @param aSourceMapConsumer The source map to be applied.
* @param aSourceFile Optional. The filename of the source file.
* If omitted, SourceMapConsumer's file property will be used.
* @param aSourceMapPath Optional. The dirname of the path to the source map
* to be applied. If relative, it is relative to the SourceMapConsumer.
* This parameter is needed when the two source maps aren't in the same
* directory, and the source map to be applied contains relative source
* paths. If so, those relative source paths need to be rewritten
* relative to the SourceMapGenerator.
*/
SourceMapGenerator.prototype.applySourceMap =
function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
var sourceFile = aSourceFile;
// If aSourceFile is omitted, we will use the file property of the SourceMap
if (aSourceFile == null) {
if (aSourceMapConsumer.file == null) {
throw new Error(
'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
'or the source map\'s "file" property. Both were omitted.'
);
}
sourceFile = aSourceMapConsumer.file;
}
var sourceRoot = this._sourceRoot;
// Make "sourceFile" relative if an absolute Url is passed.
if (sourceRoot != null) {
sourceFile = util.relative(sourceRoot, sourceFile);
}
// Applying the SourceMap can add and remove items from the sources and
// the names array.
var newSources = new ArraySet();
var newNames = new ArraySet();
// Find mappings for the "sourceFile"
this._mappings.unsortedForEach(function (mapping) {
if (mapping.source === sourceFile && mapping.originalLine != null) {
// Check if it can be mapped by the source map, then update the mapping.
var original = aSourceMapConsumer.originalPositionFor({
line: mapping.originalLine,
column: mapping.originalColumn
});
if (original.source != null) {
// Copy mapping
mapping.source = original.source;
if (aSourceMapPath != null) {
mapping.source = util.join(aSourceMapPath, mapping.source)
}
if (sourceRoot != null) {
mapping.source = util.relative(sourceRoot, mapping.source);
}
mapping.originalLine = original.line;
mapping.originalColumn = original.column;
if (original.name != null) {
mapping.name = original.name;
}
}
}
var source = mapping.source;
if (source != null && !newSources.has(source)) {
newSources.add(source);
}
var name = mapping.name;
if (name != null && !newNames.has(name)) {
newNames.add(name);
}
}, this);
this._sources = newSources;
this._names = newNames;
// Copy sourcesContents of applied map.
aSourceMapConsumer.sources.forEach(function (sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content != null) {
if (aSourceMapPath != null) {
sourceFile = util.join(aSourceMapPath, sourceFile);
}
if (sourceRoot != null) {
sourceFile = util.relative(sourceRoot, sourceFile);
}
this.setSourceContent(sourceFile, content);
}
}, this);
};
/**
* A mapping can have one of the three levels of data:
*
* 1. Just the generated position.
* 2. The Generated position, original position, and original source.
* 3. Generated and original position, original source, as well as a name
* token.
*
* To maintain consistency, we validate that any new mapping being added falls
* in to one of these categories.
*/
SourceMapGenerator.prototype._validateMapping =
function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
aName) {
// When aOriginal is truthy but has empty values for .line and .column,
// it is most likely a programmer error. In this case we throw a very
// specific error message to try to guide them the right way.
// For example: https://github.com/Polymer/polymer-bundler/pull/519
if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
throw new Error(
'original.line and original.column are not numbers -- you probably meant to omit ' +
'the original mapping entirely and only map the generated position. If so, pass ' +
'null for the original mapping instead of an object with empty or null values.'
);
}
if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
&& aGenerated.line > 0 && aGenerated.column >= 0
&& !aOriginal && !aSource && !aName) {
// Case 1.
return;
}
else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
&& aOriginal && 'line' in aOriginal && 'column' in aOriginal
&& aGenerated.line > 0 && aGenerated.column >= 0
&& aOriginal.line > 0 && aOriginal.column >= 0
&& aSource) {
// Cases 2 and 3.
return;
}
else {
throw new Error('Invalid mapping: ' + JSON.stringify({
generated: aGenerated,
source: aSource,
original: aOriginal,
name: aName
}));
}
};
/**
* Serialize the accumulated mappings in to the stream of base 64 VLQs
* specified by the source map format.
*/
SourceMapGenerator.prototype._serializeMappings =
function SourceMapGenerator_serializeMappings() {
var previousGeneratedColumn = 0;
var previousGeneratedLine = 1;
var previousOriginalColumn = 0;
var previousOriginalLine = 0;
var previousName = 0;
var previousSource = 0;
var result = '';
var next;
var mapping;
var nameIdx;
var sourceIdx;
var mappings = this._mappings.toArray();
for (var i = 0, len = mappings.length; i < len; i++) {
mapping = mappings[i];
next = ''
if (mapping.generatedLine !== previousGeneratedLine) {
previousGeneratedColumn = 0;
while (mapping.generatedLine !== previousGeneratedLine) {
next += ';';
previousGeneratedLine++;
}
}
else {
if (i > 0) {
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
continue;
}
next += ',';
}
}
next += base64VLQ.encode(mapping.generatedColumn
- previousGeneratedColumn);
previousGeneratedColumn = mapping.generatedColumn;
if (mapping.source != null) {
sourceIdx = this._sources.indexOf(mapping.source);
next += base64VLQ.encode(sourceIdx - previousSource);
previousSource = sourceIdx;
// lines are stored 0-based in SourceMap spec version 3
next += base64VLQ.encode(mapping.originalLine - 1
- previousOriginalLine);
previousOriginalLine = mapping.originalLine - 1;
next += base64VLQ.encode(mapping.originalColumn
- previousOriginalColumn);
previousOriginalColumn = mapping.originalColumn;
if (mapping.name != null) {
nameIdx = this._names.indexOf(mapping.name);
next += base64VLQ.encode(nameIdx - previousName);
previousName = nameIdx;
}
}
result += next;
}
return result;
};
SourceMapGenerator.prototype._generateSourcesContent =
function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
return aSources.map(function (source) {
if (!this._sourcesContents) {
return null;
}
if (aSourceRoot != null) {
source = util.relative(aSourceRoot, source);
}
var key = util.toSetString(source);
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
? this._sourcesContents[key]
: null;
}, this);
};
/**
* Externalize the source map.
*/
SourceMapGenerator.prototype.toJSON =
function SourceMapGenerator_toJSON() {
var map = {
version: this._version,
sources: this._sources.toArray(),
names: this._names.toArray(),
mappings: this._serializeMappings()
};
if (this._file != null) {
map.file = this._file;
}
if (this._sourceRoot != null) {
map.sourceRoot = this._sourceRoot;
}
if (this._sourcesContents) {
map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
}
return map;
};
/**
* Render the source map being generated to a string.
*/
SourceMapGenerator.prototype.toString =
function SourceMapGenerator_toString() {
return JSON.stringify(this.toJSON());
};
exports.h = SourceMapGenerator;
/***/ }),
/***/ 92616:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var SourceMapGenerator = __nccwpck_require__(69425)/* .SourceMapGenerator */ .h;
var util = __nccwpck_require__(12344);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).
var REGEX_NEWLINE = /(\r?\n)/;
// Newline character code for charCodeAt() comparisons
var NEWLINE_CODE = 10;
// Private symbol for identifying `SourceNode`s when multiple versions of
// the source-map library are loaded. This MUST NOT CHANGE across
// versions!
var isSourceNode = "$$$isSourceNode$$$";
/**
* SourceNodes provide a way to abstract over interpolating/concatenating
* snippets of generated JavaScript source code while maintaining the line and
* column information associated with the original source code.
*
* @param aLine The original line number.
* @param aColumn The original column number.
* @param aSource The original source's filename.
* @param aChunks Optional. An array of strings which are snippets of
* generated JS, or other SourceNodes.
* @param aName The original identifier.
*/
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
this.children = [];
this.sourceContents = {};
this.line = aLine == null ? null : aLine;
this.column = aColumn == null ? null : aColumn;
this.source = aSource == null ? null : aSource;
this.name = aName == null ? null : aName;
this[isSourceNode] = true;
if (aChunks != null) this.add(aChunks);
}
/**
* Creates a SourceNode from generated code and a SourceMapConsumer.
*
* @param aGeneratedCode The generated code
* @param aSourceMapConsumer The SourceMap for the generated code
* @param aRelativePath Optional. The path that relative sources in the
* SourceMapConsumer should be relative to.
*/
SourceNode.fromStringWithSourceMap =
function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
// The SourceNode we want to fill with the generated code
// and the SourceMap
var node = new SourceNode();
// All even indices of this array are one line of the generated code,
// while all odd indices are the newlines between two adjacent lines
// (since `REGEX_NEWLINE` captures its match).
// Processed fragments are accessed by calling `shiftNextLine`.
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
var remainingLinesIndex = 0;
var shiftNextLine = function() {
var lineContents = getNextLine();
// The last line of a file might not have a newline.
var newLine = getNextLine() || "";
return lineContents + newLine;
function getNextLine() {
return remainingLinesIndex < remainingLines.length ?
remainingLines[remainingLinesIndex++] : undefined;
}
};
// We need to remember the position of "remainingLines"
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
// The generate SourceNodes we need a code range.
// To extract it current and last mapping is used.
// Here we store the last mapping.
var lastMapping = null;
aSourceMapConsumer.eachMapping(function (mapping) {
if (lastMapping !== null) {
// We add the code from "lastMapping" to "mapping":
// First check if there is a new line in between.
if (lastGeneratedLine < mapping.generatedLine) {
// Associate first line with "lastMapping"
addMappingWithCode(lastMapping, shiftNextLine());
lastGeneratedLine++;
lastGeneratedColumn = 0;
// The remaining code is added without mapping
} else {
// There is no new line in between.
// Associate the code between "lastGeneratedColumn" and
// "mapping.generatedColumn" with "lastMapping"
var nextLine = remainingLines[remainingLinesIndex] || '';
var code = nextLine.substr(0, mapping.generatedColumn -
lastGeneratedColumn);
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
lastGeneratedColumn);
lastGeneratedColumn = mapping.generatedColumn;
addMappingWithCode(lastMapping, code);
// No more remaining code, continue
lastMapping = mapping;
return;
}
}
// We add the generated code until the first mapping
// to the SourceNode without any mapping.
// Each line is added as separate string.
while (lastGeneratedLine < mapping.generatedLine) {
node.add(shiftNextLine());
lastGeneratedLine++;
}
if (lastGeneratedColumn < mapping.generatedColumn) {
var nextLine = remainingLines[remainingLinesIndex] || '';
node.add(nextLine.substr(0, mapping.generatedColumn));
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
lastGeneratedColumn = mapping.generatedColumn;
}
lastMapping = mapping;
}, this);
// We have processed all mappings.
if (remainingLinesIndex < remainingLines.length) {
if (lastMapping) {
// Associate the remaining code in the current line with "lastMapping"
addMappingWithCode(lastMapping, shiftNextLine());
}
// and add the remaining lines without any mapping
node.add(remainingLines.splice(remainingLinesIndex).join(""));
}
// Copy sourcesContent into SourceNode
aSourceMapConsumer.sources.forEach(function (sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content != null) {
if (aRelativePath != null) {
sourceFile = util.join(aRelativePath, sourceFile);
}
node.setSourceContent(sourceFile, content);
}
});
return node;
function addMappingWithCode(mapping, code) {
if (mapping === null || mapping.source === undefined) {
node.add(code);
} else {
var source = aRelativePath
? util.join(aRelativePath, mapping.source)
: mapping.source;
node.add(new SourceNode(mapping.originalLine,
mapping.originalColumn,
source,
code,
mapping.name));
}
}
};
/**
* Add a chunk of generated JS to this source node.
*
* @param aChunk A string snippet of generated JS code, another instance of
* SourceNode, or an array where each member is one of those things.
*/
SourceNode.prototype.add = function SourceNode_add(aChunk) {
if (Array.isArray(aChunk)) {
aChunk.forEach(function (chunk) {
this.add(chunk);
}, this);
}
else if (aChunk[isSourceNode] || typeof aChunk === "string") {
if (aChunk) {
this.children.push(aChunk);
}
}
else {
throw new TypeError(
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
);
}
return this;
};
/**
* Add a chunk of generated JS to the beginning of this source node.
*
* @param aChunk A string snippet of generated JS code, another instance of
* SourceNode, or an array where each member is one of those things.
*/
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
if (Array.isArray(aChunk)) {
for (var i = aChunk.length-1; i >= 0; i--) {
this.prepend(aChunk[i]);
}
}
else if (aChunk[isSourceNode] || typeof aChunk === "string") {
this.children.unshift(aChunk);
}
else {
throw new TypeError(
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
);
}
return this;
};
/**
* Walk over the tree of JS snippets in this node and its children. The
* walking function is called once for each snippet of JS and is passed that
* snippet and the its original associated source's line/column location.
*
* @param aFn The traversal function.
*/
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
var chunk;
for (var i = 0, len = this.children.length; i < len; i++) {
chunk = this.children[i];
if (chunk[isSourceNode]) {
chunk.walk(aFn);
}
else {
if (chunk !== '') {
aFn(chunk, { source: this.source,
line: this.line,
column: this.column,
name: this.name });
}
}
}
};
/**
* Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
* each of `this.children`.
*
* @param aSep The separator.
*/
SourceNode.prototype.join = function SourceNode_join(aSep) {
var newChildren;
var i;
var len = this.children.length;
if (len > 0) {
newChildren = [];
for (i = 0; i < len-1; i++) {
newChildren.push(this.children[i]);
newChildren.push(aSep);
}
newChildren.push(this.children[i]);
this.children = newChildren;
}
return this;
};
/**
* Call String.prototype.replace on the very right-most source snippet. Useful
* for trimming whitespace from the end of a source node, etc.
*
* @param aPattern The pattern to replace.
* @param aReplacement The thing to replace the pattern with.
*/
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
var lastChild = this.children[this.children.length - 1];
if (lastChild[isSourceNode]) {
lastChild.replaceRight(aPattern, aReplacement);
}
else if (typeof lastChild === 'string') {
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
}
else {
this.children.push(''.replace(aPattern, aReplacement));
}
return this;
};
/**
* Set the source content for a source file. This will be added to the SourceMapGenerator
* in the sourcesContent field.
*
* @param aSourceFile The filename of the source file
* @param aSourceContent The content of the source file
*/
SourceNode.prototype.setSourceContent =
function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
};
/**
* Walk over the tree of SourceNodes. The walking function is called for each
* source file content and is passed the filename and source content.
*
* @param aFn The traversal function.
*/
SourceNode.prototype.walkSourceContents =
function SourceNode_walkSourceContents(aFn) {
for (var i = 0, len = this.children.length; i < len; i++) {
if (this.children[i][isSourceNode]) {
this.children[i].walkSourceContents(aFn);
}
}
var sources = Object.keys(this.sourceContents);
for (var i = 0, len = sources.length; i < len; i++) {
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
}
};
/**
* Return the string representation of this source node. Walks over the tree
* and concatenates all the various snippets together to one string.
*/
SourceNode.prototype.toString = function SourceNode_toString() {
var str = "";
this.walk(function (chunk) {
str += chunk;
});
return str;
};
/**
* Returns the string representation of this source node along with a source
* map.
*/
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
var generated = {
code: "",
line: 1,
column: 0
};
var map = new SourceMapGenerator(aArgs);
var sourceMappingActive = false;
var lastOriginalSource = null;
var lastOriginalLine = null;
var lastOriginalColumn = null;
var lastOriginalName = null;
this.walk(function (chunk, original) {
generated.code += chunk;
if (original.source !== null
&& original.line !== null
&& original.column !== null) {
if(lastOriginalSource !== original.source
|| lastOriginalLine !== original.line
|| lastOriginalColumn !== original.column
|| lastOriginalName !== original.name) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
lastOriginalSource = original.source;
lastOriginalLine = original.line;
lastOriginalColumn = original.column;
lastOriginalName = original.name;
sourceMappingActive = true;
} else if (sourceMappingActive) {
map.addMapping({
generated: {
line: generated.line,
column: generated.column
}
});
lastOriginalSource = null;
sourceMappingActive = false;
}
for (var idx = 0, length = chunk.length; idx < length; idx++) {
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
generated.line++;
generated.column = 0;
// Mappings end at eol
if (idx + 1 === length) {
lastOriginalSource = null;
sourceMappingActive = false;
} else if (sourceMappingActive) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
} else {
generated.column++;
}
}
});
this.walkSourceContents(function (sourceFile, sourceContent) {
map.setSourceContent(sourceFile, sourceContent);
});
return { code: generated.code, map: map };
};
exports.SourceNode = SourceNode;
/***/ }),
/***/ 12344:
/***/ ((__unused_webpack_module, exports) => {
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
/**
* This is a helper function for getting values from parameter/options
* objects.
*
* @param args The object we are extracting values from
* @param name The name of the property we are getting.
* @param defaultValue An optional value to return if the property is missing
* from the object. If this is not specified and the property is missing, an
* error will be thrown.
*/
function getArg(aArgs, aName, aDefaultValue) {
if (aName in aArgs) {
return aArgs[aName];
} else if (arguments.length === 3) {
return aDefaultValue;
} else {
throw new Error('"' + aName + '" is a required argument.');
}
}
exports.getArg = getArg;
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
var dataUrlRegexp = /^data:.+\,.+$/;
function urlParse(aUrl) {
var match = aUrl.match(urlRegexp);
if (!match) {
return null;
}
return {
scheme: match[1],
auth: match[2],
host: match[3],
port: match[4],
path: match[5]
};
}
exports.urlParse = urlParse;
function urlGenerate(aParsedUrl) {
var url = '';
if (aParsedUrl.scheme) {
url += aParsedUrl.scheme + ':';
}
url += '//';
if (aParsedUrl.auth) {
url += aParsedUrl.auth + '@';
}
if (aParsedUrl.host) {
url += aParsedUrl.host;
}
if (aParsedUrl.port) {
url += ":" + aParsedUrl.port
}
if (aParsedUrl.path) {
url += aParsedUrl.path;
}
return url;
}
exports.urlGenerate = urlGenerate;
/**
* Normalizes a path, or the path portion of a URL:
*
* - Replaces consecutive slashes with one slash.
* - Removes unnecessary '.' parts.
* - Removes unnecessary '<dir>/..' parts.
*
* Based on code in the Node.js 'path' core module.
*
* @param aPath The path or url to normalize.
*/
function normalize(aPath) {
var path = aPath;
var url = urlParse(aPath);
if (url) {
if (!url.path) {
return aPath;
}
path = url.path;
}
var isAbsolute = exports.isAbsolute(path);
var parts = path.split(/\/+/);
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
part = parts[i];
if (part === '.') {
parts.splice(i, 1);
} else if (part === '..') {
up++;
} else if (up > 0) {
if (part === '') {
// The first part is blank if the path is absolute. Trying to go
// above the root is a no-op. Therefore we can remove all '..' parts
// directly after the root.
parts.splice(i + 1, up);
up = 0;
} else {
parts.splice(i, 2);
up--;
}
}
}
path = parts.join('/');
if (path === '') {
path = isAbsolute ? '/' : '.';
}
if (url) {
url.path = path;
return urlGenerate(url);
}
return path;
}
exports.normalize = normalize;
/**
* Joins two paths/URLs.
*
* @param aRoot The root path or URL.
* @param aPath The path or URL to be joined with the root.
*
* - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
* scheme-relative URL: Then the scheme of aRoot, if any, is prepended
* first.
* - Otherwise aPath is a path. If aRoot is a URL, then its path portion
* is updated with the result and aRoot is returned. Otherwise the result
* is returned.
* - If aPath is absolute, the result is aPath.
* - Otherwise the two paths are joined with a slash.
* - Joining for example 'http://' and 'www.example.com' is also supported.
*/
function join(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
if (aPath === "") {
aPath = ".";
}
var aPathUrl = urlParse(aPath);
var aRootUrl = urlParse(aRoot);
if (aRootUrl) {
aRoot = aRootUrl.path || '/';
}
// `join(foo, '//www.example.org')`
if (aPathUrl && !aPathUrl.scheme) {
if (aRootUrl) {
aPathUrl.scheme = aRootUrl.scheme;
}
return urlGenerate(aPathUrl);
}
if (aPathUrl || aPath.match(dataUrlRegexp)) {
return aPath;
}
// `join('http://', 'www.example.com')`
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
aRootUrl.host = aPath;
return urlGenerate(aRootUrl);
}
var joined = aPath.charAt(0) === '/'
? aPath
: normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
if (aRootUrl) {
aRootUrl.path = joined;
return urlGenerate(aRootUrl);
}
return joined;
}
exports.join = join;
exports.isAbsolute = function (aPath) {
return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
};
/**
* Make a path relative to a URL or another path.
*
* @param aRoot The root path or URL.
* @param aPath The path or URL to be made relative to aRoot.
*/
function relative(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
aRoot = aRoot.replace(/\/$/, '');
// It is possible for the path to be above the root. In this case, simply
// checking whether the root is a prefix of the path won't work. Instead, we
// need to remove components from the root one by one, until either we find
// a prefix that fits, or we run out of components to remove.
var level = 0;
while (aPath.indexOf(aRoot + '/') !== 0) {
var index = aRoot.lastIndexOf("/");
if (index < 0) {
return aPath;
}
// If the only part of the root that is left is the scheme (i.e. http://,
// file:///, etc.), one or more slashes (/), or simply nothing at all, we
// have exhausted all components, so the path is not relative to the root.
aRoot = aRoot.slice(0, index);
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
return aPath;
}
++level;
}
// Make sure we add a "../" for each component we removed from the root.
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
}
exports.relative = relative;
var supportsNullProto = (function () {
var obj = Object.create(null);
return !('__proto__' in obj);
}());
function identity (s) {
return s;
}
/**
* Because behavior goes wacky when you set `__proto__` on objects, we
* have to prefix all the strings in our set with an arbitrary character.
*
* See https://github.com/mozilla/source-map/pull/31 and
* https://github.com/mozilla/source-map/issues/30
*
* @param String aStr
*/
function toSetString(aStr) {
if (isProtoString(aStr)) {
return '$' + aStr;
}
return aStr;
}
exports.toSetString = supportsNullProto ? identity : toSetString;
function fromSetString(aStr) {
if (isProtoString(aStr)) {
return aStr.slice(1);
}
return aStr;
}
exports.fromSetString = supportsNullProto ? identity : fromSetString;
function isProtoString(s) {
if (!s) {
return false;
}
var length = s.length;
if (length < 9 /* "__proto__".length */) {
return false;
}
if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
s.charCodeAt(length - 2) !== 95 /* '_' */ ||
s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
s.charCodeAt(length - 4) !== 116 /* 't' */ ||
s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
s.charCodeAt(length - 8) !== 95 /* '_' */ ||
s.charCodeAt(length - 9) !== 95 /* '_' */) {
return false;
}
for (var i = length - 10; i >= 0; i--) {
if (s.charCodeAt(i) !== 36 /* '$' */) {
return false;
}
}
return true;
}
/**
* Comparator between two mappings where the original positions are compared.
*
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
* mappings with the same original source/line/column, but different generated
* line and column the same. Useful when searching for a mapping with a
* stubbed out mapping.
*/
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
var cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0 || onlyCompareOriginal) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByOriginalPositions = compareByOriginalPositions;
/**
* Comparator between two mappings with deflated source and name indices where
* the generated positions are compared.
*
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
* mappings with the same generated line and column, but different
* source/name/original line and column the same. Useful when searching for a
* mapping with a stubbed out mapping.
*/
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
var cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0 || onlyCompareGenerated) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
function strcmp(aStr1, aStr2) {
if (aStr1 === aStr2) {
return 0;
}
if (aStr1 === null) {
return 1; // aStr2 !== null
}
if (aStr2 === null) {
return -1; // aStr1 !== null
}
if (aStr1 > aStr2) {
return 1;
}
return -1;
}
/**
* Comparator between two mappings with inflated source and name strings where
* the generated positions are compared.
*/
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
var cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
/**
* Strip any JSON XSSI avoidance prefix from the string (as documented
* in the source maps specification), and then parse the string as
* JSON.
*/
function parseSourceMapInput(str) {
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
}
exports.parseSourceMapInput = parseSourceMapInput;
/**
* Compute the URL of a source given the the source root, the source's
* URL, and the source map's URL.
*/
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
sourceURL = sourceURL || '';
if (sourceRoot) {
// This follows what Chrome does.
if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
sourceRoot += '/';
}
// The spec says:
// Line 4: An optional source root, useful for relocating source
// files on a server or removing repeated values in the
// “sources” entry. This value is prepended to the individual
// entries in the “source” field.
sourceURL = sourceRoot + sourceURL;
}
// Historically, SourceMapConsumer did not take the sourceMapURL as
// a parameter. This mode is still somewhat supported, which is why
// this code block is conditional. However, it's preferable to pass
// the source map URL to SourceMapConsumer, so that this function
// can implement the source URL resolution algorithm as outlined in
// the spec. This block is basically the equivalent of:
// new URL(sourceURL, sourceMapURL).toString()
// ... except it avoids using URL, which wasn't available in the
// older releases of node still supported by this library.
//
// The spec says:
// If the sources are not absolute URLs after prepending of the
// “sourceRoot”, the sources are resolved relative to the
// SourceMap (like resolving script src in a html document).
if (sourceMapURL) {
var parsed = urlParse(sourceMapURL);
if (!parsed) {
throw new Error("sourceMapURL could not be parsed");
}
if (parsed.path) {
// Strip the last path component, but keep the "/".
var index = parsed.path.lastIndexOf('/');
if (index >= 0) {
parsed.path = parsed.path.substring(0, index + 1);
}
}
sourceURL = join(urlGenerate(parsed), sourceURL);
}
return normalize(sourceURL);
}
exports.computeSourceURL = computeSourceURL;
/***/ }),
/***/ 56594:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
/*
* Copyright 2009-2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
/* unused reexport */ __nccwpck_require__(69425)/* .SourceMapGenerator */ .h;
/* unused reexport */ __nccwpck_require__(75155);
exports.SourceNode = __nccwpck_require__(92616).SourceNode;
/***/ }),
/***/ 57415:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
/*!
* statuses
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module dependencies.
* @private
*/
var codes = __nccwpck_require__(67799)
/**
* Module exports.
* @public
*/
module.exports = status
// status code to message map
status.STATUS_CODES = codes
// array of status codes
status.codes = populateStatusesMap(status, codes)
// status codes for redirects
status.redirect = {
300: true,
301: true,
302: true,
303: true,
305: true,
307: true,
308: true
}
// status codes for empty bodies
status.empty = {
204: true,
205: true,
304: true
}
// status codes for when you should retry the request
status.retry = {
502: true,
503: true,
504: true
}
/**
* Populate the statuses map for given codes.
* @private
*/
function populateStatusesMap (statuses, codes) {
var arr = []
Object.keys(codes).forEach(function forEachCode (code) {
var message = codes[code]
var status = Number(code)
// Populate properties
statuses[status] = message
statuses[message] = status
statuses[message.toLowerCase()] = status
// Add to array
arr.push(status)
})
return arr
}
/**
* Get the status code.
*
* Given a number, this will throw if it is not a known status
* code, otherwise the code will be returned. Given a string,
* the string will be parsed for a number and return the code
* if valid, otherwise will lookup the code assuming this is
* the status message.
*
* @param {string|number} code
* @returns {number}
* @public
*/
function status (code) {
if (typeof code === 'number') {
if (!status[code]) throw new Error('invalid status code: ' + code)
return code
}
if (typeof code !== 'string') {
throw new TypeError('code must be a number or string')
}
// '403'
var n = parseInt(code, 10)
if (!isNaN(n)) {
if (!status[n]) throw new Error('invalid status code: ' + n)
return n
}
n = status[code.toLowerCase()]
if (!n) throw new Error('invalid status message: "' + code + '"')
return n
}
/***/ }),
/***/ 60674:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var Buffer = __nccwpck_require__(64293).Buffer;
var isBufferEncoding = Buffer.isEncoding
|| function(encoding) {
switch (encoding && encoding.toLowerCase()) {
case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
default: return false;
}
}
function assertEncoding(encoding) {
if (encoding && !isBufferEncoding(encoding)) {
throw new Error('Unknown encoding: ' + encoding);
}
}
// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters. CESU-8 is handled as part of the UTF-8 encoding.
//
// @TODO Handling all encodings inside a single object makes it very difficult
// to reason about this code, so it should be split up in the future.
// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
// points as used by CESU-8.
var StringDecoder = exports.s = function(encoding) {
this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
assertEncoding(encoding);
switch (this.encoding) {
case 'utf8':
// CESU-8 represents each of Surrogate Pair by 3-bytes
this.surrogateSize = 3;
break;
case 'ucs2':
case 'utf16le':
// UTF-16 represents each of Surrogate Pair by 2-bytes
this.surrogateSize = 2;
this.detectIncompleteChar = utf16DetectIncompleteChar;
break;
case 'base64':
// Base-64 stores 3 bytes in 4 chars, and pads the remainder.
this.surrogateSize = 3;
this.detectIncompleteChar = base64DetectIncompleteChar;
break;
default:
this.write = passThroughWrite;
return;
}
// Enough space to store all bytes of a single character. UTF-8 needs 4
// bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
this.charBuffer = new Buffer(6);
// Number of bytes received for the current incomplete multi-byte character.
this.charReceived = 0;
// Number of bytes expected for the current incomplete multi-byte character.
this.charLength = 0;
};
// write decodes the given buffer and returns it as JS string that is
// guaranteed to not contain any partial multi-byte characters. Any partial
// character found at the end of the buffer is buffered up, and will be
// returned when calling write again with the remaining bytes.
//
// Note: Converting a Buffer containing an orphan surrogate to a String
// currently works, but converting a String to a Buffer (via `new Buffer`, or
// Buffer#write) will replace incomplete surrogates with the unicode
// replacement character. See https://codereview.chromium.org/121173009/ .
StringDecoder.prototype.write = function(buffer) {
var charStr = '';
// if our last write ended with an incomplete multibyte character
while (this.charLength) {
// determine how many remaining bytes this buffer has to offer for this char
var available = (buffer.length >= this.charLength - this.charReceived) ?
this.charLength - this.charReceived :
buffer.length;
// add the new bytes to the char buffer
buffer.copy(this.charBuffer, this.charReceived, 0, available);
this.charReceived += available;
if (this.charReceived < this.charLength) {
// still not enough chars in this buffer? wait for more ...
return '';
}
// remove bytes belonging to the current character from the buffer
buffer = buffer.slice(available, buffer.length);
// get the character that was split
charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
// CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
var charCode = charStr.charCodeAt(charStr.length - 1);
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
this.charLength += this.surrogateSize;
charStr = '';
continue;
}
this.charReceived = this.charLength = 0;
// if there are no more bytes in this buffer, just emit our char
if (buffer.length === 0) {
return charStr;
}
break;
}
// determine and set charLength / charReceived
this.detectIncompleteChar(buffer);
var end = buffer.length;
if (this.charLength) {
// buffer the incomplete character bytes we got
buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
end -= this.charReceived;
}
charStr += buffer.toString(this.encoding, 0, end);
var end = charStr.length - 1;
var charCode = charStr.charCodeAt(end);
// CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
var size = this.surrogateSize;
this.charLength += size;
this.charReceived += size;
this.charBuffer.copy(this.charBuffer, size, 0, size);
buffer.copy(this.charBuffer, 0, 0, size);
return charStr.substring(0, end);
}
// or just emit the charStr
return charStr;
};
// detectIncompleteChar determines if there is an incomplete UTF-8 character at
// the end of the given buffer. If so, it sets this.charLength to the byte
// length that character, and sets this.charReceived to the number of bytes
// that are available for this character.
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
// determine how many bytes we have to check at the end of this buffer
var i = (buffer.length >= 3) ? 3 : buffer.length;
// Figure out if one of the last i bytes of our buffer announces an
// incomplete char.
for (; i > 0; i--) {
var c = buffer[buffer.length - i];
// See http://en.wikipedia.org/wiki/UTF-8#Description
// 110XXXXX
if (i == 1 && c >> 5 == 0x06) {
this.charLength = 2;
break;
}
// 1110XXXX
if (i <= 2 && c >> 4 == 0x0E) {
this.charLength = 3;
break;
}
// 11110XXX
if (i <= 3 && c >> 3 == 0x1E) {
this.charLength = 4;
break;
}
}
this.charReceived = i;
};
StringDecoder.prototype.end = function(buffer) {
var res = '';
if (buffer && buffer.length)
res = this.write(buffer);
if (this.charReceived) {
var cr = this.charReceived;
var buf = this.charBuffer;
var enc = this.encoding;
res += buf.slice(0, cr).toString(enc);
}
return res;
};
function passThroughWrite(buffer) {
return buffer.toString(this.encoding);
}
function utf16DetectIncompleteChar(buffer) {
this.charReceived = buffer.length % 2;
this.charLength = this.charReceived ? 2 : 0;
}
function base64DetectIncompleteChar(buffer) {
this.charReceived = buffer.length % 3;
this.charLength = this.charReceived ? 3 : 0;
}
/***/ }),
/***/ 59318:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const os = __nccwpck_require__(12087);
const tty = __nccwpck_require__(33867);
const hasFlag = __nccwpck_require__(31621);
const {env} = process;
let forceColor;
if (hasFlag('no-color') ||
hasFlag('no-colors') ||
hasFlag('color=false') ||
hasFlag('color=never')) {
forceColor = 0;
} else if (hasFlag('color') ||
hasFlag('colors') ||
hasFlag('color=true') ||
hasFlag('color=always')) {
forceColor = 1;
}
if ('FORCE_COLOR' in env) {
if (env.FORCE_COLOR === 'true') {
forceColor = 1;
} else if (env.FORCE_COLOR === 'false') {
forceColor = 0;
} else {
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
}
}
function translateLevel(level) {
if (level === 0) {
return false;
}
return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}
function supportsColor(haveStream, streamIsTTY) {
if (forceColor === 0) {
return 0;
}
if (hasFlag('color=16m') ||
hasFlag('color=full') ||
hasFlag('color=truecolor')) {
return 3;
}
if (hasFlag('color=256')) {
return 2;
}
if (haveStream && !streamIsTTY && forceColor === undefined) {
return 0;
}
const min = forceColor || 0;
if (env.TERM === 'dumb') {
return min;
}
if (process.platform === 'win32') {
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
const osRelease = os.release().split('.');
if (
Number(osRelease[0]) >= 10 &&
Number(osRelease[2]) >= 10586
) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ('CI' in env) {
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
return 1;
}
return min;
}
if ('TEAMCITY_VERSION' in env) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
}
if (env.COLORTERM === 'truecolor') {
return 3;
}
if ('TERM_PROGRAM' in env) {
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
switch (env.TERM_PROGRAM) {
case 'iTerm.app':
return version >= 3 ? 3 : 2;
case 'Apple_Terminal':
return 2;
// No default
}
}
if (/-256(color)?$/i.test(env.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
return 1;
}
if ('COLORTERM' in env) {
return 1;
}
return min;
}
function getSupportLevel(stream) {
const level = supportsColor(stream, stream && stream.isTTY);
return translateLevel(level);
}
module.exports = {
supportsColor: getSupportLevel,
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
};
/***/ }),
/***/ 46399:
/***/ ((module) => {
"use strict";
/*!
* toidentifier
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = toIdentifier
/**
* Trasform the given string into a JavaScript identifier
*
* @param {string} str
* @returns {string}
* @public
*/
function toIdentifier (str) {
return str
.split(' ')
.map(function (token) {
return token.slice(0, 1).toUpperCase() + token.slice(1)
})
.join('')
.replace(/[^ _0-9a-z]/gi, '')
}
/***/ }),
/***/ 4351:
/***/ ((module) => {
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __spreadArrays;
var __spreadArray;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
var __classPrivateFieldGet;
var __classPrivateFieldSet;
var __createBinding;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if ( true && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
__extends = function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__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());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar = function(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
};
__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];
});
__values = function (o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
/** @deprecated */
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
/** @deprecated */
__spreadArrays = function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
__spreadArray = function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
__importStar = function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
__classPrivateFieldGet = function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__createBinding", __createBinding);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__spreadArrays", __spreadArrays);
exporter("__spreadArray", __spreadArray);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
});
/***/ }),
/***/ 74294:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
module.exports = __nccwpck_require__(54219);
/***/ }),
/***/ 54219:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var net = __nccwpck_require__(11631);
var tls = __nccwpck_require__(4016);
var http = __nccwpck_require__(98605);
var https = __nccwpck_require__(57211);
var events = __nccwpck_require__(28614);
var assert = __nccwpck_require__(42357);
var util = __nccwpck_require__(31669);
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
/***/ }),
/***/ 9046:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
exports.E = function (fn) {
return Object.defineProperty(function () {
if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
else {
return new Promise((resolve, reject) => {
arguments[arguments.length] = (err, res) => {
if (err) return reject(err)
resolve(res)
}
arguments.length++
fn.apply(this, arguments)
})
}
}, 'name', { value: fn.name })
}
exports.p = function (fn) {
return Object.defineProperty(function () {
const cb = arguments[arguments.length - 1]
if (typeof cb !== 'function') return fn.apply(this, arguments)
else fn.apply(this, arguments).then(r => cb(null, r), cb)
}, 'name', { value: fn.name })
}
/***/ }),
/***/ 3124:
/***/ ((module) => {
"use strict";
/*!
* unpipe
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = unpipe
/**
* Determine if there are Node.js pipe-like data listeners.
* @private
*/
function hasPipeDataListeners(stream) {
var listeners = stream.listeners('data')
for (var i = 0; i < listeners.length; i++) {
if (listeners[i].name === 'ondata') {
return true
}
}
return false
}
/**
* Unpipe a stream from all destinations.
*
* @param {object} stream
* @public
*/
function unpipe(stream) {
if (!stream) {
throw new TypeError('argument stream is required')
}
if (typeof stream.unpipe === 'function') {
// new-style
stream.unpipe()
return
}
// Node.js 0.8 hack
if (!hasPipeDataListeners(stream)) {
return
}
var listener
var listeners = stream.listeners('close')
for (var i = 0; i < listeners.length; i++) {
listener = listeners[i]
if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
continue
}
// invoke the listener
listener.call(stream)
}
}
/***/ }),
/***/ 75840:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
Object.defineProperty(exports, "v1", ({
enumerable: true,
get: function () {
return _v.default;
}
}));
Object.defineProperty(exports, "v3", ({
enumerable: true,
get: function () {
return _v2.default;
}
}));
Object.defineProperty(exports, "v4", ({
enumerable: true,
get: function () {
return _v3.default;
}
}));
Object.defineProperty(exports, "v5", ({
enumerable: true,
get: function () {
return _v4.default;
}
}));
Object.defineProperty(exports, "NIL", ({
enumerable: true,
get: function () {
return _nil.default;
}
}));
Object.defineProperty(exports, "version", ({
enumerable: true,
get: function () {
return _version.default;
}
}));
Object.defineProperty(exports, "validate", ({
enumerable: true,
get: function () {
return _validate.default;
}
}));
Object.defineProperty(exports, "stringify", ({
enumerable: true,
get: function () {
return _stringify.default;
}
}));
Object.defineProperty(exports, "parse", ({
enumerable: true,
get: function () {
return _parse.default;
}
}));
var _v = _interopRequireDefault(__nccwpck_require__(78628));
var _v2 = _interopRequireDefault(__nccwpck_require__(86409));
var _v3 = _interopRequireDefault(__nccwpck_require__(85122));
var _v4 = _interopRequireDefault(__nccwpck_require__(79120));
var _nil = _interopRequireDefault(__nccwpck_require__(25332));
var _version = _interopRequireDefault(__nccwpck_require__(32414));
var _validate = _interopRequireDefault(__nccwpck_require__(66900));
var _stringify = _interopRequireDefault(__nccwpck_require__(18950));
var _parse = _interopRequireDefault(__nccwpck_require__(62746));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
/***/ 4569:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _crypto = _interopRequireDefault(__nccwpck_require__(76417));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function md5(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return _crypto.default.createHash('md5').update(bytes).digest();
}
var _default = md5;
exports.default = _default;
/***/ }),
/***/ 25332:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _default = '00000000-0000-0000-0000-000000000000';
exports.default = _default;
/***/ }),
/***/ 62746:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _validate = _interopRequireDefault(__nccwpck_require__(66900));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function parse(uuid) {
if (!(0, _validate.default)(uuid)) {
throw TypeError('Invalid UUID');
}
let v;
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
arr[1] = v >>> 16 & 0xff;
arr[2] = v >>> 8 & 0xff;
arr[3] = v & 0xff; // Parse ........-####-....-....-............
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
arr[5] = v & 0xff; // Parse ........-....-####-....-............
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
arr[7] = v & 0xff; // Parse ........-....-....-####-............
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
arr[9] = v & 0xff; // Parse ........-....-....-....-############
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
arr[11] = v / 0x100000000 & 0xff;
arr[12] = v >>> 24 & 0xff;
arr[13] = v >>> 16 & 0xff;
arr[14] = v >>> 8 & 0xff;
arr[15] = v & 0xff;
return arr;
}
var _default = parse;
exports.default = _default;
/***/ }),
/***/ 40814:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
exports.default = _default;
/***/ }),
/***/ 50807:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = rng;
var _crypto = _interopRequireDefault(__nccwpck_require__(76417));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
let poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
_crypto.default.randomFillSync(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
/***/ }),
/***/ 85274:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _crypto = _interopRequireDefault(__nccwpck_require__(76417));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function sha1(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return _crypto.default.createHash('sha1').update(bytes).digest();
}
var _default = sha1;
exports.default = _default;
/***/ }),
/***/ 18950:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _validate = _interopRequireDefault(__nccwpck_require__(66900));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
const byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 0x100).toString(16).substr(1));
}
function stringify(arr, offset = 0) {
// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
if (!(0, _validate.default)(uuid)) {
throw TypeError('Stringified UUID is invalid');
}
return uuid;
}
var _default = stringify;
exports.default = _default;
/***/ }),
/***/ 78628:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _rng = _interopRequireDefault(__nccwpck_require__(50807));
var _stringify = _interopRequireDefault(__nccwpck_require__(18950));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// **`v1()` - Generate time-based UUID**
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html
let _nodeId;
let _clockseq; // Previous uuid creation time
let _lastMSecs = 0;
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
function v1(options, buf, offset) {
let i = buf && offset || 0;
const b = buf || new Array(16);
options = options || {};
let node = options.node || _nodeId;
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
// specified. We do this lazily to minimize issues related to insufficient
// system entropy. See #189
if (node == null || clockseq == null) {
const seedBytes = options.random || (options.rng || _rng.default)();
if (node == null) {
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
}
if (clockseq == null) {
// Per 4.2.2, randomize (14 bit) clockseq
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
}
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
// cycle to simulate higher resolution clock
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
if (dt < 0 && options.clockseq === undefined) {
clockseq = clockseq + 1 & 0x3fff;
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
// time interval
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
nsecs = 0;
} // Per 4.2.1.2 Throw error if too many uuids are requested
if (nsecs >= 10000) {
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
}
_lastMSecs = msecs;
_lastNSecs = nsecs;
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
msecs += 12219292800000; // `time_low`
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
b[i++] = tl >>> 24 & 0xff;
b[i++] = tl >>> 16 & 0xff;
b[i++] = tl >>> 8 & 0xff;
b[i++] = tl & 0xff; // `time_mid`
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
b[i++] = tmh >>> 8 & 0xff;
b[i++] = tmh & 0xff; // `time_high_and_version`
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
b[i++] = clockseq & 0xff; // `node`
for (let n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
return buf || (0, _stringify.default)(b);
}
var _default = v1;
exports.default = _default;
/***/ }),
/***/ 86409:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _v = _interopRequireDefault(__nccwpck_require__(65998));
var _md = _interopRequireDefault(__nccwpck_require__(4569));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const v3 = (0, _v.default)('v3', 0x30, _md.default);
var _default = v3;
exports.default = _default;
/***/ }),
/***/ 65998:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = _default;
exports.URL = exports.DNS = void 0;
var _stringify = _interopRequireDefault(__nccwpck_require__(18950));
var _parse = _interopRequireDefault(__nccwpck_require__(62746));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function stringToBytes(str) {
str = unescape(encodeURIComponent(str)); // UTF8 escape
const bytes = [];
for (let i = 0; i < str.length; ++i) {
bytes.push(str.charCodeAt(i));
}
return bytes;
}
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
exports.DNS = DNS;
const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
exports.URL = URL;
function _default(name, version, hashfunc) {
function generateUUID(value, namespace, buf, offset) {
if (typeof value === 'string') {
value = stringToBytes(value);
}
if (typeof namespace === 'string') {
namespace = (0, _parse.default)(namespace);
}
if (namespace.length !== 16) {
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
} // Compute hash of namespace and value, Per 4.3
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
// hashfunc([...namespace, ... value])`
let bytes = new Uint8Array(16 + value.length);
bytes.set(namespace);
bytes.set(value, namespace.length);
bytes = hashfunc(bytes);
bytes[6] = bytes[6] & 0x0f | version;
bytes[8] = bytes[8] & 0x3f | 0x80;
if (buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[offset + i] = bytes[i];
}
return buf;
}
return (0, _stringify.default)(bytes);
} // Function#name is not settable on some platforms (#270)
try {
generateUUID.name = name; // eslint-disable-next-line no-empty
} catch (err) {} // For CommonJS default export support
generateUUID.DNS = DNS;
generateUUID.URL = URL;
return generateUUID;
}
/***/ }),
/***/ 85122:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _rng = _interopRequireDefault(__nccwpck_require__(50807));
var _stringify = _interopRequireDefault(__nccwpck_require__(18950));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function v4(options, buf, offset) {
options = options || {};
const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = rnds[6] & 0x0f | 0x40;
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
if (buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[offset + i] = rnds[i];
}
return buf;
}
return (0, _stringify.default)(rnds);
}
var _default = v4;
exports.default = _default;
/***/ }),
/***/ 79120:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _v = _interopRequireDefault(__nccwpck_require__(65998));
var _sha = _interopRequireDefault(__nccwpck_require__(85274));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const v5 = (0, _v.default)('v5', 0x50, _sha.default);
var _default = v5;
exports.default = _default;
/***/ }),
/***/ 66900:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _regex = _interopRequireDefault(__nccwpck_require__(40814));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function validate(uuid) {
return typeof uuid === 'string' && _regex.default.test(uuid);
}
var _default = validate;
exports.default = _default;
/***/ }),
/***/ 32414:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.default = void 0;
var _validate = _interopRequireDefault(__nccwpck_require__(66900));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function version(uuid) {
if (!(0, _validate.default)(uuid)) {
throw TypeError('Invalid UUID');
}
return parseInt(uuid.substr(14, 1), 16);
}
var _default = version;
exports.default = _default;
/***/ }),
/***/ 69440:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
if (parseInt(process.versions.node.split('.')[0]) < 6) throw new Error('vm2 requires Node.js version 6 or newer.');
module.exports = __nccwpck_require__(74357);
/***/ }),
/***/ 82989:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* __ ___ ____ _ _ ___ _ _ ____
* \ \ / / \ | _ \| \ | |_ _| \ | |/ ___|
* \ \ /\ / / _ \ | |_) | \| || || \| | | _
* \ V V / ___ \| _ <| |\ || || |\ | |_| |
* \_/\_/_/ \_\_| \_\_| \_|___|_| \_|\____|
*
* This file is critical for vm2. It implements the bridge between the host and the sandbox.
* If you do not know exactly what you are doing, you should NOT edit this file.
*
* The file is loaded in the host and sandbox to handle objects in both directions.
* This is done to ensure that RangeErrors are from the correct context.
* The boundary between the sandbox and host might throw RangeErrors from both contexts.
* Therefore, thisFromOther and friends can handle objects from both domains.
*
* Method parameters have comments to tell from which context they came.
*
*/
const globalsList = [
'Number',
'String',
'Boolean',
'Date',
'RegExp',
'Map',
'WeakMap',
'Set',
'WeakSet',
'Promise',
'Function'
];
const errorsList = [
'RangeError',
'ReferenceError',
'SyntaxError',
'TypeError',
'EvalError',
'URIError',
'Error'
];
const OPNA = 'Operation not allowed on contextified object.';
const thisGlobalPrototypes = {
__proto__: null,
Object: Object.prototype,
Array: Array.prototype
};
for (let i = 0; i < globalsList.length; i++) {
const key = globalsList[i];
const g = global[key];
if (g) thisGlobalPrototypes[key] = g.prototype;
}
for (let i = 0; i < errorsList.length; i++) {
const key = errorsList[i];
const g = global[key];
if (g) thisGlobalPrototypes[key] = g.prototype;
}
const {
getPrototypeOf: thisReflectGetPrototypeOf,
setPrototypeOf: thisReflectSetPrototypeOf,
defineProperty: thisReflectDefineProperty,
deleteProperty: thisReflectDeleteProperty,
getOwnPropertyDescriptor: thisReflectGetOwnPropertyDescriptor,
isExtensible: thisReflectIsExtensible,
preventExtensions: thisReflectPreventExtensions,
apply: thisReflectApply,
construct: thisReflectConstruct,
set: thisReflectSet,
get: thisReflectGet,
has: thisReflectHas,
ownKeys: thisReflectOwnKeys,
enumerate: thisReflectEnumerate,
} = Reflect;
const thisObject = Object;
const {
freeze: thisObjectFreeze,
prototype: thisObjectPrototype
} = thisObject;
const thisObjectHasOwnProperty = thisObjectPrototype.hasOwnProperty;
const ThisProxy = Proxy;
const ThisWeakMap = WeakMap;
const {
get: thisWeakMapGet,
set: thisWeakMapSet
} = ThisWeakMap.prototype;
const ThisMap = Map;
const thisMapGet = ThisMap.prototype.get;
const thisMapSet = ThisMap.prototype.set;
const thisFunction = Function;
const thisFunctionBind = thisFunction.prototype.bind;
const thisArrayIsArray = Array.isArray;
const thisErrorCaptureStackTrace = Error.captureStackTrace;
const thisSymbolToString = Symbol.prototype.toString;
const thisSymbolToStringTag = Symbol.toStringTag;
/**
* VMError.
*
* @public
* @extends {Error}
*/
class VMError extends Error {
/**
* Create VMError instance.
*
* @public
* @param {string} message - Error message.
* @param {string} code - Error code.
*/
constructor(message, code) {
super(message);
this.name = 'VMError';
this.code = code;
thisErrorCaptureStackTrace(this, this.constructor);
}
}
thisGlobalPrototypes['VMError'] = VMError.prototype;
function thisUnexpected() {
return new VMError('Unexpected');
}
if (!thisReflectSetPrototypeOf(exports, null)) throw thisUnexpected();
function thisSafeGetOwnPropertyDescriptor(obj, key) {
const desc = thisReflectGetOwnPropertyDescriptor(obj, key);
if (!desc) return desc;
if (!thisReflectSetPrototypeOf(desc, null)) throw thisUnexpected();
return desc;
}
function thisThrowCallerCalleeArgumentsAccess(key) {
'use strict';
thisThrowCallerCalleeArgumentsAccess[key];
return thisUnexpected();
}
function thisIdMapping(factory, other) {
return other;
}
const thisThrowOnKeyAccessHandler = thisObjectFreeze({
__proto__: null,
get(target, key, receiver) {
if (typeof key === 'symbol') {
key = thisReflectApply(thisSymbolToString, key, []);
}
throw new VMError(`Unexpected access to key '${key}'`);
}
});
const emptyForzenObject = thisObjectFreeze({
__proto__: null
});
const thisThrowOnKeyAccess = new ThisProxy(emptyForzenObject, thisThrowOnKeyAccessHandler);
function SafeBase() {}
if (!thisReflectDefineProperty(SafeBase, 'prototype', {
__proto__: null,
value: thisThrowOnKeyAccess
})) throw thisUnexpected();
function SHARED_FUNCTION() {}
const TEST_PROXY_HANDLER = thisObjectFreeze({
__proto__: thisThrowOnKeyAccess,
construct() {
return this;
}
});
function thisIsConstructor(obj) {
// Note: obj@any(unsafe)
const Func = new ThisProxy(obj, TEST_PROXY_HANDLER);
try {
// eslint-disable-next-line no-new
new Func();
return true;
} catch (e) {
return false;
}
}
function thisCreateTargetObject(obj, proto) {
// Note: obj@any(unsafe) proto@any(unsafe) returns@this(unsafe) throws@this(unsafe)
let base;
if (typeof obj === 'function') {
if (thisIsConstructor(obj)) {
// Bind the function since bound functions do not have a prototype property.
base = thisReflectApply(thisFunctionBind, SHARED_FUNCTION, [null]);
} else {
base = () => {};
}
} else if (thisArrayIsArray(obj)) {
base = [];
} else {
return {__proto__: proto};
}
if (!thisReflectSetPrototypeOf(base, proto)) throw thisUnexpected();
return base;
}
function createBridge(otherInit, registerProxy) {
const mappingOtherToThis = new ThisWeakMap();
const protoMappings = new ThisMap();
const protoName = new ThisMap();
function thisAddProtoMapping(proto, other, name) {
// Note: proto@this(unsafe) other@other(unsafe) name@this(unsafe) throws@this(unsafe)
thisReflectApply(thisMapSet, protoMappings, [proto, thisIdMapping]);
thisReflectApply(thisMapSet, protoMappings, [other,
(factory, object) => thisProxyOther(factory, object, proto)]);
if (name) thisReflectApply(thisMapSet, protoName, [proto, name]);
}
function thisAddProtoMappingFactory(protoFactory, other, name) {
// Note: protoFactory@this(unsafe) other@other(unsafe) name@this(unsafe) throws@this(unsafe)
let proto;
thisReflectApply(thisMapSet, protoMappings, [other,
(factory, object) => {
if (!proto) {
proto = protoFactory();
thisReflectApply(thisMapSet, protoMappings, [proto, thisIdMapping]);
if (name) thisReflectApply(thisMapSet, protoName, [proto, name]);
}
return thisProxyOther(factory, object, proto);
}]);
}
const result = {
__proto__: null,
globalPrototypes: thisGlobalPrototypes,
safeGetOwnPropertyDescriptor: thisSafeGetOwnPropertyDescriptor,
fromArguments: thisFromOtherArguments,
from: thisFromOther,
fromWithFactory: thisFromOtherWithFactory,
ensureThis: thisEnsureThis,
mapping: mappingOtherToThis,
connect: thisConnect,
reflectSet: thisReflectSet,
reflectGet: thisReflectGet,
reflectDefineProperty: thisReflectDefineProperty,
reflectDeleteProperty: thisReflectDeleteProperty,
reflectApply: thisReflectApply,
reflectConstruct: thisReflectConstruct,
reflectHas: thisReflectHas,
reflectOwnKeys: thisReflectOwnKeys,
reflectEnumerate: thisReflectEnumerate,
reflectGetPrototypeOf: thisReflectGetPrototypeOf,
reflectIsExtensible: thisReflectIsExtensible,
reflectPreventExtensions: thisReflectPreventExtensions,
objectHasOwnProperty: thisObjectHasOwnProperty,
weakMapSet: thisWeakMapSet,
addProtoMapping: thisAddProtoMapping,
addProtoMappingFactory: thisAddProtoMappingFactory,
defaultFactory,
protectedFactory,
readonlyFactory,
VMError
};
const isHost = typeof otherInit !== 'object';
if (isHost) {
otherInit = otherInit(result, registerProxy);
}
result.other = otherInit;
const {
globalPrototypes: otherGlobalPrototypes,
safeGetOwnPropertyDescriptor: otherSafeGetOwnPropertyDescriptor,
fromArguments: otherFromThisArguments,
from: otherFromThis,
mapping: mappingThisToOther,
reflectSet: otherReflectSet,
reflectGet: otherReflectGet,
reflectDefineProperty: otherReflectDefineProperty,
reflectDeleteProperty: otherReflectDeleteProperty,
reflectApply: otherReflectApply,
reflectConstruct: otherReflectConstruct,
reflectHas: otherReflectHas,
reflectOwnKeys: otherReflectOwnKeys,
reflectEnumerate: otherReflectEnumerate,
reflectGetPrototypeOf: otherReflectGetPrototypeOf,
reflectIsExtensible: otherReflectIsExtensible,
reflectPreventExtensions: otherReflectPreventExtensions,
objectHasOwnProperty: otherObjectHasOwnProperty,
weakMapSet: otherWeakMapSet
} = otherInit;
function thisOtherHasOwnProperty(object, key) {
// Note: object@other(safe) key@prim throws@this(unsafe)
try {
return otherReflectApply(otherObjectHasOwnProperty, object, [key]) === true;
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
}
function thisDefaultGet(handler, object, key, desc) {
// Note: object@other(unsafe) key@prim desc@other(safe)
let ret; // @other(unsafe)
if (desc.get || desc.set) {
const getter = desc.get;
if (!getter) return undefined;
try {
ret = otherReflectApply(getter, object, [key]);
} catch (e) {
throw thisFromOther(e);
}
} else {
ret = desc.value;
}
return handler.fromOtherWithContext(ret);
}
function otherFromThisIfAvailable(to, from, key) {
// Note: to@other(safe) from@this(safe) key@prim throws@this(unsafe)
if (!thisReflectApply(thisObjectHasOwnProperty, from, [key])) return false;
try {
to[key] = otherFromThis(from[key]);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
return true;
}
class BaseHandler extends SafeBase {
constructor(object) {
// Note: object@other(unsafe) throws@this(unsafe)
super();
this.object = object;
}
getFactory() {
return defaultFactory;
}
fromOtherWithContext(other) {
// Note: other@other(unsafe) throws@this(unsafe)
return thisFromOtherWithFactory(this.getFactory(), other);
}
doPreventExtensions(target, object, factory) {
// Note: target@this(unsafe) object@other(unsafe) throws@this(unsafe)
let keys; // @other(safe-array-of-prim)
try {
keys = otherReflectOwnKeys(object);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
for (let i = 0; i < keys.length; i++) {
const key = keys[i]; // @prim
let desc;
try {
desc = otherSafeGetOwnPropertyDescriptor(object, key);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
if (!desc) continue;
if (!desc.configurable) {
const current = thisSafeGetOwnPropertyDescriptor(target, key);
if (current && !current.configurable) continue;
if (desc.get || desc.set) {
desc.get = this.fromOtherWithContext(desc.get);
desc.set = this.fromOtherWithContext(desc.set);
} else if (typeof object === 'function' && (key === 'caller' || key === 'callee' || key === 'arguments')) {
desc.value = null;
} else {
desc.value = this.fromOtherWithContext(desc.value);
}
} else {
if (desc.get || desc.set) {
desc = {
__proto__: null,
configurable: true,
enumerable: desc.enumerable,
writable: true,
value: null
};
} else {
desc.value = null;
}
}
if (!thisReflectDefineProperty(target, key, desc)) throw thisUnexpected();
}
if (!thisReflectPreventExtensions(target)) throw thisUnexpected();
}
get(target, key, receiver) {
// Note: target@this(unsafe) key@prim receiver@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
switch (key) {
case 'constructor': {
const desc = otherSafeGetOwnPropertyDescriptor(object, key);
if (desc) return thisDefaultGet(this, object, key, desc);
const proto = thisReflectGetPrototypeOf(target);
return proto === null ? undefined : proto.constructor;
}
case '__proto__': {
const desc = otherSafeGetOwnPropertyDescriptor(object, key);
if (desc) return thisDefaultGet(this, object, key, desc);
return thisReflectGetPrototypeOf(target);
}
case thisSymbolToStringTag:
if (!thisOtherHasOwnProperty(object, thisSymbolToStringTag)) {
const proto = thisReflectGetPrototypeOf(target);
const name = thisReflectApply(thisMapGet, protoName, [proto]);
if (name) return name;
}
break;
case 'arguments':
case 'caller':
case 'callee':
if (thisOtherHasOwnProperty(object, key)) throw thisThrowCallerCalleeArgumentsAccess(key);
break;
}
let ret; // @other(unsafe)
try {
ret = otherReflectGet(object, key);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
return this.fromOtherWithContext(ret);
}
set(target, key, value, receiver) {
// Note: target@this(unsafe) key@prim value@this(unsafe) receiver@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
if (key === '__proto__' && !thisOtherHasOwnProperty(object, key)) {
return this.setPrototypeOf(target, value);
}
try {
value = otherFromThis(value);
return otherReflectSet(object, key, value) === true;
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
}
getPrototypeOf(target) {
// Note: target@this(unsafe)
return thisReflectGetPrototypeOf(target);
}
setPrototypeOf(target, value) {
// Note: target@this(unsafe) throws@this(unsafe)
throw new VMError(OPNA);
}
apply(target, context, args) {
// Note: target@this(unsafe) context@this(unsafe) args@this(safe-array) throws@this(unsafe)
const object = this.object; // @other(unsafe)
let ret; // @other(unsafe)
try {
context = otherFromThis(context);
args = otherFromThisArguments(args);
ret = otherReflectApply(object, context, args);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
return thisFromOther(ret);
}
construct(target, args, newTarget) {
// Note: target@this(unsafe) args@this(safe-array) newTarget@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
let ret; // @other(unsafe)
try {
args = otherFromThisArguments(args);
ret = otherReflectConstruct(object, args);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
return thisFromOtherWithFactory(this.getFactory(), ret, thisFromOther(object));
}
getOwnPropertyDescriptorDesc(target, prop, desc) {
// Note: target@this(unsafe) prop@prim desc@other{safe} throws@this(unsafe)
const object = this.object; // @other(unsafe)
if (desc && typeof object === 'function' && (prop === 'arguments' || prop === 'caller' || prop === 'callee')) desc.value = null;
return desc;
}
getOwnPropertyDescriptor(target, prop) {
// Note: target@this(unsafe) prop@prim throws@this(unsafe)
const object = this.object; // @other(unsafe)
let desc; // @other(safe)
try {
desc = otherSafeGetOwnPropertyDescriptor(object, prop);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
desc = this.getOwnPropertyDescriptorDesc(target, prop, desc);
if (!desc) return undefined;
let thisDesc;
if (desc.get || desc.set) {
thisDesc = {
__proto__: null,
get: this.fromOtherWithContext(desc.get),
set: this.fromOtherWithContext(desc.set),
enumerable: desc.enumerable === true,
configurable: desc.configurable === true
};
} else {
thisDesc = {
__proto__: null,
value: this.fromOtherWithContext(desc.value),
writable: desc.writable === true,
enumerable: desc.enumerable === true,
configurable: desc.configurable === true
};
}
if (!thisDesc.configurable) {
const oldDesc = thisSafeGetOwnPropertyDescriptor(target, prop);
if (!oldDesc || oldDesc.configurable || oldDesc.writable !== thisDesc.writable) {
if (!thisReflectDefineProperty(target, prop, thisDesc)) throw thisUnexpected();
}
}
return thisDesc;
}
definePropertyDesc(target, prop, desc) {
// Note: target@this(unsafe) prop@prim desc@this(safe) throws@this(unsafe)
return desc;
}
defineProperty(target, prop, desc) {
// Note: target@this(unsafe) prop@prim desc@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
if (!thisReflectSetPrototypeOf(desc, null)) throw thisUnexpected();
desc = this.definePropertyDesc(target, prop, desc);
if (!desc) return false;
let otherDesc = {__proto__: null};
let hasFunc = true;
let hasValue = true;
let hasBasic = true;
hasFunc &= otherFromThisIfAvailable(otherDesc, desc, 'get');
hasFunc &= otherFromThisIfAvailable(otherDesc, desc, 'set');
hasValue &= otherFromThisIfAvailable(otherDesc, desc, 'value');
hasValue &= otherFromThisIfAvailable(otherDesc, desc, 'writable');
hasBasic &= otherFromThisIfAvailable(otherDesc, desc, 'enumerable');
hasBasic &= otherFromThisIfAvailable(otherDesc, desc, 'configurable');
try {
if (!otherReflectDefineProperty(object, prop, otherDesc)) return false;
if (otherDesc.configurable !== true && (!hasBasic || !(hasFunc || hasValue))) {
otherDesc = otherSafeGetOwnPropertyDescriptor(object, prop);
}
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
if (!otherDesc.configurable) {
let thisDesc;
if (otherDesc.get || otherDesc.set) {
thisDesc = {
__proto__: null,
get: this.fromOtherWithContext(otherDesc.get),
set: this.fromOtherWithContext(otherDesc.set),
enumerable: otherDesc.enumerable,
configurable: otherDesc.configurable
};
} else {
thisDesc = {
__proto__: null,
value: this.fromOtherWithContext(otherDesc.value),
writable: otherDesc.writable,
enumerable: otherDesc.enumerable,
configurable: otherDesc.configurable
};
}
if (!thisReflectDefineProperty(target, prop, thisDesc)) throw thisUnexpected();
}
return true;
}
deleteProperty(target, prop) {
// Note: target@this(unsafe) prop@prim throws@this(unsafe)
const object = this.object; // @other(unsafe)
try {
return otherReflectDeleteProperty(object, prop) === true;
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
}
has(target, key) {
// Note: target@this(unsafe) key@prim throws@this(unsafe)
const object = this.object; // @other(unsafe)
try {
return otherReflectHas(object, key) === true;
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
}
isExtensible(target) {
// Note: target@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
try {
if (otherReflectIsExtensible(object)) return true;
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
if (thisReflectIsExtensible(target)) {
this.doPreventExtensions(target, object, this);
}
return false;
}
ownKeys(target) {
// Note: target@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
let res; // @other(unsafe)
try {
res = otherReflectOwnKeys(object);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
return thisFromOther(res);
}
preventExtensions(target) {
// Note: target@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
try {
if (!otherReflectPreventExtensions(object)) return false;
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
if (thisReflectIsExtensible(target)) {
this.doPreventExtensions(target, object, this);
}
return true;
}
enumerate(target) {
// Note: target@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
let res; // @other(unsafe)
try {
res = otherReflectEnumerate(object);
} catch (e) { // @other(unsafe)
throw thisFromOther(e);
}
return this.fromOtherWithContext(res);
}
}
function defaultFactory(object) {
// Note: other@other(unsafe) returns@this(unsafe) throws@this(unsafe)
return new BaseHandler(object);
}
class ProtectedHandler extends BaseHandler {
getFactory() {
return protectedFactory;
}
set(target, key, value, receiver) {
// Note: target@this(unsafe) key@prim value@this(unsafe) receiver@this(unsafe) throws@this(unsafe)
if (typeof value === 'function') {
return thisReflectDefineProperty(receiver, key, {
__proto__: null,
value: value,
writable: true,
enumerable: true,
configurable: true
}) === true;
}
return super.set(target, key, value, receiver);
}
definePropertyDesc(target, prop, desc) {
// Note: target@this(unsafe) prop@prim desc@this(safe) throws@this(unsafe)
if (desc && (desc.set || desc.get || typeof desc.value === 'function')) return undefined;
return desc;
}
}
function protectedFactory(object) {
// Note: other@other(unsafe) returns@this(unsafe) throws@this(unsafe)
return new ProtectedHandler(object);
}
class ReadOnlyHandler extends BaseHandler {
getFactory() {
return readonlyFactory;
}
set(target, key, value, receiver) {
// Note: target@this(unsafe) key@prim value@this(unsafe) receiver@this(unsafe) throws@this(unsafe)
return thisReflectDefineProperty(receiver, key, {
__proto__: null,
value: value,
writable: true,
enumerable: true,
configurable: true
});
}
setPrototypeOf(target, value) {
// Note: target@this(unsafe) throws@this(unsafe)
return false;
}
defineProperty(target, prop, desc) {
// Note: target@this(unsafe) prop@prim desc@this(unsafe) throws@this(unsafe)
return false;
}
deleteProperty(target, prop) {
// Note: target@this(unsafe) prop@prim throws@this(unsafe)
return false;
}
isExtensible(target) {
// Note: target@this(unsafe) throws@this(unsafe)
return false;
}
preventExtensions(target) {
// Note: target@this(unsafe) throws@this(unsafe)
return false;
}
}
function readonlyFactory(object) {
// Note: other@other(unsafe) returns@this(unsafe) throws@this(unsafe)
return new ReadOnlyHandler(object);
}
class ReadOnlyMockHandler extends ReadOnlyHandler {
constructor(object, mock) {
// Note: object@other(unsafe) mock:this(unsafe) throws@this(unsafe)
super(object);
this.mock = mock;
}
get(target, key, receiver) {
// Note: target@this(unsafe) key@prim receiver@this(unsafe) throws@this(unsafe)
const object = this.object; // @other(unsafe)
const mock = this.mock;
if (thisReflectApply(thisObjectHasOwnProperty, mock, key) && !thisOtherHasOwnProperty(object, key)) {
return mock[key];
}
return super.get(target, key, receiver);
}
}
function thisFromOther(other) {
// Note: other@other(unsafe) returns@this(unsafe) throws@this(unsafe)
return thisFromOtherWithFactory(defaultFactory, other);
}
function thisProxyOther(factory, other, proto) {
const target = thisCreateTargetObject(other, proto);
const handler = factory(other);
const proxy = new ThisProxy(target, handler);
try {
otherReflectApply(otherWeakMapSet, mappingThisToOther, [proxy, other]);
registerProxy(proxy, handler);
} catch (e) {
throw new VMError('Unexpected error');
}
if (!isHost) {
thisReflectApply(thisWeakMapSet, mappingOtherToThis, [other, proxy]);
return proxy;
}
const proxy2 = new ThisProxy(proxy, emptyForzenObject);
try {
otherReflectApply(otherWeakMapSet, mappingThisToOther, [proxy2, other]);
registerProxy(proxy2, handler);
} catch (e) {
throw new VMError('Unexpected error');
}
thisReflectApply(thisWeakMapSet, mappingOtherToThis, [other, proxy2]);
return proxy2;
}
function thisEnsureThis(other) {
const type = typeof other;
switch (type) {
case 'object':
case 'function':
if (other === null) {
return null;
} else {
let proto = thisReflectGetPrototypeOf(other);
if (!proto) {
return other;
}
while (proto) {
const mapping = thisReflectApply(thisMapGet, protoMappings, [proto]);
if (mapping) {
const mapped = thisReflectApply(thisWeakMapGet, mappingOtherToThis, [other]);
if (mapped) return mapped;
return mapping(defaultFactory, other);
}
proto = thisReflectGetPrototypeOf(proto);
}
return other;
}
case 'undefined':
case 'string':
case 'number':
case 'boolean':
case 'symbol':
case 'bigint':
return other;
default: // new, unknown types can be dangerous
throw new VMError(`Unknown type '${type}'`);
}
}
function thisFromOtherWithFactory(factory, other, proto) {
for (let loop = 0; loop < 10; loop++) {
const type = typeof other;
switch (type) {
case 'object':
case 'function':
if (other === null) {
return null;
} else {
const mapped = thisReflectApply(thisWeakMapGet, mappingOtherToThis, [other]);
if (mapped) return mapped;
if (proto) {
return thisProxyOther(factory, other, proto);
}
try {
proto = otherReflectGetPrototypeOf(other);
} catch (e) { // @other(unsafe)
other = e;
break;
}
if (!proto) {
return thisProxyOther(factory, other, null);
}
while (proto) {
const mapping = thisReflectApply(thisMapGet, protoMappings, [proto]);
if (mapping) return mapping(factory, other);
try {
proto = otherReflectGetPrototypeOf(proto);
} catch (e) { // @other(unsafe)
other = e;
break;
}
}
return thisProxyOther(factory, other, thisObjectPrototype);
}
case 'undefined':
case 'string':
case 'number':
case 'boolean':
case 'symbol':
case 'bigint':
return other;
default: // new, unknown types can be dangerous
throw new VMError(`Unknown type '${type}'`);
}
factory = defaultFactory;
proto = undefined;
}
throw new VMError('Exception recursion depth');
}
function thisFromOtherArguments(args) {
// Note: args@other(safe-array) returns@this(safe-array) throws@this(unsafe)
const arr = [];
for (let i = 0; i < args.length; i++) {
const value = thisFromOther(args[i]);
thisReflectDefineProperty(arr, i, {
__proto__: null,
value: value,
writable: true,
enumerable: true,
configurable: true
});
}
return arr;
}
function thisConnect(obj, other) {
// Note: obj@this(unsafe) other@other(unsafe) throws@this(unsafe)
try {
otherReflectApply(otherWeakMapSet, mappingThisToOther, [obj, other]);
} catch (e) {
throw new VMError('Unexpected error');
}
thisReflectApply(thisWeakMapSet, mappingOtherToThis, [other, obj]);
}
thisAddProtoMapping(thisGlobalPrototypes.Object, otherGlobalPrototypes.Object);
thisAddProtoMapping(thisGlobalPrototypes.Array, otherGlobalPrototypes.Array);
for (let i = 0; i < globalsList.length; i++) {
const key = globalsList[i];
const tp = thisGlobalPrototypes[key];
const op = otherGlobalPrototypes[key];
if (tp && op) thisAddProtoMapping(tp, op, key);
}
for (let i = 0; i < errorsList.length; i++) {
const key = errorsList[i];
const tp = thisGlobalPrototypes[key];
const op = otherGlobalPrototypes[key];
if (tp && op) thisAddProtoMapping(tp, op, 'Error');
}
thisAddProtoMapping(thisGlobalPrototypes.VMError, otherGlobalPrototypes.VMError, 'Error');
result.BaseHandler = BaseHandler;
result.ProtectedHandler = ProtectedHandler;
result.ReadOnlyHandler = ReadOnlyHandler;
result.ReadOnlyMockHandler = ReadOnlyMockHandler;
return result;
}
exports.createBridge = createBridge;
exports.VMError = VMError;
/***/ }),
/***/ 56400:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const {
VMError
} = __nccwpck_require__(82989);
let cacheCoffeeScriptCompiler;
/**
* Returns the cached coffee script compiler or loads it
* if it is not found in the cache.
*
* @private
* @return {compileCallback} The coffee script compiler.
* @throws {VMError} If the coffee-script module can't be found.
*/
function getCoffeeScriptCompiler() {
if (!cacheCoffeeScriptCompiler) {
try {
// The warning generated by webpack can be disabled by setting:
// ignoreWarnings[].message = /Can't resolve 'coffee-script'/
/* eslint-disable-next-line global-require */
const coffeeScript = __nccwpck_require__(8188);
cacheCoffeeScriptCompiler = (code, filename) => {
return coffeeScript.compile(code, {header: false, bare: true});
};
} catch (e) {
throw new VMError('Coffee-Script compiler is not installed.');
}
}
return cacheCoffeeScriptCompiler;
}
/**
* Remove the shebang from source code.
*
* @private
* @param {string} code - Code from which to remove the shebang.
* @return {string} code without the shebang.
*/
function removeShebang(code) {
if (!code.startsWith('#!')) return code;
return '//' + code.substring(2);
}
/**
* The JavaScript compiler, just a identity function.
*
* @private
* @type {compileCallback}
* @param {string} code - The JavaScript code.
* @param {string} filename - Filename of this script.
* @return {string} The code.
*/
function jsCompiler(code, filename) {
return removeShebang(code);
}
/**
* Look up the compiler for a specific name.
*
* @private
* @param {(string|compileCallback)} compiler - A compile callback or the name of the compiler.
* @return {compileCallback} The resolved compiler.
* @throws {VMError} If the compiler is unknown or the coffee script module was needed and couldn't be found.
*/
function lookupCompiler(compiler) {
if ('function' === typeof compiler) return compiler;
switch (compiler) {
case 'coffeescript':
case 'coffee-script':
case 'cs':
case 'text/coffeescript':
return getCoffeeScriptCompiler();
case 'javascript':
case 'java-script':
case 'js':
case 'text/javascript':
return jsCompiler;
default:
throw new VMError(`Unsupported compiler '${compiler}'.`);
}
}
exports.removeShebang = removeShebang;
exports.lookupCompiler = lookupCompiler;
/***/ }),
/***/ 74357:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const {
VMError
} = __nccwpck_require__(82989);
const {
VMScript
} = __nccwpck_require__(98611);
const {
VM
} = __nccwpck_require__(93841);
const {
NodeVM
} = __nccwpck_require__(76461);
exports.VMError = VMError;
exports.VMScript = VMScript;
exports.NodeVM = NodeVM;
exports.VM = VM;
/***/ }),
/***/ 76461:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* This callback will be called to resolve a module if it couldn't be found.
*
* @callback resolveCallback
* @param {string} moduleName - Name of the module used to resolve.
* @param {string} dirname - Name of the current directory.
* @return {(string|undefined)} The file or directory to use to load the requested module.
*/
/**
* This callback will be called to require a module instead of node's require.
*
* @callback customRequire
* @param {string} moduleName - Name of the module requested.
* @return {*} The required module object.
*/
const fs = __nccwpck_require__(35747);
const pa = __nccwpck_require__(85622);
const {
Script
} = __nccwpck_require__(92184);
const {
VMError
} = __nccwpck_require__(82989);
const {
VMScript,
MODULE_PREFIX,
STRICT_MODULE_PREFIX,
MODULE_SUFFIX
} = __nccwpck_require__(98611);
const {
transformer
} = __nccwpck_require__(33342);
const {
VM
} = __nccwpck_require__(93841);
const {
resolverFromOptions
} = __nccwpck_require__(81909);
const objectDefineProperty = Object.defineProperty;
const objectDefineProperties = Object.defineProperties;
/**
* Host objects
*
* @private
*/
const HOST = Object.freeze({
__proto__: null,
version: parseInt(process.versions.node.split('.')[0]),
process,
console,
setTimeout,
setInterval,
setImmediate,
clearTimeout,
clearInterval,
clearImmediate
});
/**
* Compile a script.
*
* @private
* @param {string} filename - Filename of the script.
* @param {string} script - Script.
* @return {vm.Script} The compiled script.
*/
function compileScript(filename, script) {
return new Script(script, {
__proto__: null,
filename,
displayErrors: false
});
}
let cacheSandboxScript = null;
let cacheMakeNestingScript = null;
const NESTING_OVERRIDE = Object.freeze({
__proto__: null,
vm2: vm2NestingLoader
});
/**
* Event caused by a <code>console.debug</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.debug"
* @type {...*}
*/
/**
* Event caused by a <code>console.log</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.log"
* @type {...*}
*/
/**
* Event caused by a <code>console.info</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.info"
* @type {...*}
*/
/**
* Event caused by a <code>console.warn</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.warn"
* @type {...*}
*/
/**
* Event caused by a <code>console.error</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.error"
* @type {...*}
*/
/**
* Event caused by a <code>console.dir</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.dir"
* @type {...*}
*/
/**
* Event caused by a <code>console.trace</code> call if <code>options.console="redirect"</code> is specified.
*
* @public
* @event NodeVM."console.trace"
* @type {...*}
*/
/**
* Class NodeVM.
*
* @public
* @extends {VM}
* @extends {EventEmitter}
*/
class NodeVM extends VM {
/**
* Create a new NodeVM instance.<br>
*
* Unlike VM, NodeVM lets you use require same way like in regular node.<br>
*
* However, it does not use the timeout.
*
* @public
* @param {Object} [options] - VM options.
* @param {Object} [options.sandbox] - Objects that will be copied into the global object of the sandbox.
* @param {(string|compileCallback)} [options.compiler="javascript"] - The compiler to use.
* @param {boolean} [options.eval=true] - Allow the dynamic evaluation of code via eval(code) or Function(code)().<br>
* Only available for node v10+.
* @param {boolean} [options.wasm=true] - Allow to run wasm code.<br>
* Only available for node v10+.
* @param {("inherit"|"redirect"|"off")} [options.console="inherit"] - Sets the behavior of the console in the sandbox.
* <code>inherit</code> to enable console, <code>redirect</code> to redirect to events, <code>off</code> to disable console.
* @param {Object|boolean} [options.require=false] - Allow require inside the sandbox.
* @param {(boolean|string[]|Object)} [options.require.external=false] - <b>WARNING: When allowing require the option <code>options.require.root</code>
* should be set to restrict the script from requiring any module. Values can be true, an array of allowed external modules or an object.
* @param {(string[])} [options.require.external.modules] - Array of allowed external modules. Also supports wildcards, so specifying ['@scope/*-ver-??],
* for instance, will allow using all modules having a name of the form @scope/something-ver-aa, @scope/other-ver-11, etc.
* @param {boolean} [options.require.external.transitive=false] - Boolean which indicates if transitive dependencies of external modules are allowed.
* @param {string[]} [options.require.builtin=[]] - Array of allowed built-in modules, accepts ["*"] for all.
* @param {(string|string[])} [options.require.root] - Restricted path(s) where local modules can be required. If omitted every path is allowed.
* @param {Object} [options.require.mock] - Collection of mock modules (both external or built-in).
* @param {("host"|"sandbox")} [options.require.context="host"] - <code>host</code> to require modules in host and proxy them to sandbox.
* <code>sandbox</code> to load, compile and require modules in sandbox.
* Builtin modules except <code>events</code> always required in host and proxied to sandbox.
* @param {string[]} [options.require.import] - Array of modules to be loaded into NodeVM on start.
* @param {resolveCallback} [options.require.resolve] - An additional lookup function in case a module wasn't
* found in one of the traditional node lookup paths.
* @param {customRequire} [options.require.customRequire=require] - Custom require to require host and built-in modules.
* @param {boolean} [options.nesting=false] -
* <b>WARNING: Allowing this is a security risk as scripts can create a NodeVM which can require any host module.</b>
* Allow nesting of VMs.
* @param {("commonjs"|"none")} [options.wrapper="commonjs"] - <code>commonjs</code> to wrap script into CommonJS wrapper,
* <code>none</code> to retrieve value returned by the script.
* @param {string[]} [options.sourceExtensions=["js"]] - Array of file extensions to treat as source code.
* @param {string[]} [options.argv=[]] - Array of arguments passed to <code>process.argv</code>.
* This object will not be copied and the script can change this object.
* @param {Object} [options.env={}] - Environment map passed to <code>process.env</code>.
* This object will not be copied and the script can change this object.
* @param {boolean} [options.strict=false] - If modules should be loaded in strict mode.
* @throws {VMError} If the compiler is unknown.
*/
constructor(options = {}) {
const {
compiler,
eval: allowEval,
wasm,
console: consoleType = 'inherit',
require: requireOpts = false,
nesting = false,
wrapper = 'commonjs',
sourceExtensions = ['js'],
argv,
env,
strict = false,
sandbox
} = options;
// Throw this early
if (sandbox && 'object' !== typeof sandbox) {
throw new VMError('Sandbox must be an object.');
}
super({__proto__: null, compiler: compiler, eval: allowEval, wasm});
// This is only here for backwards compatibility.
objectDefineProperty(this, 'options', {__proto__: null, value: {
console: consoleType,
require: requireOpts,
nesting,
wrapper,
sourceExtensions,
strict
}});
const resolver = resolverFromOptions(this, requireOpts, nesting && NESTING_OVERRIDE, this._compiler);
objectDefineProperty(this, '_resolver', {__proto__: null, value: resolver});
if (!cacheSandboxScript) {
cacheSandboxScript = compileScript(__nccwpck_require__.ab + "setup-node-sandbox.js",
`(function (host, data) { ${fs.readFileSync(`${__dirname}/setup-node-sandbox.js`, 'utf8')}\n})`);
}
const closure = this._runScript(cacheSandboxScript);
const extensions = {
__proto__: null
};
const loadJS = (mod, filename) => resolver.loadJS(this, mod, filename);
for (let i = 0; i < sourceExtensions.length; i++) {
extensions['.' + sourceExtensions[i]] = loadJS;
}
if (!extensions['.json']) extensions['.json'] = (mod, filename) => resolver.loadJSON(this, mod, filename);
if (!extensions['.node']) extensions['.node'] = (mod, filename) => resolver.loadNode(this, mod, filename);
this.readonly(HOST);
this.readonly(resolver);
this.readonly(this);
const {
Module,
jsonParse,
createRequireForModule
} = closure(HOST, {
__proto__: null,
argv,
env,
console: consoleType,
vm: this,
resolver,
extensions
});
objectDefineProperties(this, {
__proto__: null,
_Module: {__proto__: null, value: Module},
_jsonParse: {__proto__: null, value: jsonParse},
_createRequireForModule: {__proto__: null, value: createRequireForModule},
_cacheRequireModule: {__proto__: null, value: null, writable: true}
});
resolver.init(this, ()=>true);
// prepare global sandbox
if (sandbox) {
this.setGlobals(sandbox);
}
if (requireOpts && requireOpts.import) {
if (Array.isArray(requireOpts.import)) {
for (let i = 0, l = requireOpts.import.length; i < l; i++) {
this.require(requireOpts.import[i]);
}
} else {
this.require(requireOpts.import);
}
}
}
/**
* @ignore
* @deprecated Just call the method yourself like <code>method(args);</code>
* @param {function} method - Function to invoke.
* @param {...*} args - Arguments to pass to the function.
* @return {*} Return value of the function.
* @todo Can we remove this function? It even had a bug that would use args as this parameter.
* @throws {*} Rethrows anything the method throws.
* @throws {VMError} If method is not a function.
* @throws {Error} If method is a class.
*/
call(method, ...args) {
if ('function' === typeof method) {
return method(...args);
} else {
throw new VMError('Unrecognized method type.');
}
}
/**
* Require a module in VM and return it's exports.
*
* @public
* @param {string} module - Module name.
* @return {*} Exported module.
* @throws {*} If the module couldn't be found or loading it threw an error.
*/
require(module) {
const path = this._resolver.pathResolve('.');
let mod = this._cacheRequireModule;
if (!mod || mod.path !== path) {
mod = new (this._Module)(this._resolver.pathConcat(path, '/vm.js'), path);
this._cacheRequireModule = mod;
}
return mod.require(module);
}
/**
* Run the code in NodeVM.
*
* First time you run this method, code is executed same way like in node's regular `require` - it's executed with
* `module`, `require`, `exports`, `__dirname`, `__filename` variables and expect result in `module.exports'.
*
* @param {(string|VMScript)} code - Code to run.
* @param {(string|Object)} [options] - Options map or filename.
* @param {string} [options.filename="vm.js"] - Filename that shows up in any stack traces produced from this script.<br>
* This is only used if code is a String.
* @param {boolean} [options.strict] - If modules should be loaded in strict mode. Defaults to NodeVM options.
* @param {("commonjs"|"none")} [options.wrapper] - <code>commonjs</code> to wrap script into CommonJS wrapper,
* <code>none</code> to retrieve value returned by the script. Defaults to NodeVM options.
* @return {*} Result of executed code.
* @throws {SyntaxError} If there is a syntax error in the script.
* @throws {*} If the script execution terminated with an exception it is propagated.
* @fires NodeVM."console.debug"
* @fires NodeVM."console.log"
* @fires NodeVM."console.info"
* @fires NodeVM."console.warn"
* @fires NodeVM."console.error"
* @fires NodeVM."console.dir"
* @fires NodeVM."console.trace"
*/
run(code, options) {
let script;
let filename;
if (typeof options === 'object') {
filename = options.filename;
} else {
filename = options;
options = {__proto__: null};
}
const {
strict = this.options.strict,
wrapper = this.options.wrapper,
module: customModule,
require: customRequire,
dirname: customDirname = null
} = options;
let sandboxModule = customModule;
let dirname = customDirname;
if (code instanceof VMScript) {
script = strict ? code._compileNodeVMStrict() : code._compileNodeVM();
if (!sandboxModule) {
const resolvedFilename = this._resolver.pathResolve(code.filename);
dirname = this._resolver.pathDirname(resolvedFilename);
sandboxModule = new (this._Module)(resolvedFilename, dirname);
this._resolver.registerModule(sandboxModule, resolvedFilename, dirname, null, false);
}
} else {
const unresolvedFilename = filename || 'vm.js';
if (!sandboxModule) {
if (filename) {
const resolvedFilename = this._resolver.pathResolve(filename);
dirname = this._resolver.pathDirname(resolvedFilename);
sandboxModule = new (this._Module)(resolvedFilename, dirname);
this._resolver.registerModule(sandboxModule, resolvedFilename, dirname, null, false);
} else {
sandboxModule = new (this._Module)(null, null);
sandboxModule.id = unresolvedFilename;
}
}
const prefix = strict ? STRICT_MODULE_PREFIX : MODULE_PREFIX;
let scriptCode = prefix + this._compiler(code, unresolvedFilename) + MODULE_SUFFIX;
scriptCode = transformer(null, scriptCode, false, false).code;
script = new Script(scriptCode, {
__proto__: null,
filename: unresolvedFilename,
displayErrors: false
});
}
const closure = this._runScript(script);
const usedRequire = customRequire || this._createRequireForModule(sandboxModule);
const ret = Reflect.apply(closure, this.sandbox, [sandboxModule.exports, usedRequire, sandboxModule, filename, dirname]);
return wrapper === 'commonjs' ? sandboxModule.exports : ret;
}
/**
* Create NodeVM and run code inside it.
*
* @public
* @static
* @param {string} script - Code to execute.
* @param {string} [filename] - File name (used in stack traces only).
* @param {Object} [options] - VM options.
* @param {string} [options.filename] - File name (used in stack traces only). Used if <code>filename</code> is omitted.
* @return {*} Result of executed code.
* @see {@link NodeVM} for the options.
* @throws {SyntaxError} If there is a syntax error in the script.
* @throws {*} If the script execution terminated with an exception it is propagated.
*/
static code(script, filename, options) {
let unresolvedFilename;
if (filename != null) {
if ('object' === typeof filename) {
options = filename;
unresolvedFilename = options.filename;
} else if ('string' === typeof filename) {
unresolvedFilename = filename;
} else {
throw new VMError('Invalid arguments.');
}
} else if ('object' === typeof options) {
unresolvedFilename = options.filename;
}
if (arguments.length > 3) {
throw new VMError('Invalid number of arguments.');
}
const resolvedFilename = typeof unresolvedFilename === 'string' ? pa.resolve(unresolvedFilename) : undefined;
return new NodeVM(options).run(script, resolvedFilename);
}
/**
* Create NodeVM and run script from file inside it.
*
* @public
* @static
* @param {string} filename - Filename of file to load and execute in a NodeVM.
* @param {Object} [options] - NodeVM options.
* @return {*} Result of executed code.
* @see {@link NodeVM} for the options.
* @throws {Error} If filename is not a valid filename.
* @throws {SyntaxError} If there is a syntax error in the script.
* @throws {*} If the script execution terminated with an exception it is propagated.
*/
static file(filename, options) {
const resolvedFilename = pa.resolve(filename);
if (!fs.existsSync(resolvedFilename)) {
throw new VMError(`Script '${filename}' not found.`);
}
if (fs.statSync(resolvedFilename).isDirectory()) {
throw new VMError('Script must be file, got directory.');
}
return new NodeVM(options).run(fs.readFileSync(resolvedFilename, 'utf8'), resolvedFilename);
}
}
function vm2NestingLoader(resolver, vm, id) {
if (!cacheMakeNestingScript) {
cacheMakeNestingScript = compileScript('nesting.js', '(vm, nodevm) => ({VM: vm, NodeVM: nodevm})');
}
const makeNesting = vm._runScript(cacheMakeNestingScript);
return makeNesting(vm.readonly(VM), vm.readonly(NodeVM));
}
exports.NodeVM = NodeVM;
/***/ }),
/***/ 81909:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
// Translate the old options to the new Resolver functionality.
const fs = __nccwpck_require__(35747);
const pa = __nccwpck_require__(85622);
const nmod = __nccwpck_require__(32282);
const {EventEmitter} = __nccwpck_require__(28614);
const util = __nccwpck_require__(31669);
const {
Resolver,
DefaultResolver
} = __nccwpck_require__(18038);
const {VMScript} = __nccwpck_require__(98611);
const {VM} = __nccwpck_require__(93841);
const {VMError} = __nccwpck_require__(82989);
/**
* Require wrapper to be able to annotate require with webpackIgnore.
*
* @private
* @param {string} moduleName - Name of module to load.
* @return {*} Module exports.
*/
function defaultRequire(moduleName) {
// Set module.parser.javascript.commonjsMagicComments=true in your webpack config.
// eslint-disable-next-line global-require
return require(/* webpackIgnore: true */ moduleName);
}
// source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
function escapeRegExp(string) {
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}
function makeExternalMatcherRegex(obj) {
return escapeRegExp(obj).replace(/\\\\|\//g, '[\\\\/]')
.replace(/\\\*\\\*/g, '.*').replace(/\\\*/g, '[^\\\\/]*').replace(/\\\?/g, '[^\\\\/]');
}
function makeExternalMatcher(obj) {
const regexString = makeExternalMatcherRegex(obj);
return new RegExp(`[\\\\/]node_modules[\\\\/]${regexString}(?:[\\\\/](?!(?:.*[\\\\/])?node_modules[\\\\/]).*)?$`);
}
class LegacyResolver extends DefaultResolver {
constructor(builtinModules, checkPath, globalPaths, pathContext, customResolver, hostRequire, compiler, externals, allowTransitive) {
super(builtinModules, checkPath, globalPaths, pathContext, customResolver, hostRequire, compiler);
this.externals = externals;
this.currMod = undefined;
this.trustedMods = new WeakMap();
this.allowTransitive = allowTransitive;
}
isPathAllowed(path) {
return this.isPathAllowedForModule(path, this.currMod);
}
isPathAllowedForModule(path, mod) {
if (!super.isPathAllowed(path)) return false;
if (mod) {
if (mod.allowTransitive) return true;
if (path.startsWith(mod.path)) {
const rem = path.slice(mod.path.length);
if (!/(?:^|[\\\\/])node_modules(?:$|[\\\\/])/.test(rem)) return true;
}
}
return this.externals.some(regex => regex.test(path));
}
registerModule(mod, filename, path, parent, direct) {
const trustedParent = this.trustedMods.get(parent);
this.trustedMods.set(mod, {
filename,
path,
paths: this.genLookupPaths(path),
allowTransitive: this.allowTransitive &&
((direct && trustedParent && trustedParent.allowTransitive) || this.externals.some(regex => regex.test(filename)))
});
}
resolveFull(mod, x, options, ext, direct) {
this.currMod = undefined;
if (!direct) return super.resolveFull(mod, x, options, ext, false);
const trustedMod = this.trustedMods.get(mod);
if (!trustedMod || mod.path !== trustedMod.path) return super.resolveFull(mod, x, options, ext, false);
const paths = [...mod.paths];
if (paths.length === trustedMod.length) {
for (let i = 0; i < paths.length; i++) {
if (paths[i] !== trustedMod.paths[i]) {
return super.resolveFull(mod, x, options, ext, false);
}
}
}
const extCopy = Object.assign({__proto__: null}, ext);
try {
this.currMod = trustedMod;
return super.resolveFull(trustedMod, x, undefined, extCopy, true);
} finally {
this.currMod = undefined;
}
}
checkAccess(mod, filename) {
const trustedMod = this.trustedMods.get(mod);
if ((!trustedMod || trustedMod.filename !== filename) && !this.isPathAllowedForModule(filename, undefined)) {
throw new VMError(`Module '${filename}' is not allowed to be required. The path is outside the border!`, 'EDENIED');
}
}
loadJS(vm, mod, filename) {
filename = this.pathResolve(filename);
this.checkAccess(mod, filename);
if (this.pathContext(filename, 'js') === 'sandbox') {
const trustedMod = this.trustedMods.get(mod);
const script = this.readScript(filename);
vm.run(script, {filename, strict: true, module: mod, wrapper: 'none', dirname: trustedMod ? trustedMod.path : mod.path});
} else {
const m = this.hostRequire(filename);
mod.exports = vm.readonly(m);
}
}
}
function defaultBuiltinLoader(resolver, vm, id) {
const mod = resolver.hostRequire(id);
return vm.readonly(mod);
}
const eventsModules = new WeakMap();
function defaultBuiltinLoaderEvents(resolver, vm, id) {
return eventsModules.get(vm);
}
let cacheBufferScript;
function defaultBuiltinLoaderBuffer(resolver, vm, id) {
if (!cacheBufferScript) {
cacheBufferScript = new VMScript('return buffer=>({Buffer: buffer});', {__proto__: null, filename: 'buffer.js'});
}
const makeBuffer = vm.run(cacheBufferScript, {__proto__: null, strict: true, wrapper: 'none'});
return makeBuffer(Buffer);
}
let cacheUtilScript;
function defaultBuiltinLoaderUtil(resolver, vm, id) {
if (!cacheUtilScript) {
cacheUtilScript = new VMScript(`return function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
Object.setPrototypeOf(ctor.prototype, superCtor.prototype);
}`, {__proto__: null, filename: 'util.js'});
}
const inherits = vm.run(cacheUtilScript, {__proto__: null, strict: true, wrapper: 'none'});
const copy = Object.assign({}, util);
copy.inherits = inherits;
return vm.readonly(copy);
}
const BUILTIN_MODULES = (nmod.builtinModules || Object.getOwnPropertyNames(process.binding('natives'))).filter(s=>!s.startsWith('internal/'));
let EventEmitterReferencingAsyncResourceClass = null;
if (EventEmitter.EventEmitterAsyncResource) {
// eslint-disable-next-line global-require
const {AsyncResource} = __nccwpck_require__(77303);
const kEventEmitter = Symbol('kEventEmitter');
class EventEmitterReferencingAsyncResource extends AsyncResource {
constructor(ee, type, options) {
super(type, options);
this[kEventEmitter] = ee;
}
get eventEmitter() {
return this[kEventEmitter];
}
}
EventEmitterReferencingAsyncResourceClass = EventEmitterReferencingAsyncResource;
}
let cacheEventsScript;
const SPECIAL_MODULES = {
events(vm) {
if (!cacheEventsScript) {
const eventsSource = fs.readFileSync(__nccwpck_require__.ab + "events.js", 'utf8');
cacheEventsScript = new VMScript(`(function (fromhost) { const module = {}; module.exports={};{ ${eventsSource}
} return module.exports;})`, {filename: 'events.js'});
}
const closure = VM.prototype.run.call(vm, cacheEventsScript);
const eventsInstance = closure(vm.readonly({
kErrorMonitor: EventEmitter.errorMonitor,
once: EventEmitter.once,
on: EventEmitter.on,
getEventListeners: EventEmitter.getEventListeners,
EventEmitterReferencingAsyncResource: EventEmitterReferencingAsyncResourceClass
}));
eventsModules.set(vm, eventsInstance);
vm._addProtoMapping(EventEmitter.prototype, eventsInstance.EventEmitter.prototype);
return defaultBuiltinLoaderEvents;
},
buffer(vm) {
return defaultBuiltinLoaderBuffer;
},
util(vm) {
return defaultBuiltinLoaderUtil;
}
};
function addDefaultBuiltin(builtins, key, vm) {
if (builtins[key]) return;
const special = SPECIAL_MODULES[key];
builtins[key] = special ? special(vm) : defaultBuiltinLoader;
}
function genBuiltinsFromOptions(vm, builtinOpt, mockOpt, override) {
const builtins = {__proto__: null};
if (mockOpt) {
const keys = Object.getOwnPropertyNames(mockOpt);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
builtins[key] = (resolver, tvm, id) => tvm.readonly(mockOpt[key]);
}
}
if (override) {
const keys = Object.getOwnPropertyNames(override);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
builtins[key] = override[key];
}
}
if (Array.isArray(builtinOpt)) {
const def = builtinOpt.indexOf('*') >= 0;
if (def) {
for (let i = 0; i < BUILTIN_MODULES.length; i++) {
const name = BUILTIN_MODULES[i];
if (builtinOpt.indexOf(`-${name}`) === -1) {
addDefaultBuiltin(builtins, name, vm);
}
}
} else {
for (let i = 0; i < BUILTIN_MODULES.length; i++) {
const name = BUILTIN_MODULES[i];
if (builtinOpt.indexOf(name) !== -1) {
addDefaultBuiltin(builtins, name, vm);
}
}
}
} else if (builtinOpt) {
for (let i = 0; i < BUILTIN_MODULES.length; i++) {
const name = BUILTIN_MODULES[i];
if (builtinOpt[name]) {
addDefaultBuiltin(builtins, name, vm);
}
}
}
return builtins;
}
function defaultCustomResolver() {
return undefined;
}
const DENY_RESOLVER = new Resolver({__proto__: null}, [], id => {
throw new VMError(`Access denied to require '${id}'`, 'EDENIED');
});
function resolverFromOptions(vm, options, override, compiler) {
if (!options) {
if (!override) return DENY_RESOLVER;
const builtins = genBuiltinsFromOptions(vm, undefined, undefined, override);
return new Resolver(builtins, [], defaultRequire);
}
const {
builtin: builtinOpt,
mock: mockOpt,
external: externalOpt,
root: rootPaths,
resolve: customResolver,
customRequire: hostRequire = defaultRequire,
context = 'host'
} = options;
const builtins = genBuiltinsFromOptions(vm, builtinOpt, mockOpt, override);
if (!externalOpt) return new Resolver(builtins, [], hostRequire);
let checkPath;
if (rootPaths) {
const checkedRootPaths = (Array.isArray(rootPaths) ? rootPaths : [rootPaths]).map(f => pa.resolve(f));
checkPath = (filename) => {
return checkedRootPaths.some(path => {
if (!filename.startsWith(path)) return false;
const len = path.length;
if (filename.length === len) return true;
const sep = filename[len];
return sep === '/' || sep === pa.sep;
});
};
} else {
checkPath = () => true;
}
let newCustomResolver = defaultCustomResolver;
let externals = undefined;
let external = undefined;
if (customResolver) {
let externalCache;
newCustomResolver = (resolver, x, path, extList) => {
if (external && !(resolver.pathIsAbsolute(x) || resolver.pathIsRelative(x))) {
if (!externalCache) {
externalCache = external.map(ext => new RegExp(makeExternalMatcherRegex(ext)));
}
if (!externalCache.some(regex => regex.test(x))) return undefined;
}
const resolved = customResolver(x, path);
if (!resolved) return undefined;
if (externals) externals.push(new RegExp('^' + escapeRegExp(resolved)));
return resolver.loadAsFileOrDirecotry(resolved, extList);
};
}
if (typeof externalOpt !== 'object') {
return new DefaultResolver(builtins, checkPath, [], () => context, newCustomResolver, hostRequire, compiler);
}
let transitive = false;
if (Array.isArray(externalOpt)) {
external = externalOpt;
} else {
external = externalOpt.modules;
transitive = context === 'sandbox' && externalOpt.transitive;
}
externals = external.map(makeExternalMatcher);
return new LegacyResolver(builtins, checkPath, [], () => context, newCustomResolver, hostRequire, compiler, externals, transitive);
}
exports.resolverFromOptions = resolverFromOptions;
/***/ }),
/***/ 18038:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
// The Resolver is currently experimental and might be exposed to users in the future.
const pa = __nccwpck_require__(85622);
const fs = __nccwpck_require__(35747);
const {
VMError
} = __nccwpck_require__(82989);
const { VMScript } = __nccwpck_require__(98611);
// This should match. Note that '\', '%' are invalid characters
// 1. name/.*
// 2. @scope/name/.*
const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^/\\%]+)(\/.*)?$/;
// See https://tc39.es/ecma262/#integer-index
function isArrayIndex(key) {
const keyNum = +key;
if (`${keyNum}` !== key) return false;
return keyNum >= 0 && keyNum < 0xFFFFFFFF;
}
class Resolver {
constructor(builtinModules, globalPaths, hostRequire) {
this.builtinModules = builtinModules;
this.globalPaths = globalPaths;
this.hostRequire = hostRequire;
}
init(vm) {
}
pathResolve(path) {
return pa.resolve(path);
}
pathIsRelative(path) {
if (path === '' || path[0] !== '.') return false;
if (path.length === 1) return true;
const idx = path[1] === '.' ? 2 : 1;
if (path.length <= idx) return false;
return path[idx] === '/' || path[idx] === pa.sep;
}
pathIsAbsolute(path) {
return pa.isAbsolute(path);
}
pathConcat(...paths) {
return pa.join(...paths);
}
pathBasename(path) {
return pa.basename(path);
}
pathDirname(path) {
return pa.dirname(path);
}
lookupPaths(mod, id) {
if (typeof id === 'string') throw new Error('Id is not a string');
if (this.pathIsRelative(id)) return [mod.path || '.'];
return [...mod.paths, ...this.globalPaths];
}
getBuiltinModulesList() {
return Object.getOwnPropertyNames(this.builtinModules);
}
loadBuiltinModule(vm, id) {
const handler = this.builtinModules[id];
return handler && handler(this, vm, id);
}
loadJS(vm, mod, filename) {
throw new VMError(`Access denied to require '${filename}'`, 'EDENIED');
}
loadJSON(vm, mod, filename) {
throw new VMError(`Access denied to require '${filename}'`, 'EDENIED');
}
loadNode(vm, mod, filename) {
throw new VMError(`Access denied to require '${filename}'`, 'EDENIED');
}
registerModule(mod, filename, path, parent, direct) {
}
resolve(mod, x, options, ext, direct) {
if (typeof x !== 'string') throw new Error('Id is not a string');
if (x.startsWith('node:') || this.builtinModules[x]) {
// a. return the core module
// b. STOP
return x;
}
return this.resolveFull(mod, x, options, ext, direct);
}
resolveFull(mod, x, options, ext, direct) {
// 7. THROW "not found"
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
}
// NODE_MODULES_PATHS(START)
genLookupPaths(path) {
// 1. let PARTS = path split(START)
// 2. let I = count of PARTS - 1
// 3. let DIRS = []
const dirs = [];
// 4. while I >= 0,
while (true) {
const name = this.pathBasename(path);
// a. if PARTS[I] = "node_modules" CONTINUE
if (name !== 'node_modules') {
// b. DIR = path join(PARTS[0 .. I] + "node_modules")
// c. DIRS = DIR + DIRS // Note: this seems wrong. Should be DIRS + DIR
dirs.push(this.pathConcat(path, 'node_modules'));
}
const dir = this.pathDirname(path);
if (dir == path) break;
// d. let I = I - 1
path = dir;
}
return dirs;
// This is done later on
// 5. return DIRS + GLOBAL_FOLDERS
}
}
class DefaultResolver extends Resolver {
constructor(builtinModules, checkPath, globalPaths, pathContext, customResolver, hostRequire, compiler) {
super(builtinModules, globalPaths, hostRequire);
this.checkPath = checkPath;
this.pathContext = pathContext;
this.customResolver = customResolver;
this.compiler = compiler;
this.packageCache = {__proto__: null};
this.scriptCache = {__proto__: null};
}
isPathAllowed(path) {
return this.checkPath(path);
}
pathTestIsDirectory(path) {
try {
const stat = fs.statSync(path, {__proto__: null, throwIfNoEntry: false});
return stat && stat.isDirectory();
} catch (e) {
return false;
}
}
pathTestIsFile(path) {
try {
const stat = fs.statSync(path, {__proto__: null, throwIfNoEntry: false});
return stat && stat.isFile();
} catch (e) {
return false;
}
}
readFile(path) {
return fs.readFileSync(path, {encoding: 'utf8'});
}
readFileWhenExists(path) {
return this.pathTestIsFile(path) ? this.readFile(path) : undefined;
}
readScript(filename) {
let script = this.scriptCache[filename];
if (!script) {
script = new VMScript(this.readFile(filename), {filename, compiler: this.compiler});
this.scriptCache[filename] = script;
}
return script;
}
checkAccess(mod, filename) {
if (!this.isPathAllowed(filename)) {
throw new VMError(`Module '${filename}' is not allowed to be required. The path is outside the border!`, 'EDENIED');
}
}
loadJS(vm, mod, filename) {
filename = this.pathResolve(filename);
this.checkAccess(mod, filename);
if (this.pathContext(filename, 'js') === 'sandbox') {
const script = this.readScript(filename);
vm.run(script, {filename, strict: true, module: mod, wrapper: 'none', dirname: mod.path});
} else {
const m = this.hostRequire(filename);
mod.exports = vm.readonly(m);
}
}
loadJSON(vm, mod, filename) {
filename = this.pathResolve(filename);
this.checkAccess(mod, filename);
const json = this.readFile(filename);
mod.exports = vm._jsonParse(json);
}
loadNode(vm, mod, filename) {
filename = this.pathResolve(filename);
this.checkAccess(mod, filename);
if (this.pathContext(filename, 'node') === 'sandbox') throw new VMError('Native modules can be required only with context set to \'host\'.');
const m = this.hostRequire(filename);
mod.exports = vm.readonly(m);
}
// require(X) from module at path Y
resolveFull(mod, x, options, ext, direct) {
// Note: core module handled by caller
const extList = Object.getOwnPropertyNames(ext);
const path = mod.path || '.';
// 5. LOAD_PACKAGE_SELF(X, dirname(Y))
let f = this.loadPackageSelf(x, path, extList);
if (f) return f;
// 4. If X begins with '#'
if (x[0] === '#') {
// a. LOAD_PACKAGE_IMPORTS(X, dirname(Y))
f = this.loadPackageImports(x, path, extList);
if (f) return f;
}
// 2. If X begins with '/'
if (this.pathIsAbsolute(x)) {
// a. set Y to be the filesystem root
f = this.loadAsFileOrDirecotry(x, extList);
if (f) return f;
// c. THROW "not found"
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
// 3. If X begins with './' or '/' or '../'
} else if (this.pathIsRelative(x)) {
if (typeof options === 'object' && options !== null) {
const paths = options.paths;
if (Array.isArray(paths)) {
for (let i = 0; i < paths.length; i++) {
// a. LOAD_AS_FILE(Y + X)
// b. LOAD_AS_DIRECTORY(Y + X)
f = this.loadAsFileOrDirecotry(this.pathConcat(paths[i], x), extList);
if (f) return f;
}
} else if (paths === undefined) {
// a. LOAD_AS_FILE(Y + X)
// b. LOAD_AS_DIRECTORY(Y + X)
f = this.loadAsFileOrDirecotry(this.pathConcat(path, x), extList);
if (f) return f;
} else {
throw new VMError('Invalid options.paths option.');
}
} else {
// a. LOAD_AS_FILE(Y + X)
// b. LOAD_AS_DIRECTORY(Y + X)
f = this.loadAsFileOrDirecotry(this.pathConcat(path, x), extList);
if (f) return f;
}
// c. THROW "not found"
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
}
let dirs;
if (typeof options === 'object' && options !== null) {
const paths = options.paths;
if (Array.isArray(paths)) {
dirs = [];
for (let i = 0; i < paths.length; i++) {
const lookups = this.genLookupPaths(paths[i]);
for (let j = 0; j < lookups.length; j++) {
if (!dirs.includes(lookups[j])) dirs.push(lookups[j]);
}
if (i === 0) {
const globalPaths = this.globalPaths;
for (let j = 0; j < globalPaths.length; j++) {
if (!dirs.includes(globalPaths[j])) dirs.push(globalPaths[j]);
}
}
}
} else if (paths === undefined) {
dirs = [...mod.paths, ...this.globalPaths];
} else {
throw new VMError('Invalid options.paths option.');
}
} else {
dirs = [...mod.paths, ...this.globalPaths];
}
// 6. LOAD_NODE_MODULES(X, dirname(Y))
f = this.loadNodeModules(x, dirs, extList);
if (f) return f;
f = this.customResolver(this, x, path, extList);
if (f) return f;
return super.resolveFull(mod, x, options, ext, direct);
}
loadAsFileOrDirecotry(x, extList) {
// a. LOAD_AS_FILE(X)
const f = this.loadAsFile(x, extList);
if (f) return f;
// b. LOAD_AS_DIRECTORY(X)
return this.loadAsDirectory(x, extList);
}
tryFile(x) {
x = this.pathResolve(x);
return this.isPathAllowed(x) && this.pathTestIsFile(x) ? x : undefined;
}
tryWithExtension(x, extList) {
for (let i = 0; i < extList.length; i++) {
const ext = extList[i];
if (ext !== this.pathBasename(ext)) continue;
const f = this.tryFile(x + ext);
if (f) return f;
}
return undefined;
}
readPackage(path) {
const packagePath = this.pathResolve(this.pathConcat(path, 'package.json'));
const cache = this.packageCache[packagePath];
if (cache !== undefined) return cache;
if (!this.isPathAllowed(packagePath)) return undefined;
const content = this.readFileWhenExists(packagePath);
if (!content) {
this.packageCache[packagePath] = false;
return false;
}
let parsed;
try {
parsed = JSON.parse(content);
} catch (e) {
e.path = packagePath;
e.message = 'Error parsing ' + packagePath + ': ' + e.message;
throw e;
}
const filtered = {
name: parsed.name,
main: parsed.main,
exports: parsed.exports,
imports: parsed.imports,
type: parsed.type
};
this.packageCache[packagePath] = filtered;
return filtered;
}
readPackageScope(path) {
while (true) {
const dir = this.pathDirname(path);
if (dir === path) break;
const basename = this.pathBasename(dir);
if (basename === 'node_modules') break;
const pack = this.readPackage(dir);
if (pack) return {data: pack, scope: dir};
path = dir;
}
return {data: undefined, scope: undefined};
}
// LOAD_AS_FILE(X)
loadAsFile(x, extList) {
// 1. If X is a file, load X as its file extension format. STOP
const f = this.tryFile(x);
if (f) return f;
// 2. If X.js is a file, load X.js as JavaScript text. STOP
// 3. If X.json is a file, parse X.json to a JavaScript Object. STOP
// 4. If X.node is a file, load X.node as binary addon. STOP
return this.tryWithExtension(x, extList);
}
// LOAD_INDEX(X)
loadIndex(x, extList) {
// 1. If X/index.js is a file, load X/index.js as JavaScript text. STOP
// 2. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP
// 3. If X/index.node is a file, load X/index.node as binary addon. STOP
return this.tryWithExtension(this.pathConcat(x, 'index'), extList);
}
// LOAD_AS_DIRECTORY(X)
loadAsPackage(x, pack, extList) {
// 1. If X/package.json is a file,
// already done.
if (pack) {
// a. Parse X/package.json, and look for "main" field.
// b. If "main" is a falsy value, GOTO 2.
if (typeof pack.main === 'string') {
// c. let M = X + (json main field)
const m = this.pathConcat(x, pack.main);
// d. LOAD_AS_FILE(M)
let f = this.loadAsFile(m, extList);
if (f) return f;
// e. LOAD_INDEX(M)
f = this.loadIndex(m, extList);
if (f) return f;
// f. LOAD_INDEX(X) DEPRECATED
f = this.loadIndex(x, extList);
if (f) return f;
// g. THROW "not found"
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
}
}
// 2. LOAD_INDEX(X)
return this.loadIndex(x, extList);
}
// LOAD_AS_DIRECTORY(X)
loadAsDirectory(x, extList) {
// 1. If X/package.json is a file,
const pack = this.readPackage(x);
return this.loadAsPackage(x, pack, extList);
}
// LOAD_NODE_MODULES(X, START)
loadNodeModules(x, dirs, extList) {
// 1. let DIRS = NODE_MODULES_PATHS(START)
// This step is already done.
// 2. for each DIR in DIRS:
for (let i = 0; i < dirs.length; i++) {
const dir = dirs[i];
// a. LOAD_PACKAGE_EXPORTS(X, DIR)
let f = this.loadPackageExports(x, dir, extList);
if (f) return f;
// b. LOAD_AS_FILE(DIR/X)
f = this.loadAsFile(dir + '/' + x, extList);
if (f) return f;
// c. LOAD_AS_DIRECTORY(DIR/X)
f = this.loadAsDirectory(dir + '/' + x, extList);
if (f) return f;
}
return undefined;
}
// LOAD_PACKAGE_IMPORTS(X, DIR)
loadPackageImports(x, dir, extList) {
// 1. Find the closest package scope SCOPE to DIR.
const {data, scope} = this.readPackageScope(dir);
// 2. If no scope was found, return.
if (!data) return undefined;
// 3. If the SCOPE/package.json "imports" is null or undefined, return.
if (typeof data.imports !== 'object' || data.imports === null || Array.isArray(data.imports)) return undefined;
// 4. let MATCH = PACKAGE_IMPORTS_RESOLVE(X, pathToFileURL(SCOPE),
// ["node", "require"]) defined in the ESM resolver.
// PACKAGE_IMPORTS_RESOLVE(specifier, parentURL, conditions)
// 1. Assert: specifier begins with "#".
// 2. If specifier is exactly equal to "#" or starts with "#/", then
if (x === '#' || x.startsWith('#/')) {
// a. Throw an Invalid Module Specifier error.
throw new VMError(`Invalid module specifier '${x}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// 3. Let packageURL be the result of LOOKUP_PACKAGE_SCOPE(parentURL).
// Note: packageURL === parentURL === scope
// 4. If packageURL is not null, then
// Always true
// a. Let pjson be the result of READ_PACKAGE_JSON(packageURL).
// pjson === data
// b. If pjson.imports is a non-null Object, then
// Already tested
// x. Let resolved be the result of PACKAGE_IMPORTS_EXPORTS_RESOLVE( specifier, pjson.imports, packageURL, true, conditions).
const match = this.packageImportsExportsResolve(x, data.imports, scope, true, ['node', 'require'], extList);
// y. If resolved is not null or undefined, return resolved.
if (!match) {
// 5. Throw a Package Import Not Defined error.
throw new VMError(`Package import not defined for '${x}'`, 'ERR_PACKAGE_IMPORT_NOT_DEFINED');
}
// END PACKAGE_IMPORTS_RESOLVE
// 5. RESOLVE_ESM_MATCH(MATCH).
return this.resolveEsmMatch(match, x, extList);
}
// LOAD_PACKAGE_EXPORTS(X, DIR)
loadPackageExports(x, dir, extList) {
// 1. Try to interpret X as a combination of NAME and SUBPATH where the name
// may have a @scope/ prefix and the subpath begins with a slash (`/`).
const res = x.match(EXPORTS_PATTERN);
// 2. If X does not match this pattern or DIR/NAME/package.json is not a file,
// return.
if (!res) return undefined;
const scope = this.pathConcat(dir, res[1]);
const pack = this.readPackage(scope);
if (!pack) return undefined;
// 3. Parse DIR/NAME/package.json, and look for "exports" field.
// 4. If "exports" is null or undefined, return.
if (!pack.exports) return undefined;
// 5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(DIR/NAME), "." + SUBPATH,
// `package.json` "exports", ["node", "require"]) defined in the ESM resolver.
const match = this.packageExportsResolve(scope, '.' + (res[2] || ''), pack.exports, ['node', 'require'], extList);
// 6. RESOLVE_ESM_MATCH(MATCH)
return this.resolveEsmMatch(match, x, extList);
}
// LOAD_PACKAGE_SELF(X, DIR)
loadPackageSelf(x, dir, extList) {
// 1. Find the closest package scope SCOPE to DIR.
const {data, scope} = this.readPackageScope(dir);
// 2. If no scope was found, return.
if (!data) return undefined;
// 3. If the SCOPE/package.json "exports" is null or undefined, return.
if (!data.exports) return undefined;
// 4. If the SCOPE/package.json "name" is not the first segment of X, return.
if (x !== data.name && !x.startsWith(data.name + '/')) return undefined;
// 5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(SCOPE),
// "." + X.slice("name".length), `package.json` "exports", ["node", "require"])
// defined in the ESM resolver.
const match = this.packageExportsResolve(scope, '.' + x.slice(data.name.length), data.exports, ['node', 'require'], extList);
// 6. RESOLVE_ESM_MATCH(MATCH)
return this.resolveEsmMatch(match, x, extList);
}
// RESOLVE_ESM_MATCH(MATCH)
resolveEsmMatch(match, x, extList) {
// 1. let { RESOLVED, EXACT } = MATCH
const resolved = match;
const exact = true;
// 2. let RESOLVED_PATH = fileURLToPath(RESOLVED)
const resolvedPath = resolved;
let f;
// 3. If EXACT is true,
if (exact) {
// a. If the file at RESOLVED_PATH exists, load RESOLVED_PATH as its extension
// format. STOP
f = this.tryFile(resolvedPath);
// 4. Otherwise, if EXACT is false,
} else {
// a. LOAD_AS_FILE(RESOLVED_PATH)
// b. LOAD_AS_DIRECTORY(RESOLVED_PATH)
f = this.loadAsFileOrDirecotry(resolvedPath, extList);
}
if (f) return f;
// 5. THROW "not found"
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
}
// PACKAGE_EXPORTS_RESOLVE(packageURL, subpath, exports, conditions)
packageExportsResolve(packageURL, subpath, rexports, conditions, extList) {
// 1. If exports is an Object with both a key starting with "." and a key not starting with ".", throw an Invalid Package Configuration error.
let hasDots = false;
if (typeof rexports === 'object' && !Array.isArray(rexports)) {
const keys = Object.getOwnPropertyNames(rexports);
if (keys.length > 0) {
hasDots = keys[0][0] === '.';
for (let i = 0; i < keys.length; i++) {
if (hasDots !== (keys[i][0] === '.')) {
throw new VMError('Invalid package configuration', 'ERR_INVALID_PACKAGE_CONFIGURATION');
}
}
}
}
// 2. If subpath is equal to ".", then
if (subpath === '.') {
// a. Let mainExport be undefined.
let mainExport = undefined;
// b. If exports is a String or Array, or an Object containing no keys starting with ".", then
if (typeof rexports === 'string' || Array.isArray(rexports) || !hasDots) {
// x. Set mainExport to exports.
mainExport = rexports;
// c. Otherwise if exports is an Object containing a "." property, then
} else if (hasDots) {
// x. Set mainExport to exports["."].
mainExport = rexports['.'];
}
// d. If mainExport is not undefined, then
if (mainExport) {
// x. Let resolved be the result of PACKAGE_TARGET_RESOLVE( packageURL, mainExport, "", false, false, conditions).
const resolved = this.packageTargetResolve(packageURL, mainExport, '', false, false, conditions, extList);
// y. If resolved is not null or undefined, return resolved.
if (resolved) return resolved;
}
// 3. Otherwise, if exports is an Object and all keys of exports start with ".", then
} else if (hasDots) {
// a. Let matchKey be the string "./" concatenated with subpath.
// Note: Here subpath starts already with './'
// b. Let resolved be the result of PACKAGE_IMPORTS_EXPORTS_RESOLVE( matchKey, exports, packageURL, false, conditions).
const resolved = this.packageImportsExportsResolve(subpath, rexports, packageURL, false, conditions, extList);
// c. If resolved is not null or undefined, return resolved.
if (resolved) return resolved;
}
// 4. Throw a Package Path Not Exported error.
throw new VMError(`Package path '${subpath}' is not exported`, 'ERR_PACKAGE_PATH_NOT_EXPORTED');
}
// PACKAGE_IMPORTS_EXPORTS_RESOLVE(matchKey, matchObj, packageURL, isImports, conditions)
packageImportsExportsResolve(matchKey, matchObj, packageURL, isImports, conditions, extList) {
// 1. If matchKey is a key of matchObj and does not contain "*", then
let target = matchObj[matchKey];
if (target && matchKey.indexOf('*') === -1) {
// a. Let target be the value of matchObj[matchKey].
// b. Return the result of PACKAGE_TARGET_RESOLVE(packageURL, target, "", false, isImports, conditions).
return this.packageTargetResolve(packageURL, target, '', false, isImports, conditions, extList);
}
// 2. Let expansionKeys be the list of keys of matchObj containing only a single "*",
// sorted by the sorting function PATTERN_KEY_COMPARE which orders in descending order of specificity.
const expansionKeys = Object.getOwnPropertyNames(matchObj);
let bestKey = '';
let bestSubpath;
// 3. For each key expansionKey in expansionKeys, do
for (let i = 0; i < expansionKeys.length; i++) {
const expansionKey = expansionKeys[i];
if (matchKey.length < expansionKey.length) continue;
// a. Let patternBase be the substring of expansionKey up to but excluding the first "*" character.
const star = expansionKey.indexOf('*');
if (star === -1) continue; // Note: expansionKeys was not filtered
const patternBase = expansionKey.slice(0, star);
// b. If matchKey starts with but is not equal to patternBase, then
if (matchKey.startsWith(patternBase) && expansionKey.indexOf('*', star + 1) === -1) { // Note: expansionKeys was not filtered
// 1. Let patternTrailer be the substring of expansionKey from the index after the first "*" character.
const patternTrailer = expansionKey.slice(star + 1);
// 2. If patternTrailer has zero length, or if matchKey ends with patternTrailer and the length of matchKey is greater than or
// equal to the length of expansionKey, then
if (matchKey.endsWith(patternTrailer) && this.patternKeyCompare(bestKey, expansionKey) === 1) { // Note: expansionKeys was not sorted
// a. Let target be the value of matchObj[expansionKey].
target = matchObj[expansionKey];
// b. Let subpath be the substring of matchKey starting at the index of the length of patternBase up to the length of
// matchKey minus the length of patternTrailer.
bestKey = expansionKey;
bestSubpath = matchKey.slice(patternBase.length, matchKey.length - patternTrailer.length);
}
}
}
if (bestSubpath) { // Note: expansionKeys was not sorted
// c. Return the result of PACKAGE_TARGET_RESOLVE(packageURL, target, subpath, true, isImports, conditions).
return this.packageTargetResolve(packageURL, target, bestSubpath, true, isImports, conditions, extList);
}
// 4. Return null.
return null;
}
// PATTERN_KEY_COMPARE(keyA, keyB)
patternKeyCompare(keyA, keyB) {
// 1. Assert: keyA ends with "/" or contains only a single "*".
// 2. Assert: keyB ends with "/" or contains only a single "*".
// 3. Let baseLengthA be the index of "*" in keyA plus one, if keyA contains "*", or the length of keyA otherwise.
const baseAStar = keyA.indexOf('*');
const baseLengthA = baseAStar === -1 ? keyA.length : baseAStar + 1;
// 4. Let baseLengthB be the index of "*" in keyB plus one, if keyB contains "*", or the length of keyB otherwise.
const baseBStar = keyB.indexOf('*');
const baseLengthB = baseBStar === -1 ? keyB.length : baseBStar + 1;
// 5. If baseLengthA is greater than baseLengthB, return -1.
if (baseLengthA > baseLengthB) return -1;
// 6. If baseLengthB is greater than baseLengthA, return 1.
if (baseLengthB > baseLengthA) return 1;
// 7. If keyA does not contain "*", return 1.
if (baseAStar === -1) return 1;
// 8. If keyB does not contain "*", return -1.
if (baseBStar === -1) return -1;
// 9. If the length of keyA is greater than the length of keyB, return -1.
if (keyA.length > keyB.length) return -1;
// 10. If the length of keyB is greater than the length of keyA, return 1.
if (keyB.length > keyA.length) return 1;
// 11. Return 0.
return 0;
}
// PACKAGE_TARGET_RESOLVE(packageURL, target, subpath, pattern, internal, conditions)
packageTargetResolve(packageURL, target, subpath, pattern, internal, conditions, extList) {
// 1. If target is a String, then
if (typeof target === 'string') {
// a. If pattern is false, subpath has non-zero length and target does not end with "/", throw an Invalid Module Specifier error.
if (!pattern && subpath.length > 0 && !target.endsWith('/')) {
throw new VMError(`Invalid package specifier '${subpath}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// b. If target does not start with "./", then
if (!target.startsWith('./')) {
// 1. If internal is true and target does not start with "../" or "/" and is not a valid URL, then
if (internal && !target.startsWith('../') && !target.startsWith('/')) {
let isURL = false;
try {
// eslint-disable-next-line no-new
new URL(target);
isURL = true;
} catch (e) {}
if (!isURL) {
// a. If pattern is true, then
if (pattern) {
// 1. Return PACKAGE_RESOLVE(target with every instance of "*" replaced by subpath, packageURL + "/").
return this.packageResolve(target.replace(/\*/g, subpath), packageURL, conditions, extList);
}
// b. Return PACKAGE_RESOLVE(target + subpath, packageURL + "/").
return this.packageResolve(this.pathConcat(target, subpath), packageURL, conditions, extList);
}
}
// Otherwise, throw an Invalid Package Target error.
throw new VMError(`Invalid package target for '${subpath}'`, 'ERR_INVALID_PACKAGE_TARGET');
}
target = decodeURI(target);
// c. If target split on "/" or "\" contains any ".", ".." or "node_modules" segments after the first segment, case insensitive
// and including percent encoded variants, throw an Invalid Package Target error.
if (target.split(/[/\\]/).slice(1).findIndex(x => x === '.' || x === '..' || x.toLowerCase() === 'node_modules') !== -1) {
throw new VMError(`Invalid package target for '${subpath}'`, 'ERR_INVALID_PACKAGE_TARGET');
}
// d. Let resolvedTarget be the URL resolution of the concatenation of packageURL and target.
const resolvedTarget = this.pathConcat(packageURL, target);
// e. Assert: resolvedTarget is contained in packageURL.
subpath = decodeURI(subpath);
// f. If subpath split on "/" or "\" contains any ".", ".." or "node_modules" segments, case insensitive and including percent
// encoded variants, throw an Invalid Module Specifier error.
if (subpath.split(/[/\\]/).findIndex(x => x === '.' || x === '..' || x.toLowerCase() === 'node_modules') !== -1) {
throw new VMError(`Invalid package specifier '${subpath}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// g. If pattern is true, then
if (pattern) {
// 1. Return the URL resolution of resolvedTarget with every instance of "*" replaced with subpath.
return resolvedTarget.replace(/\*/g, subpath);
}
// h. Otherwise,
// 1. Return the URL resolution of the concatenation of subpath and resolvedTarget.
return this.pathConcat(resolvedTarget, subpath);
// 3. Otherwise, if target is an Array, then
} else if (Array.isArray(target)) {
// a. If target.length is zero, return null.
if (target.length === 0) return null;
let lastException = undefined;
// b. For each item targetValue in target, do
for (let i = 0; i < target.length; i++) {
const targetValue = target[i];
// 1. Let resolved be the result of PACKAGE_TARGET_RESOLVE( packageURL, targetValue, subpath, pattern, internal, conditions),
// continuing the loop on any Invalid Package Target error.
let resolved;
try {
resolved = this.packageTargetResolve(packageURL, targetValue, subpath, pattern, internal, conditions, extList);
} catch (e) {
if (e.code !== 'ERR_INVALID_PACKAGE_TARGET') throw e;
lastException = e;
continue;
}
// 2. If resolved is undefined, continue the loop.
// 3. Return resolved.
if (resolved !== undefined) return resolved;
if (resolved === null) {
lastException = null;
}
}
// c. Return or throw the last fallback resolution null return or error.
if (lastException === undefined || lastException === null) return lastException;
throw lastException;
// 2. Otherwise, if target is a non-null Object, then
} else if (typeof target === 'object' && target !== null) {
const keys = Object.getOwnPropertyNames(target);
// a. If exports contains any index property keys, as defined in ECMA-262 6.1.7 Array Index, throw an Invalid Package Configuration error.
for (let i = 0; i < keys.length; i++) {
const p = keys[i];
if (isArrayIndex(p)) throw new VMError(`Invalid package configuration for '${subpath}'`, 'ERR_INVALID_PACKAGE_CONFIGURATION');
}
// b. For each property p of target, in object insertion order as,
for (let i = 0; i < keys.length; i++) {
const p = keys[i];
// 1. If p equals "default" or conditions contains an entry for p, then
if (p === 'default' || conditions.includes(p)) {
// a. Let targetValue be the value of the p property in target.
const targetValue = target[p];
// b. Let resolved be the result of PACKAGE_TARGET_RESOLVE( packageURL, targetValue, subpath, pattern, internal, conditions).
const resolved = this.packageTargetResolve(packageURL, targetValue, subpath, pattern, internal, conditions, extList);
// c. If resolved is equal to undefined, continue the loop.
// d. Return resolved.
if (resolved !== undefined) return resolved;
}
}
// c. Return undefined.
return undefined;
// 4. Otherwise, if target is null, return null.
} else if (target == null) {
return null;
}
// Otherwise throw an Invalid Package Target error.
throw new VMError(`Invalid package target for '${subpath}'`, 'ERR_INVALID_PACKAGE_TARGET');
}
// PACKAGE_RESOLVE(packageSpecifier, parentURL)
packageResolve(packageSpecifier, parentURL, conditions, extList) {
// 1. Let packageName be undefined.
let packageName = undefined;
// 2. If packageSpecifier is an empty string, then
if (packageSpecifier === '') {
// a. Throw an Invalid Module Specifier error.
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// 3. If packageSpecifier is a Node.js builtin module name, then
if (this.builtinModules[packageSpecifier]) {
// a. Return the string "node:" concatenated with packageSpecifier.
return 'node:' + packageSpecifier;
}
let idx = packageSpecifier.indexOf('/');
// 5. Otherwise,
if (packageSpecifier[0] === '@') {
// a. If packageSpecifier does not contain a "/" separator, then
if (idx === -1) {
// x. Throw an Invalid Module Specifier error.
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// b. Set packageName to the substring of packageSpecifier until the second "/" separator or the end of the string.
idx = packageSpecifier.indexOf('/', idx + 1);
}
// else
// 4. If packageSpecifier does not start with "@", then
// a. Set packageName to the substring of packageSpecifier until the first "/" separator or the end of the string.
packageName = idx === -1 ? packageSpecifier : packageSpecifier.slice(0, idx);
// 6. If packageName starts with "." or contains "\" or "%", then
if (idx !== 0 && (packageName[0] === '.' || packageName.indexOf('\\') >= 0 || packageName.indexOf('%') >= 0)) {
// a. Throw an Invalid Module Specifier error.
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// 7. Let packageSubpath be "." concatenated with the substring of packageSpecifier from the position at the length of packageName.
const packageSubpath = '.' + packageSpecifier.slice(packageName.length);
// 8. If packageSubpath ends in "/", then
if (packageSubpath[packageSubpath.length - 1] === '/') {
// a. Throw an Invalid Module Specifier error.
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
}
// 9. Let selfUrl be the result of PACKAGE_SELF_RESOLVE(packageName, packageSubpath, parentURL).
const selfUrl = this.packageSelfResolve(packageName, packageSubpath, parentURL);
// 10. If selfUrl is not undefined, return selfUrl.
if (selfUrl) return selfUrl;
// 11. While parentURL is not the file system root,
let packageURL;
while (true) {
// a. Let packageURL be the URL resolution of "node_modules/" concatenated with packageSpecifier, relative to parentURL.
packageURL = this.pathResolve(this.pathConcat(parentURL, 'node_modules', packageSpecifier));
// b. Set parentURL to the parent folder URL of parentURL.
const parentParentURL = this.pathDirname(parentURL);
// c. If the folder at packageURL does not exist, then
if (this.isPathAllowed(packageURL) && this.pathTestIsDirectory(packageURL)) break;
// 1. Continue the next loop iteration.
if (parentParentURL === parentURL) {
// 12. Throw a Module Not Found error.
throw new VMError(`Cannot find module '${packageSpecifier}'`, 'ENOTFOUND');
}
parentURL = parentParentURL;
}
// d. Let pjson be the result of READ_PACKAGE_JSON(packageURL).
const pack = this.readPackage(packageURL);
// e. If pjson is not null and pjson.exports is not null or undefined, then
if (pack && pack.exports) {
// 1. Return the result of PACKAGE_EXPORTS_RESOLVE(packageURL, packageSubpath, pjson.exports, defaultConditions).
return this.packageExportsResolve(packageURL, packageSubpath, pack.exports, conditions, extList);
}
// f. Otherwise, if packageSubpath is equal to ".", then
if (packageSubpath === '.') {
// 1. If pjson.main is a string, then
// a. Return the URL resolution of main in packageURL.
return this.loadAsPackage(packageSubpath, pack, extList);
}
// g. Otherwise,
// 1. Return the URL resolution of packageSubpath in packageURL.
return this.pathConcat(packageURL, packageSubpath);
}
}
exports.Resolver = Resolver;
exports.DefaultResolver = DefaultResolver;
/***/ }),
/***/ 98611:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
const {Script} = __nccwpck_require__(92184);
const {
lookupCompiler,
removeShebang
} = __nccwpck_require__(56400);
const {
transformer
} = __nccwpck_require__(33342);
const objectDefineProperties = Object.defineProperties;
const MODULE_PREFIX = '(function (exports, require, module, __filename, __dirname) { ';
const STRICT_MODULE_PREFIX = MODULE_PREFIX + '"use strict"; ';
const MODULE_SUFFIX = '\n});';
/**
* Class Script
*
* @public
*/
class VMScript {
/**
* The script code with wrapping. If set will invalidate the cache.<br>
* Writable only for backwards compatibility.
*
* @public
* @readonly
* @member {string} code
* @memberOf VMScript#
*/
/**
* The filename used for this script.
*
* @public
* @readonly
* @since v3.9.0
* @member {string} filename
* @memberOf VMScript#
*/
/**
* The line offset use for stack traces.
*
* @public
* @readonly
* @since v3.9.0
* @member {number} lineOffset
* @memberOf VMScript#
*/
/**
* The column offset use for stack traces.
*
* @public
* @readonly
* @since v3.9.0
* @member {number} columnOffset
* @memberOf VMScript#
*/
/**
* The compiler to use to get the JavaScript code.
*
* @public
* @readonly
* @since v3.9.0
* @member {(string|compileCallback)} compiler
* @memberOf VMScript#
*/
/**
* The prefix for the script.
*
* @private
* @member {string} _prefix
* @memberOf VMScript#
*/
/**
* The suffix for the script.
*
* @private
* @member {string} _suffix
* @memberOf VMScript#
*/
/**
* The compiled vm.Script for the VM or if not compiled <code>null</code>.
*
* @private
* @member {?vm.Script} _compiledVM
* @memberOf VMScript#
*/
/**
* The compiled vm.Script for the NodeVM or if not compiled <code>null</code>.
*
* @private
* @member {?vm.Script} _compiledNodeVM
* @memberOf VMScript#
*/
/**
* The compiled vm.Script for the NodeVM in strict mode or if not compiled <code>null</code>.
*
* @private
* @member {?vm.Script} _compiledNodeVMStrict
* @memberOf VMScript#
*/
/**
* The resolved compiler to use to get the JavaScript code.
*
* @private
* @readonly
* @member {compileCallback} _compiler
* @memberOf VMScript#
*/
/**
* The script to run without wrapping.
*
* @private
* @member {string} _code
* @memberOf VMScript#
*/
/**
* Whether or not the script contains async functions.
*
* @private
* @member {boolean} _hasAsync
* @memberOf VMScript#
*/
/**
* Create VMScript instance.
*
* @public
* @param {string} code - Code to run.
* @param {(string|Object)} [options] - Options map or filename.
* @param {string} [options.filename="vm.js"] - Filename that shows up in any stack traces produced from this script.
* @param {number} [options.lineOffset=0] - Passed to vm.Script options.
* @param {number} [options.columnOffset=0] - Passed to vm.Script options.
* @param {(string|compileCallback)} [options.compiler="javascript"] - The compiler to use.
* @throws {VMError} If the compiler is unknown or if coffee-script was requested but the module not found.
*/
constructor(code, options) {
const sCode = `${code}`;
let useFileName;
let useOptions;
if (arguments.length === 2) {
if (typeof options === 'object') {
useOptions = options || {__proto__: null};
useFileName = useOptions.filename;
} else {
useOptions = {__proto__: null};
useFileName = options;
}
} else if (arguments.length > 2) {
// We do it this way so that there are no more arguments in the function.
// eslint-disable-next-line prefer-rest-params
useOptions = arguments[2] || {__proto__: null};
useFileName = options || useOptions.filename;
} else {
useOptions = {__proto__: null};
}
const {
compiler = 'javascript',
lineOffset = 0,
columnOffset = 0
} = useOptions;
// Throw if the compiler is unknown.
const resolvedCompiler = lookupCompiler(compiler);
objectDefineProperties(this, {
__proto__: null,
code: {
__proto__: null,
// Put this here so that it is enumerable, and looks like a property.
get() {
return this._prefix + this._code + this._suffix;
},
set(value) {
const strNewCode = String(value);
if (strNewCode === this._code && this._prefix === '' && this._suffix === '') return;
this._code = strNewCode;
this._prefix = '';
this._suffix = '';
this._compiledVM = null;
this._compiledNodeVM = null;
this._compiledCode = null;
},
enumerable: true
},
filename: {
__proto__: null,
value: useFileName || 'vm.js',
enumerable: true
},
lineOffset: {
__proto__: null,
value: lineOffset,
enumerable: true
},
columnOffset: {
__proto__: null,
value: columnOffset,
enumerable: true
},
compiler: {
__proto__: null,
value: compiler,
enumerable: true
},
_code: {
__proto__: null,
value: sCode,
writable: true
},
_prefix: {
__proto__: null,
value: '',
writable: true
},
_suffix: {
__proto__: null,
value: '',
writable: true
},
_compiledVM: {
__proto__: null,
value: null,
writable: true
},
_compiledNodeVM: {
__proto__: null,
value: null,
writable: true
},
_compiledNodeVMStrict: {
__proto__: null,
value: null,
writable: true
},
_compiledCode: {
__proto__: null,
value: null,
writable: true
},
_hasAsync: {
__proto__: null,
value: false,
writable: true
},
_compiler: {__proto__: null, value: resolvedCompiler}
});
}
/**
* Wraps the code.<br>
* This will replace the old wrapping.<br>
* Will invalidate the code cache.
*
* @public
* @deprecated Since v3.9.0. Wrap your code before passing it into the VMScript object.
* @param {string} prefix - String that will be appended before the script code.
* @param {script} suffix - String that will be appended behind the script code.
* @return {this} This for chaining.
* @throws {TypeError} If prefix or suffix is a Symbol.
*/
wrap(prefix, suffix) {
const strPrefix = `${prefix}`;
const strSuffix = `${suffix}`;
if (this._prefix === strPrefix && this._suffix === strSuffix) return this;
this._prefix = strPrefix;
this._suffix = strSuffix;
this._compiledVM = null;
this._compiledNodeVM = null;
this._compiledNodeVMStrict = null;
return this;
}
/**
* Compile this script. <br>
* This is useful to detect syntax errors in the script.
*
* @public
* @return {this} This for chaining.
* @throws {SyntaxError} If there is a syntax error in the script.
*/
compile() {
this._compileVM();
return this;
}
/**
* Get the compiled code.
*
* @private
* @return {string} The code.
*/
getCompiledCode() {
if (!this._compiledCode) {
const comp = this._compiler(this._prefix + removeShebang(this._code) + this._suffix, this.filename);
const res = transformer(null, comp, false, false);
this._compiledCode = res.code;
this._hasAsync = res.hasAsync;
}
return this._compiledCode;
}
/**
* Compiles this script to a vm.Script.
*
* @private
* @param {string} prefix - JavaScript code that will be used as prefix.
* @param {string} suffix - JavaScript code that will be used as suffix.
* @return {vm.Script} The compiled vm.Script.
* @throws {SyntaxError} If there is a syntax error in the script.
*/
_compile(prefix, suffix) {
return new Script(prefix + this.getCompiledCode() + suffix, {
__proto__: null,
filename: this.filename,
displayErrors: false,
lineOffset: this.lineOffset,
columnOffset: this.columnOffset
});
}
/**
* Will return the cached version of the script intended for VM or compile it.
*
* @private
* @return {vm.Script} The compiled script
* @throws {SyntaxError} If there is a syntax error in the script.
*/
_compileVM() {
let script = this._compiledVM;
if (!script) {
this._compiledVM = script = this._compile('', '');
}
return script;
}
/**
* Will return the cached version of the script intended for NodeVM or compile it.
*
* @private
* @return {vm.Script} The compiled script
* @throws {SyntaxError} If there is a syntax error in the script.
*/
_compileNodeVM() {
let script = this._compiledNodeVM;
if (!script) {
this._compiledNodeVM = script = this._compile(MODULE_PREFIX, MODULE_SUFFIX);
}
return script;
}
/**
* Will return the cached version of the script intended for NodeVM in strict mode or compile it.
*
* @private
* @return {vm.Script} The compiled script
* @throws {SyntaxError} If there is a syntax error in the script.
*/
_compileNodeVMStrict() {
let script = this._compiledNodeVMStrict;
if (!script) {
this._compiledNodeVMStrict = script = this._compile(STRICT_MODULE_PREFIX, MODULE_SUFFIX);
}
return script;
}
}
exports.MODULE_PREFIX = MODULE_PREFIX;
exports.STRICT_MODULE_PREFIX = STRICT_MODULE_PREFIX;
exports.MODULE_SUFFIX = MODULE_SUFFIX;
exports.VMScript = VMScript;
/***/ }),
/***/ 33342:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
const {parse: acornParse} = __nccwpck_require__(35594);
const {full: acornWalkFull} = __nccwpck_require__(15000);
const INTERNAL_STATE_NAME = 'VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL';
function assertType(node, type) {
if (!node) throw new Error(`None existent node expected '${type}'`);
if (node.type !== type) throw new Error(`Invalid node type '${node.type}' expected '${type}'`);
return node;
}
function transformer(args, body, isAsync, isGenerator) {
let code;
let argsOffset;
if (args === null) {
code = body;
} else {
code = isAsync ? '(async function' : '(function';
if (isGenerator) code += '*';
code += ' anonymous(';
code += args;
argsOffset = code.length;
code += '\n) {\n';
code += body;
code += '\n})';
}
const ast = acornParse(code, {
__proto__: null,
ecmaVersion: 2020,
allowAwaitOutsideFunction: args === null && isAsync,
allowReturnOutsideFunction: args === null
});
if (args !== null) {
const pBody = assertType(ast, 'Program').body;
if (pBody.length !== 1) throw new Error('Invalid arguments');
const expr = pBody[0];
if (expr.type !== 'ExpressionStatement') throw new Error('Invalid arguments');
const func = expr.expression;
if (func.type !== 'FunctionExpression') throw new Error('Invalid arguments');
if (func.body.start !== argsOffset + 3) throw new Error('Invalid arguments');
}
const insertions = [];
let hasAsync = false;
const RIGHT = -100;
const LEFT = 100;
acornWalkFull(ast, (node, state, type) => {
if (type === 'CatchClause') {
const param = node.param;
if (param) {
const name = assertType(param, 'Identifier').name;
const cBody = assertType(node.body, 'BlockStatement');
if (cBody.body.length > 0) {
insertions.push({
__proto__: null,
pos: cBody.body[0].start,
order: RIGHT,
code: `${name}=${INTERNAL_STATE_NAME}.handleException(${name});`
});
}
}
} else if (type === 'WithStatement') {
insertions.push({
__proto__: null,
pos: node.object.start,
order: RIGHT,
code: INTERNAL_STATE_NAME + '.wrapWith('
});
insertions.push({
__proto__: null,
pos: node.object.end,
order: LEFT,
code: ')'
});
} else if (type === 'Identifier') {
if (node.name === INTERNAL_STATE_NAME) {
throw new Error('Use of internal vm2 state variable');
}
} else if (type === 'ImportExpression') {
insertions.push({
__proto__: null,
pos: node.start,
order: LEFT,
code: INTERNAL_STATE_NAME + '.'
});
} else if (type === 'Function') {
if (node.async) hasAsync = true;
}
});
if (insertions.length === 0) return {__proto__: null, code, hasAsync};
insertions.sort((a, b) => (a.pos == b.pos ? a.order - b.order : a.pos - b.pos));
let ncode = '';
let curr = 0;
for (let i = 0; i < insertions.length; i++) {
const change = insertions[i];
ncode += code.substring(curr, change.pos) + change.code;
curr = change.pos;
}
ncode += code.substring(curr);
return {__proto__: null, code: ncode, hasAsync};
}
exports.INTERNAL_STATE_NAME = INTERNAL_STATE_NAME;
exports.transformer = transformer;
/***/ }),
/***/ 93841:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
/**
* This callback will be called to transform a script to JavaScript.
*
* @callback compileCallback
* @param {string} code - Script code to transform to JavaScript.
* @param {string} filename - Filename of this script.
* @return {string} JavaScript code that represents the script code.
*/
/**
* This callback will be called to resolve a module if it couldn't be found.
*
* @callback resolveCallback
* @param {string} moduleName - Name of the modulusedRequiree to resolve.
* @param {string} dirname - Name of the current directory.
* @return {(string|undefined)} The file or directory to use to load the requested module.
*/
const fs = __nccwpck_require__(35747);
const pa = __nccwpck_require__(85622);
const {
Script,
createContext
} = __nccwpck_require__(92184);
const {
EventEmitter
} = __nccwpck_require__(28614);
const {
INSPECT_MAX_BYTES
} = __nccwpck_require__(64293);
const {
createBridge,
VMError
} = __nccwpck_require__(82989);
const {
transformer,
INTERNAL_STATE_NAME
} = __nccwpck_require__(33342);
const {
lookupCompiler
} = __nccwpck_require__(56400);
const {
VMScript
} = __nccwpck_require__(98611);
const objectDefineProperties = Object.defineProperties;
/**
* Host objects
*
* @private
*/
const HOST = Object.freeze({
Buffer,
Function,
Object,
transformAndCheck,
INSPECT_MAX_BYTES,
INTERNAL_STATE_NAME
});
/**
* Compile a script.
*
* @private
* @param {string} filename - Filename of the script.
* @param {string} script - Script.
* @return {vm.Script} The compiled script.
*/
function compileScript(filename, script) {
return new Script(script, {
__proto__: null,
filename,
displayErrors: false
});
}
/**
* Default run options for vm.Script.runInContext
*
* @private
*/
const DEFAULT_RUN_OPTIONS = Object.freeze({__proto__: null, displayErrors: false});
function checkAsync(allow) {
if (!allow) throw new VMError('Async not available');
}
function transformAndCheck(args, code, isAsync, isGenerator, allowAsync) {
const ret = transformer(args, code, isAsync, isGenerator);
checkAsync(allowAsync || !ret.hasAsync);
return ret.code;
}
/**
*
* This callback will be called and has a specific time to finish.<br>
* No parameters will be supplied.<br>
* If parameters are required, use a closure.
*
* @private
* @callback runWithTimeout
* @return {*}
*
*/
let cacheTimeoutContext = null;
let cacheTimeoutScript = null;
/**
* Run a function with a specific timeout.
*
* @private
* @param {runWithTimeout} fn - Function to run with the specific timeout.
* @param {number} timeout - The amount of time to give the function to finish.
* @return {*} The value returned by the function.
* @throws {Error} If the function took to long.
*/
function doWithTimeout(fn, timeout) {
if (!cacheTimeoutContext) {
cacheTimeoutContext = createContext();
cacheTimeoutScript = new Script('fn()', {
__proto__: null,
filename: 'timeout_bridge.js',
displayErrors: false
});
}
cacheTimeoutContext.fn = fn;
try {
return cacheTimeoutScript.runInContext(cacheTimeoutContext, {
__proto__: null,
displayErrors: false,
timeout
});
} finally {
cacheTimeoutContext.fn = null;
}
}
const bridgeScript = compileScript(__nccwpck_require__.ab + "bridge.js",
`(function(global) {"use strict"; const exports = {};${fs.readFileSync(`${__dirname}/bridge.js`, 'utf8')}\nreturn exports;})`);
const setupSandboxScript = compileScript(__nccwpck_require__.ab + "setup-sandbox.js",
`(function(global, host, bridge, data, context) { ${fs.readFileSync(`${__dirname}/setup-sandbox.js`, 'utf8')}\n})`);
const getGlobalScript = compileScript('get_global.js', 'this');
let getGeneratorFunctionScript = null;
let getAsyncFunctionScript = null;
let getAsyncGeneratorFunctionScript = null;
try {
getGeneratorFunctionScript = compileScript('get_generator_function.js', '(function*(){}).constructor');
} catch (ex) {}
try {
getAsyncFunctionScript = compileScript('get_async_function.js', '(async function(){}).constructor');
} catch (ex) {}
try {
getAsyncGeneratorFunctionScript = compileScript('get_async_generator_function.js', '(async function*(){}).constructor');
} catch (ex) {}
/**
* Class VM.
*
* @public
*/
class VM extends EventEmitter {
/**
* The timeout for {@link VM#run} calls.
*
* @public
* @since v3.9.0
* @member {number} timeout
* @memberOf VM#
*/
/**
* Get the global sandbox object.
*
* @public
* @readonly
* @since v3.9.0
* @member {Object} sandbox
* @memberOf VM#
*/
/**
* The compiler to use to get the JavaScript code.
*
* @public
* @readonly
* @since v3.9.0
* @member {(string|compileCallback)} compiler
* @memberOf VM#
*/
/**
* The resolved compiler to use to get the JavaScript code.
*
* @private
* @readonly
* @member {compileCallback} _compiler
* @memberOf VM#
*/
/**
* Create a new VM instance.
*
* @public
* @param {Object} [options] - VM options.
* @param {number} [options.timeout] - The amount of time until a call to {@link VM#run} will timeout.
* @param {Object} [options.sandbox] - Objects that will be copied into the global object of the sandbox.
* @param {(string|compileCallback)} [options.compiler="javascript"] - The compiler to use.
* @param {boolean} [options.eval=true] - Allow the dynamic evaluation of code via eval(code) or Function(code)().<br>
* Only available for node v10+.
* @param {boolean} [options.wasm=true] - Allow to run wasm code.<br>
* Only available for node v10+.
* @param {boolean} [options.allowAsync=true] - Allows for async functions.
* @throws {VMError} If the compiler is unknown.
*/
constructor(options = {}) {
super();
// Read all options
const {
timeout,
sandbox,
compiler = 'javascript',
allowAsync: optAllowAsync = true
} = options;
const allowEval = options.eval !== false;
const allowWasm = options.wasm !== false;
const allowAsync = optAllowAsync && !options.fixAsync;
// Early error if sandbox is not an object.
if (sandbox && 'object' !== typeof sandbox) {
throw new VMError('Sandbox must be object.');
}
// Early error if compiler can't be found.
const resolvedCompiler = lookupCompiler(compiler);
// Create a new context for this vm.
const _context = createContext(undefined, {
__proto__: null,
codeGeneration: {
__proto__: null,
strings: allowEval,
wasm: allowWasm
}
});
const sandboxGlobal = getGlobalScript.runInContext(_context, DEFAULT_RUN_OPTIONS);
// Initialize the sandbox bridge
const {
createBridge: sandboxCreateBridge
} = bridgeScript.runInContext(_context, DEFAULT_RUN_OPTIONS)(sandboxGlobal);
// Initialize the bridge
const bridge = createBridge(sandboxCreateBridge, () => {});
const data = {
__proto__: null,
allowAsync
};
if (getGeneratorFunctionScript) {
data.GeneratorFunction = getGeneratorFunctionScript.runInContext(_context, DEFAULT_RUN_OPTIONS);
}
if (getAsyncFunctionScript) {
data.AsyncFunction = getAsyncFunctionScript.runInContext(_context, DEFAULT_RUN_OPTIONS);
}
if (getAsyncGeneratorFunctionScript) {
data.AsyncGeneratorFunction = getAsyncGeneratorFunctionScript.runInContext(_context, DEFAULT_RUN_OPTIONS);
}
// Create the bridge between the host and the sandbox.
const internal = setupSandboxScript.runInContext(_context, DEFAULT_RUN_OPTIONS)(sandboxGlobal, HOST, bridge.other, data, _context);
const runScript = (script) => {
// This closure is intentional to hide _context and bridge since the allow to access the sandbox directly which is unsafe.
let ret;
try {
ret = script.runInContext(_context, DEFAULT_RUN_OPTIONS);
} catch (e) {
throw bridge.from(e);
}
return bridge.from(ret);
};
const makeReadonly = (value, mock) => {
try {
internal.readonly(value, mock);
} catch (e) {
throw bridge.from(e);
}
return value;
};
const makeProtected = (value) => {
const sandboxBridge = bridge.other;
try {
sandboxBridge.fromWithFactory(sandboxBridge.protectedFactory, value);
} catch (e) {
throw bridge.from(e);
}
return value;
};
const addProtoMapping = (hostProto, sandboxProto) => {
const sandboxBridge = bridge.other;
let otherProto;
try {
otherProto = sandboxBridge.from(sandboxProto);
sandboxBridge.addProtoMapping(otherProto, hostProto);
} catch (e) {
throw bridge.from(e);
}
bridge.addProtoMapping(hostProto, otherProto);
};
const addProtoMappingFactory = (hostProto, sandboxProtoFactory) => {
const sandboxBridge = bridge.other;
const factory = () => {
const proto = sandboxProtoFactory(this);
bridge.addProtoMapping(hostProto, proto);
return proto;
};
try {
const otherProtoFactory = sandboxBridge.from(factory);
sandboxBridge.addProtoMappingFactory(otherProtoFactory, hostProto);
} catch (e) {
throw bridge.from(e);
}
};
// Define the properties of this object.
// Use Object.defineProperties here to be able to
// hide and set properties read-only.
objectDefineProperties(this, {
__proto__: null,
timeout: {
__proto__: null,
value: timeout,
writable: true,
enumerable: true
},
compiler: {
__proto__: null,
value: compiler,
enumerable: true
},
sandbox: {
__proto__: null,
value: bridge.from(sandboxGlobal),
enumerable: true
},
_runScript: {__proto__: null, value: runScript},
_makeReadonly: {__proto__: null, value: makeReadonly},
_makeProtected: {__proto__: null, value: makeProtected},
_addProtoMapping: {__proto__: null, value: addProtoMapping},
_addProtoMappingFactory: {__proto__: null, value: addProtoMappingFactory},
_compiler: {__proto__: null, value: resolvedCompiler},
_allowAsync: {__proto__: null, value: allowAsync}
});
// prepare global sandbox
if (sandbox) {
this.setGlobals(sandbox);
}
}
/**
* Adds all the values to the globals.
*
* @public
* @since v3.9.0
* @param {Object} values - All values that will be added to the globals.
* @return {this} This for chaining.
* @throws {*} If the setter of a global throws an exception it is propagated. And the remaining globals will not be written.
*/
setGlobals(values) {
for (const name in values) {
if (Object.prototype.hasOwnProperty.call(values, name)) {
this.sandbox[name] = values[name];
}
}
return this;
}
/**
* Set a global value.
*
* @public
* @since v3.9.0
* @param {string} name - The name of the global.
* @param {*} value - The value of the global.
* @return {this} This for chaining.
* @throws {*} If the setter of the global throws an exception it is propagated.
*/
setGlobal(name, value) {
this.sandbox[name] = value;
return this;
}
/**
* Get a global value.
*
* @public
* @since v3.9.0
* @param {string} name - The name of the global.
* @return {*} The value of the global.
* @throws {*} If the getter of the global throws an exception it is propagated.
*/
getGlobal(name) {
return this.sandbox[name];
}
/**
* Freezes the object inside VM making it read-only. Not available for primitive values.
*
* @public
* @param {*} value - Object to freeze.
* @param {string} [globalName] - Whether to add the object to global.
* @return {*} Object to freeze.
* @throws {*} If the setter of the global throws an exception it is propagated.
*/
freeze(value, globalName) {
this.readonly(value);
if (globalName) this.sandbox[globalName] = value;
return value;
}
/**
* Freezes the object inside VM making it read-only. Not available for primitive values.
*
* @public
* @param {*} value - Object to freeze.
* @param {*} [mock] - When the object does not have a property the mock is used before prototype lookup.
* @return {*} Object to freeze.
*/
readonly(value, mock) {
return this._makeReadonly(value, mock);
}
/**
* Protects the object inside VM making impossible to set functions as it's properties. Not available for primitive values.
*
* @public
* @param {*} value - Object to protect.
* @param {string} [globalName] - Whether to add the object to global.
* @return {*} Object to protect.
* @throws {*} If the setter of the global throws an exception it is propagated.
*/
protect(value, globalName) {
this._makeProtected(value);
if (globalName) this.sandbox[globalName] = value;
return value;
}
/**
* Run the code in VM.
*
* @public
* @param {(string|VMScript)} code - Code to run.
* @param {(string|Object)} [options] - Options map or filename.
* @param {string} [options.filename="vm.js"] - Filename that shows up in any stack traces produced from this script.<br>
* This is only used if code is a String.
* @return {*} Result of executed code.
* @throws {SyntaxError} If there is a syntax error in the script.
* @throws {Error} An error is thrown when the script took to long and there is a timeout.
* @throws {*} If the script execution terminated with an exception it is propagated.
*/
run(code, options) {
let script;
let filename;
if (typeof options === 'object') {
filename = options.filename;
} else {
filename = options;
}
if (code instanceof VMScript) {
script = code._compileVM();
checkAsync(this._allowAsync || !code._hasAsync);
} else {
const useFileName = filename || 'vm.js';
let scriptCode = this._compiler(code, useFileName);
const ret = transformer(null, scriptCode, false, false);
scriptCode = ret.code;
checkAsync(this._allowAsync || !ret.hasAsync);
// Compile the script here so that we don't need to create a instance of VMScript.
script = new Script(scriptCode, {
__proto__: null,
filename: useFileName,
displayErrors: false
});
}
if (!this.timeout) {
return this._runScript(script);
}
return doWithTimeout(() => {
return this._runScript(script);
}, this.timeout);
}
/**
* Run the code in VM.
*
* @public
* @since v3.9.0
* @param {string} filename - Filename of file to load and execute in a NodeVM.
* @return {*} Result of executed code.
* @throws {Error} If filename is not a valid filename.
* @throws {SyntaxError} If there is a syntax error in the script.
* @throws {Error} An error is thrown when the script took to long and there is a timeout.
* @throws {*} If the script execution terminated with an exception it is propagated.
*/
runFile(filename) {
const resolvedFilename = pa.resolve(filename);
if (!fs.existsSync(resolvedFilename)) {
throw new VMError(`Script '${filename}' not found.`);
}
if (fs.statSync(resolvedFilename).isDirectory()) {
throw new VMError('Script must be file, got directory.');
}
return this.run(fs.readFileSync(resolvedFilename, 'utf8'), resolvedFilename);
}
}
exports.VM = VM;
/***/ }),
/***/ 15000:
/***/ (function(__unused_webpack_module, exports) {
(function (global, factory) {
true ? factory(exports) :
0;
}(this, (function (exports) { 'use strict';
// AST walker module for Mozilla Parser API compatible trees
// A simple walk is one where you simply specify callbacks to be
// called on specific nodes. The last two arguments are optional. A
// simple use would be
//
// walk.simple(myTree, {
// Expression: function(node) { ... }
// });
//
// to do something with all expressions. All Parser API node types
// can be used to identify node types, as well as Expression and
// Statement, which denote categories of nodes.
//
// The base argument can be used to pass a custom (recursive)
// walker, and state can be used to give this walked an initial
// state.
function simple(node, visitors, baseVisitor, state, override) {
if (!baseVisitor) { baseVisitor = base
; }(function c(node, st, override) {
var type = override || node.type, found = visitors[type];
baseVisitor[type](node, st, c);
if (found) { found(node, st); }
})(node, state, override);
}
// An ancestor walk keeps an array of ancestor nodes (including the
// current node) and passes them to the callback as third parameter
// (and also as state parameter when no other state is present).
function ancestor(node, visitors, baseVisitor, state, override) {
var ancestors = [];
if (!baseVisitor) { baseVisitor = base
; }(function c(node, st, override) {
var type = override || node.type, found = visitors[type];
var isNew = node !== ancestors[ancestors.length - 1];
if (isNew) { ancestors.push(node); }
baseVisitor[type](node, st, c);
if (found) { found(node, st || ancestors, ancestors); }
if (isNew) { ancestors.pop(); }
})(node, state, override);
}
// A recursive walk is one where your functions override the default
// walkers. They can modify and replace the state parameter that's
// threaded through the walk, and can opt how and whether to walk
// their child nodes (by calling their third argument on these
// nodes).
function recursive(node, state, funcs, baseVisitor, override) {
var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor
;(function c(node, st, override) {
visitor[override || node.type](node, st, c);
})(node, state, override);
}
function makeTest(test) {
if (typeof test === "string")
{ return function (type) { return type === test; } }
else if (!test)
{ return function () { return true; } }
else
{ return test }
}
var Found = function Found(node, state) { this.node = node; this.state = state; };
// A full walk triggers the callback on each node
function full(node, callback, baseVisitor, state, override) {
if (!baseVisitor) { baseVisitor = base; }
var last
;(function c(node, st, override) {
var type = override || node.type;
baseVisitor[type](node, st, c);
if (last !== node) {
callback(node, st, type);
last = node;
}
})(node, state, override);
}
// An fullAncestor walk is like an ancestor walk, but triggers
// the callback on each node
function fullAncestor(node, callback, baseVisitor, state) {
if (!baseVisitor) { baseVisitor = base; }
var ancestors = [], last
;(function c(node, st, override) {
var type = override || node.type;
var isNew = node !== ancestors[ancestors.length - 1];
if (isNew) { ancestors.push(node); }
baseVisitor[type](node, st, c);
if (last !== node) {
callback(node, st || ancestors, ancestors, type);
last = node;
}
if (isNew) { ancestors.pop(); }
})(node, state);
}
// Find a node with a given start, end, and type (all are optional,
// null can be used as wildcard). Returns a {node, state} object, or
// undefined when it doesn't find a matching node.
function findNodeAt(node, start, end, test, baseVisitor, state) {
if (!baseVisitor) { baseVisitor = base; }
test = makeTest(test);
try {
(function c(node, st, override) {
var type = override || node.type;
if ((start == null || node.start <= start) &&
(end == null || node.end >= end))
{ baseVisitor[type](node, st, c); }
if ((start == null || node.start === start) &&
(end == null || node.end === end) &&
test(type, node))
{ throw new Found(node, st) }
})(node, state);
} catch (e) {
if (e instanceof Found) { return e }
throw e
}
}
// Find the innermost node of a given type that contains the given
// position. Interface similar to findNodeAt.
function findNodeAround(node, pos, test, baseVisitor, state) {
test = makeTest(test);
if (!baseVisitor) { baseVisitor = base; }
try {
(function c(node, st, override) {
var type = override || node.type;
if (node.start > pos || node.end < pos) { return }
baseVisitor[type](node, st, c);
if (test(type, node)) { throw new Found(node, st) }
})(node, state);
} catch (e) {
if (e instanceof Found) { return e }
throw e
}
}
// Find the outermost matching node after a given position.
function findNodeAfter(node, pos, test, baseVisitor, state) {
test = makeTest(test);
if (!baseVisitor) { baseVisitor = base; }
try {
(function c(node, st, override) {
if (node.end < pos) { return }
var type = override || node.type;
if (node.start >= pos && test(type, node)) { throw new Found(node, st) }
baseVisitor[type](node, st, c);
})(node, state);
} catch (e) {
if (e instanceof Found) { return e }
throw e
}
}
// Find the outermost matching node before a given position.
function findNodeBefore(node, pos, test, baseVisitor, state) {
test = makeTest(test);
if (!baseVisitor) { baseVisitor = base; }
var max
;(function c(node, st, override) {
if (node.start > pos) { return }
var type = override || node.type;
if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
{ max = new Found(node, st); }
baseVisitor[type](node, st, c);
})(node, state);
return max
}
// Used to create a custom walker. Will fill in all missing node
// type properties with the defaults.
function make(funcs, baseVisitor) {
var visitor = Object.create(baseVisitor || base);
for (var type in funcs) { visitor[type] = funcs[type]; }
return visitor
}
function skipThrough(node, st, c) { c(node, st); }
function ignore(_node, _st, _c) {}
// Node walkers.
var base = {};
base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) {
for (var i = 0, list = node.body; i < list.length; i += 1)
{
var stmt = list[i];
c(stmt, st, "Statement");
}
};
base.Statement = skipThrough;
base.EmptyStatement = ignore;
base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression =
function (node, st, c) { return c(node.expression, st, "Expression"); };
base.IfStatement = function (node, st, c) {
c(node.test, st, "Expression");
c(node.consequent, st, "Statement");
if (node.alternate) { c(node.alternate, st, "Statement"); }
};
base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
base.BreakStatement = base.ContinueStatement = ignore;
base.WithStatement = function (node, st, c) {
c(node.object, st, "Expression");
c(node.body, st, "Statement");
};
base.SwitchStatement = function (node, st, c) {
c(node.discriminant, st, "Expression");
for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
var cs = list$1[i$1];
if (cs.test) { c(cs.test, st, "Expression"); }
for (var i = 0, list = cs.consequent; i < list.length; i += 1)
{
var cons = list[i];
c(cons, st, "Statement");
}
}
};
base.SwitchCase = function (node, st, c) {
if (node.test) { c(node.test, st, "Expression"); }
for (var i = 0, list = node.consequent; i < list.length; i += 1)
{
var cons = list[i];
c(cons, st, "Statement");
}
};
base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
if (node.argument) { c(node.argument, st, "Expression"); }
};
base.ThrowStatement = base.SpreadElement =
function (node, st, c) { return c(node.argument, st, "Expression"); };
base.TryStatement = function (node, st, c) {
c(node.block, st, "Statement");
if (node.handler) { c(node.handler, st); }
if (node.finalizer) { c(node.finalizer, st, "Statement"); }
};
base.CatchClause = function (node, st, c) {
if (node.param) { c(node.param, st, "Pattern"); }
c(node.body, st, "Statement");
};
base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
c(node.test, st, "Expression");
c(node.body, st, "Statement");
};
base.ForStatement = function (node, st, c) {
if (node.init) { c(node.init, st, "ForInit"); }
if (node.test) { c(node.test, st, "Expression"); }
if (node.update) { c(node.update, st, "Expression"); }
c(node.body, st, "Statement");
};
base.ForInStatement = base.ForOfStatement = function (node, st, c) {
c(node.left, st, "ForInit");
c(node.right, st, "Expression");
c(node.body, st, "Statement");
};
base.ForInit = function (node, st, c) {
if (node.type === "VariableDeclaration") { c(node, st); }
else { c(node, st, "Expression"); }
};
base.DebuggerStatement = ignore;
base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
base.VariableDeclaration = function (node, st, c) {
for (var i = 0, list = node.declarations; i < list.length; i += 1)
{
var decl = list[i];
c(decl, st);
}
};
base.VariableDeclarator = function (node, st, c) {
c(node.id, st, "Pattern");
if (node.init) { c(node.init, st, "Expression"); }
};
base.Function = function (node, st, c) {
if (node.id) { c(node.id, st, "Pattern"); }
for (var i = 0, list = node.params; i < list.length; i += 1)
{
var param = list[i];
c(param, st, "Pattern");
}
c(node.body, st, node.expression ? "Expression" : "Statement");
};
base.Pattern = function (node, st, c) {
if (node.type === "Identifier")
{ c(node, st, "VariablePattern"); }
else if (node.type === "MemberExpression")
{ c(node, st, "MemberPattern"); }
else
{ c(node, st); }
};
base.VariablePattern = ignore;
base.MemberPattern = skipThrough;
base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
base.ArrayPattern = function (node, st, c) {
for (var i = 0, list = node.elements; i < list.length; i += 1) {
var elt = list[i];
if (elt) { c(elt, st, "Pattern"); }
}
};
base.ObjectPattern = function (node, st, c) {
for (var i = 0, list = node.properties; i < list.length; i += 1) {
var prop = list[i];
if (prop.type === "Property") {
if (prop.computed) { c(prop.key, st, "Expression"); }
c(prop.value, st, "Pattern");
} else if (prop.type === "RestElement") {
c(prop.argument, st, "Pattern");
}
}
};
base.Expression = skipThrough;
base.ThisExpression = base.Super = base.MetaProperty = ignore;
base.ArrayExpression = function (node, st, c) {
for (var i = 0, list = node.elements; i < list.length; i += 1) {
var elt = list[i];
if (elt) { c(elt, st, "Expression"); }
}
};
base.ObjectExpression = function (node, st, c) {
for (var i = 0, list = node.properties; i < list.length; i += 1)
{
var prop = list[i];
c(prop, st);
}
};
base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
base.SequenceExpression = function (node, st, c) {
for (var i = 0, list = node.expressions; i < list.length; i += 1)
{
var expr = list[i];
c(expr, st, "Expression");
}
};
base.TemplateLiteral = function (node, st, c) {
for (var i = 0, list = node.quasis; i < list.length; i += 1)
{
var quasi = list[i];
c(quasi, st);
}
for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1)
{
var expr = list$1[i$1];
c(expr, st, "Expression");
}
};
base.TemplateElement = ignore;
base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
c(node.argument, st, "Expression");
};
base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
c(node.left, st, "Expression");
c(node.right, st, "Expression");
};
base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
c(node.left, st, "Pattern");
c(node.right, st, "Expression");
};
base.ConditionalExpression = function (node, st, c) {
c(node.test, st, "Expression");
c(node.consequent, st, "Expression");
c(node.alternate, st, "Expression");
};
base.NewExpression = base.CallExpression = function (node, st, c) {
c(node.callee, st, "Expression");
if (node.arguments)
{ for (var i = 0, list = node.arguments; i < list.length; i += 1)
{
var arg = list[i];
c(arg, st, "Expression");
} }
};
base.MemberExpression = function (node, st, c) {
c(node.object, st, "Expression");
if (node.computed) { c(node.property, st, "Expression"); }
};
base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
if (node.declaration)
{ c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
if (node.source) { c(node.source, st, "Expression"); }
};
base.ExportAllDeclaration = function (node, st, c) {
if (node.exported)
{ c(node.exported, st); }
c(node.source, st, "Expression");
};
base.ImportDeclaration = function (node, st, c) {
for (var i = 0, list = node.specifiers; i < list.length; i += 1)
{
var spec = list[i];
c(spec, st);
}
c(node.source, st, "Expression");
};
base.ImportExpression = function (node, st, c) {
c(node.source, st, "Expression");
};
base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore;
base.TaggedTemplateExpression = function (node, st, c) {
c(node.tag, st, "Expression");
c(node.quasi, st, "Expression");
};
base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
base.Class = function (node, st, c) {
if (node.id) { c(node.id, st, "Pattern"); }
if (node.superClass) { c(node.superClass, st, "Expression"); }
c(node.body, st);
};
base.ClassBody = function (node, st, c) {
for (var i = 0, list = node.body; i < list.length; i += 1)
{
var elt = list[i];
c(elt, st);
}
};
base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) {
if (node.computed) { c(node.key, st, "Expression"); }
if (node.value) { c(node.value, st, "Expression"); }
};
exports.ancestor = ancestor;
exports.base = base;
exports.findNodeAfter = findNodeAfter;
exports.findNodeAround = findNodeAround;
exports.findNodeAt = findNodeAt;
exports.findNodeBefore = findNodeBefore;
exports.full = full;
exports.fullAncestor = fullAncestor;
exports.make = make;
exports.recursive = recursive;
exports.simple = simple;
Object.defineProperty(exports, '__esModule', { value: true });
})));
/***/ }),
/***/ 35594:
/***/ (function(__unused_webpack_module, exports) {
(function (global, factory) {
true ? factory(exports) :
0;
})(this, (function (exports) { 'use strict';
// Reserved word lists for various dialects of the language
var reservedWords = {
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5: "class enum extends super const export import",
6: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"
};
// And the keywords
var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
var keywords$1 = {
5: ecma5AndLessKeywords,
"5module": ecma5AndLessKeywords + " export import",
6: ecma5AndLessKeywords + " const class extends export import super"
};
var keywordRelationalOperator = /^in(stanceof)?$/;
// ## Character categories
// Big ugly regular expressions that match characters in the
// whitespace, identifier, and identifier-start categories. These
// are only applied when a character is found to actually have a
// code point above 128.
// Generated by `bin/generate-identifier-regex.js`.
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
// These are a run-length and offset encoded representation of the
// >0xffff code points that are a valid part of identifiers. The
// offset starts at 0x10000, and each pair of numbers represents an
// offset to the next range, and then a size of the range. They were
// generated by bin/generate-identifier-regex.js
// eslint-disable-next-line comma-spacing
var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];
// eslint-disable-next-line comma-spacing
var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];
// This has a complexity linear to the value of the code. The
// assumption is that looking up astral identifier characters is
// rare.
function isInAstralSet(code, set) {
var pos = 0x10000;
for (var i = 0; i < set.length; i += 2) {
pos += set[i];
if (pos > code) { return false }
pos += set[i + 1];
if (pos >= code) { return true }
}
}
// Test whether a given character code starts an identifier.
function isIdentifierStart(code, astral) {
if (code < 65) { return code === 36 }
if (code < 91) { return true }
if (code < 97) { return code === 95 }
if (code < 123) { return true }
if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) }
if (astral === false) { return false }
return isInAstralSet(code, astralIdentifierStartCodes)
}
// Test whether a given character is part of an identifier.
function isIdentifierChar(code, astral) {
if (code < 48) { return code === 36 }
if (code < 58) { return true }
if (code < 65) { return false }
if (code < 91) { return true }
if (code < 97) { return code === 95 }
if (code < 123) { return true }
if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) }
if (astral === false) { return false }
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
}
// ## Token types
// The assignment of fine-grained, information-carrying type objects
// allows the tokenizer to store the information it has about a
// token in a way that is very cheap for the parser to look up.
// All token type variables start with an underscore, to make them
// easy to recognize.
// The `beforeExpr` property is used to disambiguate between regular
// expressions and divisions. It is set on all token types that can
// be followed by an expression (thus, a slash after them would be a
// regular expression).
//
// The `startsExpr` property is used to check if the token ends a
// `yield` expression. It is set on all token types that either can
// directly start an expression (like a quotation mark) or can
// continue an expression (like the body of a string).
//
// `isLoop` marks a keyword as starting a loop, which is important
// to know when parsing a label, in order to allow or disallow
// continue jumps to that label.
var TokenType = function TokenType(label, conf) {
if ( conf === void 0 ) conf = {};
this.label = label;
this.keyword = conf.keyword;
this.beforeExpr = !!conf.beforeExpr;
this.startsExpr = !!conf.startsExpr;
this.isLoop = !!conf.isLoop;
this.isAssign = !!conf.isAssign;
this.prefix = !!conf.prefix;
this.postfix = !!conf.postfix;
this.binop = conf.binop || null;
this.updateContext = null;
};
function binop(name, prec) {
return new TokenType(name, {beforeExpr: true, binop: prec})
}
var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true};
// Map keyword names to token types.
var keywords = {};
// Succinct definitions of keyword token types
function kw(name, options) {
if ( options === void 0 ) options = {};
options.keyword = name;
return keywords[name] = new TokenType(name, options)
}
var types$1 = {
num: new TokenType("num", startsExpr),
regexp: new TokenType("regexp", startsExpr),
string: new TokenType("string", startsExpr),
name: new TokenType("name", startsExpr),
privateId: new TokenType("privateId", startsExpr),
eof: new TokenType("eof"),
// Punctuation token types.
bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
bracketR: new TokenType("]"),
braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
braceR: new TokenType("}"),
parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
parenR: new TokenType(")"),
comma: new TokenType(",", beforeExpr),
semi: new TokenType(";", beforeExpr),
colon: new TokenType(":", beforeExpr),
dot: new TokenType("."),
question: new TokenType("?", beforeExpr),
questionDot: new TokenType("?."),
arrow: new TokenType("=>", beforeExpr),
template: new TokenType("template"),
invalidTemplate: new TokenType("invalidTemplate"),
ellipsis: new TokenType("...", beforeExpr),
backQuote: new TokenType("`", startsExpr),
dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
// Operators. These carry several kinds of properties to help the
// parser use them properly (the presence of these properties is
// what categorizes them as operators).
//
// `binop`, when present, specifies that this operator is a binary
// operator, and will refer to its precedence.
//
// `prefix` and `postfix` mark the operator as a prefix or postfix
// unary operator.
//
// `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
// binary operators with a very low precedence, that should result
// in AssignmentExpression nodes.
eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}),
logicalOR: binop("||", 1),
logicalAND: binop("&&", 2),
bitwiseOR: binop("|", 3),
bitwiseXOR: binop("^", 4),
bitwiseAND: binop("&", 5),
equality: binop("==/!=/===/!==", 6),
relational: binop("</>/<=/>=", 7),
bitShift: binop("<</>>/>>>", 8),
plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
modulo: binop("%", 10),
star: binop("*", 10),
slash: binop("/", 10),
starstar: new TokenType("**", {beforeExpr: true}),
coalesce: binop("??", 1),
// Keyword token types.
_break: kw("break"),
_case: kw("case", beforeExpr),
_catch: kw("catch"),
_continue: kw("continue"),
_debugger: kw("debugger"),
_default: kw("default", beforeExpr),
_do: kw("do", {isLoop: true, beforeExpr: true}),
_else: kw("else", beforeExpr),
_finally: kw("finally"),
_for: kw("for", {isLoop: true}),
_function: kw("function", startsExpr),
_if: kw("if"),
_return: kw("return", beforeExpr),
_switch: kw("switch"),
_throw: kw("throw", beforeExpr),
_try: kw("try"),
_var: kw("var"),
_const: kw("const"),
_while: kw("while", {isLoop: true}),
_with: kw("with"),
_new: kw("new", {beforeExpr: true, startsExpr: true}),
_this: kw("this", startsExpr),
_super: kw("super", startsExpr),
_class: kw("class", startsExpr),
_extends: kw("extends", beforeExpr),
_export: kw("export"),
_import: kw("import", startsExpr),
_null: kw("null", startsExpr),
_true: kw("true", startsExpr),
_false: kw("false", startsExpr),
_in: kw("in", {beforeExpr: true, binop: 7}),
_instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
_typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
_void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
_delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
};
// Matches a whole line break (where CRLF is considered a single
// line break). Used to count lines.
var lineBreak = /\r\n?|\n|\u2028|\u2029/;
var lineBreakG = new RegExp(lineBreak.source, "g");
function isNewLine(code) {
return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
}
function nextLineBreak(code, from, end) {
if ( end === void 0 ) end = code.length;
for (var i = from; i < end; i++) {
var next = code.charCodeAt(i);
if (isNewLine(next))
{ return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 }
}
return -1
}
var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
var ref = Object.prototype;
var hasOwnProperty = ref.hasOwnProperty;
var toString = ref.toString;
var hasOwn = Object.hasOwn || (function (obj, propName) { return (
hasOwnProperty.call(obj, propName)
); });
var isArray = Array.isArray || (function (obj) { return (
toString.call(obj) === "[object Array]"
); });
function wordsRegexp(words) {
return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
}
var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
// These are used when `options.locations` is on, for the
// `startLoc` and `endLoc` properties.
var Position = function Position(line, col) {
this.line = line;
this.column = col;
};
Position.prototype.offset = function offset (n) {
return new Position(this.line, this.column + n)
};
var SourceLocation = function SourceLocation(p, start, end) {
this.start = start;
this.end = end;
if (p.sourceFile !== null) { this.source = p.sourceFile; }
};
// The `getLineInfo` function is mostly useful when the
// `locations` option is off (for performance reasons) and you
// want to find the line/column position for a given character
// offset. `input` should be the code string that the offset refers
// into.
function getLineInfo(input, offset) {
for (var line = 1, cur = 0;;) {
var nextBreak = nextLineBreak(input, cur, offset);
if (nextBreak < 0) { return new Position(line, offset - cur) }
++line;
cur = nextBreak;
}
}
// A second argument must be given to configure the parser process.
// These options are recognized (only `ecmaVersion` is required):
var defaultOptions = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
// (2019), 11 (2020), 12 (2021), 13 (2022), or `"latest"` (the
// latest version the library supports). This influences support
// for strict mode, the set of reserved words, and support for
// new syntax features.
ecmaVersion: null,
// `sourceType` indicates the mode the code should be parsed in.
// Can be either `"script"` or `"module"`. This influences global
// strict mode and parsing of `import` and `export` declarations.
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called
// when a semicolon is automatically inserted. It will be passed
// the position of the comma as an offset, and if `locations` is
// enabled, it is given the location as a `{line, column}` object
// as second argument.
onInsertedSemicolon: null,
// `onTrailingComma` is similar to `onInsertedSemicolon`, but for
// trailing commas.
onTrailingComma: null,
// By default, reserved words are only enforced if ecmaVersion >= 5.
// Set `allowReserved` to a boolean value to explicitly turn this on
// an off. When this option has the value "never", reserved words
// and keywords can also not be used as property names.
allowReserved: null,
// When enabled, a return at the top level is not considered an
// error.
allowReturnOutsideFunction: false,
// When enabled, import/export statements are not constrained to
// appearing at the top of the program, and an import.meta expression
// in a script isn't considered an error.
allowImportExportEverywhere: false,
// By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
// When enabled, await identifiers are allowed to appear at the top-level scope,
// but they are still not allowed in non-async functions.
allowAwaitOutsideFunction: null,
// When enabled, super identifiers are not constrained to
// appearing in methods and do not raise an error when they appear elsewhere.
allowSuperOutsideMethod: null,
// When enabled, hashbang directive in the beginning of file
// is allowed and treated as a line comment.
allowHashBang: false,
// When `locations` is on, `loc` properties holding objects with
// `start` and `end` properties in `{line, column}` form (with
// line being 1-based and column 0-based) will be attached to the
// nodes.
locations: false,
// A function can be passed as `onToken` option, which will
// cause Acorn to call that function with object in the same
// format as tokens returned from `tokenizer().getToken()`. Note
// that you are not allowed to call the parser from the
// callback—that will corrupt its internal state.
onToken: null,
// A function can be passed as `onComment` option, which will
// cause Acorn to call that function with `(block, text, start,
// end)` parameters whenever a comment is skipped. `block` is a
// boolean indicating whether this is a block (`/* */`) comment,
// `text` is the content of the comment, and `start` and `end` are
// character offsets that denote the start and end of the comment.
// When the `locations` option is on, two more parameters are
// passed, the full `{line, column}` locations of the start and
// end of the comments. Note that you are not allowed to call the
// parser from the callback—that will corrupt its internal state.
onComment: null,
// Nodes have their start and end characters offsets recorded in
// `start` and `end` properties (directly on the node, rather than
// the `loc` object, which holds line/column data. To also add a
// [semi-standardized][range] `range` property holding a `[start,
// end]` array with the same numbers, set the `ranges` option to
// `true`.
//
// [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
ranges: false,
// It is possible to parse multiple files into a single AST by
// passing the tree produced by parsing the first file as
// `program` option in subsequent parses. This will add the
// toplevel forms of the parsed file to the `Program` (top) node
// of an existing parse tree.
program: null,
// When `locations` is on, you can pass this to record the source
// file in every node's `loc` object.
sourceFile: null,
// This value, if given, is stored in every node, whether
// `locations` is on or off.
directSourceFile: null,
// When enabled, parenthesized expressions are represented by
// (non-standard) ParenthesizedExpression nodes
preserveParens: false
};
// Interpret and default an options object
var warnedAboutEcmaVersion = false;
function getOptions(opts) {
var options = {};
for (var opt in defaultOptions)
{ options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; }
if (options.ecmaVersion === "latest") {
options.ecmaVersion = 1e8;
} else if (options.ecmaVersion == null) {
if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
warnedAboutEcmaVersion = true;
console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
}
options.ecmaVersion = 11;
} else if (options.ecmaVersion >= 2015) {
options.ecmaVersion -= 2009;
}
if (options.allowReserved == null)
{ options.allowReserved = options.ecmaVersion < 5; }
if (isArray(options.onToken)) {
var tokens = options.onToken;
options.onToken = function (token) { return tokens.push(token); };
}
if (isArray(options.onComment))
{ options.onComment = pushComment(options, options.onComment); }
return options
}
function pushComment(options, array) {
return function(block, text, start, end, startLoc, endLoc) {
var comment = {
type: block ? "Block" : "Line",
value: text,
start: start,
end: end
};
if (options.locations)
{ comment.loc = new SourceLocation(this, startLoc, endLoc); }
if (options.ranges)
{ comment.range = [start, end]; }
array.push(comment);
}
}
// Each scope gets a bitset that may contain these flags
var
SCOPE_TOP = 1,
SCOPE_FUNCTION = 2,
SCOPE_ASYNC = 4,
SCOPE_GENERATOR = 8,
SCOPE_ARROW = 16,
SCOPE_SIMPLE_CATCH = 32,
SCOPE_SUPER = 64,
SCOPE_DIRECT_SUPER = 128,
SCOPE_CLASS_STATIC_BLOCK = 256,
SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
function functionFlags(async, generator) {
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0)
}
// Used in checkLVal* and declareName to determine the type of a binding
var
BIND_NONE = 0, // Not a binding
BIND_VAR = 1, // Var-style binding
BIND_LEXICAL = 2, // Let- or const-style binding
BIND_FUNCTION = 3, // Function declaration
BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding
BIND_OUTSIDE = 5; // Special case for function names as bound inside the function
var Parser = function Parser(options, input, startPos) {
this.options = options = getOptions(options);
this.sourceFile = options.sourceFile;
this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
var reserved = "";
if (options.allowReserved !== true) {
reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
if (options.sourceType === "module") { reserved += " await"; }
}
this.reservedWords = wordsRegexp(reserved);
var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
this.reservedWordsStrict = wordsRegexp(reservedStrict);
this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
this.input = String(input);
// Used to signal to callers of `readWord1` whether the word
// contained any escape sequences. This is needed because words with
// escape sequences must not be interpreted as keywords.
this.containsEsc = false;
// Set up token state
// The current position of the tokenizer in the input.
if (startPos) {
this.pos = startPos;
this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
} else {
this.pos = this.lineStart = 0;
this.curLine = 1;
}
// Properties of the current token:
// Its type
this.type = types$1.eof;
// For tokens that include more information than their type, the value
this.value = null;
// Its start and end offset
this.start = this.end = this.pos;
// And, if locations are used, the {line, column} object
// corresponding to those offsets
this.startLoc = this.endLoc = this.curPosition();
// Position information for the previous token
this.lastTokEndLoc = this.lastTokStartLoc = null;
this.lastTokStart = this.lastTokEnd = this.pos;
// The context stack is used to superficially track syntactic
// context to predict whether a regular expression is allowed in a
// given position.
this.context = this.initialContext();
this.exprAllowed = true;
// Figure out if it's a module code.
this.inModule = options.sourceType === "module";
this.strict = this.inModule || this.strictDirective(this.pos);
// Used to signify the start of a potential arrow function
this.potentialArrowAt = -1;
this.potentialArrowInForAwait = false;
// Positions to delayed-check that yield/await does not exist in default parameters.
this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
// Labels in scope.
this.labels = [];
// Thus-far undefined exports.
this.undefinedExports = Object.create(null);
// If enabled, skip leading hashbang line.
if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!")
{ this.skipLineComment(2); }
// Scope tracking for duplicate variable names (see scope.js)
this.scopeStack = [];
this.enterScope(SCOPE_TOP);
// For RegExp validation
this.regexpState = null;
// The stack of private names.
// Each element has two properties: 'declared' and 'used'.
// When it exited from the outermost class definition, all used private names must be declared.
this.privateNameStack = [];
};
var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } };
Parser.prototype.parse = function parse () {
var node = this.options.program || this.startNode();
this.nextToken();
return this.parseTopLevel(node)
};
prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 };
prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit };
prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit };
prototypeAccessors.canAwait.get = function () {
for (var i = this.scopeStack.length - 1; i >= 0; i--) {
var scope = this.scopeStack[i];
if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false }
if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 }
}
return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction
};
prototypeAccessors.allowSuper.get = function () {
var ref = this.currentThisScope();
var flags = ref.flags;
var inClassFieldInit = ref.inClassFieldInit;
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod
};
prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
prototypeAccessors.allowNewDotTarget.get = function () {
var ref = this.currentThisScope();
var flags = ref.flags;
var inClassFieldInit = ref.inClassFieldInit;
return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit
};
prototypeAccessors.inClassStaticBlock.get = function () {
return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0
};
Parser.extend = function extend () {
var plugins = [], len = arguments.length;
while ( len-- ) plugins[ len ] = arguments[ len ];
var cls = this;
for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }
return cls
};
Parser.parse = function parse (input, options) {
return new this(options, input).parse()
};
Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) {
var parser = new this(options, input, pos);
parser.nextToken();
return parser.parseExpression()
};
Parser.tokenizer = function tokenizer (input, options) {
return new this(options, input)
};
Object.defineProperties( Parser.prototype, prototypeAccessors );
var pp$9 = Parser.prototype;
// ## Parser utilities
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
pp$9.strictDirective = function(start) {
for (;;) {
// Try to find string literal.
skipWhiteSpace.lastIndex = start;
start += skipWhiteSpace.exec(this.input)[0].length;
var match = literal.exec(this.input.slice(start));
if (!match) { return false }
if ((match[1] || match[2]) === "use strict") {
skipWhiteSpace.lastIndex = start + match[0].length;
var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
var next = this.input.charAt(end);
return next === ";" || next === "}" ||
(lineBreak.test(spaceAfter[0]) &&
!(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "="))
}
start += match[0].length;
// Skip semicolon, if any.
skipWhiteSpace.lastIndex = start;
start += skipWhiteSpace.exec(this.input)[0].length;
if (this.input[start] === ";")
{ start++; }
}
};
// Predicate that tests whether the next token is of the given
// type, and if yes, consumes it as a side effect.
pp$9.eat = function(type) {
if (this.type === type) {
this.next();
return true
} else {
return false
}
};
// Tests whether parsed token is a contextual keyword.
pp$9.isContextual = function(name) {
return this.type === types$1.name && this.value === name && !this.containsEsc
};
// Consumes contextual keyword if possible.
pp$9.eatContextual = function(name) {
if (!this.isContextual(name)) { return false }
this.next();
return true
};
// Asserts that following token is given contextual keyword.
pp$9.expectContextual = function(name) {
if (!this.eatContextual(name)) { this.unexpected(); }
};
// Test whether a semicolon can be inserted at the current position.
pp$9.canInsertSemicolon = function() {
return this.type === types$1.eof ||
this.type === types$1.braceR ||
lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
};
pp$9.insertSemicolon = function() {
if (this.canInsertSemicolon()) {
if (this.options.onInsertedSemicolon)
{ this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); }
return true
}
};
// Consume a semicolon, or, failing that, see if we are allowed to
// pretend that there is a semicolon at this position.
pp$9.semicolon = function() {
if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); }
};
pp$9.afterTrailingComma = function(tokType, notNext) {
if (this.type === tokType) {
if (this.options.onTrailingComma)
{ this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); }
if (!notNext)
{ this.next(); }
return true
}
};
// Expect a token of a given type. If found, consume it, otherwise,
// raise an unexpected token error.
pp$9.expect = function(type) {
this.eat(type) || this.unexpected();
};
// Raise an unexpected token error.
pp$9.unexpected = function(pos) {
this.raise(pos != null ? pos : this.start, "Unexpected token");
};
function DestructuringErrors() {
this.shorthandAssign =
this.trailingComma =
this.parenthesizedAssign =
this.parenthesizedBind =
this.doubleProto =
-1;
}
pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
if (!refDestructuringErrors) { return }
if (refDestructuringErrors.trailingComma > -1)
{ this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); }
var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); }
};
pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
if (!refDestructuringErrors) { return false }
var shorthandAssign = refDestructuringErrors.shorthandAssign;
var doubleProto = refDestructuringErrors.doubleProto;
if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 }
if (shorthandAssign >= 0)
{ this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); }
if (doubleProto >= 0)
{ this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); }
};
pp$9.checkYieldAwaitInDefaultParams = function() {
if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
{ this.raise(this.yieldPos, "Yield expression cannot be a default value"); }
if (this.awaitPos)
{ this.raise(this.awaitPos, "Await expression cannot be a default value"); }
};
pp$9.isSimpleAssignTarget = function(expr) {
if (expr.type === "ParenthesizedExpression")
{ return this.isSimpleAssignTarget(expr.expression) }
return expr.type === "Identifier" || expr.type === "MemberExpression"
};
var pp$8 = Parser.prototype;
// ### Statement parsing
// Parse a program. Initializes the parser, reads any number of
// statements, and wraps them in a Program node. Optionally takes a
// `program` argument. If present, the statements will be appended
// to its body instead of creating a new node.
pp$8.parseTopLevel = function(node) {
var exports = Object.create(null);
if (!node.body) { node.body = []; }
while (this.type !== types$1.eof) {
var stmt = this.parseStatement(null, true, exports);
node.body.push(stmt);
}
if (this.inModule)
{ for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1)
{
var name = list[i];
this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined"));
} }
this.adaptDirectivePrologue(node.body);
this.next();
node.sourceType = this.options.sourceType;
return this.finishNode(node, "Program")
};
var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"};
pp$8.isLet = function(context) {
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false }
skipWhiteSpace.lastIndex = this.pos;
var skip = skipWhiteSpace.exec(this.input);
var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
// For ambiguous cases, determine if a LexicalDeclaration (or only a
// Statement) is allowed here. If context is not empty then only a Statement
// is allowed. However, `let [` is an explicit negative lookahead for
// ExpressionStatement, so special-case it first.
if (nextCh === 91 || nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '[', '/', astral
if (context) { return false }
if (nextCh === 123) { return true } // '{'
if (isIdentifierStart(nextCh, true)) {
var pos = next + 1;
while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }
if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true }
var ident = this.input.slice(next, pos);
if (!keywordRelationalOperator.test(ident)) { return true }
}
return false
};
// check 'async [no LineTerminator here] function'
// - 'async /*foo*/ function' is OK.
// - 'async /*\n*/ function' is invalid.
pp$8.isAsyncFunction = function() {
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
{ return false }
skipWhiteSpace.lastIndex = this.pos;
var skip = skipWhiteSpace.exec(this.input);
var next = this.pos + skip[0].length, after;
return !lineBreak.test(this.input.slice(this.pos, next)) &&
this.input.slice(next, next + 8) === "function" &&
(next + 8 === this.input.length ||
!(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00))
};
// Parse a single statement.
//
// If expecting a statement and finding a slash operator, parse a
// regular expression literal. This is to handle cases like
// `if (foo) /blah/.exec(foo)`, where looking at the previous token
// does not help.
pp$8.parseStatement = function(context, topLevel, exports) {
var starttype = this.type, node = this.startNode(), kind;
if (this.isLet(context)) {
starttype = types$1._var;
kind = "let";
}
// Most types of statements are recognized by the keyword they
// start with. Many are trivial to parse, some require a bit of
// complexity.
switch (starttype) {
case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
case types$1._debugger: return this.parseDebuggerStatement(node)
case types$1._do: return this.parseDoStatement(node)
case types$1._for: return this.parseForStatement(node)
case types$1._function:
// Function as sole body of either an if statement or a labeled statement
// works, but not when it is part of a labeled statement that is the sole
// body of an if statement.
if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); }
return this.parseFunctionStatement(node, false, !context)
case types$1._class:
if (context) { this.unexpected(); }
return this.parseClass(node, true)
case types$1._if: return this.parseIfStatement(node)
case types$1._return: return this.parseReturnStatement(node)
case types$1._switch: return this.parseSwitchStatement(node)
case types$1._throw: return this.parseThrowStatement(node)
case types$1._try: return this.parseTryStatement(node)
case types$1._const: case types$1._var:
kind = kind || this.value;
if (context && kind !== "var") { this.unexpected(); }
return this.parseVarStatement(node, kind)
case types$1._while: return this.parseWhileStatement(node)
case types$1._with: return this.parseWithStatement(node)
case types$1.braceL: return this.parseBlock(true, node)
case types$1.semi: return this.parseEmptyStatement(node)
case types$1._export:
case types$1._import:
if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
skipWhiteSpace.lastIndex = this.pos;
var skip = skipWhiteSpace.exec(this.input);
var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
if (nextCh === 40 || nextCh === 46) // '(' or '.'
{ return this.parseExpressionStatement(node, this.parseExpression()) }
}
if (!this.options.allowImportExportEverywhere) {
if (!topLevel)
{ this.raise(this.start, "'import' and 'export' may only appear at the top level"); }
if (!this.inModule)
{ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); }
}
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports)
// If the statement does not start with a statement keyword or a
// brace, it's an ExpressionStatement or LabeledStatement. We
// simply start parsing an expression, and afterwards, if the
// next token is a colon and the expression was a simple
// Identifier node, we switch to interpreting it as a label.
default:
if (this.isAsyncFunction()) {
if (context) { this.unexpected(); }
this.next();
return this.parseFunctionStatement(node, true, !context)
}
var maybeName = this.value, expr = this.parseExpression();
if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon))
{ return this.parseLabeledStatement(node, maybeName, expr, context) }
else { return this.parseExpressionStatement(node, expr) }
}
};
pp$8.parseBreakContinueStatement = function(node, keyword) {
var isBreak = keyword === "break";
this.next();
if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; }
else if (this.type !== types$1.name) { this.unexpected(); }
else {
node.label = this.parseIdent();
this.semicolon();
}
// Verify that there is an actual destination to break or
// continue to.
var i = 0;
for (; i < this.labels.length; ++i) {
var lab = this.labels[i];
if (node.label == null || lab.name === node.label.name) {
if (lab.kind != null && (isBreak || lab.kind === "loop")) { break }
if (node.label && isBreak) { break }
}
}
if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); }
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
};
pp$8.parseDebuggerStatement = function(node) {
this.next();
this.semicolon();
return this.finishNode(node, "DebuggerStatement")
};
pp$8.parseDoStatement = function(node) {
this.next();
this.labels.push(loopLabel);
node.body = this.parseStatement("do");
this.labels.pop();
this.expect(types$1._while);
node.test = this.parseParenExpression();
if (this.options.ecmaVersion >= 6)
{ this.eat(types$1.semi); }
else
{ this.semicolon(); }
return this.finishNode(node, "DoWhileStatement")
};
// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
// loop is non-trivial. Basically, we have to parse the init `var`
// statement or expression, disallowing the `in` operator (see
// the second parameter to `parseExpression`), and then check
// whether the next token is `in` or `of`. When there is no init
// part (semicolon immediately after the opening parenthesis), it
// is a regular `for` loop.
pp$8.parseForStatement = function(node) {
this.next();
var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1;
this.labels.push(loopLabel);
this.enterScope(0);
this.expect(types$1.parenL);
if (this.type === types$1.semi) {
if (awaitAt > -1) { this.unexpected(awaitAt); }
return this.parseFor(node, null)
}
var isLet = this.isLet();
if (this.type === types$1._var || this.type === types$1._const || isLet) {
var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
this.next();
this.parseVar(init$1, true, kind);
this.finishNode(init$1, "VariableDeclaration");
if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) {
if (this.options.ecmaVersion >= 9) {
if (this.type === types$1._in) {
if (awaitAt > -1) { this.unexpected(awaitAt); }
} else { node.await = awaitAt > -1; }
}
return this.parseForIn(node, init$1)
}
if (awaitAt > -1) { this.unexpected(awaitAt); }
return this.parseFor(node, init$1)
}
var startsWithLet = this.isContextual("let"), isForOf = false;
var refDestructuringErrors = new DestructuringErrors;
var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
if (this.options.ecmaVersion >= 9) {
if (this.type === types$1._in) {
if (awaitAt > -1) { this.unexpected(awaitAt); }
} else { node.await = awaitAt > -1; }
}
if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
this.toAssignable(init, false, refDestructuringErrors);
this.checkLValPattern(init);
return this.parseForIn(node, init)
} else {
this.checkExpressionErrors(refDestructuringErrors, true);
}
if (awaitAt > -1) { this.unexpected(awaitAt); }
return this.parseFor(node, init)
};
pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
this.next();
return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync)
};
pp$8.parseIfStatement = function(node) {
this.next();
node.test = this.parseParenExpression();
// allow function declarations in branches, but only in non-strict mode
node.consequent = this.parseStatement("if");
node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
return this.finishNode(node, "IfStatement")
};
pp$8.parseReturnStatement = function(node) {
if (!this.inFunction && !this.options.allowReturnOutsideFunction)
{ this.raise(this.start, "'return' outside of function"); }
this.next();
// In `return` (and `break`/`continue`), the keywords with
// optional arguments, we eagerly look for a semicolon or the
// possibility to insert one.
if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; }
else { node.argument = this.parseExpression(); this.semicolon(); }
return this.finishNode(node, "ReturnStatement")
};
pp$8.parseSwitchStatement = function(node) {
this.next();
node.discriminant = this.parseParenExpression();
node.cases = [];
this.expect(types$1.braceL);
this.labels.push(switchLabel);
this.enterScope(0);
// Statements under must be grouped (by label) in SwitchCase
// nodes. `cur` is used to keep the node that we are currently
// adding statements to.
var cur;
for (var sawDefault = false; this.type !== types$1.braceR;) {
if (this.type === types$1._case || this.type === types$1._default) {
var isCase = this.type === types$1._case;
if (cur) { this.finishNode(cur, "SwitchCase"); }
node.cases.push(cur = this.startNode());
cur.consequent = [];
this.next();
if (isCase) {
cur.test = this.parseExpression();
} else {
if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); }
sawDefault = true;
cur.test = null;
}
this.expect(types$1.colon);
} else {
if (!cur) { this.unexpected(); }
cur.consequent.push(this.parseStatement(null));
}
}
this.exitScope();
if (cur) { this.finishNode(cur, "SwitchCase"); }
this.next(); // Closing brace
this.labels.pop();
return this.finishNode(node, "SwitchStatement")
};
pp$8.parseThrowStatement = function(node) {
this.next();
if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
{ this.raise(this.lastTokEnd, "Illegal newline after throw"); }
node.argument = this.parseExpression();
this.semicolon();
return this.finishNode(node, "ThrowStatement")
};
// Reused empty array added for node fields that are always empty.
var empty$1 = [];
pp$8.parseTryStatement = function(node) {
this.next();
node.block = this.parseBlock();
node.handler = null;
if (this.type === types$1._catch) {
var clause = this.startNode();
this.next();
if (this.eat(types$1.parenL)) {
clause.param = this.parseBindingAtom();
var simple = clause.param.type === "Identifier";
this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
this.expect(types$1.parenR);
} else {
if (this.options.ecmaVersion < 10) { this.unexpected(); }
clause.param = null;
this.enterScope(0);
}
clause.body = this.parseBlock(false);
this.exitScope();
node.handler = this.finishNode(clause, "CatchClause");
}
node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
if (!node.handler && !node.finalizer)
{ this.raise(node.start, "Missing catch or finally clause"); }
return this.finishNode(node, "TryStatement")
};
pp$8.parseVarStatement = function(node, kind) {
this.next();
this.parseVar(node, false, kind);
this.semicolon();
return this.finishNode(node, "VariableDeclaration")
};
pp$8.parseWhileStatement = function(node) {
this.next();
node.test = this.parseParenExpression();
this.labels.push(loopLabel);
node.body = this.parseStatement("while");
this.labels.pop();
return this.finishNode(node, "WhileStatement")
};
pp$8.parseWithStatement = function(node) {
if (this.strict) { this.raise(this.start, "'with' in strict mode"); }
this.next();
node.object = this.parseParenExpression();
node.body = this.parseStatement("with");
return this.finishNode(node, "WithStatement")
};
pp$8.parseEmptyStatement = function(node) {
this.next();
return this.finishNode(node, "EmptyStatement")
};
pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1)
{
var label = list[i$1];
if (label.name === maybeName)
{ this.raise(expr.start, "Label '" + maybeName + "' is already declared");
} }
var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
for (var i = this.labels.length - 1; i >= 0; i--) {
var label$1 = this.labels[i];
if (label$1.statementStart === node.start) {
// Update information about previous labels on this node
label$1.statementStart = this.start;
label$1.kind = kind;
} else { break }
}
this.labels.push({name: maybeName, kind: kind, statementStart: this.start});
node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
this.labels.pop();
node.label = expr;
return this.finishNode(node, "LabeledStatement")
};
pp$8.parseExpressionStatement = function(node, expr) {
node.expression = expr;
this.semicolon();
return this.finishNode(node, "ExpressionStatement")
};
// Parse a semicolon-enclosed block of statements, handling `"use
// strict"` declarations when `allowStrict` is true (used for
// function bodies).
pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true;
if ( node === void 0 ) node = this.startNode();
node.body = [];
this.expect(types$1.braceL);
if (createNewLexicalScope) { this.enterScope(0); }
while (this.type !== types$1.braceR) {
var stmt = this.parseStatement(null);
node.body.push(stmt);
}
if (exitStrict) { this.strict = false; }
this.next();
if (createNewLexicalScope) { this.exitScope(); }
return this.finishNode(node, "BlockStatement")
};
// Parse a regular `for` loop. The disambiguation code in
// `parseStatement` will already have parsed the init statement or
// expression.
pp$8.parseFor = function(node, init) {
node.init = init;
this.expect(types$1.semi);
node.test = this.type === types$1.semi ? null : this.parseExpression();
this.expect(types$1.semi);
node.update = this.type === types$1.parenR ? null : this.parseExpression();
this.expect(types$1.parenR);
node.body = this.parseStatement("for");
this.exitScope();
this.labels.pop();
return this.finishNode(node, "ForStatement")
};
// Parse a `for`/`in` and `for`/`of` loop, which are almost
// same from parser's perspective.
pp$8.parseForIn = function(node, init) {
var isForIn = this.type === types$1._in;
this.next();
if (
init.type === "VariableDeclaration" &&
init.declarations[0].init != null &&
(
!isForIn ||
this.options.ecmaVersion < 8 ||
this.strict ||
init.kind !== "var" ||
init.declarations[0].id.type !== "Identifier"
)
) {
this.raise(
init.start,
((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer")
);
}
node.left = init;
node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
this.expect(types$1.parenR);
node.body = this.parseStatement("for");
this.exitScope();
this.labels.pop();
return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement")
};
// Parse a list of variable declarations.
pp$8.parseVar = function(node, isFor, kind) {
node.declarations = [];
node.kind = kind;
for (;;) {
var decl = this.startNode();
this.parseVarId(decl, kind);
if (this.eat(types$1.eq)) {
decl.init = this.parseMaybeAssign(isFor);
} else if (kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) {
this.unexpected();
} else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
} else {
decl.init = null;
}
node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
if (!this.eat(types$1.comma)) { break }
}
return node
};
pp$8.parseVarId = function(decl, kind) {
decl.id = this.parseBindingAtom();
this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
};
var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
// Parse a function declaration or literal (depending on the
// `statement & FUNC_STATEMENT`).
// Remove `allowExpressionBody` for 7.0.0, as it is only called with false
pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
this.initFunction(node);
if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT))
{ this.unexpected(); }
node.generator = this.eat(types$1.star);
}
if (this.options.ecmaVersion >= 8)
{ node.async = !!isAsync; }
if (statement & FUNC_STATEMENT) {
node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent();
if (node.id && !(statement & FUNC_HANGING_STATEMENT))
// If it is a regular function declaration in sloppy mode, then it is
// subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding
// mode depends on properties of the current scope (see
// treatFunctionsAsVar).
{ this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); }
}
var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.yieldPos = 0;
this.awaitPos = 0;
this.awaitIdentPos = 0;
this.enterScope(functionFlags(node.async, node.generator));
if (!(statement & FUNC_STATEMENT))
{ node.id = this.type === types$1.name ? this.parseIdent() : null; }
this.parseFunctionParams(node);
this.parseFunctionBody(node, allowExpressionBody, false, forInit);
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
this.awaitIdentPos = oldAwaitIdentPos;
return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression")
};
pp$8.parseFunctionParams = function(node) {
this.expect(types$1.parenL);
node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
this.checkYieldAwaitInDefaultParams();
};
// Parse a class declaration or literal (depending on the
// `isStatement` parameter).
pp$8.parseClass = function(node, isStatement) {
this.next();
// ecma-262 14.6 Class Definitions
// A class definition is always strict mode code.
var oldStrict = this.strict;
this.strict = true;
this.parseClassId(node, isStatement);
this.parseClassSuper(node);
var privateNameMap = this.enterClassBody();
var classBody = this.startNode();
var hadConstructor = false;
classBody.body = [];
this.expect(types$1.braceL);
while (this.type !== types$1.braceR) {
var element = this.parseClassElement(node.superClass !== null);
if (element) {
classBody.body.push(element);
if (element.type === "MethodDefinition" && element.kind === "constructor") {
if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); }
hadConstructor = true;
} else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) {
this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared"));
}
}
}
this.strict = oldStrict;
this.next();
node.body = this.finishNode(classBody, "ClassBody");
this.exitClassBody();
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
};
pp$8.parseClassElement = function(constructorAllowsSuper) {
if (this.eat(types$1.semi)) { return null }
var ecmaVersion = this.options.ecmaVersion;
var node = this.startNode();
var keyName = "";
var isGenerator = false;
var isAsync = false;
var kind = "method";
var isStatic = false;
if (this.eatContextual("static")) {
// Parse static init block
if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
this.parseClassStaticBlock(node);
return node
}
if (this.isClassElementNameStart() || this.type === types$1.star) {
isStatic = true;
} else {
keyName = "static";
}
}
node.static = isStatic;
if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
isAsync = true;
} else {
keyName = "async";
}
}
if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) {
isGenerator = true;
}
if (!keyName && !isAsync && !isGenerator) {
var lastValue = this.value;
if (this.eatContextual("get") || this.eatContextual("set")) {
if (this.isClassElementNameStart()) {
kind = lastValue;
} else {
keyName = lastValue;
}
}
}
// Parse element name
if (keyName) {
// 'async', 'get', 'set', or 'static' were not a keyword contextually.
// The last token is any of those. Make it the element name.
node.computed = false;
node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
node.key.name = keyName;
this.finishNode(node.key, "Identifier");
} else {
this.parseClassElementName(node);
}
// Parse element value
if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
var isConstructor = !node.static && checkKeyName(node, "constructor");
var allowsDirectSuper = isConstructor && constructorAllowsSuper;
// Couldn't move this check into the 'parseClassMethod' method for backward compatibility.
if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); }
node.kind = isConstructor ? "constructor" : kind;
this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
} else {
this.parseClassField(node);
}
return node
};
pp$8.isClassElementNameStart = function() {
return (
this.type === types$1.name ||
this.type === types$1.privateId ||
this.type === types$1.num ||
this.type === types$1.string ||
this.type === types$1.bracketL ||
this.type.keyword
)
};
pp$8.parseClassElementName = function(element) {
if (this.type === types$1.privateId) {
if (this.value === "constructor") {
this.raise(this.start, "Classes can't have an element named '#constructor'");
}
element.computed = false;
element.key = this.parsePrivateIdent();
} else {
this.parsePropertyName(element);
}
};
pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
// Check key and flags
var key = method.key;
if (method.kind === "constructor") {
if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); }
if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); }
} else if (method.static && checkKeyName(method, "prototype")) {
this.raise(key.start, "Classes may not have a static property named prototype");
}
// Parse value
var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
// Check value
if (method.kind === "get" && value.params.length !== 0)
{ this.raiseRecoverable(value.start, "getter should have no params"); }
if (method.kind === "set" && value.params.length !== 1)
{ this.raiseRecoverable(value.start, "setter should have exactly one param"); }
if (method.kind === "set" && value.params[0].type === "RestElement")
{ this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); }
return this.finishNode(method, "MethodDefinition")
};
pp$8.parseClassField = function(field) {
if (checkKeyName(field, "constructor")) {
this.raise(field.key.start, "Classes can't have a field named 'constructor'");
} else if (field.static && checkKeyName(field, "prototype")) {
this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
}
if (this.eat(types$1.eq)) {
// To raise SyntaxError if 'arguments' exists in the initializer.
var scope = this.currentThisScope();
var inClassFieldInit = scope.inClassFieldInit;
scope.inClassFieldInit = true;
field.value = this.parseMaybeAssign();
scope.inClassFieldInit = inClassFieldInit;
} else {
field.value = null;
}
this.semicolon();
return this.finishNode(field, "PropertyDefinition")
};
pp$8.parseClassStaticBlock = function(node) {
node.body = [];
var oldLabels = this.labels;
this.labels = [];
this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
while (this.type !== types$1.braceR) {
var stmt = this.parseStatement(null);
node.body.push(stmt);
}
this.next();
this.exitScope();
this.labels = oldLabels;
return this.finishNode(node, "StaticBlock")
};
pp$8.parseClassId = function(node, isStatement) {
if (this.type === types$1.name) {
node.id = this.parseIdent();
if (isStatement)
{ this.checkLValSimple(node.id, BIND_LEXICAL, false); }
} else {
if (isStatement === true)
{ this.unexpected(); }
node.id = null;
}
};
pp$8.parseClassSuper = function(node) {
node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(false) : null;
};
pp$8.enterClassBody = function() {
var element = {declared: Object.create(null), used: []};
this.privateNameStack.push(element);
return element.declared
};
pp$8.exitClassBody = function() {
var ref = this.privateNameStack.pop();
var declared = ref.declared;
var used = ref.used;
var len = this.privateNameStack.length;
var parent = len === 0 ? null : this.privateNameStack[len - 1];
for (var i = 0; i < used.length; ++i) {
var id = used[i];
if (!hasOwn(declared, id.name)) {
if (parent) {
parent.used.push(id);
} else {
this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class"));
}
}
}
};
function isPrivateNameConflicted(privateNameMap, element) {
var name = element.key.name;
var curr = privateNameMap[name];
var next = "true";
if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) {
next = (element.static ? "s" : "i") + element.kind;
}
// `class { get #a(){}; static set #a(_){} }` is also conflict.
if (
curr === "iget" && next === "iset" ||
curr === "iset" && next === "iget" ||
curr === "sget" && next === "sset" ||
curr === "sset" && next === "sget"
) {
privateNameMap[name] = "true";
return false
} else if (!curr) {
privateNameMap[name] = next;
return false
} else {
return true
}
}
function checkKeyName(node, name) {
var computed = node.computed;
var key = node.key;
return !computed && (
key.type === "Identifier" && key.name === name ||
key.type === "Literal" && key.value === name
)
}
// Parses module export declaration.
pp$8.parseExport = function(node, exports) {
this.next();
// export * from '...'
if (this.eat(types$1.star)) {
if (this.options.ecmaVersion >= 11) {
if (this.eatContextual("as")) {
node.exported = this.parseModuleExportName();
this.checkExport(exports, node.exported.name, this.lastTokStart);
} else {
node.exported = null;
}
}
this.expectContextual("from");
if (this.type !== types$1.string) { this.unexpected(); }
node.source = this.parseExprAtom();
this.semicolon();
return this.finishNode(node, "ExportAllDeclaration")
}
if (this.eat(types$1._default)) { // export default ...
this.checkExport(exports, "default", this.lastTokStart);
var isAsync;
if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
var fNode = this.startNode();
this.next();
if (isAsync) { this.next(); }
node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
} else if (this.type === types$1._class) {
var cNode = this.startNode();
node.declaration = this.parseClass(cNode, "nullableID");
} else {
node.declaration = this.parseMaybeAssign();
this.semicolon();
}
return this.finishNode(node, "ExportDefaultDeclaration")
}
// export var|const|let|function|class ...
if (this.shouldParseExportStatement()) {
node.declaration = this.parseStatement(null);
if (node.declaration.type === "VariableDeclaration")
{ this.checkVariableExport(exports, node.declaration.declarations); }
else
{ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); }
node.specifiers = [];
node.source = null;
} else { // export { x, y as z } [from '...']
node.declaration = null;
node.specifiers = this.parseExportSpecifiers(exports);
if (this.eatContextual("from")) {
if (this.type !== types$1.string) { this.unexpected(); }
node.source = this.parseExprAtom();
} else {
for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
// check for keywords used as local names
var spec = list[i];
this.checkUnreserved(spec.local);
// check if export is defined
this.checkLocalExport(spec.local);
if (spec.local.type === "Literal") {
this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
}
}
node.source = null;
}
this.semicolon();
}
return this.finishNode(node, "ExportNamedDeclaration")
};
pp$8.checkExport = function(exports, name, pos) {
if (!exports) { return }
if (hasOwn(exports, name))
{ this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
exports[name] = true;
};
pp$8.checkPatternExport = function(exports, pat) {
var type = pat.type;
if (type === "Identifier")
{ this.checkExport(exports, pat.name, pat.start); }
else if (type === "ObjectPattern")
{ for (var i = 0, list = pat.properties; i < list.length; i += 1)
{
var prop = list[i];
this.checkPatternExport(exports, prop);
} }
else if (type === "ArrayPattern")
{ for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
var elt = list$1[i$1];
if (elt) { this.checkPatternExport(exports, elt); }
} }
else if (type === "Property")
{ this.checkPatternExport(exports, pat.value); }
else if (type === "AssignmentPattern")
{ this.checkPatternExport(exports, pat.left); }
else if (type === "RestElement")
{ this.checkPatternExport(exports, pat.argument); }
else if (type === "ParenthesizedExpression")
{ this.checkPatternExport(exports, pat.expression); }
};
pp$8.checkVariableExport = function(exports, decls) {
if (!exports) { return }
for (var i = 0, list = decls; i < list.length; i += 1)
{
var decl = list[i];
this.checkPatternExport(exports, decl.id);
}
};
pp$8.shouldParseExportStatement = function() {
return this.type.keyword === "var" ||
this.type.keyword === "const" ||
this.type.keyword === "class" ||
this.type.keyword === "function" ||
this.isLet() ||
this.isAsyncFunction()
};
// Parses a comma-separated list of module exports.
pp$8.parseExportSpecifiers = function(exports) {
var nodes = [], first = true;
// export { x, y as z } [from '...']
this.expect(types$1.braceL);
while (!this.eat(types$1.braceR)) {
if (!first) {
this.expect(types$1.comma);
if (this.afterTrailingComma(types$1.braceR)) { break }
} else { first = false; }
var node = this.startNode();
node.local = this.parseModuleExportName();
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
this.checkExport(
exports,
node.exported[node.exported.type === "Identifier" ? "name" : "value"],
node.exported.start
);
nodes.push(this.finishNode(node, "ExportSpecifier"));
}
return nodes
};
// Parses import declaration.
pp$8.parseImport = function(node) {
this.next();
// import '...'
if (this.type === types$1.string) {
node.specifiers = empty$1;
node.source = this.parseExprAtom();
} else {
node.specifiers = this.parseImportSpecifiers();
this.expectContextual("from");
node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
}
this.semicolon();
return this.finishNode(node, "ImportDeclaration")
};
// Parses a comma-separated list of module imports.
pp$8.parseImportSpecifiers = function() {
var nodes = [], first = true;
if (this.type === types$1.name) {
// import defaultObj, { x, y as z } from '...'
var node = this.startNode();
node.local = this.parseIdent();
this.checkLValSimple(node.local, BIND_LEXICAL);
nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
if (!this.eat(types$1.comma)) { return nodes }
}
if (this.type === types$1.star) {
var node$1 = this.startNode();
this.next();
this.expectContextual("as");
node$1.local = this.parseIdent();
this.checkLValSimple(node$1.local, BIND_LEXICAL);
nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
return nodes
}
this.expect(types$1.braceL);
while (!this.eat(types$1.braceR)) {
if (!first) {
this.expect(types$1.comma);
if (this.afterTrailingComma(types$1.braceR)) { break }
} else { first = false; }
var node$2 = this.startNode();
node$2.imported = this.parseModuleExportName();
if (this.eatContextual("as")) {
node$2.local = this.parseIdent();
} else {
this.checkUnreserved(node$2.imported);
node$2.local = node$2.imported;
}
this.checkLValSimple(node$2.local, BIND_LEXICAL);
nodes.push(this.finishNode(node$2, "ImportSpecifier"));
}
return nodes
};
pp$8.parseModuleExportName = function() {
if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
var stringLiteral = this.parseLiteral(this.value);
if (loneSurrogate.test(stringLiteral.value)) {
this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
}
return stringLiteral
}
return this.parseIdent(true)
};
// Set `ExpressionStatement#directive` property for directive prologues.
pp$8.adaptDirectivePrologue = function(statements) {
for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
statements[i].directive = statements[i].expression.raw.slice(1, -1);
}
};
pp$8.isDirectiveCandidate = function(statement) {
return (
statement.type === "ExpressionStatement" &&
statement.expression.type === "Literal" &&
typeof statement.expression.value === "string" &&
// Reject parenthesized strings.
(this.input[statement.start] === "\"" || this.input[statement.start] === "'")
)
};
var pp$7 = Parser.prototype;
// Convert existing expression atom to assignable pattern
// if possible.
pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
if (this.options.ecmaVersion >= 6 && node) {
switch (node.type) {
case "Identifier":
if (this.inAsync && node.name === "await")
{ this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); }
break
case "ObjectPattern":
case "ArrayPattern":
case "AssignmentPattern":
case "RestElement":
break
case "ObjectExpression":
node.type = "ObjectPattern";
if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }
for (var i = 0, list = node.properties; i < list.length; i += 1) {
var prop = list[i];
this.toAssignable(prop, isBinding);
// Early error:
// AssignmentRestProperty[Yield, Await] :
// `...` DestructuringAssignmentTarget[Yield, Await]
//
// It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.
if (
prop.type === "RestElement" &&
(prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")
) {
this.raise(prop.argument.start, "Unexpected token");
}
}
break
case "Property":
// AssignmentProperty has type === "Property"
if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); }
this.toAssignable(node.value, isBinding);
break
case "ArrayExpression":
node.type = "ArrayPattern";
if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }
this.toAssignableList(node.elements, isBinding);
break
case "SpreadElement":
node.type = "RestElement";
this.toAssignable(node.argument, isBinding);
if (node.argument.type === "AssignmentPattern")
{ this.raise(node.argument.start, "Rest elements cannot have a default value"); }
break
case "AssignmentExpression":
if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); }
node.type = "AssignmentPattern";
delete node.operator;
this.toAssignable(node.left, isBinding);
break
case "ParenthesizedExpression":
this.toAssignable(node.expression, isBinding, refDestructuringErrors);
break
case "ChainExpression":
this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
break
case "MemberExpression":
if (!isBinding) { break }
default:
this.raise(node.start, "Assigning to rvalue");
}
} else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); }
return node
};
// Convert list of expression atoms to binding list.
pp$7.toAssignableList = function(exprList, isBinding) {
var end = exprList.length;
for (var i = 0; i < end; i++) {
var elt = exprList[i];
if (elt) { this.toAssignable(elt, isBinding); }
}
if (end) {
var last = exprList[end - 1];
if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
{ this.unexpected(last.argument.start); }
}
return exprList
};
// Parses spread element.
pp$7.parseSpread = function(refDestructuringErrors) {
var node = this.startNode();
this.next();
node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
return this.finishNode(node, "SpreadElement")
};
pp$7.parseRestBinding = function() {
var node = this.startNode();
this.next();
// RestElement inside of a function parameter must be an identifier
if (this.options.ecmaVersion === 6 && this.type !== types$1.name)
{ this.unexpected(); }
node.argument = this.parseBindingAtom();
return this.finishNode(node, "RestElement")
};
// Parses lvalue (assignable) atom.
pp$7.parseBindingAtom = function() {
if (this.options.ecmaVersion >= 6) {
switch (this.type) {
case types$1.bracketL:
var node = this.startNode();
this.next();
node.elements = this.parseBindingList(types$1.bracketR, true, true);
return this.finishNode(node, "ArrayPattern")
case types$1.braceL:
return this.parseObj(true)
}
}
return this.parseIdent()
};
pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
var elts = [], first = true;
while (!this.eat(close)) {
if (first) { first = false; }
else { this.expect(types$1.comma); }
if (allowEmpty && this.type === types$1.comma) {
elts.push(null);
} else if (allowTrailingComma && this.afterTrailingComma(close)) {
break
} else if (this.type === types$1.ellipsis) {
var rest = this.parseRestBinding();
this.parseBindingListItem(rest);
elts.push(rest);
if (this.type === types$1.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); }
this.expect(close);
break
} else {
var elem = this.parseMaybeDefault(this.start, this.startLoc);
this.parseBindingListItem(elem);
elts.push(elem);
}
}
return elts
};
pp$7.parseBindingListItem = function(param) {
return param
};
// Parses assignment pattern around given atom if possible.
pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
left = left || this.parseBindingAtom();
if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left }
var node = this.startNodeAt(startPos, startLoc);
node.left = left;
node.right = this.parseMaybeAssign();
return this.finishNode(node, "AssignmentPattern")
};
// The following three functions all verify that a node is an lvalue —
// something that can be bound, or assigned to. In order to do so, they perform
// a variety of checks:
//
// - Check that none of the bound/assigned-to identifiers are reserved words.
// - Record name declarations for bindings in the appropriate scope.
// - Check duplicate argument names, if checkClashes is set.
//
// If a complex binding pattern is encountered (e.g., object and array
// destructuring), the entire pattern is recursively checked.
//
// There are three versions of checkLVal*() appropriate for different
// circumstances:
//
// - checkLValSimple() shall be used if the syntactic construct supports
// nothing other than identifiers and member expressions. Parenthesized
// expressions are also correctly handled. This is generally appropriate for
// constructs for which the spec says
//
// > It is a Syntax Error if AssignmentTargetType of [the production] is not
// > simple.
//
// It is also appropriate for checking if an identifier is valid and not
// defined elsewhere, like import declarations or function/class identifiers.
//
// Examples where this is used include:
// a += …;
// import a from '…';
// where a is the node to be checked.
//
// - checkLValPattern() shall be used if the syntactic construct supports
// anything checkLValSimple() supports, as well as object and array
// destructuring patterns. This is generally appropriate for constructs for
// which the spec says
//
// > It is a Syntax Error if [the production] is neither an ObjectLiteral nor
// > an ArrayLiteral and AssignmentTargetType of [the production] is not
// > simple.
//
// Examples where this is used include:
// (a = …);
// const a = …;
// try { … } catch (a) { … }
// where a is the node to be checked.
//
// - checkLValInnerPattern() shall be used if the syntactic construct supports
// anything checkLValPattern() supports, as well as default assignment
// patterns, rest elements, and other constructs that may appear within an
// object or array destructuring pattern.
//
// As a special case, function parameters also use checkLValInnerPattern(),
// as they also support defaults and rest constructs.
//
// These functions deliberately support both assignment and binding constructs,
// as the logic for both is exceedingly similar. If the node is the target of
// an assignment, then bindingType should be set to BIND_NONE. Otherwise, it
// should be set to the appropriate BIND_* constant, like BIND_VAR or
// BIND_LEXICAL.
//
// If the function is called with a non-BIND_NONE bindingType, then
// additionally a checkClashes object may be specified to allow checking for
// duplicate argument names. checkClashes is ignored if the provided construct
// is an assignment (i.e., bindingType is BIND_NONE).
pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
if ( bindingType === void 0 ) bindingType = BIND_NONE;
var isBind = bindingType !== BIND_NONE;
switch (expr.type) {
case "Identifier":
if (this.strict && this.reservedWordsStrictBind.test(expr.name))
{ this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); }
if (isBind) {
if (bindingType === BIND_LEXICAL && expr.name === "let")
{ this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); }
if (checkClashes) {
if (hasOwn(checkClashes, expr.name))
{ this.raiseRecoverable(expr.start, "Argument name clash"); }
checkClashes[expr.name] = true;
}
if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); }
}
break
case "ChainExpression":
this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
break
case "MemberExpression":
if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); }
break
case "ParenthesizedExpression":
if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); }
return this.checkLValSimple(expr.expression, bindingType, checkClashes)
default:
this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
}
};
pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
if ( bindingType === void 0 ) bindingType = BIND_NONE;
switch (expr.type) {
case "ObjectPattern":
for (var i = 0, list = expr.properties; i < list.length; i += 1) {
var prop = list[i];
this.checkLValInnerPattern(prop, bindingType, checkClashes);
}
break
case "ArrayPattern":
for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
var elem = list$1[i$1];
if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); }
}
break
default:
this.checkLValSimple(expr, bindingType, checkClashes);
}
};
pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
if ( bindingType === void 0 ) bindingType = BIND_NONE;
switch (expr.type) {
case "Property":
// AssignmentProperty has type === "Property"
this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
break
case "AssignmentPattern":
this.checkLValPattern(expr.left, bindingType, checkClashes);
break
case "RestElement":
this.checkLValPattern(expr.argument, bindingType, checkClashes);
break
default:
this.checkLValPattern(expr, bindingType, checkClashes);
}
};
// The algorithm used to determine whether a regexp can appear at a
var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {
this.token = token;
this.isExpr = !!isExpr;
this.preserveSpace = !!preserveSpace;
this.override = override;
this.generator = !!generator;
};
var types = {
b_stat: new TokContext("{", false),
b_expr: new TokContext("{", true),
b_tmpl: new TokContext("${", false),
p_stat: new TokContext("(", false),
p_expr: new TokContext("(", true),
q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }),
f_stat: new TokContext("function", false),
f_expr: new TokContext("function", true),
f_expr_gen: new TokContext("function", true, false, null, true),
f_gen: new TokContext("function", false, false, null, true)
};
var pp$6 = Parser.prototype;
pp$6.initialContext = function() {
return [types.b_stat]
};
pp$6.curContext = function() {
return this.context[this.context.length - 1]
};
pp$6.braceIsBlock = function(prevType) {
var parent = this.curContext();
if (parent === types.f_expr || parent === types.f_stat)
{ return true }
if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr))
{ return !parent.isExpr }
// The check for `tt.name && exprAllowed` detects whether we are
// after a `yield` or `of` construct. See the `updateContext` for
// `tt.name`.
if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed)
{ return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) }
if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow)
{ return true }
if (prevType === types$1.braceL)
{ return parent === types.b_stat }
if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name)
{ return false }
return !this.exprAllowed
};
pp$6.inGeneratorContext = function() {
for (var i = this.context.length - 1; i >= 1; i--) {
var context = this.context[i];
if (context.token === "function")
{ return context.generator }
}
return false
};
pp$6.updateContext = function(prevType) {
var update, type = this.type;
if (type.keyword && prevType === types$1.dot)
{ this.exprAllowed = false; }
else if (update = type.updateContext)
{ update.call(this, prevType); }
else
{ this.exprAllowed = type.beforeExpr; }
};
// Used to handle egde case when token context could not be inferred correctly in tokenize phase
pp$6.overrideContext = function(tokenCtx) {
if (this.curContext() !== tokenCtx) {
this.context[this.context.length - 1] = tokenCtx;
}
};
// Token-specific context update code
types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
if (this.context.length === 1) {
this.exprAllowed = true;
return
}
var out = this.context.pop();
if (out === types.b_stat && this.curContext().token === "function") {
out = this.context.pop();
}
this.exprAllowed = !out.isExpr;
};
types$1.braceL.updateContext = function(prevType) {
this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
this.exprAllowed = true;
};
types$1.dollarBraceL.updateContext = function() {
this.context.push(types.b_tmpl);
this.exprAllowed = true;
};
types$1.parenL.updateContext = function(prevType) {
var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
this.context.push(statementParens ? types.p_stat : types.p_expr);
this.exprAllowed = true;
};
types$1.incDec.updateContext = function() {
// tokExprAllowed stays unchanged
};
types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
if (prevType.beforeExpr && prevType !== types$1._else &&
!(prevType === types$1.semi && this.curContext() !== types.p_stat) &&
!(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) &&
!((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat))
{ this.context.push(types.f_expr); }
else
{ this.context.push(types.f_stat); }
this.exprAllowed = false;
};
types$1.backQuote.updateContext = function() {
if (this.curContext() === types.q_tmpl)
{ this.context.pop(); }
else
{ this.context.push(types.q_tmpl); }
this.exprAllowed = false;
};
types$1.star.updateContext = function(prevType) {
if (prevType === types$1._function) {
var index = this.context.length - 1;
if (this.context[index] === types.f_expr)
{ this.context[index] = types.f_expr_gen; }
else
{ this.context[index] = types.f_gen; }
}
this.exprAllowed = true;
};
types$1.name.updateContext = function(prevType) {
var allowed = false;
if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {
if (this.value === "of" && !this.exprAllowed ||
this.value === "yield" && this.inGeneratorContext())
{ allowed = true; }
}
this.exprAllowed = allowed;
};
// A recursive descent parser operates by defining functions for all
var pp$5 = Parser.prototype;
// Check if property name clashes with already added.
// Object/class getters and setters are not allowed to clash —
// either with each other or with an init property — and in
// strict mode, init properties are also not allowed to be repeated.
pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement")
{ return }
if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
{ return }
var key = prop.key;
var name;
switch (key.type) {
case "Identifier": name = key.name; break
case "Literal": name = String(key.value); break
default: return
}
var kind = prop.kind;
if (this.options.ecmaVersion >= 6) {
if (name === "__proto__" && kind === "init") {
if (propHash.proto) {
if (refDestructuringErrors) {
if (refDestructuringErrors.doubleProto < 0) {
refDestructuringErrors.doubleProto = key.start;
}
} else {
this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
}
}
propHash.proto = true;
}
return
}
name = "$" + name;
var other = propHash[name];
if (other) {
var redefinition;
if (kind === "init") {
redefinition = this.strict && other.init || other.get || other.set;
} else {
redefinition = other.init || other[kind];
}
if (redefinition)
{ this.raiseRecoverable(key.start, "Redefinition of property"); }
} else {
other = propHash[name] = {
init: false,
get: false,
set: false
};
}
other[kind] = true;
};
// ### Expression parsing
// These nest, from the most general expression type at the top to
// 'atomic', nondivisible expression types at the bottom. Most of
// the functions will simply let the function(s) below them parse,
// and, *if* the syntactic construct they handle is present, wrap
// the AST node that the inner parser gave them in another node.
// Parse a full expression. The optional arguments are used to
// forbid the `in` operator (in for loops initalization expressions)
// and provide reference for storing '=' operator inside shorthand
// property assignment in contexts where both object expression
// and object pattern might appear (so it's possible to raise
// delayed syntax error at correct position).
pp$5.parseExpression = function(forInit, refDestructuringErrors) {
var startPos = this.start, startLoc = this.startLoc;
var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
if (this.type === types$1.comma) {
var node = this.startNodeAt(startPos, startLoc);
node.expressions = [expr];
while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); }
return this.finishNode(node, "SequenceExpression")
}
return expr
};
// Parse an assignment expression. This includes applications of
// operators like `+=`.
pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
if (this.isContextual("yield")) {
if (this.inGenerator) { return this.parseYield(forInit) }
// The tokenizer will assume an expression is allowed after
// `yield`, but this isn't that kind of yield
else { this.exprAllowed = false; }
}
var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
if (refDestructuringErrors) {
oldParenAssign = refDestructuringErrors.parenthesizedAssign;
oldTrailingComma = refDestructuringErrors.trailingComma;
oldDoubleProto = refDestructuringErrors.doubleProto;
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
} else {
refDestructuringErrors = new DestructuringErrors;
ownDestructuringErrors = true;
}
var startPos = this.start, startLoc = this.startLoc;
if (this.type === types$1.parenL || this.type === types$1.name) {
this.potentialArrowAt = this.start;
this.potentialArrowInForAwait = forInit === "await";
}
var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); }
if (this.type.isAssign) {
var node = this.startNodeAt(startPos, startLoc);
node.operator = this.value;
if (this.type === types$1.eq)
{ left = this.toAssignable(left, false, refDestructuringErrors); }
if (!ownDestructuringErrors) {
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
}
if (refDestructuringErrors.shorthandAssign >= left.start)
{ refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly
if (this.type === types$1.eq)
{ this.checkLValPattern(left); }
else
{ this.checkLValSimple(left); }
node.left = left;
this.next();
node.right = this.parseMaybeAssign(forInit);
if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; }
return this.finishNode(node, "AssignmentExpression")
} else {
if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); }
}
if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; }
if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; }
return left
};
// Parse a ternary conditional (`?:`) operator.
pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
var startPos = this.start, startLoc = this.startLoc;
var expr = this.parseExprOps(forInit, refDestructuringErrors);
if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
if (this.eat(types$1.question)) {
var node = this.startNodeAt(startPos, startLoc);
node.test = expr;
node.consequent = this.parseMaybeAssign();
this.expect(types$1.colon);
node.alternate = this.parseMaybeAssign(forInit);
return this.finishNode(node, "ConditionalExpression")
}
return expr
};
// Start the precedence parser.
pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
var startPos = this.start, startLoc = this.startLoc;
var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit)
};
// Parse binary operators with the operator precedence parsing
// algorithm. `left` is the left-hand side of the operator.
// `minPrec` provides context that allows the function to stop and
// defer further parser to one of its callers when it encounters an
// operator that has a lower precedence than the set it is parsing.
pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
var prec = this.type.binop;
if (prec != null && (!forInit || this.type !== types$1._in)) {
if (prec > minPrec) {
var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;
var coalesce = this.type === types$1.coalesce;
if (coalesce) {
// Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.
// In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.
prec = types$1.logicalAND.binop;
}
var op = this.value;
this.next();
var startPos = this.start, startLoc = this.startLoc;
var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) {
this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
}
return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit)
}
}
return left
};
pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); }
var node = this.startNodeAt(startPos, startLoc);
node.left = left;
node.operator = op;
node.right = right;
return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
};
// Parse unary operators, both prefix and postfix.
pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
var startPos = this.start, startLoc = this.startLoc, expr;
if (this.isContextual("await") && this.canAwait) {
expr = this.parseAwait(forInit);
sawUnary = true;
} else if (this.type.prefix) {
var node = this.startNode(), update = this.type === types$1.incDec;
node.operator = this.value;
node.prefix = true;
this.next();
node.argument = this.parseMaybeUnary(null, true, update, forInit);
this.checkExpressionErrors(refDestructuringErrors, true);
if (update) { this.checkLValSimple(node.argument); }
else if (this.strict && node.operator === "delete" &&
node.argument.type === "Identifier")
{ this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
{ this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
else { sawUnary = true; }
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
} else if (!sawUnary && this.type === types$1.privateId) {
if (forInit || this.privateNameStack.length === 0) { this.unexpected(); }
expr = this.parsePrivateIdent();
// only could be private fields in 'in', such as #x in obj
if (this.type !== types$1._in) { this.unexpected(); }
} else {
expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
if (this.checkExpressionErrors(refDestructuringErrors)) { return expr }
while (this.type.postfix && !this.canInsertSemicolon()) {
var node$1 = this.startNodeAt(startPos, startLoc);
node$1.operator = this.value;
node$1.prefix = false;
node$1.argument = expr;
this.checkLValSimple(expr);
this.next();
expr = this.finishNode(node$1, "UpdateExpression");
}
}
if (!incDec && this.eat(types$1.starstar)) {
if (sawUnary)
{ this.unexpected(this.lastTokStart); }
else
{ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false) }
} else {
return expr
}
};
function isPrivateFieldAccess(node) {
return (
node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)
)
}
// Parse call, dot, and `[]`-subscript expressions.
pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
var startPos = this.start, startLoc = this.startLoc;
var expr = this.parseExprAtom(refDestructuringErrors, forInit);
if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
{ return expr }
var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
if (refDestructuringErrors && result.type === "MemberExpression") {
if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; }
if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; }
if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; }
}
return result
};
pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 &&
this.potentialArrowAt === base.start;
var optionalChained = false;
while (true) {
var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
if (element.optional) { optionalChained = true; }
if (element === base || element.type === "ArrowFunctionExpression") {
if (optionalChained) {
var chainNode = this.startNodeAt(startPos, startLoc);
chainNode.expression = element;
element = this.finishNode(chainNode, "ChainExpression");
}
return element
}
base = element;
}
};
pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
var optionalSupported = this.options.ecmaVersion >= 11;
var optional = optionalSupported && this.eat(types$1.questionDot);
if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); }
var computed = this.eat(types$1.bracketL);
if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) {
var node = this.startNodeAt(startPos, startLoc);
node.object = base;
if (computed) {
node.property = this.parseExpression();
this.expect(types$1.bracketR);
} else if (this.type === types$1.privateId && base.type !== "Super") {
node.property = this.parsePrivateIdent();
} else {
node.property = this.parseIdent(this.options.allowReserved !== "never");
}
node.computed = !!computed;
if (optionalSupported) {
node.optional = optional;
}
base = this.finishNode(node, "MemberExpression");
} else if (!noCalls && this.eat(types$1.parenL)) {
var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.yieldPos = 0;
this.awaitPos = 0;
this.awaitIdentPos = 0;
var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
this.checkPatternErrors(refDestructuringErrors, false);
this.checkYieldAwaitInDefaultParams();
if (this.awaitIdentPos > 0)
{ this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); }
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
this.awaitIdentPos = oldAwaitIdentPos;
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit)
}
this.checkExpressionErrors(refDestructuringErrors, true);
this.yieldPos = oldYieldPos || this.yieldPos;
this.awaitPos = oldAwaitPos || this.awaitPos;
this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
var node$1 = this.startNodeAt(startPos, startLoc);
node$1.callee = base;
node$1.arguments = exprList;
if (optionalSupported) {
node$1.optional = optional;
}
base = this.finishNode(node$1, "CallExpression");
} else if (this.type === types$1.backQuote) {
if (optional || optionalChained) {
this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
}
var node$2 = this.startNodeAt(startPos, startLoc);
node$2.tag = base;
node$2.quasi = this.parseTemplate({isTagged: true});
base = this.finishNode(node$2, "TaggedTemplateExpression");
}
return base
};
// Parse an atomic expression — either a single token that is an
// expression, an expression started by a keyword like `function` or
// `new`, or an expression wrapped in punctuation like `()`, `[]`,
// or `{}`.
pp$5.parseExprAtom = function(refDestructuringErrors, forInit) {
// If a division operator appears in an expression position, the
// tokenizer got confused, and we force it to read a regexp instead.
if (this.type === types$1.slash) { this.readRegexp(); }
var node, canBeArrow = this.potentialArrowAt === this.start;
switch (this.type) {
case types$1._super:
if (!this.allowSuper)
{ this.raise(this.start, "'super' keyword outside a method"); }
node = this.startNode();
this.next();
if (this.type === types$1.parenL && !this.allowDirectSuper)
{ this.raise(node.start, "super() call outside constructor of a subclass"); }
// The `super` keyword can appear at below:
// SuperProperty:
// super [ Expression ]
// super . IdentifierName
// SuperCall:
// super ( Arguments )
if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL)
{ this.unexpected(); }
return this.finishNode(node, "Super")
case types$1._this:
node = this.startNode();
this.next();
return this.finishNode(node, "ThisExpression")
case types$1.name:
var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
var id = this.parseIdent(false);
if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) {
this.overrideContext(types.f_expr);
return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit)
}
if (canBeArrow && !this.canInsertSemicolon()) {
if (this.eat(types$1.arrow))
{ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) }
if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc &&
(!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
id = this.parseIdent(false);
if (this.canInsertSemicolon() || !this.eat(types$1.arrow))
{ this.unexpected(); }
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit)
}
}
return id
case types$1.regexp:
var value = this.value;
node = this.parseLiteral(value.value);
node.regex = {pattern: value.pattern, flags: value.flags};
return node
case types$1.num: case types$1.string:
return this.parseLiteral(this.value)
case types$1._null: case types$1._true: case types$1._false:
node = this.startNode();
node.value = this.type === types$1._null ? null : this.type === types$1._true;
node.raw = this.type.keyword;
this.next();
return this.finishNode(node, "Literal")
case types$1.parenL:
var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
if (refDestructuringErrors) {
if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
{ refDestructuringErrors.parenthesizedAssign = start; }
if (refDestructuringErrors.parenthesizedBind < 0)
{ refDestructuringErrors.parenthesizedBind = start; }
}
return expr
case types$1.bracketL:
node = this.startNode();
this.next();
node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
return this.finishNode(node, "ArrayExpression")
case types$1.braceL:
this.overrideContext(types.b_expr);
return this.parseObj(false, refDestructuringErrors)
case types$1._function:
node = this.startNode();
this.next();
return this.parseFunction(node, 0)
case types$1._class:
return this.parseClass(this.startNode(), false)
case types$1._new:
return this.parseNew()
case types$1.backQuote:
return this.parseTemplate()
case types$1._import:
if (this.options.ecmaVersion >= 11) {
return this.parseExprImport()
} else {
return this.unexpected()
}
default:
this.unexpected();
}
};
pp$5.parseExprImport = function() {
var node = this.startNode();
// Consume `import` as an identifier for `import.meta`.
// Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.
if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); }
var meta = this.parseIdent(true);
switch (this.type) {
case types$1.parenL:
return this.parseDynamicImport(node)
case types$1.dot:
node.meta = meta;
return this.parseImportMeta(node)
default:
this.unexpected();
}
};
pp$5.parseDynamicImport = function(node) {
this.next(); // skip `(`
// Parse node.source.
node.source = this.parseMaybeAssign();
// Verify ending.
if (!this.eat(types$1.parenR)) {
var errorPos = this.start;
if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
} else {
this.unexpected(errorPos);
}
}
return this.finishNode(node, "ImportExpression")
};
pp$5.parseImportMeta = function(node) {
this.next(); // skip `.`
var containsEsc = this.containsEsc;
node.property = this.parseIdent(true);
if (node.property.name !== "meta")
{ this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); }
if (containsEsc)
{ this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); }
if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere)
{ this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); }
return this.finishNode(node, "MetaProperty")
};
pp$5.parseLiteral = function(value) {
var node = this.startNode();
node.value = value;
node.raw = this.input.slice(this.start, this.end);
if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); }
this.next();
return this.finishNode(node, "Literal")
};
pp$5.parseParenExpression = function() {
this.expect(types$1.parenL);
var val = this.parseExpression();
this.expect(types$1.parenR);
return val
};
pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
if (this.options.ecmaVersion >= 6) {
this.next();
var innerStartPos = this.start, innerStartLoc = this.startLoc;
var exprList = [], first = true, lastIsComma = false;
var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
this.yieldPos = 0;
this.awaitPos = 0;
// Do not save awaitIdentPos to allow checking awaits nested in parameters
while (this.type !== types$1.parenR) {
first ? first = false : this.expect(types$1.comma);
if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {
lastIsComma = true;
break
} else if (this.type === types$1.ellipsis) {
spreadStart = this.start;
exprList.push(this.parseParenItem(this.parseRestBinding()));
if (this.type === types$1.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); }
break
} else {
exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
}
}
var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
this.expect(types$1.parenR);
if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
this.checkPatternErrors(refDestructuringErrors, false);
this.checkYieldAwaitInDefaultParams();
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
return this.parseParenArrowList(startPos, startLoc, exprList, forInit)
}
if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); }
if (spreadStart) { this.unexpected(spreadStart); }
this.checkExpressionErrors(refDestructuringErrors, true);
this.yieldPos = oldYieldPos || this.yieldPos;
this.awaitPos = oldAwaitPos || this.awaitPos;
if (exprList.length > 1) {
val = this.startNodeAt(innerStartPos, innerStartLoc);
val.expressions = exprList;
this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
} else {
val = exprList[0];
}
} else {
val = this.parseParenExpression();
}
if (this.options.preserveParens) {
var par = this.startNodeAt(startPos, startLoc);
par.expression = val;
return this.finishNode(par, "ParenthesizedExpression")
} else {
return val
}
};
pp$5.parseParenItem = function(item) {
return item
};
pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit)
};
// New's precedence is slightly tricky. It must allow its argument to
// be a `[]` or dot subscript expression, but not a call — at least,
// not without wrapping it in parentheses. Thus, it uses the noCalls
// argument to parseSubscripts to prevent it from consuming the
// argument list.
var empty = [];
pp$5.parseNew = function() {
if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); }
var node = this.startNode();
var meta = this.parseIdent(true);
if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
node.meta = meta;
var containsEsc = this.containsEsc;
node.property = this.parseIdent(true);
if (node.property.name !== "target")
{ this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); }
if (containsEsc)
{ this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); }
if (!this.allowNewDotTarget)
{ this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); }
return this.finishNode(node, "MetaProperty")
}
var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$1._import;
node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false);
if (isImport && node.callee.type === "ImportExpression") {
this.raise(startPos, "Cannot use new with import()");
}
if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); }
else { node.arguments = empty; }
return this.finishNode(node, "NewExpression")
};
// Parse template expression.
pp$5.parseTemplateElement = function(ref) {
var isTagged = ref.isTagged;
var elem = this.startNode();
if (this.type === types$1.invalidTemplate) {
if (!isTagged) {
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
}
elem.value = {
raw: this.value,
cooked: null
};
} else {
elem.value = {
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
cooked: this.value
};
}
this.next();
elem.tail = this.type === types$1.backQuote;
return this.finishNode(elem, "TemplateElement")
};
pp$5.parseTemplate = function(ref) {
if ( ref === void 0 ) ref = {};
var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false;
var node = this.startNode();
this.next();
node.expressions = [];
var curElt = this.parseTemplateElement({isTagged: isTagged});
node.quasis = [curElt];
while (!curElt.tail) {
if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); }
this.expect(types$1.dollarBraceL);
node.expressions.push(this.parseExpression());
this.expect(types$1.braceR);
node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged}));
}
this.next();
return this.finishNode(node, "TemplateLiteral")
};
pp$5.isAsyncProp = function(prop) {
return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" &&
(this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) &&
!lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
};
// Parse an object literal or binding pattern.
pp$5.parseObj = function(isPattern, refDestructuringErrors) {
var node = this.startNode(), first = true, propHash = {};
node.properties = [];
this.next();
while (!this.eat(types$1.braceR)) {
if (!first) {
this.expect(types$1.comma);
if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break }
} else { first = false; }
var prop = this.parseProperty(isPattern, refDestructuringErrors);
if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); }
node.properties.push(prop);
}
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
};
pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
if (isPattern) {
prop.argument = this.parseIdent(false);
if (this.type === types$1.comma) {
this.raise(this.start, "Comma is not permitted after the rest element");
}
return this.finishNode(prop, "RestElement")
}
// To disallow parenthesized identifier via `this.toAssignable()`.
if (this.type === types$1.parenL && refDestructuringErrors) {
if (refDestructuringErrors.parenthesizedAssign < 0) {
refDestructuringErrors.parenthesizedAssign = this.start;
}
if (refDestructuringErrors.parenthesizedBind < 0) {
refDestructuringErrors.parenthesizedBind = this.start;
}
}
// Parse argument.
prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
// To disallow trailing comma via `this.toAssignable()`.
if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
refDestructuringErrors.trailingComma = this.start;
}
// Finish
return this.finishNode(prop, "SpreadElement")
}
if (this.options.ecmaVersion >= 6) {
prop.method = false;
prop.shorthand = false;
if (isPattern || refDestructuringErrors) {
startPos = this.start;
startLoc = this.startLoc;
}
if (!isPattern)
{ isGenerator = this.eat(types$1.star); }
}
var containsEsc = this.containsEsc;
this.parsePropertyName(prop);
if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
isAsync = true;
isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
this.parsePropertyName(prop, refDestructuringErrors);
} else {
isAsync = false;
}
this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
return this.finishNode(prop, "Property")
};
pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
if ((isGenerator || isAsync) && this.type === types$1.colon)
{ this.unexpected(); }
if (this.eat(types$1.colon)) {
prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
prop.kind = "init";
} else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
if (isPattern) { this.unexpected(); }
prop.kind = "init";
prop.method = true;
prop.value = this.parseMethod(isGenerator, isAsync);
} else if (!isPattern && !containsEsc &&
this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
(prop.key.name === "get" || prop.key.name === "set") &&
(this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
if (isGenerator || isAsync) { this.unexpected(); }
prop.kind = prop.key.name;
this.parsePropertyName(prop);
prop.value = this.parseMethod(false);
var paramCount = prop.kind === "get" ? 0 : 1;
if (prop.value.params.length !== paramCount) {
var start = prop.value.start;
if (prop.kind === "get")
{ this.raiseRecoverable(start, "getter should have no params"); }
else
{ this.raiseRecoverable(start, "setter should have exactly one param"); }
} else {
if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
{ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); }
}
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
if (isGenerator || isAsync) { this.unexpected(); }
this.checkUnreserved(prop.key);
if (prop.key.name === "await" && !this.awaitIdentPos)
{ this.awaitIdentPos = startPos; }
prop.kind = "init";
if (isPattern) {
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
} else if (this.type === types$1.eq && refDestructuringErrors) {
if (refDestructuringErrors.shorthandAssign < 0)
{ refDestructuringErrors.shorthandAssign = this.start; }
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
} else {
prop.value = this.copyNode(prop.key);
}
prop.shorthand = true;
} else { this.unexpected(); }
};
pp$5.parsePropertyName = function(prop) {
if (this.options.ecmaVersion >= 6) {
if (this.eat(types$1.bracketL)) {
prop.computed = true;
prop.key = this.parseMaybeAssign();
this.expect(types$1.bracketR);
return prop.key
} else {
prop.computed = false;
}
}
return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never")
};
// Initialize empty function node.
pp$5.initFunction = function(node) {
node.id = null;
if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; }
if (this.options.ecmaVersion >= 8) { node.async = false; }
};
// Parse object or class method.
pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.initFunction(node);
if (this.options.ecmaVersion >= 6)
{ node.generator = isGenerator; }
if (this.options.ecmaVersion >= 8)
{ node.async = !!isAsync; }
this.yieldPos = 0;
this.awaitPos = 0;
this.awaitIdentPos = 0;
this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
this.expect(types$1.parenL);
node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
this.checkYieldAwaitInDefaultParams();
this.parseFunctionBody(node, false, true, false);
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
this.awaitIdentPos = oldAwaitIdentPos;
return this.finishNode(node, "FunctionExpression")
};
// Parse arrow function expression with given parameters.
pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
this.initFunction(node);
if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; }
this.yieldPos = 0;
this.awaitPos = 0;
this.awaitIdentPos = 0;
node.params = this.toAssignableList(params, true);
this.parseFunctionBody(node, true, false, forInit);
this.yieldPos = oldYieldPos;
this.awaitPos = oldAwaitPos;
this.awaitIdentPos = oldAwaitIdentPos;
return this.finishNode(node, "ArrowFunctionExpression")
};
// Parse function body and check parameters.
pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
var isExpression = isArrowFunction && this.type !== types$1.braceL;
var oldStrict = this.strict, useStrict = false;
if (isExpression) {
node.body = this.parseMaybeAssign(forInit);
node.expression = true;
this.checkParams(node, false);
} else {
var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
if (!oldStrict || nonSimple) {
useStrict = this.strictDirective(this.end);
// If this is a strict mode function, verify that argument names
// are not repeated, and it does not try to bind the words `eval`
// or `arguments`.
if (useStrict && nonSimple)
{ this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); }
}
// Start a new scope with regard to labels and the `inFunction`
// flag (restore them to their old value afterwards).
var oldLabels = this.labels;
this.labels = [];
if (useStrict) { this.strict = true; }
// Add the params to varDeclaredNames to ensure that an error is thrown
// if a let/const declaration in the function clashes with one of the params.
this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
// Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'
if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); }
node.body = this.parseBlock(false, undefined, useStrict && !oldStrict);
node.expression = false;
this.adaptDirectivePrologue(node.body.body);
this.labels = oldLabels;
}
this.exitScope();
};
pp$5.isSimpleParamList = function(params) {
for (var i = 0, list = params; i < list.length; i += 1)
{
var param = list[i];
if (param.type !== "Identifier") { return false
} }
return true
};
// Checks function params for various disallowed patterns such as using "eval"
// or "arguments" and duplicate parameters.
pp$5.checkParams = function(node, allowDuplicates) {
var nameHash = Object.create(null);
for (var i = 0, list = node.params; i < list.length; i += 1)
{
var param = list[i];
this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
}
};
// Parses a comma-separated list of expressions, and returns them as
// an array. `close` is the token type that ends the list, and
// `allowEmpty` can be turned on to allow subsequent commas with
// nothing in between them to be parsed as `null` (which is needed
// for array literals).
pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
var elts = [], first = true;
while (!this.eat(close)) {
if (!first) {
this.expect(types$1.comma);
if (allowTrailingComma && this.afterTrailingComma(close)) { break }
} else { first = false; }
var elt = (void 0);
if (allowEmpty && this.type === types$1.comma)
{ elt = null; }
else if (this.type === types$1.ellipsis) {
elt = this.parseSpread(refDestructuringErrors);
if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0)
{ refDestructuringErrors.trailingComma = this.start; }
} else {
elt = this.parseMaybeAssign(false, refDestructuringErrors);
}
elts.push(elt);
}
return elts
};
pp$5.checkUnreserved = function(ref) {
var start = ref.start;
var end = ref.end;
var name = ref.name;
if (this.inGenerator && name === "yield")
{ this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); }
if (this.inAsync && name === "await")
{ this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); }
if (this.currentThisScope().inClassFieldInit && name === "arguments")
{ this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); }
if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
{ this.raise(start, ("Cannot use " + name + " in class static initialization block")); }
if (this.keywords.test(name))
{ this.raise(start, ("Unexpected keyword '" + name + "'")); }
if (this.options.ecmaVersion < 6 &&
this.input.slice(start, end).indexOf("\\") !== -1) { return }
var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
if (re.test(name)) {
if (!this.inAsync && name === "await")
{ this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); }
this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved"));
}
};
// Parse the next token as an identifier. If `liberal` is true (used
// when parsing properties), it will also convert keywords into
// identifiers.
pp$5.parseIdent = function(liberal, isBinding) {
var node = this.startNode();
if (this.type === types$1.name) {
node.name = this.value;
} else if (this.type.keyword) {
node.name = this.type.keyword;
// To fix https://github.com/acornjs/acorn/issues/575
// `class` and `function` keywords push new context into this.context.
// But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.
// If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword
if ((node.name === "class" || node.name === "function") &&
(this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
this.context.pop();
}
} else {
this.unexpected();
}
this.next(!!liberal);
this.finishNode(node, "Identifier");
if (!liberal) {
this.checkUnreserved(node);
if (node.name === "await" && !this.awaitIdentPos)
{ this.awaitIdentPos = node.start; }
}
return node
};
pp$5.parsePrivateIdent = function() {
var node = this.startNode();
if (this.type === types$1.privateId) {
node.name = this.value;
} else {
this.unexpected();
}
this.next();
this.finishNode(node, "PrivateIdentifier");
// For validating existence
if (this.privateNameStack.length === 0) {
this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class"));
} else {
this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
}
return node
};
// Parses yield expression inside generator.
pp$5.parseYield = function(forInit) {
if (!this.yieldPos) { this.yieldPos = this.start; }
var node = this.startNode();
this.next();
if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) {
node.delegate = false;
node.argument = null;
} else {
node.delegate = this.eat(types$1.star);
node.argument = this.parseMaybeAssign(forInit);
}
return this.finishNode(node, "YieldExpression")
};
pp$5.parseAwait = function(forInit) {
if (!this.awaitPos) { this.awaitPos = this.start; }
var node = this.startNode();
this.next();
node.argument = this.parseMaybeUnary(null, true, false, forInit);
return this.finishNode(node, "AwaitExpression")
};
var pp$4 = Parser.prototype;
// This function is used to raise exceptions on parse errors. It
// takes an offset integer (into the current `input`) to indicate
// the location of the error, attaches the position to the end
// of the error message, and then raises a `SyntaxError` with that
// message.
pp$4.raise = function(pos, message) {
var loc = getLineInfo(this.input, pos);
message += " (" + loc.line + ":" + loc.column + ")";
var err = new SyntaxError(message);
err.pos = pos; err.loc = loc; err.raisedAt = this.pos;
throw err
};
pp$4.raiseRecoverable = pp$4.raise;
pp$4.curPosition = function() {
if (this.options.locations) {
return new Position(this.curLine, this.pos - this.lineStart)
}
};
var pp$3 = Parser.prototype;
var Scope = function Scope(flags) {
this.flags = flags;
// A list of var-declared names in the current lexical scope
this.var = [];
// A list of lexically-declared names in the current lexical scope
this.lexical = [];
// A list of lexically-declared FunctionDeclaration names in the current lexical scope
this.functions = [];
// A switch to disallow the identifier reference 'arguments'
this.inClassFieldInit = false;
};
// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
pp$3.enterScope = function(flags) {
this.scopeStack.push(new Scope(flags));
};
pp$3.exitScope = function() {
this.scopeStack.pop();
};
// The spec says:
// > At the top level of a function, or script, function declarations are
// > treated like var declarations rather than like lexical declarations.
pp$3.treatFunctionsAsVarInScope = function(scope) {
return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP)
};
pp$3.declareName = function(name, bindingType, pos) {
var redeclared = false;
if (bindingType === BIND_LEXICAL) {
var scope = this.currentScope();
redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
scope.lexical.push(name);
if (this.inModule && (scope.flags & SCOPE_TOP))
{ delete this.undefinedExports[name]; }
} else if (bindingType === BIND_SIMPLE_CATCH) {
var scope$1 = this.currentScope();
scope$1.lexical.push(name);
} else if (bindingType === BIND_FUNCTION) {
var scope$2 = this.currentScope();
if (this.treatFunctionsAsVar)
{ redeclared = scope$2.lexical.indexOf(name) > -1; }
else
{ redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; }
scope$2.functions.push(name);
} else {
for (var i = this.scopeStack.length - 1; i >= 0; --i) {
var scope$3 = this.scopeStack[i];
if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) ||
!this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
redeclared = true;
break
}
scope$3.var.push(name);
if (this.inModule && (scope$3.flags & SCOPE_TOP))
{ delete this.undefinedExports[name]; }
if (scope$3.flags & SCOPE_VAR) { break }
}
}
if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); }
};
pp$3.checkLocalExport = function(id) {
// scope.functions must be empty as Module code is always strict.
if (this.scopeStack[0].lexical.indexOf(id.name) === -1 &&
this.scopeStack[0].var.indexOf(id.name) === -1) {
this.undefinedExports[id.name] = id;
}
};
pp$3.currentScope = function() {
return this.scopeStack[this.scopeStack.length - 1]
};
pp$3.currentVarScope = function() {
for (var i = this.scopeStack.length - 1;; i--) {
var scope = this.scopeStack[i];
if (scope.flags & SCOPE_VAR) { return scope }
}
};
// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.
pp$3.currentThisScope = function() {
for (var i = this.scopeStack.length - 1;; i--) {
var scope = this.scopeStack[i];
if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope }
}
};
var Node = function Node(parser, pos, loc) {
this.type = "";
this.start = pos;
this.end = 0;
if (parser.options.locations)
{ this.loc = new SourceLocation(parser, loc); }
if (parser.options.directSourceFile)
{ this.sourceFile = parser.options.directSourceFile; }
if (parser.options.ranges)
{ this.range = [pos, 0]; }
};
// Start an AST node, attaching a start offset.
var pp$2 = Parser.prototype;
pp$2.startNode = function() {
return new Node(this, this.start, this.startLoc)
};
pp$2.startNodeAt = function(pos, loc) {
return new Node(this, pos, loc)
};
// Finish an AST node, adding `type` and `end` properties.
function finishNodeAt(node, type, pos, loc) {
node.type = type;
node.end = pos;
if (this.options.locations)
{ node.loc.end = loc; }
if (this.options.ranges)
{ node.range[1] = pos; }
return node
}
pp$2.finishNode = function(node, type) {
return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
};
// Finish node at given position
pp$2.finishNodeAt = function(node, type, pos, loc) {
return finishNodeAt.call(this, node, type, pos, loc)
};
pp$2.copyNode = function(node) {
var newNode = new Node(this, node.start, this.startLoc);
for (var prop in node) { newNode[prop] = node[prop]; }
return newNode
};
// This file contains Unicode properties extracted from the ECMAScript
// specification. The lists are extracted like so:
// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)
// #table-binary-unicode-properties
var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
var ecma11BinaryProperties = ecma10BinaryProperties;
var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
var ecma13BinaryProperties = ecma12BinaryProperties;
var unicodeBinaryProperties = {
9: ecma9BinaryProperties,
10: ecma10BinaryProperties,
11: ecma11BinaryProperties,
12: ecma12BinaryProperties,
13: ecma13BinaryProperties
};
// #table-unicode-general-category-values
var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
// #table-unicode-script-values
var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
var unicodeScriptValues = {
9: ecma9ScriptValues,
10: ecma10ScriptValues,
11: ecma11ScriptValues,
12: ecma12ScriptValues,
13: ecma13ScriptValues
};
var data = {};
function buildUnicodeData(ecmaVersion) {
var d = data[ecmaVersion] = {
binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
nonBinary: {
General_Category: wordsRegexp(unicodeGeneralCategoryValues),
Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
}
};
d.nonBinary.Script_Extensions = d.nonBinary.Script;
d.nonBinary.gc = d.nonBinary.General_Category;
d.nonBinary.sc = d.nonBinary.Script;
d.nonBinary.scx = d.nonBinary.Script_Extensions;
}
for (var i = 0, list = [9, 10, 11, 12, 13]; i < list.length; i += 1) {
var ecmaVersion = list[i];
buildUnicodeData(ecmaVersion);
}
var pp$1 = Parser.prototype;
var RegExpValidationState = function RegExpValidationState(parser) {
this.parser = parser;
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
this.unicodeProperties = data[parser.options.ecmaVersion >= 13 ? 13 : parser.options.ecmaVersion];
this.source = "";
this.flags = "";
this.start = 0;
this.switchU = false;
this.switchN = false;
this.pos = 0;
this.lastIntValue = 0;
this.lastStringValue = "";
this.lastAssertionIsQuantifiable = false;
this.numCapturingParens = 0;
this.maxBackReference = 0;
this.groupNames = [];
this.backReferenceNames = [];
};
RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
var unicode = flags.indexOf("u") !== -1;
this.start = start | 0;
this.source = pattern + "";
this.flags = flags;
this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
};
RegExpValidationState.prototype.raise = function raise (message) {
this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message));
};
// If u flag is given, this returns the code point at the index (it combines a surrogate pair).
// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).
RegExpValidationState.prototype.at = function at (i, forceU) {
if ( forceU === void 0 ) forceU = false;
var s = this.source;
var l = s.length;
if (i >= l) {
return -1
}
var c = s.charCodeAt(i);
if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {
return c
}
var next = s.charCodeAt(i + 1);
return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c
};
RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) {
if ( forceU === void 0 ) forceU = false;
var s = this.source;
var l = s.length;
if (i >= l) {
return l
}
var c = s.charCodeAt(i), next;
if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l ||
(next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) {
return i + 1
}
return i + 2
};
RegExpValidationState.prototype.current = function current (forceU) {
if ( forceU === void 0 ) forceU = false;
return this.at(this.pos, forceU)
};
RegExpValidationState.prototype.lookahead = function lookahead (forceU) {
if ( forceU === void 0 ) forceU = false;
return this.at(this.nextIndex(this.pos, forceU), forceU)
};
RegExpValidationState.prototype.advance = function advance (forceU) {
if ( forceU === void 0 ) forceU = false;
this.pos = this.nextIndex(this.pos, forceU);
};
RegExpValidationState.prototype.eat = function eat (ch, forceU) {
if ( forceU === void 0 ) forceU = false;
if (this.current(forceU) === ch) {
this.advance(forceU);
return true
}
return false
};
function codePointToString$1(ch) {
if (ch <= 0xFFFF) { return String.fromCharCode(ch) }
ch -= 0x10000;
return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00)
}
/**
* Validate the flags part of a given RegExpLiteral.
*
* @param {RegExpValidationState} state The state to validate RegExp.
* @returns {void}
*/
pp$1.validateRegExpFlags = function(state) {
var validFlags = state.validFlags;
var flags = state.flags;
for (var i = 0; i < flags.length; i++) {
var flag = flags.charAt(i);
if (validFlags.indexOf(flag) === -1) {
this.raise(state.start, "Invalid regular expression flag");
}
if (flags.indexOf(flag, i + 1) > -1) {
this.raise(state.start, "Duplicate regular expression flag");
}
}
};
/**
* Validate the pattern part of a given RegExpLiteral.
*
* @param {RegExpValidationState} state The state to validate RegExp.
* @returns {void}
*/
pp$1.validateRegExpPattern = function(state) {
this.regexp_pattern(state);
// The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of
// parsing contains a |GroupName|, reparse with the goal symbol
// |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
// exception if _P_ did not conform to the grammar, if any elements of _P_
// were not matched by the parse, or if any Early Error conditions exist.
if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
state.switchN = true;
this.regexp_pattern(state);
}
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern
pp$1.regexp_pattern = function(state) {
state.pos = 0;
state.lastIntValue = 0;
state.lastStringValue = "";
state.lastAssertionIsQuantifiable = false;
state.numCapturingParens = 0;
state.maxBackReference = 0;
state.groupNames.length = 0;
state.backReferenceNames.length = 0;
this.regexp_disjunction(state);
if (state.pos !== state.source.length) {
// Make the same messages as V8.
if (state.eat(0x29 /* ) */)) {
state.raise("Unmatched ')'");
}
if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) {
state.raise("Lone quantifier brackets");
}
}
if (state.maxBackReference > state.numCapturingParens) {
state.raise("Invalid escape");
}
for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
var name = list[i];
if (state.groupNames.indexOf(name) === -1) {
state.raise("Invalid named capture referenced");
}
}
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
pp$1.regexp_disjunction = function(state) {
this.regexp_alternative(state);
while (state.eat(0x7C /* | */)) {
this.regexp_alternative(state);
}
// Make the same message as V8.
if (this.regexp_eatQuantifier(state, true)) {
state.raise("Nothing to repeat");
}
if (state.eat(0x7B /* { */)) {
state.raise("Lone quantifier brackets");
}
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
pp$1.regexp_alternative = function(state) {
while (state.pos < state.source.length && this.regexp_eatTerm(state))
{ }
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
pp$1.regexp_eatTerm = function(state) {
if (this.regexp_eatAssertion(state)) {
// Handle `QuantifiableAssertion Quantifier` alternative.
// `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion
// is a QuantifiableAssertion.
if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
// Make the same message as V8.
if (state.switchU) {
state.raise("Invalid quantifier");
}
}
return true
}
if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
this.regexp_eatQuantifier(state);
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion
pp$1.regexp_eatAssertion = function(state) {
var start = state.pos;
state.lastAssertionIsQuantifiable = false;
// ^, $
if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {
return true
}
// \b \B
if (state.eat(0x5C /* \ */)) {
if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {
return true
}
state.pos = start;
}
// Lookahead / Lookbehind
if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {
var lookbehind = false;
if (this.options.ecmaVersion >= 9) {
lookbehind = state.eat(0x3C /* < */);
}
if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {
this.regexp_disjunction(state);
if (!state.eat(0x29 /* ) */)) {
state.raise("Unterminated group");
}
state.lastAssertionIsQuantifiable = !lookbehind;
return true
}
}
state.pos = start;
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier
pp$1.regexp_eatQuantifier = function(state, noError) {
if ( noError === void 0 ) noError = false;
if (this.regexp_eatQuantifierPrefix(state, noError)) {
state.eat(0x3F /* ? */);
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix
pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
return (
state.eat(0x2A /* * */) ||
state.eat(0x2B /* + */) ||
state.eat(0x3F /* ? */) ||
this.regexp_eatBracedQuantifier(state, noError)
)
};
pp$1.regexp_eatBracedQuantifier = function(state, noError) {
var start = state.pos;
if (state.eat(0x7B /* { */)) {
var min = 0, max = -1;
if (this.regexp_eatDecimalDigits(state)) {
min = state.lastIntValue;
if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {
max = state.lastIntValue;
}
if (state.eat(0x7D /* } */)) {
// SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term
if (max !== -1 && max < min && !noError) {
state.raise("numbers out of order in {} quantifier");
}
return true
}
}
if (state.switchU && !noError) {
state.raise("Incomplete quantifier");
}
state.pos = start;
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom
pp$1.regexp_eatAtom = function(state) {
return (
this.regexp_eatPatternCharacters(state) ||
state.eat(0x2E /* . */) ||
this.regexp_eatReverseSolidusAtomEscape(state) ||
this.regexp_eatCharacterClass(state) ||
this.regexp_eatUncapturingGroup(state) ||
this.regexp_eatCapturingGroup(state)
)
};
pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
var start = state.pos;
if (state.eat(0x5C /* \ */)) {
if (this.regexp_eatAtomEscape(state)) {
return true
}
state.pos = start;
}
return false
};
pp$1.regexp_eatUncapturingGroup = function(state) {
var start = state.pos;
if (state.eat(0x28 /* ( */)) {
if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) {
this.regexp_disjunction(state);
if (state.eat(0x29 /* ) */)) {
return true
}
state.raise("Unterminated group");
}
state.pos = start;
}
return false
};
pp$1.regexp_eatCapturingGroup = function(state) {
if (state.eat(0x28 /* ( */)) {
if (this.options.ecmaVersion >= 9) {
this.regexp_groupSpecifier(state);
} else if (state.current() === 0x3F /* ? */) {
state.raise("Invalid group");
}
this.regexp_disjunction(state);
if (state.eat(0x29 /* ) */)) {
state.numCapturingParens += 1;
return true
}
state.raise("Unterminated group");
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom
pp$1.regexp_eatExtendedAtom = function(state) {
return (
state.eat(0x2E /* . */) ||
this.regexp_eatReverseSolidusAtomEscape(state) ||
this.regexp_eatCharacterClass(state) ||
this.regexp_eatUncapturingGroup(state) ||
this.regexp_eatCapturingGroup(state) ||
this.regexp_eatInvalidBracedQuantifier(state) ||
this.regexp_eatExtendedPatternCharacter(state)
)
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier
pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
if (this.regexp_eatBracedQuantifier(state, true)) {
state.raise("Nothing to repeat");
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter
pp$1.regexp_eatSyntaxCharacter = function(state) {
var ch = state.current();
if (isSyntaxCharacter(ch)) {
state.lastIntValue = ch;
state.advance();
return true
}
return false
};
function isSyntaxCharacter(ch) {
return (
ch === 0x24 /* $ */ ||
ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||
ch === 0x2E /* . */ ||
ch === 0x3F /* ? */ ||
ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||
ch >= 0x7B /* { */ && ch <= 0x7D /* } */
)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter
// But eat eager.
pp$1.regexp_eatPatternCharacters = function(state) {
var start = state.pos;
var ch = 0;
while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
state.advance();
}
return state.pos !== start
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter
pp$1.regexp_eatExtendedPatternCharacter = function(state) {
var ch = state.current();
if (
ch !== -1 &&
ch !== 0x24 /* $ */ &&
!(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&
ch !== 0x2E /* . */ &&
ch !== 0x3F /* ? */ &&
ch !== 0x5B /* [ */ &&
ch !== 0x5E /* ^ */ &&
ch !== 0x7C /* | */
) {
state.advance();
return true
}
return false
};
// GroupSpecifier ::
// [empty]
// `?` GroupName
pp$1.regexp_groupSpecifier = function(state) {
if (state.eat(0x3F /* ? */)) {
if (this.regexp_eatGroupName(state)) {
if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
state.raise("Duplicate capture group name");
}
state.groupNames.push(state.lastStringValue);
return
}
state.raise("Invalid group");
}
};
// GroupName ::
// `<` RegExpIdentifierName `>`
// Note: this updates `state.lastStringValue` property with the eaten name.
pp$1.regexp_eatGroupName = function(state) {
state.lastStringValue = "";
if (state.eat(0x3C /* < */)) {
if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {
return true
}
state.raise("Invalid capture group name");
}
return false
};
// RegExpIdentifierName ::
// RegExpIdentifierStart
// RegExpIdentifierName RegExpIdentifierPart
// Note: this updates `state.lastStringValue` property with the eaten name.
pp$1.regexp_eatRegExpIdentifierName = function(state) {
state.lastStringValue = "";
if (this.regexp_eatRegExpIdentifierStart(state)) {
state.lastStringValue += codePointToString$1(state.lastIntValue);
while (this.regexp_eatRegExpIdentifierPart(state)) {
state.lastStringValue += codePointToString$1(state.lastIntValue);
}
return true
}
return false
};
// RegExpIdentifierStart ::
// UnicodeIDStart
// `$`
// `_`
// `\` RegExpUnicodeEscapeSequence[+U]
pp$1.regexp_eatRegExpIdentifierStart = function(state) {
var start = state.pos;
var forceU = this.options.ecmaVersion >= 11;
var ch = state.current(forceU);
state.advance(forceU);
if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
ch = state.lastIntValue;
}
if (isRegExpIdentifierStart(ch)) {
state.lastIntValue = ch;
return true
}
state.pos = start;
return false
};
function isRegExpIdentifierStart(ch) {
return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */
}
// RegExpIdentifierPart ::
// UnicodeIDContinue
// `$`
// `_`
// `\` RegExpUnicodeEscapeSequence[+U]
// <ZWNJ>
// <ZWJ>
pp$1.regexp_eatRegExpIdentifierPart = function(state) {
var start = state.pos;
var forceU = this.options.ecmaVersion >= 11;
var ch = state.current(forceU);
state.advance(forceU);
if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
ch = state.lastIntValue;
}
if (isRegExpIdentifierPart(ch)) {
state.lastIntValue = ch;
return true
}
state.pos = start;
return false
};
function isRegExpIdentifierPart(ch) {
return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* <ZWNJ> */ || ch === 0x200D /* <ZWJ> */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape
pp$1.regexp_eatAtomEscape = function(state) {
if (
this.regexp_eatBackReference(state) ||
this.regexp_eatCharacterClassEscape(state) ||
this.regexp_eatCharacterEscape(state) ||
(state.switchN && this.regexp_eatKGroupName(state))
) {
return true
}
if (state.switchU) {
// Make the same message as V8.
if (state.current() === 0x63 /* c */) {
state.raise("Invalid unicode escape");
}
state.raise("Invalid escape");
}
return false
};
pp$1.regexp_eatBackReference = function(state) {
var start = state.pos;
if (this.regexp_eatDecimalEscape(state)) {
var n = state.lastIntValue;
if (state.switchU) {
// For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape
if (n > state.maxBackReference) {
state.maxBackReference = n;
}
return true
}
if (n <= state.numCapturingParens) {
return true
}
state.pos = start;
}
return false
};
pp$1.regexp_eatKGroupName = function(state) {
if (state.eat(0x6B /* k */)) {
if (this.regexp_eatGroupName(state)) {
state.backReferenceNames.push(state.lastStringValue);
return true
}
state.raise("Invalid named reference");
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape
pp$1.regexp_eatCharacterEscape = function(state) {
return (
this.regexp_eatControlEscape(state) ||
this.regexp_eatCControlLetter(state) ||
this.regexp_eatZero(state) ||
this.regexp_eatHexEscapeSequence(state) ||
this.regexp_eatRegExpUnicodeEscapeSequence(state, false) ||
(!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||
this.regexp_eatIdentityEscape(state)
)
};
pp$1.regexp_eatCControlLetter = function(state) {
var start = state.pos;
if (state.eat(0x63 /* c */)) {
if (this.regexp_eatControlLetter(state)) {
return true
}
state.pos = start;
}
return false
};
pp$1.regexp_eatZero = function(state) {
if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {
state.lastIntValue = 0;
state.advance();
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape
pp$1.regexp_eatControlEscape = function(state) {
var ch = state.current();
if (ch === 0x74 /* t */) {
state.lastIntValue = 0x09; /* \t */
state.advance();
return true
}
if (ch === 0x6E /* n */) {
state.lastIntValue = 0x0A; /* \n */
state.advance();
return true
}
if (ch === 0x76 /* v */) {
state.lastIntValue = 0x0B; /* \v */
state.advance();
return true
}
if (ch === 0x66 /* f */) {
state.lastIntValue = 0x0C; /* \f */
state.advance();
return true
}
if (ch === 0x72 /* r */) {
state.lastIntValue = 0x0D; /* \r */
state.advance();
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter
pp$1.regexp_eatControlLetter = function(state) {
var ch = state.current();
if (isControlLetter(ch)) {
state.lastIntValue = ch % 0x20;
state.advance();
return true
}
return false
};
function isControlLetter(ch) {
return (
(ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||
(ch >= 0x61 /* a */ && ch <= 0x7A /* z */)
)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence
pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
if ( forceU === void 0 ) forceU = false;
var start = state.pos;
var switchU = forceU || state.switchU;
if (state.eat(0x75 /* u */)) {
if (this.regexp_eatFixedHexDigits(state, 4)) {
var lead = state.lastIntValue;
if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {
var leadSurrogateEnd = state.pos;
if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {
var trail = state.lastIntValue;
if (trail >= 0xDC00 && trail <= 0xDFFF) {
state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return true
}
}
state.pos = leadSurrogateEnd;
state.lastIntValue = lead;
}
return true
}
if (
switchU &&
state.eat(0x7B /* { */) &&
this.regexp_eatHexDigits(state) &&
state.eat(0x7D /* } */) &&
isValidUnicode(state.lastIntValue)
) {
return true
}
if (switchU) {
state.raise("Invalid unicode escape");
}
state.pos = start;
}
return false
};
function isValidUnicode(ch) {
return ch >= 0 && ch <= 0x10FFFF
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape
pp$1.regexp_eatIdentityEscape = function(state) {
if (state.switchU) {
if (this.regexp_eatSyntaxCharacter(state)) {
return true
}
if (state.eat(0x2F /* / */)) {
state.lastIntValue = 0x2F; /* / */
return true
}
return false
}
var ch = state.current();
if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {
state.lastIntValue = ch;
state.advance();
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape
pp$1.regexp_eatDecimalEscape = function(state) {
state.lastIntValue = 0;
var ch = state.current();
if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {
do {
state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);
state.advance();
} while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape
pp$1.regexp_eatCharacterClassEscape = function(state) {
var ch = state.current();
if (isCharacterClassEscape(ch)) {
state.lastIntValue = -1;
state.advance();
return true
}
if (
state.switchU &&
this.options.ecmaVersion >= 9 &&
(ch === 0x50 /* P */ || ch === 0x70 /* p */)
) {
state.lastIntValue = -1;
state.advance();
if (
state.eat(0x7B /* { */) &&
this.regexp_eatUnicodePropertyValueExpression(state) &&
state.eat(0x7D /* } */)
) {
return true
}
state.raise("Invalid property name");
}
return false
};
function isCharacterClassEscape(ch) {
return (
ch === 0x64 /* d */ ||
ch === 0x44 /* D */ ||
ch === 0x73 /* s */ ||
ch === 0x53 /* S */ ||
ch === 0x77 /* w */ ||
ch === 0x57 /* W */
)
}
// UnicodePropertyValueExpression ::
// UnicodePropertyName `=` UnicodePropertyValue
// LoneUnicodePropertyNameOrValue
pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
var start = state.pos;
// UnicodePropertyName `=` UnicodePropertyValue
if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {
var name = state.lastStringValue;
if (this.regexp_eatUnicodePropertyValue(state)) {
var value = state.lastStringValue;
this.regexp_validateUnicodePropertyNameAndValue(state, name, value);
return true
}
}
state.pos = start;
// LoneUnicodePropertyNameOrValue
if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
var nameOrValue = state.lastStringValue;
this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
return true
}
return false
};
pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
if (!hasOwn(state.unicodeProperties.nonBinary, name))
{ state.raise("Invalid property name"); }
if (!state.unicodeProperties.nonBinary[name].test(value))
{ state.raise("Invalid property value"); }
};
pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
if (!state.unicodeProperties.binary.test(nameOrValue))
{ state.raise("Invalid property name"); }
};
// UnicodePropertyName ::
// UnicodePropertyNameCharacters
pp$1.regexp_eatUnicodePropertyName = function(state) {
var ch = 0;
state.lastStringValue = "";
while (isUnicodePropertyNameCharacter(ch = state.current())) {
state.lastStringValue += codePointToString$1(ch);
state.advance();
}
return state.lastStringValue !== ""
};
function isUnicodePropertyNameCharacter(ch) {
return isControlLetter(ch) || ch === 0x5F /* _ */
}
// UnicodePropertyValue ::
// UnicodePropertyValueCharacters
pp$1.regexp_eatUnicodePropertyValue = function(state) {
var ch = 0;
state.lastStringValue = "";
while (isUnicodePropertyValueCharacter(ch = state.current())) {
state.lastStringValue += codePointToString$1(ch);
state.advance();
}
return state.lastStringValue !== ""
};
function isUnicodePropertyValueCharacter(ch) {
return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)
}
// LoneUnicodePropertyNameOrValue ::
// UnicodePropertyValueCharacters
pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
return this.regexp_eatUnicodePropertyValue(state)
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass
pp$1.regexp_eatCharacterClass = function(state) {
if (state.eat(0x5B /* [ */)) {
state.eat(0x5E /* ^ */);
this.regexp_classRanges(state);
if (state.eat(0x5D /* ] */)) {
return true
}
// Unreachable since it threw "unterminated regular expression" error before.
state.raise("Unterminated character class");
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges
// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges
// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash
pp$1.regexp_classRanges = function(state) {
while (this.regexp_eatClassAtom(state)) {
var left = state.lastIntValue;
if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {
var right = state.lastIntValue;
if (state.switchU && (left === -1 || right === -1)) {
state.raise("Invalid character class");
}
if (left !== -1 && right !== -1 && left > right) {
state.raise("Range out of order in character class");
}
}
}
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom
// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash
pp$1.regexp_eatClassAtom = function(state) {
var start = state.pos;
if (state.eat(0x5C /* \ */)) {
if (this.regexp_eatClassEscape(state)) {
return true
}
if (state.switchU) {
// Make the same message as V8.
var ch$1 = state.current();
if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) {
state.raise("Invalid class escape");
}
state.raise("Invalid escape");
}
state.pos = start;
}
var ch = state.current();
if (ch !== 0x5D /* ] */) {
state.lastIntValue = ch;
state.advance();
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape
pp$1.regexp_eatClassEscape = function(state) {
var start = state.pos;
if (state.eat(0x62 /* b */)) {
state.lastIntValue = 0x08; /* <BS> */
return true
}
if (state.switchU && state.eat(0x2D /* - */)) {
state.lastIntValue = 0x2D; /* - */
return true
}
if (!state.switchU && state.eat(0x63 /* c */)) {
if (this.regexp_eatClassControlLetter(state)) {
return true
}
state.pos = start;
}
return (
this.regexp_eatCharacterClassEscape(state) ||
this.regexp_eatCharacterEscape(state)
)
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter
pp$1.regexp_eatClassControlLetter = function(state) {
var ch = state.current();
if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {
state.lastIntValue = ch % 0x20;
state.advance();
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
pp$1.regexp_eatHexEscapeSequence = function(state) {
var start = state.pos;
if (state.eat(0x78 /* x */)) {
if (this.regexp_eatFixedHexDigits(state, 2)) {
return true
}
if (state.switchU) {
state.raise("Invalid escape");
}
state.pos = start;
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits
pp$1.regexp_eatDecimalDigits = function(state) {
var start = state.pos;
var ch = 0;
state.lastIntValue = 0;
while (isDecimalDigit(ch = state.current())) {
state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);
state.advance();
}
return state.pos !== start
};
function isDecimalDigit(ch) {
return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits
pp$1.regexp_eatHexDigits = function(state) {
var start = state.pos;
var ch = 0;
state.lastIntValue = 0;
while (isHexDigit(ch = state.current())) {
state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
state.advance();
}
return state.pos !== start
};
function isHexDigit(ch) {
return (
(ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) ||
(ch >= 0x41 /* A */ && ch <= 0x46 /* F */) ||
(ch >= 0x61 /* a */ && ch <= 0x66 /* f */)
)
}
function hexToInt(ch) {
if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {
return 10 + (ch - 0x41 /* A */)
}
if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {
return 10 + (ch - 0x61 /* a */)
}
return ch - 0x30 /* 0 */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence
// Allows only 0-377(octal) i.e. 0-255(decimal).
pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
if (this.regexp_eatOctalDigit(state)) {
var n1 = state.lastIntValue;
if (this.regexp_eatOctalDigit(state)) {
var n2 = state.lastIntValue;
if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
} else {
state.lastIntValue = n1 * 8 + n2;
}
} else {
state.lastIntValue = n1;
}
return true
}
return false
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit
pp$1.regexp_eatOctalDigit = function(state) {
var ch = state.current();
if (isOctalDigit(ch)) {
state.lastIntValue = ch - 0x30; /* 0 */
state.advance();
return true
}
state.lastIntValue = 0;
return false
};
function isOctalDigit(ch) {
return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits
// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit
// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
pp$1.regexp_eatFixedHexDigits = function(state, length) {
var start = state.pos;
state.lastIntValue = 0;
for (var i = 0; i < length; ++i) {
var ch = state.current();
if (!isHexDigit(ch)) {
state.pos = start;
return false
}
state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
state.advance();
}
return true
};
// Object type used to represent tokens. Note that normally, tokens
// simply exist as properties on the parser object. This is only
// used for the onToken callback and the external tokenizer.
var Token = function Token(p) {
this.type = p.type;
this.value = p.value;
this.start = p.start;
this.end = p.end;
if (p.options.locations)
{ this.loc = new SourceLocation(p, p.startLoc, p.endLoc); }
if (p.options.ranges)
{ this.range = [p.start, p.end]; }
};
// ## Tokenizer
var pp = Parser.prototype;
// Move to the next token
pp.next = function(ignoreEscapeSequenceInKeyword) {
if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc)
{ this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); }
if (this.options.onToken)
{ this.options.onToken(new Token(this)); }
this.lastTokEnd = this.end;
this.lastTokStart = this.start;
this.lastTokEndLoc = this.endLoc;
this.lastTokStartLoc = this.startLoc;
this.nextToken();
};
pp.getToken = function() {
this.next();
return new Token(this)
};
// If we're in an ES6 environment, make parsers iterable
if (typeof Symbol !== "undefined")
{ pp[Symbol.iterator] = function() {
var this$1$1 = this;
return {
next: function () {
var token = this$1$1.getToken();
return {
done: token.type === types$1.eof,
value: token
}
}
}
}; }
// Toggle strict mode. Re-reads the next number or string to please
// pedantic tests (`"use strict"; 010;` should fail).
// Read a single token, updating the parser object's token-related
// properties.
pp.nextToken = function() {
var curContext = this.curContext();
if (!curContext || !curContext.preserveSpace) { this.skipSpace(); }
this.start = this.pos;
if (this.options.locations) { this.startLoc = this.curPosition(); }
if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) }
if (curContext.override) { return curContext.override(this) }
else { this.readToken(this.fullCharCodeAtPos()); }
};
pp.readToken = function(code) {
// Identifier or keyword. '\uXXXX' sequences are allowed in
// identifiers, so '\' also dispatches to that.
if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
{ return this.readWord() }
return this.getTokenFromCode(code)
};
pp.fullCharCodeAtPos = function() {
var code = this.input.charCodeAt(this.pos);
if (code <= 0xd7ff || code >= 0xdc00) { return code }
var next = this.input.charCodeAt(this.pos + 1);
return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00
};
pp.skipBlockComment = function() {
var startLoc = this.options.onComment && this.curPosition();
var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); }
this.pos = end + 2;
if (this.options.locations) {
for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) {
++this.curLine;
pos = this.lineStart = nextBreak;
}
}
if (this.options.onComment)
{ this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
startLoc, this.curPosition()); }
};
pp.skipLineComment = function(startSkip) {
var start = this.pos;
var startLoc = this.options.onComment && this.curPosition();
var ch = this.input.charCodeAt(this.pos += startSkip);
while (this.pos < this.input.length && !isNewLine(ch)) {
ch = this.input.charCodeAt(++this.pos);
}
if (this.options.onComment)
{ this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
startLoc, this.curPosition()); }
};
// Called at the start of the parse and after every token. Skips
// whitespace and comments, and.
pp.skipSpace = function() {
loop: while (this.pos < this.input.length) {
var ch = this.input.charCodeAt(this.pos);
switch (ch) {
case 32: case 160: // ' '
++this.pos;
break
case 13:
if (this.input.charCodeAt(this.pos + 1) === 10) {
++this.pos;
}
case 10: case 8232: case 8233:
++this.pos;
if (this.options.locations) {
++this.curLine;
this.lineStart = this.pos;
}
break
case 47: // '/'
switch (this.input.charCodeAt(this.pos + 1)) {
case 42: // '*'
this.skipBlockComment();
break
case 47:
this.skipLineComment(2);
break
default:
break loop
}
break
default:
if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
++this.pos;
} else {
break loop
}
}
}
};
// Called at the end of every token. Sets `end`, `val`, and
// maintains `context` and `exprAllowed`, and skips the space after
// the token, so that the next one's `start` will point at the
// right position.
pp.finishToken = function(type, val) {
this.end = this.pos;
if (this.options.locations) { this.endLoc = this.curPosition(); }
var prevType = this.type;
this.type = type;
this.value = val;
this.updateContext(prevType);
};
// ### Token reading
// This is the function that is called to fetch the next token. It
// is somewhat obscure, because it works in character codes rather
// than characters, and because operator parsing has been inlined
// into it.
//
// All in the name of speed.
//
pp.readToken_dot = function() {
var next = this.input.charCodeAt(this.pos + 1);
if (next >= 48 && next <= 57) { return this.readNumber(true) }
var next2 = this.input.charCodeAt(this.pos + 2);
if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
this.pos += 3;
return this.finishToken(types$1.ellipsis)
} else {
++this.pos;
return this.finishToken(types$1.dot)
}
};
pp.readToken_slash = function() { // '/'
var next = this.input.charCodeAt(this.pos + 1);
if (this.exprAllowed) { ++this.pos; return this.readRegexp() }
if (next === 61) { return this.finishOp(types$1.assign, 2) }
return this.finishOp(types$1.slash, 1)
};
pp.readToken_mult_modulo_exp = function(code) { // '%*'
var next = this.input.charCodeAt(this.pos + 1);
var size = 1;
var tokentype = code === 42 ? types$1.star : types$1.modulo;
// exponentiation operator ** and **=
if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {
++size;
tokentype = types$1.starstar;
next = this.input.charCodeAt(this.pos + 2);
}
if (next === 61) { return this.finishOp(types$1.assign, size + 1) }
return this.finishOp(tokentype, size)
};
pp.readToken_pipe_amp = function(code) { // '|&'
var next = this.input.charCodeAt(this.pos + 1);
if (next === code) {
if (this.options.ecmaVersion >= 12) {
var next2 = this.input.charCodeAt(this.pos + 2);
if (next2 === 61) { return this.finishOp(types$1.assign, 3) }
}
return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2)
}
if (next === 61) { return this.finishOp(types$1.assign, 2) }
return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1)
};
pp.readToken_caret = function() { // '^'
var next = this.input.charCodeAt(this.pos + 1);
if (next === 61) { return this.finishOp(types$1.assign, 2) }
return this.finishOp(types$1.bitwiseXOR, 1)
};
pp.readToken_plus_min = function(code) { // '+-'
var next = this.input.charCodeAt(this.pos + 1);
if (next === code) {
if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 &&
(this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
// A `-->` line comment
this.skipLineComment(3);
this.skipSpace();
return this.nextToken()
}
return this.finishOp(types$1.incDec, 2)
}
if (next === 61) { return this.finishOp(types$1.assign, 2) }
return this.finishOp(types$1.plusMin, 1)
};
pp.readToken_lt_gt = function(code) { // '<>'
var next = this.input.charCodeAt(this.pos + 1);
var size = 1;
if (next === code) {
size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) }
return this.finishOp(types$1.bitShift, size)
}
if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&
this.input.charCodeAt(this.pos + 3) === 45) {
// `<!--`, an XML-style comment that should be interpreted as a line comment
this.skipLineComment(4);
this.skipSpace();
return this.nextToken()
}
if (next === 61) { size = 2; }
return this.finishOp(types$1.relational, size)
};
pp.readToken_eq_excl = function(code) { // '=!'
var next = this.input.charCodeAt(this.pos + 1);
if (next === 61) { return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) }
if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
this.pos += 2;
return this.finishToken(types$1.arrow)
}
return this.finishOp(code === 61 ? types$1.eq : types$1.prefix, 1)
};
pp.readToken_question = function() { // '?'
var ecmaVersion = this.options.ecmaVersion;
if (ecmaVersion >= 11) {
var next = this.input.charCodeAt(this.pos + 1);
if (next === 46) {
var next2 = this.input.charCodeAt(this.pos + 2);
if (next2 < 48 || next2 > 57) { return this.finishOp(types$1.questionDot, 2) }
}
if (next === 63) {
if (ecmaVersion >= 12) {
var next2$1 = this.input.charCodeAt(this.pos + 2);
if (next2$1 === 61) { return this.finishOp(types$1.assign, 3) }
}
return this.finishOp(types$1.coalesce, 2)
}
}
return this.finishOp(types$1.question, 1)
};
pp.readToken_numberSign = function() { // '#'
var ecmaVersion = this.options.ecmaVersion;
var code = 35; // '#'
if (ecmaVersion >= 13) {
++this.pos;
code = this.fullCharCodeAtPos();
if (isIdentifierStart(code, true) || code === 92 /* '\' */) {
return this.finishToken(types$1.privateId, this.readWord1())
}
}
this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
};
pp.getTokenFromCode = function(code) {
switch (code) {
// The interpretation of a dot depends on whether it is followed
// by a digit or another two dots.
case 46: // '.'
return this.readToken_dot()
// Punctuation tokens.
case 40: ++this.pos; return this.finishToken(types$1.parenL)
case 41: ++this.pos; return this.finishToken(types$1.parenR)
case 59: ++this.pos; return this.finishToken(types$1.semi)
case 44: ++this.pos; return this.finishToken(types$1.comma)
case 91: ++this.pos; return this.finishToken(types$1.bracketL)
case 93: ++this.pos; return this.finishToken(types$1.bracketR)
case 123: ++this.pos; return this.finishToken(types$1.braceL)
case 125: ++this.pos; return this.finishToken(types$1.braceR)
case 58: ++this.pos; return this.finishToken(types$1.colon)
case 96: // '`'
if (this.options.ecmaVersion < 6) { break }
++this.pos;
return this.finishToken(types$1.backQuote)
case 48: // '0'
var next = this.input.charCodeAt(this.pos + 1);
if (next === 120 || next === 88) { return this.readRadixNumber(16) } // '0x', '0X' - hex number
if (this.options.ecmaVersion >= 6) {
if (next === 111 || next === 79) { return this.readRadixNumber(8) } // '0o', '0O' - octal number
if (next === 98 || next === 66) { return this.readRadixNumber(2) } // '0b', '0B' - binary number
}
// Anything else beginning with a digit is an integer, octal
// number, or float.
case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
return this.readNumber(false)
// Quotes produce strings.
case 34: case 39: // '"', "'"
return this.readString(code)
// Operators are parsed inline in tiny state machines. '=' (61) is
// often referred to. `finishOp` simply skips the amount of
// characters it is given as second argument, and returns a token
// of the type given by its first argument.
case 47: // '/'
return this.readToken_slash()
case 37: case 42: // '%*'
return this.readToken_mult_modulo_exp(code)
case 124: case 38: // '|&'
return this.readToken_pipe_amp(code)
case 94: // '^'
return this.readToken_caret()
case 43: case 45: // '+-'
return this.readToken_plus_min(code)
case 60: case 62: // '<>'
return this.readToken_lt_gt(code)
case 61: case 33: // '=!'
return this.readToken_eq_excl(code)
case 63: // '?'
return this.readToken_question()
case 126: // '~'
return this.finishOp(types$1.prefix, 1)
case 35: // '#'
return this.readToken_numberSign()
}
this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
};
pp.finishOp = function(type, size) {
var str = this.input.slice(this.pos, this.pos + size);
this.pos += size;
return this.finishToken(type, str)
};
pp.readRegexp = function() {
var escaped, inClass, start = this.pos;
for (;;) {
if (this.pos >= this.input.length) { this.raise(start, "Unterminated regular expression"); }
var ch = this.input.charAt(this.pos);
if (lineBreak.test(ch)) { this.raise(start, "Unterminated regular expression"); }
if (!escaped) {
if (ch === "[") { inClass = true; }
else if (ch === "]" && inClass) { inClass = false; }
else if (ch === "/" && !inClass) { break }
escaped = ch === "\\";
} else { escaped = false; }
++this.pos;
}
var pattern = this.input.slice(start, this.pos);
++this.pos;
var flagsStart = this.pos;
var flags = this.readWord1();
if (this.containsEsc) { this.unexpected(flagsStart); }
// Validate pattern
var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));
state.reset(start, pattern, flags);
this.validateRegExpFlags(state);
this.validateRegExpPattern(state);
// Create Literal#value property value.
var value = null;
try {
value = new RegExp(pattern, flags);
} catch (e) {
// ESTree requires null if it failed to instantiate RegExp object.
// https://github.com/estree/estree/blob/a27003adf4fd7bfad44de9cef372a2eacd527b1c/es5.md#regexpliteral
}
return this.finishToken(types$1.regexp, {pattern: pattern, flags: flags, value: value})
};
// Read an integer in the given radix. Return null if zero digits
// were read, the integer value otherwise. When `len` is given, this
// will return `null` unless the integer has exactly `len` digits.
pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
// `len` is used for character escape sequences. In that case, disallow separators.
var allowSeparators = this.options.ecmaVersion >= 12 && len === undefined;
// `maybeLegacyOctalNumericLiteral` is true if it doesn't have prefix (0x,0o,0b)
// and isn't fraction part nor exponent part. In that case, if the first digit
// is zero then disallow separators.
var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
var start = this.pos, total = 0, lastCode = 0;
for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) {
var code = this.input.charCodeAt(this.pos), val = (void 0);
if (allowSeparators && code === 95) {
if (isLegacyOctalNumericLiteral) { this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"); }
if (lastCode === 95) { this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"); }
if (i === 0) { this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"); }
lastCode = code;
continue
}
if (code >= 97) { val = code - 97 + 10; } // a
else if (code >= 65) { val = code - 65 + 10; } // A
else if (code >= 48 && code <= 57) { val = code - 48; } // 0-9
else { val = Infinity; }
if (val >= radix) { break }
lastCode = code;
total = total * radix + val;
}
if (allowSeparators && lastCode === 95) { this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"); }
if (this.pos === start || len != null && this.pos - start !== len) { return null }
return total
};
function stringToNumber(str, isLegacyOctalNumericLiteral) {
if (isLegacyOctalNumericLiteral) {
return parseInt(str, 8)
}
// `parseFloat(value)` stops parsing at the first numeric separator then returns a wrong value.
return parseFloat(str.replace(/_/g, ""))
}
function stringToBigInt(str) {
if (typeof BigInt !== "function") {
return null
}
// `BigInt(value)` throws syntax error if the string contains numeric separators.
return BigInt(str.replace(/_/g, ""))
}
pp.readRadixNumber = function(radix) {
var start = this.pos;
this.pos += 2; // 0x
var val = this.readInt(radix);
if (val == null) { this.raise(this.start + 2, "Expected number in radix " + radix); }
if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
val = stringToBigInt(this.input.slice(start, this.pos));
++this.pos;
} else if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
return this.finishToken(types$1.num, val)
};
// Read an integer, octal integer, or floating-point number.
pp.readNumber = function(startsWithDot) {
var start = this.pos;
if (!startsWithDot && this.readInt(10, undefined, true) === null) { this.raise(start, "Invalid number"); }
var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48;
if (octal && this.strict) { this.raise(start, "Invalid number"); }
var next = this.input.charCodeAt(this.pos);
if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
var val$1 = stringToBigInt(this.input.slice(start, this.pos));
++this.pos;
if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
return this.finishToken(types$1.num, val$1)
}
if (octal && /[89]/.test(this.input.slice(start, this.pos))) { octal = false; }
if (next === 46 && !octal) { // '.'
++this.pos;
this.readInt(10);
next = this.input.charCodeAt(this.pos);
}
if ((next === 69 || next === 101) && !octal) { // 'eE'
next = this.input.charCodeAt(++this.pos);
if (next === 43 || next === 45) { ++this.pos; } // '+-'
if (this.readInt(10) === null) { this.raise(start, "Invalid number"); }
}
if (isIdentifierStart(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); }
var val = stringToNumber(this.input.slice(start, this.pos), octal);
return this.finishToken(types$1.num, val)
};
// Read a string value, interpreting backslash-escapes.
pp.readCodePoint = function() {
var ch = this.input.charCodeAt(this.pos), code;
if (ch === 123) { // '{'
if (this.options.ecmaVersion < 6) { this.unexpected(); }
var codePos = ++this.pos;
code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
++this.pos;
if (code > 0x10FFFF) { this.invalidStringToken(codePos, "Code point out of bounds"); }
} else {
code = this.readHexChar(4);
}
return code
};
function codePointToString(code) {
// UTF-16 Decoding
if (code <= 0xFFFF) { return String.fromCharCode(code) }
code -= 0x10000;
return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
}
pp.readString = function(quote) {
var out = "", chunkStart = ++this.pos;
for (;;) {
if (this.pos >= this.input.length) { this.raise(this.start, "Unterminated string constant"); }
var ch = this.input.charCodeAt(this.pos);
if (ch === quote) { break }
if (ch === 92) { // '\'
out += this.input.slice(chunkStart, this.pos);
out += this.readEscapedChar(false);
chunkStart = this.pos;
} else if (ch === 0x2028 || ch === 0x2029) {
if (this.options.ecmaVersion < 10) { this.raise(this.start, "Unterminated string constant"); }
++this.pos;
if (this.options.locations) {
this.curLine++;
this.lineStart = this.pos;
}
} else {
if (isNewLine(ch)) { this.raise(this.start, "Unterminated string constant"); }
++this.pos;
}
}
out += this.input.slice(chunkStart, this.pos++);
return this.finishToken(types$1.string, out)
};
// Reads template string tokens.
var INVALID_TEMPLATE_ESCAPE_ERROR = {};
pp.tryReadTemplateToken = function() {
this.inTemplateElement = true;
try {
this.readTmplToken();
} catch (err) {
if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
this.readInvalidTemplateToken();
} else {
throw err
}
}
this.inTemplateElement = false;
};
pp.invalidStringToken = function(position, message) {
if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
throw INVALID_TEMPLATE_ESCAPE_ERROR
} else {
this.raise(position, message);
}
};
pp.readTmplToken = function() {
var out = "", chunkStart = this.pos;
for (;;) {
if (this.pos >= this.input.length) { this.raise(this.start, "Unterminated template"); }
var ch = this.input.charCodeAt(this.pos);
if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) {
if (ch === 36) {
this.pos += 2;
return this.finishToken(types$1.dollarBraceL)
} else {
++this.pos;
return this.finishToken(types$1.backQuote)
}
}
out += this.input.slice(chunkStart, this.pos);
return this.finishToken(types$1.template, out)
}
if (ch === 92) { // '\'
out += this.input.slice(chunkStart, this.pos);
out += this.readEscapedChar(true);
chunkStart = this.pos;
} else if (isNewLine(ch)) {
out += this.input.slice(chunkStart, this.pos);
++this.pos;
switch (ch) {
case 13:
if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; }
case 10:
out += "\n";
break
default:
out += String.fromCharCode(ch);
break
}
if (this.options.locations) {
++this.curLine;
this.lineStart = this.pos;
}
chunkStart = this.pos;
} else {
++this.pos;
}
}
};
// Reads a template token to search for the end, without validating any escape sequences
pp.readInvalidTemplateToken = function() {
for (; this.pos < this.input.length; this.pos++) {
switch (this.input[this.pos]) {
case "\\":
++this.pos;
break
case "$":
if (this.input[this.pos + 1] !== "{") {
break
}
// falls through
case "`":
return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))
// no default
}
}
this.raise(this.start, "Unterminated template");
};
// Used to read escaped characters
pp.readEscapedChar = function(inTemplate) {
var ch = this.input.charCodeAt(++this.pos);
++this.pos;
switch (ch) {
case 110: return "\n" // 'n' -> '\n'
case 114: return "\r" // 'r' -> '\r'
case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
case 117: return codePointToString(this.readCodePoint()) // 'u'
case 116: return "\t" // 't' -> '\t'
case 98: return "\b" // 'b' -> '\b'
case 118: return "\u000b" // 'v' -> '\u000b'
case 102: return "\f" // 'f' -> '\f'
case 13: if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; } // '\r\n'
case 10: // ' \n'
if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
return ""
case 56:
case 57:
if (this.strict) {
this.invalidStringToken(
this.pos - 1,
"Invalid escape sequence"
);
}
if (inTemplate) {
var codePos = this.pos - 1;
this.invalidStringToken(
codePos,
"Invalid escape sequence in template string"
);
return null
}
default:
if (ch >= 48 && ch <= 55) {
var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
var octal = parseInt(octalStr, 8);
if (octal > 255) {
octalStr = octalStr.slice(0, -1);
octal = parseInt(octalStr, 8);
}
this.pos += octalStr.length - 1;
ch = this.input.charCodeAt(this.pos);
if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
this.invalidStringToken(
this.pos - 1 - octalStr.length,
inTemplate
? "Octal literal in template string"
: "Octal literal in strict mode"
);
}
return String.fromCharCode(octal)
}
if (isNewLine(ch)) {
// Unicode new line characters after \ get removed from output in both
// template literals and strings
return ""
}
return String.fromCharCode(ch)
}
};
// Used to read character escape sequences ('\x', '\u', '\U').
pp.readHexChar = function(len) {
var codePos = this.pos;
var n = this.readInt(16, len);
if (n === null) { this.invalidStringToken(codePos, "Bad character escape sequence"); }
return n
};
// Read an identifier, and return it as a string. Sets `this.containsEsc`
// to whether the word contained a '\u' escape.
//
// Incrementally adds only escaped chars, adding other chunks as-is
// as a micro-optimization.
pp.readWord1 = function() {
this.containsEsc = false;
var word = "", first = true, chunkStart = this.pos;
var astral = this.options.ecmaVersion >= 6;
while (this.pos < this.input.length) {
var ch = this.fullCharCodeAtPos();
if (isIdentifierChar(ch, astral)) {
this.pos += ch <= 0xffff ? 1 : 2;
} else if (ch === 92) { // "\"
this.containsEsc = true;
word += this.input.slice(chunkStart, this.pos);
var escStart = this.pos;
if (this.input.charCodeAt(++this.pos) !== 117) // "u"
{ this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"); }
++this.pos;
var esc = this.readCodePoint();
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
{ this.invalidStringToken(escStart, "Invalid Unicode escape"); }
word += codePointToString(esc);
chunkStart = this.pos;
} else {
break
}
first = false;
}
return word + this.input.slice(chunkStart, this.pos)
};
// Read an identifier or keyword token. Will check for reserved
// words when necessary.
pp.readWord = function() {
var word = this.readWord1();
var type = types$1.name;
if (this.keywords.test(word)) {
type = keywords[word];
}
return this.finishToken(type, word)
};
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
var version = "8.7.0";
Parser.acorn = {
Parser: Parser,
version: version,
defaultOptions: defaultOptions,
Position: Position,
SourceLocation: SourceLocation,
getLineInfo: getLineInfo,
Node: Node,
TokenType: TokenType,
tokTypes: types$1,
keywordTypes: keywords,
TokContext: TokContext,
tokContexts: types,
isIdentifierChar: isIdentifierChar,
isIdentifierStart: isIdentifierStart,
Token: Token,
isNewLine: isNewLine,
lineBreak: lineBreak,
lineBreakG: lineBreakG,
nonASCIIwhitespace: nonASCIIwhitespace
};
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
// returns an abstract syntax tree as specified by [Mozilla parser
// API][api].
//
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
function parse(input, options) {
return Parser.parse(input, options)
}
// This function tries to parse a single expression at a given
// offset in a string. Useful for parsing mixed-language formats
// that embed JavaScript expressions.
function parseExpressionAt(input, pos, options) {
return Parser.parseExpressionAt(input, pos, options)
}
// Acorn is organized as a tokenizer and a recursive-descent parser.
// The `tokenizer` export provides an interface to the tokenizer.
function tokenizer(input, options) {
return Parser.tokenizer(input, options)
}
exports.Node = Node;
exports.Parser = Parser;
exports.Position = Position;
exports.SourceLocation = SourceLocation;
exports.TokContext = TokContext;
exports.Token = Token;
exports.TokenType = TokenType;
exports.defaultOptions = defaultOptions;
exports.getLineInfo = getLineInfo;
exports.isIdentifierChar = isIdentifierChar;
exports.isIdentifierStart = isIdentifierStart;
exports.isNewLine = isNewLine;
exports.keywordTypes = keywords;
exports.lineBreak = lineBreak;
exports.lineBreakG = lineBreakG;
exports.nonASCIIwhitespace = nonASCIIwhitespace;
exports.parse = parse;
exports.parseExpressionAt = parseExpressionAt;
exports.tokContexts = types;
exports.tokTypes = types$1;
exports.tokenizer = tokenizer;
exports.version = version;
Object.defineProperty(exports, '__esModule', { value: true });
}));
/***/ }),
/***/ 56155:
/***/ ((__unused_webpack_module, exports) => {
/***** xregexp.js *****/
/*!
* XRegExp v2.0.0
* (c) 2007-2012 Steven Levithan <http://xregexp.com/>
* MIT License
*/
/**
* XRegExp provides augmented, extensible JavaScript regular expressions. You get new syntax,
* flags, and methods beyond what browsers support natively. XRegExp is also a regex utility belt
* with tools to make your client-side grepping simpler and more powerful, while freeing you from
* worrying about pesky cross-browser inconsistencies and the dubious `lastIndex` property. See
* XRegExp's documentation (http://xregexp.com/) for more details.
* @module xregexp
* @requires N/A
*/
var XRegExp;
// Avoid running twice; that would reset tokens and could break references to native globals
XRegExp = XRegExp || (function (undef) {
"use strict";
/*--------------------------------------
* Private variables
*------------------------------------*/
var self,
addToken,
add,
// Optional features; can be installed and uninstalled
features = {
natives: false,
extensibility: false
},
// Store native methods to use and restore ("native" is an ES3 reserved keyword)
nativ = {
exec: RegExp.prototype.exec,
test: RegExp.prototype.test,
match: String.prototype.match,
replace: String.prototype.replace,
split: String.prototype.split
},
// Storage for fixed/extended native methods
fixed = {},
// Storage for cached regexes
cache = {},
// Storage for addon tokens
tokens = [],
// Token scopes
defaultScope = "default",
classScope = "class",
// Regexes that match native regex syntax
nativeTokens = {
// Any native multicharacter token in default scope (includes octals, excludes character classes)
"default": /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/,
// Any native multicharacter token in character class scope (includes octals)
"class": /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/
},
// Any backreference in replacement strings
replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,
// Any character with a later instance in the string
duplicateFlags = /([\s\S])(?=[\s\S]*\1)/g,
// Any greedy/lazy quantifier
quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/,
// Check for correct `exec` handling of nonparticipating capturing groups
compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undef,
// Check for flag y support (Firefox 3+)
hasNativeY = RegExp.prototype.sticky !== undef,
// Used to kill infinite recursion during XRegExp construction
isInsideConstructor = false,
// Storage for known flags, including addon flags
registeredFlags = "gim" + (hasNativeY ? "y" : "");
/*--------------------------------------
* Private helper functions
*------------------------------------*/
/**
* Attaches XRegExp.prototype properties and named capture supporting data to a regex object.
* @private
* @param {RegExp} regex Regex to augment.
* @param {Array} captureNames Array with capture names, or null.
* @param {Boolean} [isNative] Whether the regex was created by `RegExp` rather than `XRegExp`.
* @returns {RegExp} Augmented regex.
*/
function augment(regex, captureNames, isNative) {
var p;
// Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value
for (p in self.prototype) {
if (self.prototype.hasOwnProperty(p)) {
regex[p] = self.prototype[p];
}
}
regex.xregexp = {captureNames: captureNames, isNative: !!isNative};
return regex;
}
/**
* Returns native `RegExp` flags used by a regex object.
* @private
* @param {RegExp} regex Regex to check.
* @returns {String} Native flags in use.
*/
function getNativeFlags(regex) {
//return nativ.exec.call(/\/([a-z]*)$/i, String(regex))[1];
return (regex.global ? "g" : "") +
(regex.ignoreCase ? "i" : "") +
(regex.multiline ? "m" : "") +
(regex.extended ? "x" : "") + // Proposed for ES6, included in AS3
(regex.sticky ? "y" : ""); // Proposed for ES6, included in Firefox 3+
}
/**
* Copies a regex object while preserving special properties for named capture and augmenting with
* `XRegExp.prototype` methods. The copy has a fresh `lastIndex` property (set to zero). Allows
* adding and removing flags while copying the regex.
* @private
* @param {RegExp} regex Regex to copy.
* @param {String} [addFlags] Flags to be added while copying the regex.
* @param {String} [removeFlags] Flags to be removed while copying the regex.
* @returns {RegExp} Copy of the provided regex, possibly with modified flags.
*/
function copy(regex, addFlags, removeFlags) {
if (!self.isRegExp(regex)) {
throw new TypeError("type RegExp expected");
}
var flags = nativ.replace.call(getNativeFlags(regex) + (addFlags || ""), duplicateFlags, "");
if (removeFlags) {
// Would need to escape `removeFlags` if this was public
flags = nativ.replace.call(flags, new RegExp("[" + removeFlags + "]+", "g"), "");
}
if (regex.xregexp && !regex.xregexp.isNative) {
// Compiling the current (rather than precompilation) source preserves the effects of nonnative source flags
regex = augment(self(regex.source, flags),
regex.xregexp.captureNames ? regex.xregexp.captureNames.slice(0) : null);
} else {
// Augment with `XRegExp.prototype` methods, but use native `RegExp` (avoid searching for special tokens)
regex = augment(new RegExp(regex.source, flags), null, true);
}
return regex;
}
/*
* Returns the last index at which a given value can be found in an array, or `-1` if it's not
* present. The array is searched backwards.
* @private
* @param {Array} array Array to search.
* @param {*} value Value to locate in the array.
* @returns {Number} Last zero-based index at which the item is found, or -1.
*/
function lastIndexOf(array, value) {
var i = array.length;
if (Array.prototype.lastIndexOf) {
return array.lastIndexOf(value); // Use the native method if available
}
while (i--) {
if (array[i] === value) {
return i;
}
}
return -1;
}
/**
* Determines whether an object is of the specified type.
* @private
* @param {*} value Object to check.
* @param {String} type Type to check for, in lowercase.
* @returns {Boolean} Whether the object matches the type.
*/
function isType(value, type) {
return Object.prototype.toString.call(value).toLowerCase() === "[object " + type + "]";
}
/**
* Prepares an options object from the given value.
* @private
* @param {String|Object} value Value to convert to an options object.
* @returns {Object} Options object.
*/
function prepareOptions(value) {
value = value || {};
if (value === "all" || value.all) {
value = {natives: true, extensibility: true};
} else if (isType(value, "string")) {
value = self.forEach(value, /[^\s,]+/, function (m) {
this[m] = true;
}, {});
}
return value;
}
/**
* Runs built-in/custom tokens in reverse insertion order, until a match is found.
* @private
* @param {String} pattern Original pattern from which an XRegExp object is being built.
* @param {Number} pos Position to search for tokens within `pattern`.
* @param {Number} scope Current regex scope.
* @param {Object} context Context object assigned to token handler functions.
* @returns {Object} Object with properties `output` (the substitution string returned by the
* successful token handler) and `match` (the token's match array), or null.
*/
function runTokens(pattern, pos, scope, context) {
var i = tokens.length,
result = null,
match,
t;
// Protect against constructing XRegExps within token handler and trigger functions
isInsideConstructor = true;
// Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws
try {
while (i--) { // Run in reverse order
t = tokens[i];
if ((t.scope === "all" || t.scope === scope) && (!t.trigger || t.trigger.call(context))) {
t.pattern.lastIndex = pos;
match = fixed.exec.call(t.pattern, pattern); // Fixed `exec` here allows use of named backreferences, etc.
if (match && match.index === pos) {
result = {
output: t.handler.call(context, match, scope),
match: match
};
break;
}
}
}
} catch (err) {
throw err;
} finally {
isInsideConstructor = false;
}
return result;
}
/**
* Enables or disables XRegExp syntax and flag extensibility.
* @private
* @param {Boolean} on `true` to enable; `false` to disable.
*/
function setExtensibility(on) {
self.addToken = addToken[on ? "on" : "off"];
features.extensibility = on;
}
/**
* Enables or disables native method overrides.
* @private
* @param {Boolean} on `true` to enable; `false` to disable.
*/
function setNatives(on) {
RegExp.prototype.exec = (on ? fixed : nativ).exec;
RegExp.prototype.test = (on ? fixed : nativ).test;
String.prototype.match = (on ? fixed : nativ).match;
String.prototype.replace = (on ? fixed : nativ).replace;
String.prototype.split = (on ? fixed : nativ).split;
features.natives = on;
}
/*--------------------------------------
* Constructor
*------------------------------------*/
/**
* Creates an extended regular expression object for matching text with a pattern. Differs from a
* native regular expression in that additional syntax and flags are supported. The returned object
* is in fact a native `RegExp` and works with all native methods.
* @class XRegExp
* @constructor
* @param {String|RegExp} pattern Regex pattern string, or an existing `RegExp` object to copy.
* @param {String} [flags] Any combination of flags:
* <li>`g` - global
* <li>`i` - ignore case
* <li>`m` - multiline anchors
* <li>`n` - explicit capture
* <li>`s` - dot matches all (aka singleline)
* <li>`x` - free-spacing and line comments (aka extended)
* <li>`y` - sticky (Firefox 3+ only)
* Flags cannot be provided when constructing one `RegExp` from another.
* @returns {RegExp} Extended regular expression object.
* @example
*
* // With named capture and flag x
* date = XRegExp('(?<year> [0-9]{4}) -? # year \n\
* (?<month> [0-9]{2}) -? # month \n\
* (?<day> [0-9]{2}) # day ', 'x');
*
* // Passing a regex object to copy it. The copy maintains special properties for named capture,
* // is augmented with `XRegExp.prototype` methods, and has a fresh `lastIndex` property (set to
* // zero). Native regexes are not recompiled using XRegExp syntax.
* XRegExp(/regex/);
*/
self = function (pattern, flags) {
if (self.isRegExp(pattern)) {
if (flags !== undef) {
throw new TypeError("can't supply flags when constructing one RegExp from another");
}
return copy(pattern);
}
// Tokens become part of the regex construction process, so protect against infinite recursion
// when an XRegExp is constructed within a token handler function
if (isInsideConstructor) {
throw new Error("can't call the XRegExp constructor within token definition functions");
}
var output = [],
scope = defaultScope,
tokenContext = {
hasNamedCapture: false,
captureNames: [],
hasFlag: function (flag) {
return flags.indexOf(flag) > -1;
}
},
pos = 0,
tokenResult,
match,
chr;
pattern = pattern === undef ? "" : String(pattern);
flags = flags === undef ? "" : String(flags);
if (nativ.match.call(flags, duplicateFlags)) { // Don't use test/exec because they would update lastIndex
throw new SyntaxError("invalid duplicate regular expression flag");
}
// Strip/apply leading mode modifier with any combination of flags except g or y: (?imnsx)
pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function ($0, $1) {
if (nativ.test.call(/[gy]/, $1)) {
throw new SyntaxError("can't use flag g or y in mode modifier");
}
flags = nativ.replace.call(flags + $1, duplicateFlags, "");
return "";
});
self.forEach(flags, /[\s\S]/, function (m) {
if (registeredFlags.indexOf(m[0]) < 0) {
throw new SyntaxError("invalid regular expression flag " + m[0]);
}
});
while (pos < pattern.length) {
// Check for custom tokens at the current position
tokenResult = runTokens(pattern, pos, scope, tokenContext);
if (tokenResult) {
output.push(tokenResult.output);
pos += (tokenResult.match[0].length || 1);
} else {
// Check for native tokens (except character classes) at the current position
match = nativ.exec.call(nativeTokens[scope], pattern.slice(pos));
if (match) {
output.push(match[0]);
pos += match[0].length;
} else {
chr = pattern.charAt(pos);
if (chr === "[") {
scope = classScope;
} else if (chr === "]") {
scope = defaultScope;
}
// Advance position by one character
output.push(chr);
++pos;
}
}
}
return augment(new RegExp(output.join(""), nativ.replace.call(flags, /[^gimy]+/g, "")),
tokenContext.hasNamedCapture ? tokenContext.captureNames : null);
};
/*--------------------------------------
* Public methods/properties
*------------------------------------*/
// Installed and uninstalled states for `XRegExp.addToken`
addToken = {
on: function (regex, handler, options) {
options = options || {};
if (regex) {
tokens.push({
pattern: copy(regex, "g" + (hasNativeY ? "y" : "")),
handler: handler,
scope: options.scope || defaultScope,
trigger: options.trigger || null
});
}
// Providing `customFlags` with null `regex` and `handler` allows adding flags that do
// nothing, but don't throw an error
if (options.customFlags) {
registeredFlags = nativ.replace.call(registeredFlags + options.customFlags, duplicateFlags, "");
}
},
off: function () {
throw new Error("extensibility must be installed before using addToken");
}
};
/**
* Extends or changes XRegExp syntax and allows custom flags. This is used internally and can be
* used to create XRegExp addons. `XRegExp.install('extensibility')` must be run before calling
* this function, or an error is thrown. If more than one token can match the same string, the last
* added wins.
* @memberOf XRegExp
* @param {RegExp} regex Regex object that matches the new token.
* @param {Function} handler Function that returns a new pattern string (using native regex syntax)
* to replace the matched token within all future XRegExp regexes. Has access to persistent
* properties of the regex being built, through `this`. Invoked with two arguments:
* <li>The match array, with named backreference properties.
* <li>The regex scope where the match was found.
* @param {Object} [options] Options object with optional properties:
* <li>`scope` {String} Scopes where the token applies: 'default', 'class', or 'all'.
* <li>`trigger` {Function} Function that returns `true` when the token should be applied; e.g.,
* if a flag is set. If `false` is returned, the matched string can be matched by other tokens.
* Has access to persistent properties of the regex being built, through `this` (including
* function `this.hasFlag`).
* <li>`customFlags` {String} Nonnative flags used by the token's handler or trigger functions.
* Prevents XRegExp from throwing an invalid flag error when the specified flags are used.
* @example
*
* // Basic usage: Adds \a for ALERT character
* XRegExp.addToken(
* /\\a/,
* function () {return '\\x07';},
* {scope: 'all'}
* );
* XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true
*/
self.addToken = addToken.off;
/**
* Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with
* the same pattern and flag combination, the cached copy is returned.
* @memberOf XRegExp
* @param {String} pattern Regex pattern string.
* @param {String} [flags] Any combination of XRegExp flags.
* @returns {RegExp} Cached XRegExp object.
* @example
*
* while (match = XRegExp.cache('.', 'gs').exec(str)) {
* // The regex is compiled once only
* }
*/
self.cache = function (pattern, flags) {
var key = pattern + "/" + (flags || "");
return cache[key] || (cache[key] = self(pattern, flags));
};
/**
* Escapes any regular expression metacharacters, for use when matching literal strings. The result
* can safely be used at any point within a regex that uses any flags.
* @memberOf XRegExp
* @param {String} str String to escape.
* @returns {String} String with regex metacharacters escaped.
* @example
*
* XRegExp.escape('Escaped? <.>');
* // -> 'Escaped\?\ <\.>'
*/
self.escape = function (str) {
return nativ.replace.call(str, /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
};
/**
* Executes a regex search in a specified string. Returns a match array or `null`. If the provided
* regex uses named capture, named backreference properties are included on the match array.
* Optional `pos` and `sticky` arguments specify the search start position, and whether the match
* must start at the specified position only. The `lastIndex` property of the provided regex is not
* used, but is updated for compatibility. Also fixes browser bugs compared to the native
* `RegExp.prototype.exec` and can be used reliably cross-browser.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {RegExp} regex Regex to search with.
* @param {Number} [pos=0] Zero-based index at which to start the search.
* @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
* only. The string `'sticky'` is accepted as an alternative to `true`.
* @returns {Array} Match array with named backreference properties, or null.
* @example
*
* // Basic use, with named backreference
* var match = XRegExp.exec('U+2620', XRegExp('U\\+(?<hex>[0-9A-F]{4})'));
* match.hex; // -> '2620'
*
* // With pos and sticky, in a loop
* var pos = 2, result = [], match;
* while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) {
* result.push(match[1]);
* pos = match.index + match[0].length;
* }
* // result -> ['2', '3', '4']
*/
self.exec = function (str, regex, pos, sticky) {
var r2 = copy(regex, "g" + (sticky && hasNativeY ? "y" : ""), (sticky === false ? "y" : "")),
match;
r2.lastIndex = pos = pos || 0;
match = fixed.exec.call(r2, str); // Fixed `exec` required for `lastIndex` fix, etc.
if (sticky && match && match.index !== pos) {
match = null;
}
if (regex.global) {
regex.lastIndex = match ? r2.lastIndex : 0;
}
return match;
};
/**
* Executes a provided function once per regex match.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {RegExp} regex Regex to search with.
* @param {Function} callback Function to execute for each match. Invoked with four arguments:
* <li>The match array, with named backreference properties.
* <li>The zero-based match index.
* <li>The string being traversed.
* <li>The regex object being used to traverse the string.
* @param {*} [context] Object to use as `this` when executing `callback`.
* @returns {*} Provided `context` object.
* @example
*
* // Extracts every other digit from a string
* XRegExp.forEach('1a2345', /\d/, function (match, i) {
* if (i % 2) this.push(+match[0]);
* }, []);
* // -> [2, 4]
*/
self.forEach = function (str, regex, callback, context) {
var pos = 0,
i = -1,
match;
while ((match = self.exec(str, regex, pos))) {
callback.call(context, match, ++i, str, regex);
pos = match.index + (match[0].length || 1);
}
return context;
};
/**
* Copies a regex object and adds flag `g`. The copy maintains special properties for named
* capture, is augmented with `XRegExp.prototype` methods, and has a fresh `lastIndex` property
* (set to zero). Native regexes are not recompiled using XRegExp syntax.
* @memberOf XRegExp
* @param {RegExp} regex Regex to globalize.
* @returns {RegExp} Copy of the provided regex with flag `g` added.
* @example
*
* var globalCopy = XRegExp.globalize(/regex/);
* globalCopy.global; // -> true
*/
self.globalize = function (regex) {
return copy(regex, "g");
};
/**
* Installs optional features according to the specified options.
* @memberOf XRegExp
* @param {Object|String} options Options object or string.
* @example
*
* // With an options object
* XRegExp.install({
* // Overrides native regex methods with fixed/extended versions that support named
* // backreferences and fix numerous cross-browser bugs
* natives: true,
*
* // Enables extensibility of XRegExp syntax and flags
* extensibility: true
* });
*
* // With an options string
* XRegExp.install('natives extensibility');
*
* // Using a shortcut to install all optional features
* XRegExp.install('all');
*/
self.install = function (options) {
options = prepareOptions(options);
if (!features.natives && options.natives) {
setNatives(true);
}
if (!features.extensibility && options.extensibility) {
setExtensibility(true);
}
};
/**
* Checks whether an individual optional feature is installed.
* @memberOf XRegExp
* @param {String} feature Name of the feature to check. One of:
* <li>`natives`
* <li>`extensibility`
* @returns {Boolean} Whether the feature is installed.
* @example
*
* XRegExp.isInstalled('natives');
*/
self.isInstalled = function (feature) {
return !!(features[feature]);
};
/**
* Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes
* created in another frame, when `instanceof` and `constructor` checks would fail.
* @memberOf XRegExp
* @param {*} value Object to check.
* @returns {Boolean} Whether the object is a `RegExp` object.
* @example
*
* XRegExp.isRegExp('string'); // -> false
* XRegExp.isRegExp(/regex/i); // -> true
* XRegExp.isRegExp(RegExp('^', 'm')); // -> true
* XRegExp.isRegExp(XRegExp('(?s).')); // -> true
*/
self.isRegExp = function (value) {
return isType(value, "regexp");
};
/**
* Retrieves the matches from searching a string using a chain of regexes that successively search
* within previous matches. The provided `chain` array can contain regexes and objects with `regex`
* and `backref` properties. When a backreference is specified, the named or numbered backreference
* is passed forward to the next regex or returned.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {Array} chain Regexes that each search for matches within preceding results.
* @returns {Array} Matches by the last regex in the chain, or an empty array.
* @example
*
* // Basic usage; matches numbers within <b> tags
* XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [
* XRegExp('(?is)<b>.*?</b>'),
* /\d+/
* ]);
* // -> ['2', '4', '56']
*
* // Passing forward and returning specific backreferences
* html = '<a href="http://xregexp.com/api/">XRegExp</a>\
* <a href="http://www.google.com/">Google</a>';
* XRegExp.matchChain(html, [
* {regex: /<a href="([^"]+)">/i, backref: 1},
* {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}
* ]);
* // -> ['xregexp.com', 'www.google.com']
*/
self.matchChain = function (str, chain) {
return (function recurseChain(values, level) {
var item = chain[level].regex ? chain[level] : {regex: chain[level]},
matches = [],
addMatch = function (match) {
matches.push(item.backref ? (match[item.backref] || "") : match[0]);
},
i;
for (i = 0; i < values.length; ++i) {
self.forEach(values[i], item.regex, addMatch);
}
return ((level === chain.length - 1) || !matches.length) ?
matches :
recurseChain(matches, level + 1);
}([str], 0));
};
/**
* Returns a new string with one or all matches of a pattern replaced. The pattern can be a string
* or regex, and the replacement can be a string or a function to be called for each match. To
* perform a global search and replace, use the optional `scope` argument or include flag `g` if
* using a regex. Replacement strings can use `${n}` for named and numbered backreferences.
* Replacement functions can use named backreferences via `arguments[0].name`. Also fixes browser
* bugs compared to the native `String.prototype.replace` and can be used reliably cross-browser.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {RegExp|String} search Search pattern to be replaced.
* @param {String|Function} replacement Replacement string or a function invoked to create it.
* Replacement strings can include special replacement syntax:
* <li>$$ - Inserts a literal '$'.
* <li>$&, $0 - Inserts the matched substring.
* <li>$` - Inserts the string that precedes the matched substring (left context).
* <li>$' - Inserts the string that follows the matched substring (right context).
* <li>$n, $nn - Where n/nn are digits referencing an existent capturing group, inserts
* backreference n/nn.
* <li>${n} - Where n is a name or any number of digits that reference an existent capturing
* group, inserts backreference n.
* Replacement functions are invoked with three or more arguments:
* <li>The matched substring (corresponds to $& above). Named backreferences are accessible as
* properties of this first argument.
* <li>0..n arguments, one for each backreference (corresponding to $1, $2, etc. above).
* <li>The zero-based index of the match within the total search string.
* <li>The total string being searched.
* @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not
* explicitly specified and using a regex with flag `g`, `scope` is 'all'.
* @returns {String} New string with one or all matches replaced.
* @example
*
* // Regex search, using named backreferences in replacement string
* var name = XRegExp('(?<first>\\w+) (?<last>\\w+)');
* XRegExp.replace('John Smith', name, '${last}, ${first}');
* // -> 'Smith, John'
*
* // Regex search, using named backreferences in replacement function
* XRegExp.replace('John Smith', name, function (match) {
* return match.last + ', ' + match.first;
* });
* // -> 'Smith, John'
*
* // Global string search/replacement
* XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all');
* // -> 'XRegExp builds XRegExps'
*/
self.replace = function (str, search, replacement, scope) {
var isRegex = self.isRegExp(search),
search2 = search,
result;
if (isRegex) {
if (scope === undef && search.global) {
scope = "all"; // Follow flag g when `scope` isn't explicit
}
// Note that since a copy is used, `search`'s `lastIndex` isn't updated *during* replacement iterations
search2 = copy(search, scope === "all" ? "g" : "", scope === "all" ? "" : "g");
} else if (scope === "all") {
search2 = new RegExp(self.escape(String(search)), "g");
}
result = fixed.replace.call(String(str), search2, replacement); // Fixed `replace` required for named backreferences, etc.
if (isRegex && search.global) {
search.lastIndex = 0; // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
}
return result;
};
/**
* Splits a string into an array of strings using a regex or string separator. Matches of the
* separator are not included in the result array. However, if `separator` is a regex that contains
* capturing groups, backreferences are spliced into the result each time `separator` is matched.
* Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
* cross-browser.
* @memberOf XRegExp
* @param {String} str String to split.
* @param {RegExp|String} separator Regex or string to use for separating the string.
* @param {Number} [limit] Maximum number of items to include in the result array.
* @returns {Array} Array of substrings.
* @example
*
* // Basic use
* XRegExp.split('a b c', ' ');
* // -> ['a', 'b', 'c']
*
* // With limit
* XRegExp.split('a b c', ' ', 2);
* // -> ['a', 'b']
*
* // Backreferences in result array
* XRegExp.split('..word1..', /([a-z]+)(\d+)/i);
* // -> ['..', 'word', '1', '..']
*/
self.split = function (str, separator, limit) {
return fixed.split.call(str, separator, limit);
};
/**
* Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and
* `sticky` arguments specify the search start position, and whether the match must start at the
* specified position only. The `lastIndex` property of the provided regex is not used, but is
* updated for compatibility. Also fixes browser bugs compared to the native
* `RegExp.prototype.test` and can be used reliably cross-browser.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {RegExp} regex Regex to search with.
* @param {Number} [pos=0] Zero-based index at which to start the search.
* @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
* only. The string `'sticky'` is accepted as an alternative to `true`.
* @returns {Boolean} Whether the regex matched the provided value.
* @example
*
* // Basic use
* XRegExp.test('abc', /c/); // -> true
*
* // With pos and sticky
* XRegExp.test('abc', /c/, 0, 'sticky'); // -> false
*/
self.test = function (str, regex, pos, sticky) {
// Do this the easy way :-)
return !!self.exec(str, regex, pos, sticky);
};
/**
* Uninstalls optional features according to the specified options.
* @memberOf XRegExp
* @param {Object|String} options Options object or string.
* @example
*
* // With an options object
* XRegExp.uninstall({
* // Restores native regex methods
* natives: true,
*
* // Disables additional syntax and flag extensions
* extensibility: true
* });
*
* // With an options string
* XRegExp.uninstall('natives extensibility');
*
* // Using a shortcut to uninstall all optional features
* XRegExp.uninstall('all');
*/
self.uninstall = function (options) {
options = prepareOptions(options);
if (features.natives && options.natives) {
setNatives(false);
}
if (features.extensibility && options.extensibility) {
setExtensibility(false);
}
};
/**
* Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as
* regex objects or strings. Metacharacters are escaped in patterns provided as strings.
* Backreferences in provided regex objects are automatically renumbered to work correctly. Native
* flags used by provided regexes are ignored in favor of the `flags` argument.
* @memberOf XRegExp
* @param {Array} patterns Regexes and strings to combine.
* @param {String} [flags] Any combination of XRegExp flags.
* @returns {RegExp} Union of the provided regexes and strings.
* @example
*
* XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i');
* // -> /a\+b\*c|(dogs)\1|(cats)\2/i
*
* XRegExp.union([XRegExp('(?<pet>dogs)\\k<pet>'), XRegExp('(?<pet>cats)\\k<pet>')]);
* // -> XRegExp('(?<pet>dogs)\\k<pet>|(?<pet>cats)\\k<pet>')
*/
self.union = function (patterns, flags) {
var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,
numCaptures = 0,
numPriorCaptures,
captureNames,
rewrite = function (match, paren, backref) {
var name = captureNames[numCaptures - numPriorCaptures];
if (paren) { // Capturing group
++numCaptures;
if (name) { // If the current capture has a name
return "(?<" + name + ">";
}
} else if (backref) { // Backreference
return "\\" + (+backref + numPriorCaptures);
}
return match;
},
output = [],
pattern,
i;
if (!(isType(patterns, "array") && patterns.length)) {
throw new TypeError("patterns must be a nonempty array");
}
for (i = 0; i < patterns.length; ++i) {
pattern = patterns[i];
if (self.isRegExp(pattern)) {
numPriorCaptures = numCaptures;
captureNames = (pattern.xregexp && pattern.xregexp.captureNames) || [];
// Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns
// are independently valid; helps keep this simple. Named captures are put back
output.push(self(pattern.source).source.replace(parts, rewrite));
} else {
output.push(self.escape(pattern));
}
}
return self(output.join("|"), flags);
};
/**
* The XRegExp version number.
* @static
* @memberOf XRegExp
* @type String
*/
self.version = "2.0.0";
/*--------------------------------------
* Fixed/extended native methods
*------------------------------------*/
/**
* Adds named capture support (with backreferences returned as `result.name`), and fixes browser
* bugs in the native `RegExp.prototype.exec`. Calling `XRegExp.install('natives')` uses this to
* override the native method. Use via `XRegExp.exec` without overriding natives.
* @private
* @param {String} str String to search.
* @returns {Array} Match array with named backreference properties, or null.
*/
fixed.exec = function (str) {
var match, name, r2, origLastIndex, i;
if (!this.global) {
origLastIndex = this.lastIndex;
}
match = nativ.exec.apply(this, arguments);
if (match) {
// Fix browsers whose `exec` methods don't consistently return `undefined` for
// nonparticipating capturing groups
if (!compliantExecNpcg && match.length > 1 && lastIndexOf(match, "") > -1) {
r2 = new RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", ""));
// Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
// matching due to characters outside the match
nativ.replace.call(String(str).slice(match.index), r2, function () {
var i;
for (i = 1; i < arguments.length - 2; ++i) {
if (arguments[i] === undef) {
match[i] = undef;
}
}
});
}
// Attach named capture properties
if (this.xregexp && this.xregexp.captureNames) {
for (i = 1; i < match.length; ++i) {
name = this.xregexp.captureNames[i - 1];
if (name) {
match[name] = match[i];
}
}
}
// Fix browsers that increment `lastIndex` after zero-length matches
if (this.global && !match[0].length && (this.lastIndex > match.index)) {
this.lastIndex = match.index;
}
}
if (!this.global) {
this.lastIndex = origLastIndex; // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
}
return match;
};
/**
* Fixes browser bugs in the native `RegExp.prototype.test`. Calling `XRegExp.install('natives')`
* uses this to override the native method.
* @private
* @param {String} str String to search.
* @returns {Boolean} Whether the regex matched the provided value.
*/
fixed.test = function (str) {
// Do this the easy way :-)
return !!fixed.exec.call(this, str);
};
/**
* Adds named capture support (with backreferences returned as `result.name`), and fixes browser
* bugs in the native `String.prototype.match`. Calling `XRegExp.install('natives')` uses this to
* override the native method.
* @private
* @param {RegExp} regex Regex to search with.
* @returns {Array} If `regex` uses flag g, an array of match strings or null. Without flag g, the
* result of calling `regex.exec(this)`.
*/
fixed.match = function (regex) {
if (!self.isRegExp(regex)) {
regex = new RegExp(regex); // Use native `RegExp`
} else if (regex.global) {
var result = nativ.match.apply(this, arguments);
regex.lastIndex = 0; // Fixes IE bug
return result;
}
return fixed.exec.call(regex, this);
};
/**
* Adds support for `${n}` tokens for named and numbered backreferences in replacement text, and
* provides named backreferences to replacement functions as `arguments[0].name`. Also fixes
* browser bugs in replacement text syntax when performing a replacement using a nonregex search
* value, and the value of a replacement regex's `lastIndex` property during replacement iterations
* and upon completion. Note that this doesn't support SpiderMonkey's proprietary third (`flags`)
* argument. Calling `XRegExp.install('natives')` uses this to override the native method. Use via
* `XRegExp.replace` without overriding natives.
* @private
* @param {RegExp|String} search Search pattern to be replaced.
* @param {String|Function} replacement Replacement string or a function invoked to create it.
* @returns {String} New string with one or all matches replaced.
*/
fixed.replace = function (search, replacement) {
var isRegex = self.isRegExp(search), captureNames, result, str, origLastIndex;
if (isRegex) {
if (search.xregexp) {
captureNames = search.xregexp.captureNames;
}
if (!search.global) {
origLastIndex = search.lastIndex;
}
} else {
search += "";
}
if (isType(replacement, "function")) {
result = nativ.replace.call(String(this), search, function () {
var args = arguments, i;
if (captureNames) {
// Change the `arguments[0]` string primitive to a `String` object that can store properties
args[0] = new String(args[0]);
// Store named backreferences on the first argument
for (i = 0; i < captureNames.length; ++i) {
if (captureNames[i]) {
args[0][captureNames[i]] = args[i + 1];
}
}
}
// Update `lastIndex` before calling `replacement`.
// Fixes IE, Chrome, Firefox, Safari bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1)
if (isRegex && search.global) {
search.lastIndex = args[args.length - 2] + args[0].length;
}
return replacement.apply(null, args);
});
} else {
str = String(this); // Ensure `args[args.length - 1]` will be a string when given nonstring `this`
result = nativ.replace.call(str, search, function () {
var args = arguments; // Keep this function's `arguments` available through closure
return nativ.replace.call(String(replacement), replacementToken, function ($0, $1, $2) {
var n;
// Named or numbered backreference with curly brackets
if ($1) {
/* XRegExp behavior for `${n}`:
* 1. Backreference to numbered capture, where `n` is 1+ digits. `0`, `00`, etc. is the entire match.
* 2. Backreference to named capture `n`, if it exists and is not a number overridden by numbered capture.
* 3. Otherwise, it's an error.
*/
n = +$1; // Type-convert; drop leading zeros
if (n <= args.length - 3) {
return args[n] || "";
}
n = captureNames ? lastIndexOf(captureNames, $1) : -1;
if (n < 0) {
throw new SyntaxError("backreference to undefined group " + $0);
}
return args[n + 1] || "";
}
// Else, special variable or numbered backreference (without curly brackets)
if ($2 === "$") return "$";
if ($2 === "&" || +$2 === 0) return args[0]; // $&, $0 (not followed by 1-9), $00
if ($2 === "`") return args[args.length - 1].slice(0, args[args.length - 2]);
if ($2 === "'") return args[args.length - 1].slice(args[args.length - 2] + args[0].length);
// Else, numbered backreference (without curly brackets)
$2 = +$2; // Type-convert; drop leading zero
/* XRegExp behavior:
* - Backreferences without curly brackets end after 1 or 2 digits. Use `${..}` for more digits.
* - `$1` is an error if there are no capturing groups.
* - `$10` is an error if there are less than 10 capturing groups. Use `${1}0` instead.
* - `$01` is equivalent to `$1` if a capturing group exists, otherwise it's an error.
* - `$0` (not followed by 1-9), `$00`, and `$&` are the entire match.
* Native behavior, for comparison:
* - Backreferences end after 1 or 2 digits. Cannot use backreference to capturing group 100+.
* - `$1` is a literal `$1` if there are no capturing groups.
* - `$10` is `$1` followed by a literal `0` if there are less than 10 capturing groups.
* - `$01` is equivalent to `$1` if a capturing group exists, otherwise it's a literal `$01`.
* - `$0` is a literal `$0`. `$&` is the entire match.
*/
if (!isNaN($2)) {
if ($2 > args.length - 3) {
throw new SyntaxError("backreference to undefined group " + $0);
}
return args[$2] || "";
}
throw new SyntaxError("invalid token " + $0);
});
});
}
if (isRegex) {
if (search.global) {
search.lastIndex = 0; // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
} else {
search.lastIndex = origLastIndex; // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
}
}
return result;
};
/**
* Fixes browser bugs in the native `String.prototype.split`. Calling `XRegExp.install('natives')`
* uses this to override the native method. Use via `XRegExp.split` without overriding natives.
* @private
* @param {RegExp|String} separator Regex or string to use for separating the string.
* @param {Number} [limit] Maximum number of items to include in the result array.
* @returns {Array} Array of substrings.
*/
fixed.split = function (separator, limit) {
if (!self.isRegExp(separator)) {
return nativ.split.apply(this, arguments); // use faster native method
}
var str = String(this),
origLastIndex = separator.lastIndex,
output = [],
lastLastIndex = 0,
lastLength;
/* Values for `limit`, per the spec:
* If undefined: pow(2,32) - 1
* If 0, Infinity, or NaN: 0
* If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32);
* If negative number: pow(2,32) - floor(abs(limit))
* If other: Type-convert, then use the above rules
*/
limit = (limit === undef ? -1 : limit) >>> 0;
self.forEach(str, separator, function (match) {
if ((match.index + match[0].length) > lastLastIndex) { // != `if (match[0].length)`
output.push(str.slice(lastLastIndex, match.index));
if (match.length > 1 && match.index < str.length) {
Array.prototype.push.apply(output, match.slice(1));
}
lastLength = match[0].length;
lastLastIndex = match.index + lastLength;
}
});
if (lastLastIndex === str.length) {
if (!nativ.test.call(separator, "") || lastLength) {
output.push("");
}
} else {
output.push(str.slice(lastLastIndex));
}
separator.lastIndex = origLastIndex;
return output.length > limit ? output.slice(0, limit) : output;
};
/*--------------------------------------
* Built-in tokens
*------------------------------------*/
// Shortcut
add = addToken.on;
/* Letter identity escapes that natively match literal characters: \p, \P, etc.
* Should be SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-
* browser consistency and to reserve their syntax, but lets them be superseded by XRegExp addons.
*/
add(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,
function (match, scope) {
// \B is allowed in default scope only
if (match[1] === "B" && scope === defaultScope) {
return match[0];
}
throw new SyntaxError("invalid escape " + match[0]);
},
{scope: "all"});
/* Empty character class: [] or [^]
* Fixes a critical cross-browser syntax inconsistency. Unless this is standardized (per the spec),
* regex syntax can't be accurately parsed because character class endings can't be determined.
*/
add(/\[(\^?)]/,
function (match) {
// For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S].
// (?!) should work like \b\B, but is unreliable in Firefox
return match[1] ? "[\\s\\S]" : "\\b\\B";
});
/* Comment pattern: (?# )
* Inline comments are an alternative to the line comments allowed in free-spacing mode (flag x).
*/
add(/(?:\(\?#[^)]*\))+/,
function (match) {
// Keep tokens separated unless the following token is a quantifier
return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
});
/* Named backreference: \k<name>
* Backreference names can use the characters A-Z, a-z, 0-9, _, and $ only.
*/
add(/\\k<([\w$]+)>/,
function (match) {
var index = isNaN(match[1]) ? (lastIndexOf(this.captureNames, match[1]) + 1) : +match[1],
endIndex = match.index + match[0].length;
if (!index || index > this.captureNames.length) {
throw new SyntaxError("backreference to undefined group " + match[0]);
}
// Keep backreferences separate from subsequent literal numbers
return "\\" + index + (
endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ? "" : "(?:)"
);
});
/* Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only.
*/
add(/(?:\s+|#.*)+/,
function (match) {
// Keep tokens separated unless the following token is a quantifier
return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)";
},
{
trigger: function () {
return this.hasFlag("x");
},
customFlags: "x"
});
/* Dot, in dotall mode (aka singleline mode, flag s) only.
*/
add(/\./,
function () {
return "[\\s\\S]";
},
{
trigger: function () {
return this.hasFlag("s");
},
customFlags: "s"
});
/* Named capturing group; match the opening delimiter only: (?<name>
* Capture names can use the characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers.
* Supports Python-style (?P<name> as an alternate syntax to avoid issues in recent Opera (which
* natively supports the Python-style syntax). Otherwise, XRegExp might treat numbered
* backreferences to Python-style named capture as octals.
*/
add(/\(\?P?<([\w$]+)>/,
function (match) {
if (!isNaN(match[1])) {
// Avoid incorrect lookups, since named backreferences are added to match arrays
throw new SyntaxError("can't use integer as capture name " + match[0]);
}
this.captureNames.push(match[1]);
this.hasNamedCapture = true;
return "(";
});
/* Numbered backreference or octal, plus any following digits: \0, \11, etc.
* Octals except \0 not followed by 0-9 and backreferences to unopened capture groups throw an
* error. Other matches are returned unaltered. IE <= 8 doesn't support backreferences greater than
* \99 in regex syntax.
*/
add(/\\(\d+)/,
function (match, scope) {
if (!(scope === defaultScope && /^[1-9]/.test(match[1]) && +match[1] <= this.captureNames.length) &&
match[1] !== "0") {
throw new SyntaxError("can't use octal escape or backreference to undefined group " + match[0]);
}
return match[0];
},
{scope: "all"});
/* Capturing group; match the opening parenthesis only.
* Required for support of named capturing groups. Also adds explicit capture mode (flag n).
*/
add(/\((?!\?)/,
function () {
if (this.hasFlag("n")) {
return "(?:";
}
this.captureNames.push(null);
return "(";
},
{customFlags: "n"});
/*--------------------------------------
* Expose XRegExp
*------------------------------------*/
// For CommonJS enviroments
if (true) {
exports.d = self;
}
return self;
}());
/***** unicode-base.js *****/
/*!
* XRegExp Unicode Base v1.0.0
* (c) 2008-2012 Steven Levithan <http://xregexp.com/>
* MIT License
* Uses Unicode 6.1 <http://unicode.org/>
*/
/**
* Adds support for the `\p{L}` or `\p{Letter}` Unicode category. Addon packages for other Unicode
* categories, scripts, blocks, and properties are available separately. All Unicode tokens can be
* inverted using `\P{..}` or `\p{^..}`. Token names are case insensitive, and any spaces, hyphens,
* and underscores are ignored.
* @requires XRegExp
*/
(function (XRegExp) {
"use strict";
var unicode = {};
/*--------------------------------------
* Private helper functions
*------------------------------------*/
// Generates a standardized token name (lowercase, with hyphens, spaces, and underscores removed)
function slug(name) {
return name.replace(/[- _]+/g, "").toLowerCase();
}
// Expands a list of Unicode code points and ranges to be usable in a regex character class
function expand(str) {
return str.replace(/\w{4}/g, "\\u$&");
}
// Adds leading zeros if shorter than four characters
function pad4(str) {
while (str.length < 4) {
str = "0" + str;
}
return str;
}
// Converts a hexadecimal number to decimal
function dec(hex) {
return parseInt(hex, 16);
}
// Converts a decimal number to hexadecimal
function hex(dec) {
return parseInt(dec, 10).toString(16);
}
// Inverts a list of Unicode code points and ranges
function invert(range) {
var output = [],
lastEnd = -1,
start;
XRegExp.forEach(range, /\\u(\w{4})(?:-\\u(\w{4}))?/, function (m) {
start = dec(m[1]);
if (start > (lastEnd + 1)) {
output.push("\\u" + pad4(hex(lastEnd + 1)));
if (start > (lastEnd + 2)) {
output.push("-\\u" + pad4(hex(start - 1)));
}
}
lastEnd = dec(m[2] || m[1]);
});
if (lastEnd < 0xFFFF) {
output.push("\\u" + pad4(hex(lastEnd + 1)));
if (lastEnd < 0xFFFE) {
output.push("-\\uFFFF");
}
}
return output.join("");
}
// Generates an inverted token on first use
function cacheInversion(item) {
return unicode["^" + item] || (unicode["^" + item] = invert(unicode[item]));
}
/*--------------------------------------
* Core functionality
*------------------------------------*/
XRegExp.install("extensibility");
/**
* Adds to the list of Unicode properties that XRegExp regexes can match via \p{..} or \P{..}.
* @memberOf XRegExp
* @param {Object} pack Named sets of Unicode code points and ranges.
* @param {Object} [aliases] Aliases for the primary token names.
* @example
*
* XRegExp.addUnicodePackage({
* XDigit: '0030-00390041-00460061-0066' // 0-9A-Fa-f
* }, {
* XDigit: 'Hexadecimal'
* });
*/
XRegExp.addUnicodePackage = function (pack, aliases) {
var p;
if (!XRegExp.isInstalled("extensibility")) {
throw new Error("extensibility must be installed before adding Unicode packages");
}
if (pack) {
for (p in pack) {
if (pack.hasOwnProperty(p)) {
unicode[slug(p)] = expand(pack[p]);
}
}
}
if (aliases) {
for (p in aliases) {
if (aliases.hasOwnProperty(p)) {
unicode[slug(aliases[p])] = unicode[slug(p)];
}
}
}
};
/* Adds data for the Unicode `Letter` category. Addon packages include other categories, scripts,
* blocks, and properties.
*/
XRegExp.addUnicodePackage({
L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05270531-055605590561-058705D0-05EA05F0-05F20620-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280840-085808A008A2-08AC0904-0939093D09500958-09610971-09770979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78B-A78EA790-A793A7A0-A7AAA7F8-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDAAE0-AAEAAAF2-AAF4AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC"
}, {
L: "Letter"
});
/* Adds Unicode property syntax to XRegExp: \p{..}, \P{..}, \p{^..}
*/
XRegExp.addToken(
/\\([pP]){(\^?)([^}]*)}/,
function (match, scope) {
var inv = (match[1] === "P" || match[2]) ? "^" : "",
item = slug(match[3]);
// The double negative \P{^..} is invalid
if (match[1] === "P" && match[2]) {
throw new SyntaxError("invalid double negation \\P{^");
}
if (!unicode.hasOwnProperty(item)) {
throw new SyntaxError("invalid or unknown Unicode property " + match[0]);
}
return scope === "class" ?
(inv ? cacheInversion(item) : unicode[item]) :
"[" + inv + unicode[item] + "]";
},
{scope: "all"}
);
}(XRegExp));
/***** unicode-categories.js *****/
/*!
* XRegExp Unicode Categories v1.2.0
* (c) 2010-2012 Steven Levithan <http://xregexp.com/>
* MIT License
* Uses Unicode 6.1 <http://unicode.org/>
*/
/**
* Adds support for all Unicode categories (aka properties) E.g., `\p{Lu}` or
* `\p{Uppercase Letter}`. Token names are case insensitive, and any spaces, hyphens, and
* underscores are ignored.
* @requires XRegExp, XRegExp Unicode Base
*/
(function (XRegExp) {
"use strict";
if (!XRegExp.addUnicodePackage) {
throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");
}
XRegExp.install("extensibility");
XRegExp.addUnicodePackage({
//L: "", // Included in the Unicode Base addon
Ll: "0061-007A00B500DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F05210523052505270561-05871D00-1D2B1D6B-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7B2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2CF32D00-2D252D272D2DA641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA661A663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CA78EA791A793A7A1A7A3A7A5A7A7A7A9A7FAFB00-FB06FB13-FB17FF41-FF5A",
Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E05200522052405260531-055610A0-10C510C710CD1E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CED2CF2A640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA660A662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BA78DA790A792A7A0A7A2A7A4A7A6A7A8A7AAFF21-FF3A",
Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D6A1D781D9B-1DBF2071207F2090-209C2C7C2C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A7F8A7F9A9CFAA70AADDAAF3AAF4FF70FF9EFF9F",
Lo: "00AA00BA01BB01C0-01C3029405D0-05EA05F0-05F20620-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150840-085808A008A2-08AC0904-0939093D09500958-09610972-09770979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA10FD-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF11CF51CF62135-21382D30-2D672D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCAAE0-AAEAAAF2AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065F067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0859-085B08E4-08FE0900-0903093A-093C093E-094F0951-0957096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F8D-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135D-135F1712-17141732-1734175217531772177317B4-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAD1BE6-1BF31C24-1C371CD0-1CD21CD4-1CE81CED1CF2-1CF41DC0-1DE61DFC-1DFF20D0-20F02CEF-2CF12D7F2DE0-2DFF302A-302F3099309AA66F-A672A674-A67DA69FA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1AAEB-AAEFAAF5AAF6ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065F067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0859-085B08E4-08FE0900-0902093A093C0941-0948094D0951-095709620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F8D-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135D-135F1712-17141732-1734175217531772177317B417B517B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91BAB1BE61BE81BE91BED1BEF-1BF11C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1CF41DC0-1DE61DFC-1DFF20D0-20DC20E120E5-20F02CEF-2CF12D7F2DE0-2DFF302A-302D3099309AA66FA674-A67DA69FA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1AAECAAEDAAF6ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
Mc: "0903093B093E-09400949-094C094E094F0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1BAC1BAD1BE71BEA-1BEC1BEE1BF21BF31C24-1C2B1C341C351CE11CF21CF3302E302FA823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BAAEBAAEEAAEFAAF5ABE3ABE4ABE6ABE7ABE9ABEAABEC",
Me: "0488048920DD-20E020E2-20E4A670-A672",
N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0B72-0B770BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293248-324F3251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19D91A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
No: "00B200B300B900BC-00BE09F4-09F90B72-0B770BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F919DA20702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293248-324F3251-325F3280-328932B1-32BFA830-A835",
P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100A700AB00B600B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E085E0964096509700AF00DF40E4F0E5A0E5B0F04-0F120F140F3A-0F3D0F850FD0-0FD40FD90FDA104A-104F10FB1360-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A194419451A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601BFC-1BFF1C3B-1C3F1C7E1C7F1CC0-1CC71CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2D702E00-2E2E2E30-2E3B3001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFAAF0AAF1ABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
Pd: "002D058A05BE140018062010-20152E172E1A2E3A2E3B301C303030A0FE31FE32FE58FE63FF0D",
Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100A700B600B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E085E0964096509700AF00DF40E4F0E5A0E5B0F04-0F120F140F850FD0-0FD40FD90FDA104A-104F10FB1360-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A194419451A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601BFC-1BFF1C3B-1C3F1C7E1C7F1CC0-1CC71CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2D702E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E30-2E393001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFAAF0AAF1ABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
S: "0024002B003C-003E005E0060007C007E00A2-00A600A800A900AC00AE-00B100B400B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F60482058F0606-0608060B060E060F06DE06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0D790E3F0F01-0F030F130F15-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F1390-139917DB194019DE-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B9210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23F32400-24262440-244A249C-24E92500-26FF2701-27672794-27C427C7-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-324732503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FBB2-FBC1FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C21182140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
Sc: "002400A2-00A5058F060B09F209F309FB0AF10BF90E3F17DB20A0-20B9A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFBB2-FBC1FF3EFF40FFE3",
So: "00A600A900AE00B00482060E060F06DE06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0D790F01-0F030F130F15-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F1390-1399194019DE-19FF1B61-1B6A1B74-1B7C210021012103-210621082109211421162117211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23F32400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26FF2701-27672794-27BF2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-324732503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
Z: "002000A01680180E2000-200A20282029202F205F3000",
Zs: "002000A01680180E2000-200A202F205F3000",
Zl: "2028",
Zp: "2029",
C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20528-05300557055805600588058B-058E059005C8-05CF05EB-05EF05F5-0605061C061D06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F085C085D085F-089F08A108AD-08E308FF097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B78-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D3B0D3C0D450D490D4F-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EE0-0EFF0F480F6D-0F700F980FBD0FCD0FDB-0FFF10C610C8-10CC10CE10CF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B135C137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BF4-1BFB1C38-1C3A1C4A-1C4C1C80-1CBF1CC8-1CCF1CF7-1CFF1DE7-1DFB1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F209D-209F20BA-20CF20F1-20FF218A-218F23F4-23FF2427-243F244B-245F27002B4D-2B4F2B5A-2BFF2C2F2C5F2CF4-2CF82D262D28-2D2C2D2E2D2F2D68-2D6E2D71-2D7E2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E3C-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31BB-31BF31E4-31EF321F32FF4DB6-4DBF9FCD-9FFFA48D-A48FA4C7-A4CFA62C-A63FA698-A69EA6F8-A6FFA78FA794-A79FA7AB-A7F7A82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAF7-AB00AB07AB08AB0FAB10AB17-AB1FAB27AB2F-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBC2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
Cc: "0000-001F007F-009F",
Cf: "00AD0600-060406DD070F200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
Co: "E000-F8FF",
Cs: "D800-DFFF",
Cn: "03780379037F-0383038B038D03A20528-05300557055805600588058B-058E059005C8-05CF05EB-05EF05F5-05FF0605061C061D070E074B074C07B2-07BF07FB-07FF082E082F083F085C085D085F-089F08A108AD-08E308FF097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B78-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D3B0D3C0D450D490D4F-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EE0-0EFF0F480F6D-0F700F980FBD0FCD0FDB-0FFF10C610C8-10CC10CE10CF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B135C137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BF4-1BFB1C38-1C3A1C4A-1C4C1C80-1CBF1CC8-1CCF1CF7-1CFF1DE7-1DFB1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F209D-209F20BA-20CF20F1-20FF218A-218F23F4-23FF2427-243F244B-245F27002B4D-2B4F2B5A-2BFF2C2F2C5F2CF4-2CF82D262D28-2D2C2D2E2D2F2D68-2D6E2D71-2D7E2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E3C-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31BB-31BF31E4-31EF321F32FF4DB6-4DBF9FCD-9FFFA48D-A48FA4C7-A4CFA62C-A63FA698-A69EA6F8-A6FFA78FA794-A79FA7AB-A7F7A82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAF7-AB00AB07AB08AB0FAB10AB17-AB1FAB27AB2F-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBC2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
}, {
//L: "Letter", // Included in the Unicode Base addon
Ll: "Lowercase_Letter",
Lu: "Uppercase_Letter",
Lt: "Titlecase_Letter",
Lm: "Modifier_Letter",
Lo: "Other_Letter",
M: "Mark",
Mn: "Nonspacing_Mark",
Mc: "Spacing_Mark",
Me: "Enclosing_Mark",
N: "Number",
Nd: "Decimal_Number",
Nl: "Letter_Number",
No: "Other_Number",
P: "Punctuation",
Pd: "Dash_Punctuation",
Ps: "Open_Punctuation",
Pe: "Close_Punctuation",
Pi: "Initial_Punctuation",
Pf: "Final_Punctuation",
Pc: "Connector_Punctuation",
Po: "Other_Punctuation",
S: "Symbol",
Sm: "Math_Symbol",
Sc: "Currency_Symbol",
Sk: "Modifier_Symbol",
So: "Other_Symbol",
Z: "Separator",
Zs: "Space_Separator",
Zl: "Line_Separator",
Zp: "Paragraph_Separator",
C: "Other",
Cc: "Control",
Cf: "Format",
Co: "Private_Use",
Cs: "Surrogate",
Cn: "Unassigned"
});
}(XRegExp));
/***** unicode-scripts.js *****/
/*!
* XRegExp Unicode Scripts v1.2.0
* (c) 2010-2012 Steven Levithan <http://xregexp.com/>
* MIT License
* Uses Unicode 6.1 <http://unicode.org/>
*/
/**
* Adds support for all Unicode scripts in the Basic Multilingual Plane (U+0000-U+FFFF).
* E.g., `\p{Latin}`. Token names are case insensitive, and any spaces, hyphens, and underscores
* are ignored.
* @requires XRegExp, XRegExp Unicode Base
*/
(function (XRegExp) {
"use strict";
if (!XRegExp.addUnicodePackage) {
throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");
}
XRegExp.install("extensibility");
XRegExp.addUnicodePackage({
Arabic: "0600-06040606-060B060D-061A061E0620-063F0641-064A0656-065E066A-066F0671-06DC06DE-06FF0750-077F08A008A2-08AC08E4-08FEFB50-FBC1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFCFE70-FE74FE76-FEFC",
Armenian: "0531-05560559-055F0561-0587058A058FFB13-FB17",
Balinese: "1B00-1B4B1B50-1B7C",
Bamum: "A6A0-A6F7",
Batak: "1BC0-1BF31BFC-1BFF",
Bengali: "0981-09830985-098C098F09900993-09A809AA-09B009B209B6-09B909BC-09C409C709C809CB-09CE09D709DC09DD09DF-09E309E6-09FB",
Bopomofo: "02EA02EB3105-312D31A0-31BA",
Braille: "2800-28FF",
Buginese: "1A00-1A1B1A1E1A1F",
Buhid: "1740-1753",
Canadian_Aboriginal: "1400-167F18B0-18F5",
Cham: "AA00-AA36AA40-AA4DAA50-AA59AA5C-AA5F",
Cherokee: "13A0-13F4",
Common: "0000-0040005B-0060007B-00A900AB-00B900BB-00BF00D700F702B9-02DF02E5-02E902EC-02FF0374037E038503870589060C061B061F06400660-066906DD096409650E3F0FD5-0FD810FB16EB-16ED173517361802180318051CD31CE11CE9-1CEC1CEE-1CF31CF51CF62000-200B200E-2064206A-20702074-207E2080-208E20A0-20B92100-21252127-2129212C-21312133-214D214F-215F21892190-23F32400-24262440-244A2460-26FF2701-27FF2900-2B4C2B50-2B592E00-2E3B2FF0-2FFB3000-300430063008-30203030-3037303C-303F309B309C30A030FB30FC3190-319F31C0-31E33220-325F327F-32CF3358-33FF4DC0-4DFFA700-A721A788-A78AA830-A839FD3EFD3FFDFDFE10-FE19FE30-FE52FE54-FE66FE68-FE6BFEFFFF01-FF20FF3B-FF40FF5B-FF65FF70FF9EFF9FFFE0-FFE6FFE8-FFEEFFF9-FFFD",
Coptic: "03E2-03EF2C80-2CF32CF9-2CFF",
Cyrillic: "0400-04840487-05271D2B1D782DE0-2DFFA640-A697A69F",
Devanagari: "0900-09500953-09630966-09770979-097FA8E0-A8FB",
Ethiopic: "1200-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A135D-137C1380-13992D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDEAB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2E",
Georgian: "10A0-10C510C710CD10D0-10FA10FC-10FF2D00-2D252D272D2D",
Glagolitic: "2C00-2C2E2C30-2C5E",
Greek: "0370-03730375-0377037A-037D038403860388-038A038C038E-03A103A3-03E103F0-03FF1D26-1D2A1D5D-1D611D66-1D6A1DBF1F00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FC41FC6-1FD31FD6-1FDB1FDD-1FEF1FF2-1FF41FF6-1FFE2126",
Gujarati: "0A81-0A830A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABC-0AC50AC7-0AC90ACB-0ACD0AD00AE0-0AE30AE6-0AF1",
Gurmukhi: "0A01-0A030A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A3C0A3E-0A420A470A480A4B-0A4D0A510A59-0A5C0A5E0A66-0A75",
Han: "2E80-2E992E9B-2EF32F00-2FD5300530073021-30293038-303B3400-4DB54E00-9FCCF900-FA6DFA70-FAD9",
Hangul: "1100-11FF302E302F3131-318E3200-321E3260-327EA960-A97CAC00-D7A3D7B0-D7C6D7CB-D7FBFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
Hanunoo: "1720-1734",
Hebrew: "0591-05C705D0-05EA05F0-05F4FB1D-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FB4F",
Hiragana: "3041-3096309D-309F",
Inherited: "0300-036F04850486064B-0655065F0670095109521CD0-1CD21CD4-1CE01CE2-1CE81CED1CF41DC0-1DE61DFC-1DFF200C200D20D0-20F0302A-302D3099309AFE00-FE0FFE20-FE26",
Javanese: "A980-A9CDA9CF-A9D9A9DEA9DF",
Kannada: "0C820C830C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBC-0CC40CC6-0CC80CCA-0CCD0CD50CD60CDE0CE0-0CE30CE6-0CEF0CF10CF2",
Katakana: "30A1-30FA30FD-30FF31F0-31FF32D0-32FE3300-3357FF66-FF6FFF71-FF9D",
Kayah_Li: "A900-A92F",
Khmer: "1780-17DD17E0-17E917F0-17F919E0-19FF",
Lao: "0E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB90EBB-0EBD0EC0-0EC40EC60EC8-0ECD0ED0-0ED90EDC-0EDF",
Latin: "0041-005A0061-007A00AA00BA00C0-00D600D8-00F600F8-02B802E0-02E41D00-1D251D2C-1D5C1D62-1D651D6B-1D771D79-1DBE1E00-1EFF2071207F2090-209C212A212B2132214E2160-21882C60-2C7FA722-A787A78B-A78EA790-A793A7A0-A7AAA7F8-A7FFFB00-FB06FF21-FF3AFF41-FF5A",
Lepcha: "1C00-1C371C3B-1C491C4D-1C4F",
Limbu: "1900-191C1920-192B1930-193B19401944-194F",
Lisu: "A4D0-A4FF",
Malayalam: "0D020D030D05-0D0C0D0E-0D100D12-0D3A0D3D-0D440D46-0D480D4A-0D4E0D570D60-0D630D66-0D750D79-0D7F",
Mandaic: "0840-085B085E",
Meetei_Mayek: "AAE0-AAF6ABC0-ABEDABF0-ABF9",
Mongolian: "1800180118041806-180E1810-18191820-18771880-18AA",
Myanmar: "1000-109FAA60-AA7B",
New_Tai_Lue: "1980-19AB19B0-19C919D0-19DA19DE19DF",
Nko: "07C0-07FA",
Ogham: "1680-169C",
Ol_Chiki: "1C50-1C7F",
Oriya: "0B01-0B030B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3C-0B440B470B480B4B-0B4D0B560B570B5C0B5D0B5F-0B630B66-0B77",
Phags_Pa: "A840-A877",
Rejang: "A930-A953A95F",
Runic: "16A0-16EA16EE-16F0",
Samaritan: "0800-082D0830-083E",
Saurashtra: "A880-A8C4A8CE-A8D9",
Sinhala: "0D820D830D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60DCA0DCF-0DD40DD60DD8-0DDF0DF2-0DF4",
Sundanese: "1B80-1BBF1CC0-1CC7",
Syloti_Nagri: "A800-A82B",
Syriac: "0700-070D070F-074A074D-074F",
Tagalog: "1700-170C170E-1714",
Tagbanwa: "1760-176C176E-177017721773",
Tai_Le: "1950-196D1970-1974",
Tai_Tham: "1A20-1A5E1A60-1A7C1A7F-1A891A90-1A991AA0-1AAD",
Tai_Viet: "AA80-AAC2AADB-AADF",
Tamil: "0B820B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BBE-0BC20BC6-0BC80BCA-0BCD0BD00BD70BE6-0BFA",
Telugu: "0C01-0C030C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D-0C440C46-0C480C4A-0C4D0C550C560C580C590C60-0C630C66-0C6F0C78-0C7F",
Thaana: "0780-07B1",
Thai: "0E01-0E3A0E40-0E5B",
Tibetan: "0F00-0F470F49-0F6C0F71-0F970F99-0FBC0FBE-0FCC0FCE-0FD40FD90FDA",
Tifinagh: "2D30-2D672D6F2D702D7F",
Vai: "A500-A62B",
Yi: "A000-A48CA490-A4C6"
});
}(XRegExp));
/***** unicode-blocks.js *****/
/*!
* XRegExp Unicode Blocks v1.2.0
* (c) 2010-2012 Steven Levithan <http://xregexp.com/>
* MIT License
* Uses Unicode 6.1 <http://unicode.org/>
*/
/**
* Adds support for all Unicode blocks in the Basic Multilingual Plane (U+0000-U+FFFF). Unicode
* blocks use the prefix "In". E.g., `\p{InBasicLatin}`. Token names are case insensitive, and any
* spaces, hyphens, and underscores are ignored.
* @requires XRegExp, XRegExp Unicode Base
*/
(function (XRegExp) {
"use strict";
if (!XRegExp.addUnicodePackage) {
throw new ReferenceError("Unicode Base must be loaded before Unicode Blocks");
}
XRegExp.install("extensibility");
XRegExp.addUnicodePackage({
InBasic_Latin: "0000-007F",
InLatin_1_Supplement: "0080-00FF",
InLatin_Extended_A: "0100-017F",
InLatin_Extended_B: "0180-024F",
InIPA_Extensions: "0250-02AF",
InSpacing_Modifier_Letters: "02B0-02FF",
InCombining_Diacritical_Marks: "0300-036F",
InGreek_and_Coptic: "0370-03FF",
InCyrillic: "0400-04FF",
InCyrillic_Supplement: "0500-052F",
InArmenian: "0530-058F",
InHebrew: "0590-05FF",
InArabic: "0600-06FF",
InSyriac: "0700-074F",
InArabic_Supplement: "0750-077F",
InThaana: "0780-07BF",
InNKo: "07C0-07FF",
InSamaritan: "0800-083F",
InMandaic: "0840-085F",
InArabic_Extended_A: "08A0-08FF",
InDevanagari: "0900-097F",
InBengali: "0980-09FF",
InGurmukhi: "0A00-0A7F",
InGujarati: "0A80-0AFF",
InOriya: "0B00-0B7F",
InTamil: "0B80-0BFF",
InTelugu: "0C00-0C7F",
InKannada: "0C80-0CFF",
InMalayalam: "0D00-0D7F",
InSinhala: "0D80-0DFF",
InThai: "0E00-0E7F",
InLao: "0E80-0EFF",
InTibetan: "0F00-0FFF",
InMyanmar: "1000-109F",
InGeorgian: "10A0-10FF",
InHangul_Jamo: "1100-11FF",
InEthiopic: "1200-137F",
InEthiopic_Supplement: "1380-139F",
InCherokee: "13A0-13FF",
InUnified_Canadian_Aboriginal_Syllabics: "1400-167F",
InOgham: "1680-169F",
InRunic: "16A0-16FF",
InTagalog: "1700-171F",
InHanunoo: "1720-173F",
InBuhid: "1740-175F",
InTagbanwa: "1760-177F",
InKhmer: "1780-17FF",
InMongolian: "1800-18AF",
InUnified_Canadian_Aboriginal_Syllabics_Extended: "18B0-18FF",
InLimbu: "1900-194F",
InTai_Le: "1950-197F",
InNew_Tai_Lue: "1980-19DF",
InKhmer_Symbols: "19E0-19FF",
InBuginese: "1A00-1A1F",
InTai_Tham: "1A20-1AAF",
InBalinese: "1B00-1B7F",
InSundanese: "1B80-1BBF",
InBatak: "1BC0-1BFF",
InLepcha: "1C00-1C4F",
InOl_Chiki: "1C50-1C7F",
InSundanese_Supplement: "1CC0-1CCF",
InVedic_Extensions: "1CD0-1CFF",
InPhonetic_Extensions: "1D00-1D7F",
InPhonetic_Extensions_Supplement: "1D80-1DBF",
InCombining_Diacritical_Marks_Supplement: "1DC0-1DFF",
InLatin_Extended_Additional: "1E00-1EFF",
InGreek_Extended: "1F00-1FFF",
InGeneral_Punctuation: "2000-206F",
InSuperscripts_and_Subscripts: "2070-209F",
InCurrency_Symbols: "20A0-20CF",
InCombining_Diacritical_Marks_for_Symbols: "20D0-20FF",
InLetterlike_Symbols: "2100-214F",
InNumber_Forms: "2150-218F",
InArrows: "2190-21FF",
InMathematical_Operators: "2200-22FF",
InMiscellaneous_Technical: "2300-23FF",
InControl_Pictures: "2400-243F",
InOptical_Character_Recognition: "2440-245F",
InEnclosed_Alphanumerics: "2460-24FF",
InBox_Drawing: "2500-257F",
InBlock_Elements: "2580-259F",
InGeometric_Shapes: "25A0-25FF",
InMiscellaneous_Symbols: "2600-26FF",
InDingbats: "2700-27BF",
InMiscellaneous_Mathematical_Symbols_A: "27C0-27EF",
InSupplemental_Arrows_A: "27F0-27FF",
InBraille_Patterns: "2800-28FF",
InSupplemental_Arrows_B: "2900-297F",
InMiscellaneous_Mathematical_Symbols_B: "2980-29FF",
InSupplemental_Mathematical_Operators: "2A00-2AFF",
InMiscellaneous_Symbols_and_Arrows: "2B00-2BFF",
InGlagolitic: "2C00-2C5F",
InLatin_Extended_C: "2C60-2C7F",
InCoptic: "2C80-2CFF",
InGeorgian_Supplement: "2D00-2D2F",
InTifinagh: "2D30-2D7F",
InEthiopic_Extended: "2D80-2DDF",
InCyrillic_Extended_A: "2DE0-2DFF",
InSupplemental_Punctuation: "2E00-2E7F",
InCJK_Radicals_Supplement: "2E80-2EFF",
InKangxi_Radicals: "2F00-2FDF",
InIdeographic_Description_Characters: "2FF0-2FFF",
InCJK_Symbols_and_Punctuation: "3000-303F",
InHiragana: "3040-309F",
InKatakana: "30A0-30FF",
InBopomofo: "3100-312F",
InHangul_Compatibility_Jamo: "3130-318F",
InKanbun: "3190-319F",
InBopomofo_Extended: "31A0-31BF",
InCJK_Strokes: "31C0-31EF",
InKatakana_Phonetic_Extensions: "31F0-31FF",
InEnclosed_CJK_Letters_and_Months: "3200-32FF",
InCJK_Compatibility: "3300-33FF",
InCJK_Unified_Ideographs_Extension_A: "3400-4DBF",
InYijing_Hexagram_Symbols: "4DC0-4DFF",
InCJK_Unified_Ideographs: "4E00-9FFF",
InYi_Syllables: "A000-A48F",
InYi_Radicals: "A490-A4CF",
InLisu: "A4D0-A4FF",
InVai: "A500-A63F",
InCyrillic_Extended_B: "A640-A69F",
InBamum: "A6A0-A6FF",
InModifier_Tone_Letters: "A700-A71F",
InLatin_Extended_D: "A720-A7FF",
InSyloti_Nagri: "A800-A82F",
InCommon_Indic_Number_Forms: "A830-A83F",
InPhags_pa: "A840-A87F",
InSaurashtra: "A880-A8DF",
InDevanagari_Extended: "A8E0-A8FF",
InKayah_Li: "A900-A92F",
InRejang: "A930-A95F",
InHangul_Jamo_Extended_A: "A960-A97F",
InJavanese: "A980-A9DF",
InCham: "AA00-AA5F",
InMyanmar_Extended_A: "AA60-AA7F",
InTai_Viet: "AA80-AADF",
InMeetei_Mayek_Extensions: "AAE0-AAFF",
InEthiopic_Extended_A: "AB00-AB2F",
InMeetei_Mayek: "ABC0-ABFF",
InHangul_Syllables: "AC00-D7AF",
InHangul_Jamo_Extended_B: "D7B0-D7FF",
InHigh_Surrogates: "D800-DB7F",
InHigh_Private_Use_Surrogates: "DB80-DBFF",
InLow_Surrogates: "DC00-DFFF",
InPrivate_Use_Area: "E000-F8FF",
InCJK_Compatibility_Ideographs: "F900-FAFF",
InAlphabetic_Presentation_Forms: "FB00-FB4F",
InArabic_Presentation_Forms_A: "FB50-FDFF",
InVariation_Selectors: "FE00-FE0F",
InVertical_Forms: "FE10-FE1F",
InCombining_Half_Marks: "FE20-FE2F",
InCJK_Compatibility_Forms: "FE30-FE4F",
InSmall_Form_Variants: "FE50-FE6F",
InArabic_Presentation_Forms_B: "FE70-FEFF",
InHalfwidth_and_Fullwidth_Forms: "FF00-FFEF",
InSpecials: "FFF0-FFFF"
});
}(XRegExp));
/***** unicode-properties.js *****/
/*!
* XRegExp Unicode Properties v1.0.0
* (c) 2012 Steven Levithan <http://xregexp.com/>
* MIT License
* Uses Unicode 6.1 <http://unicode.org/>
*/
/**
* Adds Unicode properties necessary to meet Level 1 Unicode support (detailed in UTS#18 RL1.2).
* Includes code points from the Basic Multilingual Plane (U+0000-U+FFFF) only. Token names are
* case insensitive, and any spaces, hyphens, and underscores are ignored.
* @requires XRegExp, XRegExp Unicode Base
*/
(function (XRegExp) {
"use strict";
if (!XRegExp.addUnicodePackage) {
throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");
}
XRegExp.install("extensibility");
XRegExp.addUnicodePackage({
Alphabetic: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE03450370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05270531-055605590561-058705B0-05BD05BF05C105C205C405C505C705D0-05EA05F0-05F20610-061A0620-06570659-065F066E-06D306D5-06DC06E1-06E806ED-06EF06FA-06FC06FF0710-073F074D-07B107CA-07EA07F407F507FA0800-0817081A-082C0840-085808A008A2-08AC08E4-08E908F0-08FE0900-093B093D-094C094E-09500955-09630971-09770979-097F0981-09830985-098C098F09900993-09A809AA-09B009B209B6-09B909BD-09C409C709C809CB09CC09CE09D709DC09DD09DF-09E309F009F10A01-0A030A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A3E-0A420A470A480A4B0A4C0A510A59-0A5C0A5E0A70-0A750A81-0A830A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD-0AC50AC7-0AC90ACB0ACC0AD00AE0-0AE30B01-0B030B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D-0B440B470B480B4B0B4C0B560B570B5C0B5D0B5F-0B630B710B820B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BBE-0BC20BC6-0BC80BCA-0BCC0BD00BD70C01-0C030C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D-0C440C46-0C480C4A-0C4C0C550C560C580C590C60-0C630C820C830C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD-0CC40CC6-0CC80CCA-0CCC0CD50CD60CDE0CE0-0CE30CF10CF20D020D030D05-0D0C0D0E-0D100D12-0D3A0D3D-0D440D46-0D480D4A-0D4C0D4E0D570D60-0D630D7A-0D7F0D820D830D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60DCF-0DD40DD60DD8-0DDF0DF20DF30E01-0E3A0E40-0E460E4D0E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB90EBB-0EBD0EC0-0EC40EC60ECD0EDC-0EDF0F000F40-0F470F49-0F6C0F71-0F810F88-0F970F99-0FBC1000-10361038103B-103F1050-10621065-1068106E-1086108E109C109D10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A135F1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA16EE-16F01700-170C170E-17131720-17331740-17531760-176C176E-1770177217731780-17B317B6-17C817D717DC1820-18771880-18AA18B0-18F51900-191C1920-192B1930-19381950-196D1970-19741980-19AB19B0-19C91A00-1A1B1A20-1A5E1A61-1A741AA71B00-1B331B35-1B431B45-1B4B1B80-1BA91BAC-1BAF1BBA-1BE51BE7-1BF11C00-1C351C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF31CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E2160-218824B6-24E92C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2DE0-2DFF2E2F3005-30073021-30293031-30353038-303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA674-A67BA67F-A697A69F-A6EFA717-A71FA722-A788A78B-A78EA790-A793A7A0-A7AAA7F8-A801A803-A805A807-A80AA80C-A827A840-A873A880-A8C3A8F2-A8F7A8FBA90A-A92AA930-A952A960-A97CA980-A9B2A9B4-A9BFA9CFAA00-AA36AA40-AA4DAA60-AA76AA7AAA80-AABEAAC0AAC2AADB-AADDAAE0-AAEFAAF2-AAF5AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABEAAC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1D-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
Uppercase: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E05200522052405260531-055610A0-10C510C710CD1E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F21452160-216F218324B6-24CF2C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CED2CF2A640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA660A662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BA78DA790A792A7A0A7A2A7A4A7A6A7A8A7AAFF21-FF3A",
Lowercase: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02B802C002C102E0-02E40345037103730377037A-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F05210523052505270561-05871D00-1DBF1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF72071207F2090-209C210A210E210F2113212F21342139213C213D2146-2149214E2170-217F218424D0-24E92C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7D2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2CF32D00-2D252D272D2DA641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA661A663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76F-A778A77AA77CA77FA781A783A785A787A78CA78EA791A793A7A1A7A3A7A5A7A7A7A9A7F8-A7FAFB00-FB06FB13-FB17FF41-FF5A",
White_Space: "0009-000D0020008500A01680180E2000-200A20282029202F205F3000",
Noncharacter_Code_Point: "FDD0-FDEFFFFEFFFF",
Default_Ignorable_Code_Point: "00AD034F115F116017B417B5180B-180D200B-200F202A-202E2060-206F3164FE00-FE0FFEFFFFA0FFF0-FFF8",
// \p{Any} matches a code unit. To match any code point via surrogate pairs, use (?:[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF])
Any: "0000-FFFF", // \p{^Any} compiles to [^\u0000-\uFFFF]; [\p{^Any}] to []
Ascii: "0000-007F",
// \p{Assigned} is equivalent to \p{^Cn}
//Assigned: XRegExp("[\\p{^Cn}]").source.replace(/[[\]]|\\u/g, "") // Negation inside a character class triggers inversion
Assigned: "0000-0377037A-037E0384-038A038C038E-03A103A3-05270531-05560559-055F0561-05870589058A058F0591-05C705D0-05EA05F0-05F40600-06040606-061B061E-070D070F-074A074D-07B107C0-07FA0800-082D0830-083E0840-085B085E08A008A2-08AC08E4-08FE0900-09770979-097F0981-09830985-098C098F09900993-09A809AA-09B009B209B6-09B909BC-09C409C709C809CB-09CE09D709DC09DD09DF-09E309E6-09FB0A01-0A030A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A3C0A3E-0A420A470A480A4B-0A4D0A510A59-0A5C0A5E0A66-0A750A81-0A830A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABC-0AC50AC7-0AC90ACB-0ACD0AD00AE0-0AE30AE6-0AF10B01-0B030B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3C-0B440B470B480B4B-0B4D0B560B570B5C0B5D0B5F-0B630B66-0B770B820B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BBE-0BC20BC6-0BC80BCA-0BCD0BD00BD70BE6-0BFA0C01-0C030C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D-0C440C46-0C480C4A-0C4D0C550C560C580C590C60-0C630C66-0C6F0C78-0C7F0C820C830C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBC-0CC40CC6-0CC80CCA-0CCD0CD50CD60CDE0CE0-0CE30CE6-0CEF0CF10CF20D020D030D05-0D0C0D0E-0D100D12-0D3A0D3D-0D440D46-0D480D4A-0D4E0D570D60-0D630D66-0D750D79-0D7F0D820D830D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60DCA0DCF-0DD40DD60DD8-0DDF0DF2-0DF40E01-0E3A0E3F-0E5B0E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB90EBB-0EBD0EC0-0EC40EC60EC8-0ECD0ED0-0ED90EDC-0EDF0F00-0F470F49-0F6C0F71-0F970F99-0FBC0FBE-0FCC0FCE-0FDA1000-10C510C710CD10D0-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A135D-137C1380-139913A0-13F41400-169C16A0-16F01700-170C170E-17141720-17361740-17531760-176C176E-1770177217731780-17DD17E0-17E917F0-17F91800-180E1810-18191820-18771880-18AA18B0-18F51900-191C1920-192B1930-193B19401944-196D1970-19741980-19AB19B0-19C919D0-19DA19DE-1A1B1A1E-1A5E1A60-1A7C1A7F-1A891A90-1A991AA0-1AAD1B00-1B4B1B50-1B7C1B80-1BF31BFC-1C371C3B-1C491C4D-1C7F1CC0-1CC71CD0-1CF61D00-1DE61DFC-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FC41FC6-1FD31FD6-1FDB1FDD-1FEF1FF2-1FF41FF6-1FFE2000-2064206A-20712074-208E2090-209C20A0-20B920D0-20F02100-21892190-23F32400-24262440-244A2460-26FF2701-2B4C2B50-2B592C00-2C2E2C30-2C5E2C60-2CF32CF9-2D252D272D2D2D30-2D672D6F2D702D7F-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2DE0-2E3B2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB3000-303F3041-30963099-30FF3105-312D3131-318E3190-31BA31C0-31E331F0-321E3220-32FE3300-4DB54DC0-9FCCA000-A48CA490-A4C6A4D0-A62BA640-A697A69F-A6F7A700-A78EA790-A793A7A0-A7AAA7F8-A82BA830-A839A840-A877A880-A8C4A8CE-A8D9A8E0-A8FBA900-A953A95F-A97CA980-A9CDA9CF-A9D9A9DEA9DFAA00-AA36AA40-AA4DAA50-AA59AA5C-AA7BAA80-AAC2AADB-AAF6AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EABC0-ABEDABF0-ABF9AC00-D7A3D7B0-D7C6D7CB-D7FBD800-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1D-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBC1FBD3-FD3FFD50-FD8FFD92-FDC7FDF0-FDFDFE00-FE19FE20-FE26FE30-FE52FE54-FE66FE68-FE6BFE70-FE74FE76-FEFCFEFFFF01-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDCFFE0-FFE6FFE8-FFEEFFF9-FFFD"
});
}(XRegExp));
/***** matchrecursive.js *****/
/*!
* XRegExp.matchRecursive v0.2.0
* (c) 2009-2012 Steven Levithan <http://xregexp.com/>
* MIT License
*/
(function (XRegExp) {
"use strict";
/**
* Returns a match detail object composed of the provided values.
* @private
*/
function row(value, name, start, end) {
return {value:value, name:name, start:start, end:end};
}
/**
* Returns an array of match strings between outermost left and right delimiters, or an array of
* objects with detailed match parts and position data. An error is thrown if delimiters are
* unbalanced within the data.
* @memberOf XRegExp
* @param {String} str String to search.
* @param {String} left Left delimiter as an XRegExp pattern.
* @param {String} right Right delimiter as an XRegExp pattern.
* @param {String} [flags] Flags for the left and right delimiters. Use any of: `gimnsxy`.
* @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options.
* @returns {Array} Array of matches, or an empty array.
* @example
*
* // Basic usage
* var str = '(t((e))s)t()(ing)';
* XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
* // -> ['t((e))s', '', 'ing']
*
* // Extended information mode with valueNames
* str = 'Here is <div> <div>an</div></div> example';
* XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
* valueNames: ['between', 'left', 'match', 'right']
* });
* // -> [
* // {name: 'between', value: 'Here is ', start: 0, end: 8},
* // {name: 'left', value: '<div>', start: 8, end: 13},
* // {name: 'match', value: ' <div>an</div>', start: 13, end: 27},
* // {name: 'right', value: '</div>', start: 27, end: 33},
* // {name: 'between', value: ' example', start: 33, end: 41}
* // ]
*
* // Omitting unneeded parts with null valueNames, and using escapeChar
* str = '...{1}\\{{function(x,y){return y+x;}}';
* XRegExp.matchRecursive(str, '{', '}', 'g', {
* valueNames: ['literal', null, 'value', null],
* escapeChar: '\\'
* });
* // -> [
* // {name: 'literal', value: '...', start: 0, end: 3},
* // {name: 'value', value: '1', start: 4, end: 5},
* // {name: 'literal', value: '\\{', start: 6, end: 8},
* // {name: 'value', value: 'function(x,y){return y+x;}', start: 9, end: 35}
* // ]
*
* // Sticky mode via flag y
* str = '<1><<<2>>><3>4<5>';
* XRegExp.matchRecursive(str, '<', '>', 'gy');
* // -> ['1', '<<2>>', '3']
*/
XRegExp.matchRecursive = function (str, left, right, flags, options) {
flags = flags || "";
options = options || {};
var global = flags.indexOf("g") > -1,
sticky = flags.indexOf("y") > -1,
basicFlags = flags.replace(/y/g, ""), // Flag y controlled internally
escapeChar = options.escapeChar,
vN = options.valueNames,
output = [],
openTokens = 0,
delimStart = 0,
delimEnd = 0,
lastOuterEnd = 0,
outerStart,
innerStart,
leftMatch,
rightMatch,
esc;
left = XRegExp(left, basicFlags);
right = XRegExp(right, basicFlags);
if (escapeChar) {
if (escapeChar.length > 1) {
throw new SyntaxError("can't use more than one escape character");
}
escapeChar = XRegExp.escape(escapeChar);
// Using XRegExp.union safely rewrites backreferences in `left` and `right`
esc = new RegExp(
"(?:" + escapeChar + "[\\S\\s]|(?:(?!" + XRegExp.union([left, right]).source + ")[^" + escapeChar + "])+)+",
flags.replace(/[^im]+/g, "") // Flags gy not needed here; flags nsx handled by XRegExp
);
}
while (true) {
// If using an escape character, advance to the delimiter's next starting position,
// skipping any escaped characters in between
if (escapeChar) {
delimEnd += (XRegExp.exec(str, esc, delimEnd, "sticky") || [""])[0].length;
}
leftMatch = XRegExp.exec(str, left, delimEnd);
rightMatch = XRegExp.exec(str, right, delimEnd);
// Keep the leftmost match only
if (leftMatch && rightMatch) {
if (leftMatch.index <= rightMatch.index) {
rightMatch = null;
} else {
leftMatch = null;
}
}
/* Paths (LM:leftMatch, RM:rightMatch, OT:openTokens):
LM | RM | OT | Result
1 | 0 | 1 | loop
1 | 0 | 0 | loop
0 | 1 | 1 | loop
0 | 1 | 0 | throw
0 | 0 | 1 | throw
0 | 0 | 0 | break
* Doesn't include the sticky mode special case
* Loop ends after the first completed match if `!global` */
if (leftMatch || rightMatch) {
delimStart = (leftMatch || rightMatch).index;
delimEnd = delimStart + (leftMatch || rightMatch)[0].length;
} else if (!openTokens) {
break;
}
if (sticky && !openTokens && delimStart > lastOuterEnd) {
break;
}
if (leftMatch) {
if (!openTokens) {
outerStart = delimStart;
innerStart = delimEnd;
}
++openTokens;
} else if (rightMatch && openTokens) {
if (!--openTokens) {
if (vN) {
if (vN[0] && outerStart > lastOuterEnd) {
output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart));
}
if (vN[1]) {
output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart));
}
if (vN[2]) {
output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart));
}
if (vN[3]) {
output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd));
}
} else {
output.push(str.slice(innerStart, delimStart));
}
lastOuterEnd = delimEnd;
if (!global) {
break;
}
}
} else {
throw new Error("string contains unbalanced delimiters");
}
// If the delimiter matched an empty string, avoid an infinite loop
if (delimStart === delimEnd) {
++delimEnd;
}
}
if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) {
output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length));
}
return output;
};
}(XRegExp));
/***** build.js *****/
/*!
* XRegExp.build v0.1.0
* (c) 2012 Steven Levithan <http://xregexp.com/>
* MIT License
* Inspired by RegExp.create by Lea Verou <http://lea.verou.me/>
*/
(function (XRegExp) {
"use strict";
var subparts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,
parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subparts], "g");
/**
* Strips a leading `^` and trailing unescaped `$`, if both are present.
* @private
* @param {String} pattern Pattern to process.
* @returns {String} Pattern with edge anchors removed.
*/
function deanchor(pattern) {
var startAnchor = /^(?:\(\?:\))?\^/, // Leading `^` or `(?:)^` (handles /x cruft)
endAnchor = /\$(?:\(\?:\))?$/; // Trailing `$` or `$(?:)` (handles /x cruft)
if (endAnchor.test(pattern.replace(/\\[\s\S]/g, ""))) { // Ensure trailing `$` isn't escaped
return pattern.replace(startAnchor, "").replace(endAnchor, "");
}
return pattern;
}
/**
* Converts the provided value to an XRegExp.
* @private
* @param {String|RegExp} value Value to convert.
* @returns {RegExp} XRegExp object with XRegExp syntax applied.
*/
function asXRegExp(value) {
return XRegExp.isRegExp(value) ?
(value.xregexp && !value.xregexp.isNative ? value : XRegExp(value.source)) :
XRegExp(value);
}
/**
* Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in the
* outer pattern and provided subpatterns are automatically renumbered to work correctly. Native
* flags used by provided subpatterns are ignored in favor of the `flags` argument.
* @memberOf XRegExp
* @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows
* `({{name}})` as shorthand for `(?<name>{{name}})`. Patterns cannot be embedded within
* character classes.
* @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A
* leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present.
* @param {String} [flags] Any combination of XRegExp flags.
* @returns {RegExp} Regex with interpolated subpatterns.
* @example
*
* var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
* hours: XRegExp.build('{{h12}} : | {{h24}}', {
* h12: /1[0-2]|0?[1-9]/,
* h24: /2[0-3]|[01][0-9]/
* }, 'x'),
* minutes: /^[0-5][0-9]$/
* });
* time.test('10:59'); // -> true
* XRegExp.exec('10:59', time).minutes; // -> '59'
*/
XRegExp.build = function (pattern, subs, flags) {
var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern),
data = {},
numCaps = 0, // Caps is short for captures
numPriorCaps,
numOuterCaps = 0,
outerCapsMap = [0],
outerCapNames,
sub,
p;
// Add flags within a leading mode modifier to the overall pattern's flags
if (inlineFlags) {
flags = flags || "";
inlineFlags[1].replace(/./g, function (flag) {
flags += (flags.indexOf(flag) > -1 ? "" : flag); // Don't add duplicates
});
}
for (p in subs) {
if (subs.hasOwnProperty(p)) {
// Passing to XRegExp enables entended syntax for subpatterns provided as strings
// and ensures independent validity, lest an unescaped `(`, `)`, `[`, or trailing
// `\` breaks the `(?:)` wrapper. For subpatterns provided as regexes, it dies on
// octals and adds the `xregexp` property, for simplicity
sub = asXRegExp(subs[p]);
// Deanchoring allows embedding independently useful anchored regexes. If you
// really need to keep your anchors, double them (i.e., `^^...$$`)
data[p] = {pattern: deanchor(sub.source), names: sub.xregexp.captureNames || []};
}
}
// Passing to XRegExp dies on octals and ensures the outer pattern is independently valid;
// helps keep this simple. Named captures will be put back
pattern = asXRegExp(pattern);
outerCapNames = pattern.xregexp.captureNames || [];
pattern = pattern.source.replace(parts, function ($0, $1, $2, $3, $4) {
var subName = $1 || $2, capName, intro;
if (subName) { // Named subpattern
if (!data.hasOwnProperty(subName)) {
throw new ReferenceError("undefined property " + $0);
}
if ($1) { // Named subpattern was wrapped in a capturing group
capName = outerCapNames[numOuterCaps];
outerCapsMap[++numOuterCaps] = ++numCaps;
// If it's a named group, preserve the name. Otherwise, use the subpattern name
// as the capture name
intro = "(?<" + (capName || subName) + ">";
} else {
intro = "(?:";
}
numPriorCaps = numCaps;
return intro + data[subName].pattern.replace(subparts, function (match, paren, backref) {
if (paren) { // Capturing group
capName = data[subName].names[numCaps - numPriorCaps];
++numCaps;
if (capName) { // If the current capture has a name, preserve the name
return "(?<" + capName + ">";
}
} else if (backref) { // Backreference
return "\\" + (+backref + numPriorCaps); // Rewrite the backreference
}
return match;
}) + ")";
}
if ($3) { // Capturing group
capName = outerCapNames[numOuterCaps];
outerCapsMap[++numOuterCaps] = ++numCaps;
if (capName) { // If the current capture has a name, preserve the name
return "(?<" + capName + ">";
}
} else if ($4) { // Backreference
return "\\" + outerCapsMap[+$4]; // Rewrite the backreference
}
return $0;
});
return XRegExp(pattern, flags);
};
}(XRegExp));
/***** prototypes.js *****/
/*!
* XRegExp Prototype Methods v1.0.0
* (c) 2012 Steven Levithan <http://xregexp.com/>
* MIT License
*/
/**
* Adds a collection of methods to `XRegExp.prototype`. RegExp objects copied by XRegExp are also
* augmented with any `XRegExp.prototype` methods. Hence, the following work equivalently:
*
* XRegExp('[a-z]', 'ig').xexec('abc');
* XRegExp(/[a-z]/ig).xexec('abc');
* XRegExp.globalize(/[a-z]/i).xexec('abc');
*/
(function (XRegExp) {
"use strict";
/**
* Copy properties of `b` to `a`.
* @private
* @param {Object} a Object that will receive new properties.
* @param {Object} b Object whose properties will be copied.
*/
function extend(a, b) {
for (var p in b) {
if (b.hasOwnProperty(p)) {
a[p] = b[p];
}
}
//return a;
}
extend(XRegExp.prototype, {
/**
* Implicitly calls the regex's `test` method with the first value in the provided arguments array.
* @memberOf XRegExp.prototype
* @param {*} context Ignored. Accepted only for congruity with `Function.prototype.apply`.
* @param {Array} args Array with the string to search as its first value.
* @returns {Boolean} Whether the regex matched the provided value.
* @example
*
* XRegExp('[a-z]').apply(null, ['abc']); // -> true
*/
apply: function (context, args) {
return this.test(args[0]);
},
/**
* Implicitly calls the regex's `test` method with the provided string.
* @memberOf XRegExp.prototype
* @param {*} context Ignored. Accepted only for congruity with `Function.prototype.call`.
* @param {String} str String to search.
* @returns {Boolean} Whether the regex matched the provided value.
* @example
*
* XRegExp('[a-z]').call(null, 'abc'); // -> true
*/
call: function (context, str) {
return this.test(str);
},
/**
* Implicitly calls {@link #XRegExp.forEach}.
* @memberOf XRegExp.prototype
* @example
*
* XRegExp('\\d').forEach('1a2345', function (match, i) {
* if (i % 2) this.push(+match[0]);
* }, []);
* // -> [2, 4]
*/
forEach: function (str, callback, context) {
return XRegExp.forEach(str, this, callback, context);
},
/**
* Implicitly calls {@link #XRegExp.globalize}.
* @memberOf XRegExp.prototype
* @example
*
* var globalCopy = XRegExp('regex').globalize();
* globalCopy.global; // -> true
*/
globalize: function () {
return XRegExp.globalize(this);
},
/**
* Implicitly calls {@link #XRegExp.exec}.
* @memberOf XRegExp.prototype
* @example
*
* var match = XRegExp('U\\+(?<hex>[0-9A-F]{4})').xexec('U+2620');
* match.hex; // -> '2620'
*/
xexec: function (str, pos, sticky) {
return XRegExp.exec(str, this, pos, sticky);
},
/**
* Implicitly calls {@link #XRegExp.test}.
* @memberOf XRegExp.prototype
* @example
*
* XRegExp('c').xtest('abc'); // -> true
*/
xtest: function (str, pos, sticky) {
return XRegExp.test(str, this, pos, sticky);
}
});
}(XRegExp));
/***/ }),
/***/ 4091:
/***/ ((module) => {
"use strict";
module.exports = function (Yallist) {
Yallist.prototype[Symbol.iterator] = function* () {
for (let walker = this.head; walker; walker = walker.next) {
yield walker.value
}
}
}
/***/ }),
/***/ 40665:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
module.exports = Yallist
Yallist.Node = Node
Yallist.create = Yallist
function Yallist (list) {
var self = this
if (!(self instanceof Yallist)) {
self = new Yallist()
}
self.tail = null
self.head = null
self.length = 0
if (list && typeof list.forEach === 'function') {
list.forEach(function (item) {
self.push(item)
})
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self.push(arguments[i])
}
}
return self
}
Yallist.prototype.removeNode = function (node) {
if (node.list !== this) {
throw new Error('removing node which does not belong to this list')
}
var next = node.next
var prev = node.prev
if (next) {
next.prev = prev
}
if (prev) {
prev.next = next
}
if (node === this.head) {
this.head = next
}
if (node === this.tail) {
this.tail = prev
}
node.list.length--
node.next = null
node.prev = null
node.list = null
return next
}
Yallist.prototype.unshiftNode = function (node) {
if (node === this.head) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var head = this.head
node.list = this
node.next = head
if (head) {
head.prev = node
}
this.head = node
if (!this.tail) {
this.tail = node
}
this.length++
}
Yallist.prototype.pushNode = function (node) {
if (node === this.tail) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var tail = this.tail
node.list = this
node.prev = tail
if (tail) {
tail.next = node
}
this.tail = node
if (!this.head) {
this.head = node
}
this.length++
}
Yallist.prototype.push = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i])
}
return this.length
}
Yallist.prototype.unshift = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i])
}
return this.length
}
Yallist.prototype.pop = function () {
if (!this.tail) {
return undefined
}
var res = this.tail.value
this.tail = this.tail.prev
if (this.tail) {
this.tail.next = null
} else {
this.head = null
}
this.length--
return res
}
Yallist.prototype.shift = function () {
if (!this.head) {
return undefined
}
var res = this.head.value
this.head = this.head.next
if (this.head) {
this.head.prev = null
} else {
this.tail = null
}
this.length--
return res
}
Yallist.prototype.forEach = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this)
walker = walker.next
}
}
Yallist.prototype.forEachReverse = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this)
walker = walker.prev
}
}
Yallist.prototype.get = function (n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.next
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.getReverse = function (n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.prev
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.map = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.head; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.next
}
return res
}
Yallist.prototype.mapReverse = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.tail; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.prev
}
return res
}
Yallist.prototype.reduce = function (fn, initial) {
var acc
var walker = this.head
if (arguments.length > 1) {
acc = initial
} else if (this.head) {
walker = this.head.next
acc = this.head.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i)
walker = walker.next
}
return acc
}
Yallist.prototype.reduceReverse = function (fn, initial) {
var acc
var walker = this.tail
if (arguments.length > 1) {
acc = initial
} else if (this.tail) {
walker = this.tail.prev
acc = this.tail.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i)
walker = walker.prev
}
return acc
}
Yallist.prototype.toArray = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value
walker = walker.next
}
return arr
}
Yallist.prototype.toArrayReverse = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value
walker = walker.prev
}
return arr
}
Yallist.prototype.slice = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.sliceReverse = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
if (start > this.length) {
start = this.length - 1
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next
}
var ret = []
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value)
walker = this.removeNode(walker)
}
if (walker === null) {
walker = this.tail
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev
}
for (var i = 2; i < arguments.length; i++) {
walker = insert(this, walker, arguments[i])
}
return ret;
}
Yallist.prototype.reverse = function () {
var head = this.head
var tail = this.tail
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev
walker.prev = walker.next
walker.next = p
}
this.head = tail
this.tail = head
return this
}
function insert (self, node, value) {
var inserted = node === self.head ?
new Node(value, null, node, self) :
new Node(value, node, node.next, self)
if (inserted.next === null) {
self.tail = inserted
}
if (inserted.prev === null) {
self.head = inserted
}
self.length++
return inserted
}
function push (self, item) {
self.tail = new Node(item, self.tail, null, self)
if (!self.head) {
self.head = self.tail
}
self.length++
}
function unshift (self, item) {
self.head = new Node(item, null, self.head, self)
if (!self.tail) {
self.tail = self.head
}
self.length++
}
function Node (value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list)
}
this.list = list
this.value = value
if (prev) {
prev.next = this
this.prev = prev
} else {
this.prev = null
}
if (next) {
next.prev = this
this.next = next
} else {
this.next = null
}
}
try {
// add if support for Symbol.iterator is present
__nccwpck_require__(4091)(Yallist)
} catch (er) {}
/***/ }),
/***/ 87578:
/***/ ((module) => {
module.exports = eval("require")("aws-crt");
/***/ }),
/***/ 8188:
/***/ ((module) => {
module.exports = eval("require")("coffee-script");
/***/ }),
/***/ 14589:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}');
/***/ }),
/***/ 84007:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"","backsim":"∽","backsimeq":"⋍","Backslash":"","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"","Bernoullis":"","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"","caps":"∩︀","caret":"","caron":"ˇ","Cayleys":"","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"","dd":"","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":"","emsp14":"","emsp":"","ENG":"Ŋ","eng":"ŋ","ensp":"","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"","Escr":"","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"","exponentiale":"","ExponentialE":"","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"","frown":"⌢","fscr":"𝒻","Fscr":"","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":"","half":"½","hamilt":"","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"","HilbertSpace":"","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"","hyphen":"","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"","Igrave":"Ì","igrave":"ì","ii":"","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"","ImaginaryI":"","imagline":"","imagpart":"","imath":"ı","Im":"","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"","lscr":"𝓁","Lscr":"","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"","lsquor":"","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":"","Mellintrf":"","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"","middot":"·","minusb":"⊟","minus":"","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":"","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"","ord":"⩝","order":"","orderof":"","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"","pointint":"⨕","popf":"𝕡","Popf":"","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"","Prime":"″","primes":"","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":"","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"","rationals":"","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"","realine":"","realpart":"","reals":"","Re":"","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"","rscr":"𝓇","Rscr":"","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"","rsquor":"","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"","setmn":"","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"","smashp":"⨳","smeparsl":"⧤","smid":"","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"","ThickSpace":"","ThinSpace":"","thinsp":"","thkap":"≈","thksim":"","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"","Vee":"","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":"","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}');
/***/ }),
/***/ 17802:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}');
/***/ }),
/***/ 2228:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}');
/***/ }),
/***/ 70149:
/***/ ((module) => {
"use strict";
module.exports = {"version":"1.14.3"};
/***/ }),
/***/ 82788:
/***/ ((module) => {
"use strict";
module.exports = {"i8":"4.3.0"};
/***/ }),
/***/ 43612:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],["8940","𪎩𡅅"],["8943","攊"],["8946","丽滝鵎釟"],["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],["89a1","琑糼緍楆竉刧"],["89ab","醌碸酞肼"],["89b0","贋胶𠧧"],["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],["89c1","溚舾甙"],["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],["8a40","𧶄唥"],["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],["8aac","䠋𠆩㿺塳𢶍"],["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],["8ac9","𪘁𠸉𢫏𢳉"],["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],["8ca1","𣏹椙橃𣱣泿"],["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],["8cc9","顨杫䉶圽"],["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],["8d40","𠮟"],["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],["9fae","酙隁酜"],["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],["9fc1","𤤙盖鮝个𠳔莾衂"],["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],["9fe7","毺蠘罸"],["9feb","嘠𪙊蹷齓"],["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],["a055","𡠻𦸅"],["a058","詾𢔛"],["a05b","惽癧髗鵄鍮鮏蟵"],["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],["a0a1","嵗𨯂迚𨸹"],["a0a6","僙𡵆礆匲阸𠼻䁥"],["a0ae","矾"],["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],["a3c0","␀",31,"␡"],["c6a1","①",9,"⑴",9,"",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],["c740","す",58,"ァアィイ"],["c7a1","ゥ",81,"А",5,"ЁЖ",4],["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],["c8a1","龰冈龱𧘇"],["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],["c8f5","ʃɐɛɔɵœøŋʊɪ"],["f9fe","■"],["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]]');
/***/ }),
/***/ 97803:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["0","\\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c",""],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996",""],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]]');
/***/ }),
/***/ 87013:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["0","\\u0000",127],["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],["8361","긝",18,"긲긳긵긶긹긻긼"],["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],["8741","놞",9,"놩",15],["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],["8a61","둧",4,"둭",18,"뒁뒂"],["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],["8c41","똀",15,"똒똓똕똖똗똙",4],["8c61","똞",6,"똦",5,"똭",6,"똵",5],["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],["8d41","뛃",16,"뛕",8],["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],["8e61","럂",4,"럈럊",19],["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],["8f41","뢅",7,"뢎",17],["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],["9061","륾",5,"릆릈릋릌릏",15],["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],["9461","봞",5,"봥",6,"봭",12],["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],["9641","뺸",23,"뻒뻓"],["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],["9741","뾃",16,"뾕",8],["9761","뾞",17,"뾱",7],["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],["9841","쁀",16,"쁒",5,"쁙쁚쁛"],["9861","쁝쁞쁟쁡",6,"쁪",15],["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],["9a41","숤숥숦숧숪숬숮숰숳숵",16],["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],["9b61","쌳",17,"썆",7],["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],["9c61","쏿",8,"쐉",6,"쐑",9],["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],["9d41","쒪",13,"쒹쒺쒻쒽",8],["9d61","쓆",25],["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],["a141","좥좦좧좩",18,"좾좿죀죁"],["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],["a241","줐줒",5,"줙",18],["a261","줭",6,"줵",18],["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],["a361","즑",6,"즚즜즞",16],["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],["a481","쨦쨧쨨쨪",28,"ㄱ",93],["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],["a561","쩫",17,"쩾",5,"쪅쪆"],["a581","쪇",16,"쪙",14,"",9],["a5b0","",9],["a5c1","Α",16,"Σ",6],["a5e1","α",16,"σ",6],["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],["a761","쬪",22,"쭂쭃쭄"],["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],["a841","쭭",10,"쭺",14],["a861","쮉",18,"쮝",6],["a881","쮤",19,"쮹",11,"ÆЪĦ"],["a8a6","IJ"],["a8a8","ĿŁØŒºÞŦŊ"],["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],["a941","쯅",14,"쯕",10],["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],["aa81","챳챴챶",29,"ぁ",82],["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],["acd1","а",5,"ёж",25],["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],["ae41","췆",5,"췍췎췏췑",16],["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],["af41","츬츭츮츯츲츴츶",19],["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],["b041","캚",5,"캢캦",5,"캮",12],["b061","캻",5,"컂",19],["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],["b161","켥",6,"켮켲",5,"켹",11],["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],["b261","쾎",18,"쾢",5,"쾩"],["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],["b541","킕",14,"킦킧킩킪킫킭",5],["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],["b641","턅",7,"턎",17],["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],["b741","텮",13,"텽",6,"톅톆톇톉톊"],["b761","톋",20,"톢톣톥톦톧"],["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],["b841","퇐",7,"퇙",17],["b861","퇫",8,"퇵퇶퇷퇹",13],["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],["be41","퐸",7,"푁푂푃푅",14],["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],["bf41","풞",10,"풪",14],["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],["c061","픞",25],["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],["c161","햌햍햎햏햑",19,"햦햧"],["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],["c361","홢",4,"홨홪",5,"홲홳홵",11],["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],["c641","힍힎힏힑",6,"힚힜힞",5],["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]]');
/***/ }),
/***/ 33104:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["0","\\u0000",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"",9,"〡",8,"十卄卅A",25,"",21],["a340","Α",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]]');
/***/ }),
/***/ 72417:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["0","\\u0000",127],["8ea1","。",62],["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],["a2ba","∈∋⊆⊇⊂⊃∪∩"],["a2ca","∧∨¬⇒⇔∀∃"],["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["a2f2","ʼn♯♭♪†‡¶"],["a2fe","◯"],["a3b0","",9],["a3c1","",25],["a3e1","",25],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["ada1","①",19,"",9],["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],["f4a1","堯槇遙瑤凜熙"],["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["fcf1","",9,"¬¦'""],["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],["8fa2c2","¡¦¿"],["8fa2eb","ºª©®™¤№"],["8fa6e1","ΆΈΉΊΪ"],["8fa6e7","Ό"],["8fa6e9","ΎΫ"],["8fa6ec","Ώ"],["8fa6f1","άέήίϊΐόςύϋΰώ"],["8fa7c2","Ђ",10,"ЎЏ"],["8fa7f2","ђ",10,"ўџ"],["8fa9a1","ÆĐ"],["8fa9a4","Ħ"],["8fa9a6","IJ"],["8fa9a8","ŁĿ"],["8fa9ab","ŊØŒ"],["8fa9af","ŦÞ"],["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],["8fabbd","ġĥíìïîǐ"],["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]]');
/***/ }),
/***/ 86351:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}');
/***/ }),
/***/ 37419:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc",""],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]]');
/***/ }),
/***/ 64108:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('[["0","\\u0000",128],["a1","。",62],["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],["81b8","∈∋⊆⊇⊂⊃∪∩"],["81c8","∧∨¬⇒⇔∀∃"],["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["81f0","ʼn♯♭♪†‡¶"],["81fc","◯"],["824f","",9],["8260","",25],["8281","",25],["829f","ぁ",82],["8340","ァ",62],["8380","ム",22],["839f","Α",16,"Σ",6],["83bf","α",16,"σ",6],["8440","А",5,"ЁЖ",25],["8470","а",5,"ёж",7],["8480","о",17],["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["8740","①",19,"",9],["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["877e","㍻"],["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["eeef","",9,"¬¦'""],["f040","",62],["f080","",124],["f140","",62],["f180","",124],["f240","",62],["f280","",124],["f340","",62],["f380","",124],["f440","",62],["f480","",124],["f540","",62],["f580","",124],["f640","",62],["f680","",124],["f740","",62],["f780","",124],["f840","",62],["f880","",124],["f940",""],["fa40","",9,"",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]]');
/***/ }),
/***/ 67799:
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}');
/***/ }),
/***/ 42357:
/***/ ((module) => {
"use strict";
module.exports = require("assert");;
/***/ }),
/***/ 77303:
/***/ ((module) => {
"use strict";
module.exports = require("async_hooks");;
/***/ }),
/***/ 64293:
/***/ ((module) => {
"use strict";
module.exports = require("buffer");;
/***/ }),
/***/ 63129:
/***/ ((module) => {
"use strict";
module.exports = require("child_process");;
/***/ }),
/***/ 27619:
/***/ ((module) => {
"use strict";
module.exports = require("constants");;
/***/ }),
/***/ 76417:
/***/ ((module) => {
"use strict";
module.exports = require("crypto");;
/***/ }),
/***/ 40881:
/***/ ((module) => {
"use strict";
module.exports = require("dns");;
/***/ }),
/***/ 28614:
/***/ ((module) => {
"use strict";
module.exports = require("events");;
/***/ }),
/***/ 35747:
/***/ ((module) => {
"use strict";
module.exports = require("fs");;
/***/ }),
/***/ 98605:
/***/ ((module) => {
"use strict";
module.exports = require("http");;
/***/ }),
/***/ 97565:
/***/ ((module) => {
"use strict";
module.exports = require("http2");;
/***/ }),
/***/ 57211:
/***/ ((module) => {
"use strict";
module.exports = require("https");;
/***/ }),
/***/ 32282:
/***/ ((module) => {
"use strict";
module.exports = require("module");;
/***/ }),
/***/ 11631:
/***/ ((module) => {
"use strict";
module.exports = require("net");;
/***/ }),
/***/ 12087:
/***/ ((module) => {
"use strict";
module.exports = require("os");;
/***/ }),
/***/ 85622:
/***/ ((module) => {
"use strict";
module.exports = require("path");;
/***/ }),
/***/ 61765:
/***/ ((module) => {
"use strict";
module.exports = require("process");;
/***/ }),
/***/ 92413:
/***/ ((module) => {
"use strict";
module.exports = require("stream");;
/***/ }),
/***/ 24304:
/***/ ((module) => {
"use strict";
module.exports = require("string_decoder");;
/***/ }),
/***/ 78213:
/***/ ((module) => {
"use strict";
module.exports = require("timers");;
/***/ }),
/***/ 4016:
/***/ ((module) => {
"use strict";
module.exports = require("tls");;
/***/ }),
/***/ 33867:
/***/ ((module) => {
"use strict";
module.exports = require("tty");;
/***/ }),
/***/ 78835:
/***/ ((module) => {
"use strict";
module.exports = require("url");;
/***/ }),
/***/ 31669:
/***/ ((module) => {
"use strict";
module.exports = require("util");;
/***/ }),
/***/ 92184:
/***/ ((module) => {
"use strict";
module.exports = require("vm");;
/***/ }),
/***/ 78761:
/***/ ((module) => {
"use strict";
module.exports = require("zlib");;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __nccwpck_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ var threw = true;
/******/ try {
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__);
/******/ threw = false;
/******/ } finally {
/******/ if(threw) delete __webpack_module_cache__[moduleId];
/******/ }
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(3109);
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;