1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-02 12:00:03 +02:00

update minify

This commit is contained in:
s2
2020-02-07 22:55:28 +01:00
parent 439b2733a6
commit 9dc253a6be
77 changed files with 6154 additions and 24560 deletions

15
node_modules/.bin/html-minifier generated vendored
View File

@@ -1,15 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../html-minifier/cli.js" "$@"
ret=$?
else
node "$basedir/../html-minifier/cli.js" "$@"
ret=$?
fi
exit $ret

1
node_modules/.bin/html-minifier generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../html-minifier/cli.js

16
node_modules/.bin/minify generated vendored
View File

@@ -1,15 +1 @@
#!/bin/sh ../minify/bin/minify.js
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../minify/bin/minify.js" "$@"
ret=$?
else
node "$basedir/../minify/bin/minify.js" "$@"
ret=$?
fi
exit $ret

15
node_modules/.bin/terser generated vendored
View File

@@ -1,15 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../terser/bin/uglifyjs" "$@"
ret=$?
else
node "$basedir/../terser/bin/uglifyjs" "$@"
ret=$?
fi
exit $ret

1
node_modules/.bin/terser generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../terser/bin/terser

15
node_modules/.bin/uglifyjs generated vendored
View File

@@ -1,15 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@"
ret=$?
else
node "$basedir/../uglify-js/bin/uglifyjs" "$@"
ret=$?
fi
exit $ret

1
node_modules/.bin/uglifyjs generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../uglify-js/bin/uglifyjs

13
node_modules/clean-css/History.md generated vendored
View File

@@ -1,3 +1,16 @@
[4.2.3 / 2020-01-28](https://github.com/jakubpawlowicz/clean-css/compare/v4.2.2...v4.2.3)
==================
* Fixed issue [#1106](https://github.com/jakubpawlowicz/clean-css/issues/1106) - regression in handling RGBA/HSLA colors.
[4.2.2 / 2020-01-25](https://github.com/jakubpawlowicz/clean-css/compare/v4.2.1...v4.2.2)
==================
* Fixed error when property block has no value.
* Fixed issue [#1077](https://github.com/jakubpawlowicz/clean-css/issues/1077) - local fonts with color in name.
* Fixed issue [#1082](https://github.com/jakubpawlowicz/clean-css/issues/1082) - correctly convert colors if alpha >= 1.
* Fixed issue [#1085](https://github.com/jakubpawlowicz/clean-css/issues/1085) - prevent unquoting of grid elements.
[4.2.1 / 2018-08-07](https://github.com/jakubpawlowicz/clean-css/compare/v4.2.0...v4.2.1) [4.2.1 / 2018-08-07](https://github.com/jakubpawlowicz/clean-css/compare/v4.2.0...v4.2.1)
================== ==================

View File

@@ -37,8 +37,13 @@ var IMPORT_PREFIX_PATTERN = /^@import/i;
var QUOTED_PATTERN = /^('.*'|".*")$/; var QUOTED_PATTERN = /^('.*'|".*")$/;
var QUOTED_BUT_SAFE_PATTERN = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/; var QUOTED_BUT_SAFE_PATTERN = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/;
var URL_PREFIX_PATTERN = /^url\(/i; var URL_PREFIX_PATTERN = /^url\(/i;
var LOCAL_PREFIX_PATTERN = /^local\(/i;
var VARIABLE_NAME_PATTERN = /^--\S+$/; var VARIABLE_NAME_PATTERN = /^--\S+$/;
function isLocal(value){
return LOCAL_PREFIX_PATTERN.test(value);
}
function isNegative(value) { function isNegative(value) {
return value && value[1][0] == '-' && parseFloat(value[1]) < 0; return value && value[1][0] == '-' && parseFloat(value[1]) < 0;
} }
@@ -89,16 +94,25 @@ function optimizeBorderRadius(property) {
} }
} }
/**
* @param {string} name
* @param {string} value
* @param {Object} compatibility
* @return {string}
*/
function optimizeColors(name, value, compatibility) { function optimizeColors(name, value, compatibility) {
if (value.indexOf('#') === -1 && value.indexOf('rgb') == -1 && value.indexOf('hsl') == -1) { if (!value.match(/#|rgb|hsl/gi)) {
return shortenHex(value); return shortenHex(value);
} }
value = value value = value
.replace(/rgb\((\-?\d+),(\-?\d+),(\-?\d+)\)/g, function (match, red, green, blue) { .replace(/(rgb|hsl)a?\((\-?\d+),(\-?\d+\%?),(\-?\d+\%?),(0*[1-9]+[0-9]*(\.?\d*)?)\)/gi, function (match, colorFn, p1, p2, p3, alpha) {
return (parseInt(alpha, 10) >= 1 ? colorFn + '(' + [p1,p2,p3].join(',') + ')' : match);
})
.replace(/rgb\((\-?\d+),(\-?\d+),(\-?\d+)\)/gi, function (match, red, green, blue) {
return shortenRgb(red, green, blue); return shortenRgb(red, green, blue);
}) })
.replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/g, function (match, hue, saturation, lightness) { .replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/gi, function (match, hue, saturation, lightness) {
return shortenHsl(hue, saturation, lightness); return shortenHsl(hue, saturation, lightness);
}) })
.replace(/(^|[^='"])#([0-9a-f]{6})/gi, function (match, prefix, color, at, inputValue) { .replace(/(^|[^='"])#([0-9a-f]{6})/gi, function (match, prefix, color, at, inputValue) {
@@ -115,12 +129,13 @@ function optimizeColors(name, value, compatibility) {
.replace(/(^|[^='"])#([0-9a-f]{3})/gi, function (match, prefix, color) { .replace(/(^|[^='"])#([0-9a-f]{3})/gi, function (match, prefix, color) {
return prefix + '#' + color.toLowerCase(); return prefix + '#' + color.toLowerCase();
}) })
.replace(/(rgb|rgba|hsl|hsla)\(([^\)]+)\)/g, function (match, colorFunction, colorDef) { .replace(/(rgb|rgba|hsl|hsla)\(([^\)]+)\)/gi, function (match, colorFunction, colorDef) {
var tokens = colorDef.split(','); var tokens = colorDef.split(',');
var applies = (colorFunction == 'hsl' && tokens.length == 3) || var colorFnLowercase = colorFunction && colorFunction.toLowerCase();
(colorFunction == 'hsla' && tokens.length == 4) || var applies = (colorFnLowercase == 'hsl' && tokens.length == 3) ||
(colorFunction == 'rgb' && tokens.length == 3 && colorDef.indexOf('%') > 0) || (colorFnLowercase == 'hsla' && tokens.length == 4) ||
(colorFunction == 'rgba' && tokens.length == 4 && colorDef.indexOf('%') > 0); (colorFnLowercase == 'rgb' && tokens.length === 3 && colorDef.indexOf('%') > 0) ||
(colorFnLowercase == 'rgba' && tokens.length == 4 && colorDef.indexOf('%') > 0);
if (!applies) { if (!applies) {
return match; return match;
@@ -336,7 +351,7 @@ function optimizeZeroUnits(name, value) {
} }
function removeQuotes(name, value) { function removeQuotes(name, value) {
if (name == 'content' || name.indexOf('font-variation-settings') > -1 || name.indexOf('font-feature-settings') > -1 || name.indexOf('grid-') > -1) { if (name == 'content' || name.indexOf('font-variation-settings') > -1 || name.indexOf('font-feature-settings') > -1 || name == 'grid' || name.indexOf('grid-') > -1) {
return value; return value;
} }
@@ -443,7 +458,7 @@ function optimizeBody(rule, properties, context) {
value = !options.compatibility.properties.urlQuotes ? value = !options.compatibility.properties.urlQuotes ?
removeUrlQuotes(value) : removeUrlQuotes(value) :
value; value;
} else if (isQuoted(value)) { } else if (isQuoted(value) || isLocal(value)) {
value = levelOptions.removeQuotes ? value = levelOptions.removeQuotes ?
removeQuotes(name, value) : removeQuotes(name, value) :
value; value;

View File

@@ -6,11 +6,11 @@ var functionAnyRegexStr = '(' + variableRegexStr + '|' + functionNoVendorRegexSt
var calcRegex = new RegExp('^(\\-moz\\-|\\-webkit\\-)?calc\\([^\\)]+\\)$', 'i'); var calcRegex = new RegExp('^(\\-moz\\-|\\-webkit\\-)?calc\\([^\\)]+\\)$', 'i');
var decimalRegex = /[0-9]/; var decimalRegex = /[0-9]/;
var functionAnyRegex = new RegExp('^' + functionAnyRegexStr + '$', 'i'); var functionAnyRegex = new RegExp('^' + functionAnyRegexStr + '$', 'i');
var hslColorRegex = /^hsl\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/; var hslColorRegex = /^hsl\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/i;
var identifierRegex = /^(\-[a-z0-9_][a-z0-9\-_]*|[a-z][a-z0-9\-_]*)$/i; var identifierRegex = /^(\-[a-z0-9_][a-z0-9\-_]*|[a-z][a-z0-9\-_]*)$/i;
var namedEntityRegex = /^[a-z]+$/i; var namedEntityRegex = /^[a-z]+$/i;
var prefixRegex = /^-([a-z0-9]|-)*$/i; var prefixRegex = /^-([a-z0-9]|-)*$/i;
var rgbColorRegex = /^rgb\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31}\)|rgba\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\.\d]+\s{0,31}\)$/; var rgbColorRegex = /^rgb\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31}\)|rgba\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\.\d]+\s{0,31}\)$/i;
var timingFunctionRegex = /^(cubic\-bezier|steps)\([^\)]+\)$/; var timingFunctionRegex = /^(cubic\-bezier|steps)\([^\)]+\)$/;
var validTimeUnits = ['ms', 's']; var validTimeUnits = ['ms', 's'];
var urlRegex = /^url\([\s\S]+\)$/i; var urlRegex = /^url\([\s\S]+\)$/i;

View File

@@ -77,7 +77,9 @@ function lastPropertyIndex(tokens) {
function property(context, tokens, position, lastPropertyAt) { function property(context, tokens, position, lastPropertyAt) {
var store = context.store; var store = context.store;
var token = tokens[position]; var token = tokens[position];
var isPropertyBlock = token[2][0] == Token.PROPERTY_BLOCK;
var propertyValue = token[2];
var isPropertyBlock = propertyValue && propertyValue[0] === Token.PROPERTY_BLOCK;
var needsSemicolon; var needsSemicolon;
if ( context.format ) { if ( context.format ) {
@@ -111,7 +113,9 @@ function property(context, tokens, position, lastPropertyAt) {
case Token.PROPERTY: case Token.PROPERTY:
store(context, token[1]); store(context, token[1]);
store(context, colon(context)); store(context, colon(context));
value(context, token); if (propertyValue) {
value(context, token);
}
store(context, needsSemicolon ? semicolon(context, Breaks.AfterProperty, isLast) : emptyCharacter); store(context, needsSemicolon ? semicolon(context, Breaks.AfterProperty, isLast) : emptyCharacter);
break; break;
case Token.RAW: case Token.RAW:

12
node_modules/clean-css/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{ {
"_from": "clean-css@^4.1.6", "_from": "clean-css@^4.1.6",
"_id": "clean-css@4.2.1", "_id": "clean-css@4.2.3",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", "_integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
"_location": "/clean-css", "_location": "/clean-css",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
@@ -19,10 +19,10 @@
"/html-minifier", "/html-minifier",
"/minify" "/minify"
], ],
"_resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", "_resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
"_shasum": "2d411ef76b8569b6d0c84068dabe85b0aa5e5c17", "_shasum": "507b5de7d97b48ee53d84adb0160ff6216380f78",
"_spec": "clean-css@^4.1.6", "_spec": "clean-css@^4.1.6",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\minify", "_where": "/home/s2/Code/minifyfromhtml/node_modules/minify",
"author": { "author": {
"name": "Jakub Pawlowicz", "name": "Jakub Pawlowicz",
"email": "contact@jakubpawlowicz.com", "email": "contact@jakubpawlowicz.com",
@@ -74,5 +74,5 @@
"prepublish": "npm run check", "prepublish": "npm run check",
"test": "vows" "test": "vows"
}, },
"version": "4.2.1" "version": "4.2.3"
} }

37
node_modules/commander/CHANGELOG.md generated vendored
View File

@@ -1,3 +1,40 @@
2.20.3 / 2019-10-11
==================
* Support Node.js 0.10 (Revert #1059)
* Ran "npm unpublish commander@2.20.2". There is no 2.20.2.
2.20.1 / 2019-09-29
==================
* Improve executable subcommand tracking
* Update dev dependencies
2.20.0 / 2019-04-02
==================
* fix: resolve symbolic links completely when hunting for subcommands (#935)
* Update index.d.ts (#930)
* Update Readme.md (#924)
* Remove --save option as it isn't required anymore (#918)
* Add link to the license file (#900)
* Added example of receiving args from options (#858)
* Added missing semicolon (#882)
* Add extension to .eslintrc (#876)
2.19.0 / 2018-10-02
==================
* Removed newline after Options and Commands headers (#864)
* Bugfix - Error output (#862)
* Fix to change default value to string (#856)
2.18.0 / 2018-09-07
==================
* Standardize help output (#853)
* chmod 644 travis.yml (#851)
* add support for execute typescript subcommand via ts-node (#849)
2.17.1 / 2018-08-07 2.17.1 / 2018-08-07
================== ==================

69
node_modules/commander/Readme.md generated vendored
View File

@@ -13,7 +13,7 @@
## Installation ## Installation
$ npm install commander --save $ npm install commander
## Option parsing ## Option parsing
@@ -45,7 +45,7 @@ console.log(' - %s cheese', program.cheese);
Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false.
```js ```js
#!/usr/bin/env node #!/usr/bin/env node
@@ -65,6 +65,17 @@ if (program.sauce) console.log(' with sauce');
else console.log(' without sauce'); else console.log(' without sauce');
``` ```
To get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs.
e.g. ```.option('-m --myarg [myVar]', 'my super cool description')```
Then to access the input if it was passed in.
e.g. ```var myInput = program.myarg```
**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in.
## Version option ## Version option
Calling the `version` implicitly adds the `-V` and `--version` options to the command. Calling the `version` implicitly adds the `-V` and `--version` options to the command.
@@ -153,7 +164,7 @@ program
.option('-s --size <size>', 'Pizza size', /^(large|medium|small)$/i, 'medium') .option('-s --size <size>', 'Pizza size', /^(large|medium|small)$/i, 'medium')
.option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i)
.parse(process.argv); .parse(process.argv);
console.log(' size: %j', program.size); console.log(' size: %j', program.size);
console.log(' drink: %j', program.drink); console.log(' drink: %j', program.drink);
``` ```
@@ -248,22 +259,19 @@ You can enable `--harmony` option in two ways:
The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
``` ```
$ ./examples/pizza --help $ ./examples/pizza --help
Usage: pizza [options]
Usage: pizza [options] An application for pizzas ordering
An application for pizzas ordering
Options:
-h, --help output usage information
-V, --version output the version number
-p, --peppers Add peppers
-P, --pineapple Add pineapple
-b, --bbq Add bbq sauce
-c, --cheese <type> Add the specified type of cheese [marble]
-C, --no-cheese You do not want any cheese
Options:
-h, --help output usage information
-V, --version output the version number
-p, --peppers Add peppers
-P, --pineapple Add pineapple
-b, --bbq Add bbq sauce
-c, --cheese <type> Add the specified type of cheese [marble]
-C, --no-cheese You do not want any cheese
``` ```
## Custom help ## Custom help
@@ -271,7 +279,7 @@ You can enable `--harmony` option in two ways:
You can display arbitrary `-h, --help` information You can display arbitrary `-h, --help` information
by listening for "--help". Commander will automatically by listening for "--help". Commander will automatically
exit once you are done so that the remainder of your program exit once you are done so that the remainder of your program
does not execute causing undesired behaviours, for example does not execute causing undesired behaviors, for example
in the following executable "stuff" will not output when in the following executable "stuff" will not output when
`--help` is used. `--help` is used.
@@ -294,11 +302,10 @@ program
// node's emit() is immediate // node's emit() is immediate
program.on('--help', function(){ program.on('--help', function(){
console.log(' Examples:'); console.log('')
console.log(''); console.log('Examples:');
console.log(' $ custom-help --help'); console.log(' $ custom-help --help');
console.log(' $ custom-help -h'); console.log(' $ custom-help -h');
console.log('');
}); });
program.parse(process.argv); program.parse(process.argv);
@@ -309,11 +316,9 @@ console.log('stuff');
Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run: Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run:
``` ```
Usage: custom-help [options] Usage: custom-help [options]
Options: Options:
-h, --help output usage information -h, --help output usage information
-V, --version output the version number -V, --version output the version number
-f, --foo enable some foo -f, --foo enable some foo
@@ -321,10 +326,8 @@ Options:
-B, --baz enable some baz -B, --baz enable some baz
Examples: Examples:
$ custom-help --help $ custom-help --help
$ custom-help -h $ custom-help -h
``` ```
## .outputHelp(cb) ## .outputHelp(cb)
@@ -402,11 +405,11 @@ program
.action(function(cmd, options){ .action(function(cmd, options){
console.log('exec "%s" using %s mode', cmd, options.exec_mode); console.log('exec "%s" using %s mode', cmd, options.exec_mode);
}).on('--help', function() { }).on('--help', function() {
console.log(' Examples:'); console.log('');
console.log(); console.log('Examples:');
console.log(' $ deploy exec sequential'); console.log('');
console.log(' $ deploy exec async'); console.log(' $ deploy exec sequential');
console.log(); console.log(' $ deploy exec async');
}); });
program program
@@ -422,4 +425,4 @@ More Demos can be found in the [examples](https://github.com/tj/commander.js/tre
## License ## License
MIT [MIT](https://github.com/tj/commander.js/blob/master/LICENSE)

66
node_modules/commander/index.js generated vendored
View File

@@ -484,7 +484,7 @@ Command.prototype.parse = function(argv) {
})[0]; })[0];
} }
if (this._execs[name] && typeof this._execs[name] !== 'function') { if (this._execs[name] === true) {
return this.executeSubCommand(argv, args, parsed.unknown); return this.executeSubCommand(argv, args, parsed.unknown);
} else if (aliasCommand) { } else if (aliasCommand) {
// is alias of a subCommand // is alias of a subCommand
@@ -523,27 +523,27 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) {
// executable // executable
var f = argv[1]; var f = argv[1];
// name of the subcommand, link `pm-install` // name of the subcommand, link `pm-install`
var bin = basename(f, '.js') + '-' + args[0]; var bin = basename(f, path.extname(f)) + '-' + args[0];
// In case of globally installed, get the base dir where executable // In case of globally installed, get the base dir where executable
// subcommand file should be located at // subcommand file should be located at
var baseDir, var baseDir;
link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f;
// when symbolink is relative path var resolvedLink = fs.realpathSync(f);
if (link !== f && link.charAt(0) !== '/') {
link = path.join(dirname(f), link); baseDir = dirname(resolvedLink);
}
baseDir = dirname(link);
// prefer local `./<bin>` to bin in the $PATH // prefer local `./<bin>` to bin in the $PATH
var localBin = path.join(baseDir, bin); var localBin = path.join(baseDir, bin);
// whether bin file is a js script with explicit `.js` extension // whether bin file is a js script with explicit `.js` or `.ts` extension
var isExplicitJS = false; var isExplicitJS = false;
if (exists(localBin + '.js')) { if (exists(localBin + '.js')) {
bin = localBin + '.js'; bin = localBin + '.js';
isExplicitJS = true; isExplicitJS = true;
} else if (exists(localBin + '.ts')) {
bin = localBin + '.ts';
isExplicitJS = true;
} else if (exists(localBin)) { } else if (exists(localBin)) {
bin = localBin; bin = localBin;
} }
@@ -577,9 +577,9 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) {
proc.on('close', process.exit.bind(process)); proc.on('close', process.exit.bind(process));
proc.on('error', function(err) { proc.on('error', function(err) {
if (err.code === 'ENOENT') { if (err.code === 'ENOENT') {
console.error('\n %s(1) does not exist, try --help\n', bin); console.error('error: %s(1) does not exist, try --help', bin);
} else if (err.code === 'EACCES') { } else if (err.code === 'EACCES') {
console.error('\n %s(1) not executable. try chmod or run with root\n', bin); console.error('error: %s(1) not executable. try chmod or run with root', bin);
} }
process.exit(1); process.exit(1);
}); });
@@ -661,7 +661,7 @@ Command.prototype.parseArgs = function(args, unknown) {
this.unknownOption(unknown[0]); this.unknownOption(unknown[0]);
} }
if (this.commands.length === 0 && if (this.commands.length === 0 &&
this._args.filter(function(a) { return a.required }).length === 0) { this._args.filter(function(a) { return a.required; }).length === 0) {
this.emit('command:*'); this.emit('command:*');
} }
} }
@@ -789,9 +789,7 @@ Command.prototype.opts = function() {
*/ */
Command.prototype.missingArgument = function(name) { Command.prototype.missingArgument = function(name) {
console.error(); console.error("error: missing required argument `%s'", name);
console.error(" error: missing required argument `%s'", name);
console.error();
process.exit(1); process.exit(1);
}; };
@@ -804,13 +802,11 @@ Command.prototype.missingArgument = function(name) {
*/ */
Command.prototype.optionMissingArgument = function(option, flag) { Command.prototype.optionMissingArgument = function(option, flag) {
console.error();
if (flag) { if (flag) {
console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); console.error("error: option `%s' argument missing, got `%s'", option.flags, flag);
} else { } else {
console.error(" error: option `%s' argument missing", option.flags); console.error("error: option `%s' argument missing", option.flags);
} }
console.error();
process.exit(1); process.exit(1);
}; };
@@ -823,9 +819,7 @@ Command.prototype.optionMissingArgument = function(option, flag) {
Command.prototype.unknownOption = function(flag) { Command.prototype.unknownOption = function(flag) {
if (this._allowUnknownOption) return; if (this._allowUnknownOption) return;
console.error(); console.error("error: unknown option `%s'", flag);
console.error(" error: unknown option `%s'", flag);
console.error();
process.exit(1); process.exit(1);
}; };
@@ -837,9 +831,7 @@ Command.prototype.unknownOption = function(flag) {
*/ */
Command.prototype.variadicArgNotLast = function(name) { Command.prototype.variadicArgNotLast = function(name) {
console.error(); console.error("error: variadic arguments must be last `%s'", name);
console.error(" error: variadic arguments must be last `%s'", name);
console.error();
process.exit(1); process.exit(1);
}; };
@@ -1050,7 +1042,7 @@ Command.prototype.optionHelp = function() {
// Append the help information // Append the help information
return this.options.map(function(option) { return this.options.map(function(option) {
return pad(option.flags, width) + ' ' + option.description + return pad(option.flags, width) + ' ' + option.description +
((option.bool && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : '');
}).concat([pad('-h, --help', width) + ' ' + 'output usage information']) }).concat([pad('-h, --help', width) + ' ' + 'output usage information'])
.join('\n'); .join('\n');
}; };
@@ -1069,12 +1061,11 @@ Command.prototype.commandHelp = function() {
var width = this.padWidth(); var width = this.padWidth();
return [ return [
' Commands:', 'Commands:',
'',
commands.map(function(cmd) { commands.map(function(cmd) {
var desc = cmd[1] ? ' ' + cmd[1] : ''; var desc = cmd[1] ? ' ' + cmd[1] : '';
return (desc ? pad(cmd[0], width) : cmd[0]) + desc; return (desc ? pad(cmd[0], width) : cmd[0]) + desc;
}).join('\n').replace(/^/gm, ' '), }).join('\n').replace(/^/gm, ' '),
'' ''
].join('\n'); ].join('\n');
}; };
@@ -1090,17 +1081,17 @@ Command.prototype.helpInformation = function() {
var desc = []; var desc = [];
if (this._description) { if (this._description) {
desc = [ desc = [
' ' + this._description, this._description,
'' ''
]; ];
var argsDescription = this._argsDescription; var argsDescription = this._argsDescription;
if (argsDescription && this._args.length) { if (argsDescription && this._args.length) {
var width = this.padWidth(); var width = this.padWidth();
desc.push(' Arguments:'); desc.push('Arguments:');
desc.push(''); desc.push('');
this._args.forEach(function(arg) { this._args.forEach(function(arg) {
desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]);
}); });
desc.push(''); desc.push('');
} }
@@ -1111,8 +1102,7 @@ Command.prototype.helpInformation = function() {
cmdName = cmdName + '|' + this._alias; cmdName = cmdName + '|' + this._alias;
} }
var usage = [ var usage = [
'', 'Usage: ' + cmdName + ' ' + this.usage(),
' Usage: ' + cmdName + ' ' + this.usage(),
'' ''
]; ];
@@ -1121,9 +1111,8 @@ Command.prototype.helpInformation = function() {
if (commandHelp) cmds = [commandHelp]; if (commandHelp) cmds = [commandHelp];
var options = [ var options = [
' Options:', 'Options:',
'', '' + this.optionHelp().replace(/^/gm, ' '),
'' + this.optionHelp().replace(/^/gm, ' '),
'' ''
]; ];
@@ -1131,7 +1120,6 @@ Command.prototype.helpInformation = function() {
.concat(desc) .concat(desc)
.concat(options) .concat(options)
.concat(cmds) .concat(cmds)
.concat([''])
.join('\n'); .join('\n');
}; };

37
node_modules/commander/package.json generated vendored
View File

@@ -1,27 +1,29 @@
{ {
"_from": "commander@2.17.x", "_from": "commander@^2.19.0",
"_id": "commander@2.17.1", "_id": "commander@2.20.3",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", "_integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"_location": "/commander", "_location": "/commander",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "commander@2.17.x", "raw": "commander@^2.19.0",
"name": "commander", "name": "commander",
"escapedName": "commander", "escapedName": "commander",
"rawSpec": "2.17.x", "rawSpec": "^2.19.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "2.17.x" "fetchSpec": "^2.19.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/html-minifier" "/html-minifier",
"/terser",
"/uglify-js"
], ],
"_resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", "_resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"_shasum": "bd77ab7de6de94205ceacc72f1716d29f20a77bf", "_shasum": "fd485e84c03eb4881c20722ba48035e8531aeb33",
"_spec": "commander@2.17.x", "_spec": "commander@^2.19.0",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\html-minifier", "_where": "/home/s2/Code/minifyfromhtml/node_modules/html-minifier",
"author": { "author": {
"name": "TJ Holowaychuk", "name": "TJ Holowaychuk",
"email": "tj@vision-media.ca" "email": "tj@vision-media.ca"
@@ -34,12 +36,13 @@
"deprecated": false, "deprecated": false,
"description": "the complete solution for node.js command-line programs", "description": "the complete solution for node.js command-line programs",
"devDependencies": { "devDependencies": {
"@types/node": "^10.5.7", "@types/node": "^12.7.8",
"eslint": "^5.3.0", "eslint": "^6.4.0",
"should": "^13.2.3", "should": "^13.2.3",
"sinon": "^6.1.4", "sinon": "^7.5.0",
"standard": "^11.0.1", "standard": "^14.3.1",
"typescript": "^2.9.2" "ts-node": "^8.4.1",
"typescript": "^3.6.3"
}, },
"files": [ "files": [
"index.js", "index.js",
@@ -65,5 +68,5 @@
"test-typings": "tsc -p tsconfig.json" "test-typings": "tsc -p tsconfig.json"
}, },
"typings": "typings/index.d.ts", "typings": "typings/index.d.ts",
"version": "2.17.1" "version": "2.20.3"
} }

View File

@@ -226,9 +226,10 @@ declare namespace local {
* Set the description to `str`. * Set the description to `str`.
* *
* @param {string} str * @param {string} str
* @param {{[argName: string]: string}} argsDescription
* @return {(Command | string)} * @return {(Command | string)}
*/ */
description(str: string): Command; description(str: string, argsDescription?: {[argName: string]: string}): Command;
description(): string; description(): string;
/** /**

25
node_modules/html-minifier/README.md generated vendored
View File

@@ -20,19 +20,19 @@ How does HTMLMinifier compare to other solutions — [HTML Minifier from Will Pe
| Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com | | Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com |
| ---------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:| | ---------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:|
| [Google](https://www.google.com/) | 48 | **44** | 48 | 49 | 48 | | [Google](https://www.google.com/) | 46 | **42** | 46 | 48 | 46 |
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 154 | **117** | 128 | 133 | 128 | | [HTMLMinifier](https://github.com/kangax/html-minifier) | 125 | **98** | 111 | 117 | 111 |
| [Twitter](https://twitter.com/) | 203 | **162** | 195 | 219 | 195 | | [Twitter](https://twitter.com/) | 207 | **165** | 200 | 224 | 200 |
| [Stack Overflow](https://stackoverflow.com/) | 254 | **196** | 208 | 216 | 205 | | [Stack Overflow](https://stackoverflow.com/) | 253 | **195** | 207 | 215 | 204 |
| [Bootstrap CSS](https://getbootstrap.com/docs/3.3/css/) | 271 | **260** | 269 | 229 | 269 | | [Bootstrap CSS](https://getbootstrap.com/docs/3.3/css/) | 271 | **260** | 269 | 228 | 269 |
| [BBC](https://www.bbc.co.uk/) | 288 | **230** | 280 | 281 | 272 | | [BBC](https://www.bbc.co.uk/) | 298 | **239** | 290 | 291 | 280 |
| [Amazon](https://www.amazon.co.uk/) | 508 | **439** | 495 | 501 | n/a | | [Amazon](https://www.amazon.co.uk/) | 422 | **316** | 412 | 425 | n/a |
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 533 | **434** | 517 | 536 | 517 | | [NBC](https://www.nbc.com/) | 553 | **530** | 552 | 553 | 534 |
| [New York Times](https://mathiasbynens.be/_tmp/nyt.html) | 699 | **619** | 693 | 683 | n/a | | [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 565 | **461** | 548 | 569 | 548 |
| [NBC](https://www.nbc.com/) | 700 | **657** | 698 | 699 | n/a | | [New York Times](https://www.nytimes.com/) | 678 | **606** | 675 | 670 | n/a |
| [Eloquent Javascript](https://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a | | [Eloquent Javascript](https://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a |
| [ES6 table](https://kangax.github.io/compat-table/es6/) | 5308 | **4529** | 5025 | n/a | n/a | | [ES6 table](https://kangax.github.io/compat-table/es6/) | 5911 | **5051** | 5595 | n/a | n/a |
| [ES draft](https://tc39.github.io/ecma262/) | 6082 | **5456** | 5624 | n/a | n/a | | [ES draft](https://tc39.github.io/ecma262/) | 6126 | **5495** | 5664 | n/a | n/a |
## Options Quick Reference ## Options Quick Reference
@@ -45,6 +45,7 @@ Most of the options are disabled by default.
| `collapseInlineTagWhitespace` | Don't leave any spaces between `display:inline;` elements when collapsing. Must be used in conjunction with `collapseWhitespace=true` | `false` | | `collapseInlineTagWhitespace` | Don't leave any spaces between `display:inline;` elements when collapsing. Must be used in conjunction with `collapseWhitespace=true` | `false` |
| `collapseWhitespace` | [Collapse white space that contributes to text nodes in a document tree](http://perfectionkills.com/experimenting-with-html-minifier/#collapse_whitespace) | `false` | | `collapseWhitespace` | [Collapse white space that contributes to text nodes in a document tree](http://perfectionkills.com/experimenting-with-html-minifier/#collapse_whitespace) | `false` |
| `conservativeCollapse` | Always collapse to 1 space (never remove it entirely). Must be used in conjunction with `collapseWhitespace=true` | `false` | | `conservativeCollapse` | Always collapse to 1 space (never remove it entirely). Must be used in conjunction with `collapseWhitespace=true` | `false` |
| `continueOnParseError` | [Handle parse errors](https://html.spec.whatwg.org/multipage/parsing.html#parse-errors) instead of aborting. | `false` |
| `customAttrAssign` | Arrays of regex'es that allow to support custom attribute assign expressions (e.g. `'<div flex?="{{mode != cover}}"></div>'`) | `[ ]` | | `customAttrAssign` | Arrays of regex'es that allow to support custom attribute assign expressions (e.g. `'<div flex?="{{mode != cover}}"></div>'`) | `[ ]` |
| `customAttrCollapse` | Regex that specifies custom attribute to strip newlines from (e.g. `/ng-class/`) | | | `customAttrCollapse` | Regex that specifies custom attribute to strip newlines from (e.g. `/ng-class/`) | |
| `customAttrSurround` | Arrays of regex'es that allow to support custom attribute surround expressions (e.g. `<input {{#if value}}checked="checked"{{/if}}>`) | `[ ]` | | `customAttrSurround` | Arrays of regex'es that allow to support custom attribute surround expressions (e.g. `<input {{#if value}}checked="checked"{{/if}}>`) | `[ ]` |

1
node_modules/html-minifier/cli.js generated vendored Normal file → Executable file
View File

@@ -103,6 +103,7 @@ var mainOptions = {
collapseInlineTagWhitespace: 'Collapse white space around inline tag', collapseInlineTagWhitespace: 'Collapse white space around inline tag',
collapseWhitespace: 'Collapse white space that contributes to text nodes in a document tree.', collapseWhitespace: 'Collapse white space that contributes to text nodes in a document tree.',
conservativeCollapse: 'Always collapse to 1 space (never remove it entirely)', conservativeCollapse: 'Always collapse to 1 space (never remove it entirely)',
continueOnParseError: 'Handle parse errors instead of aborting',
customAttrAssign: ['Arrays of regex\'es that allow to support custom attribute assign expressions (e.g. \'<div flex?="{{mode != cover}}"></div>\')', parseJSONRegExpArray], customAttrAssign: ['Arrays of regex\'es that allow to support custom attribute assign expressions (e.g. \'<div flex?="{{mode != cover}}"></div>\')', parseJSONRegExpArray],
customAttrCollapse: ['Regex that specifies custom attribute to strip newlines from (e.g. /ng-class/)', parseRegExp], customAttrCollapse: ['Regex that specifies custom attribute to strip newlines from (e.g. /ng-class/)', parseRegExp],
customAttrSurround: ['Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)', parseJSONRegExpArray], customAttrSurround: ['Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)', parseJSONRegExpArray],

View File

@@ -1,40 +1,40 @@
{ {
"_from": "html-minifier@^3.0.1", "_from": "html-minifier@^4.0.0",
"_id": "html-minifier@3.5.21", "_id": "html-minifier@4.0.0",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", "_integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==",
"_location": "/html-minifier", "_location": "/html-minifier",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "html-minifier@^3.0.1", "raw": "html-minifier@^4.0.0",
"name": "html-minifier", "name": "html-minifier",
"escapedName": "html-minifier", "escapedName": "html-minifier",
"rawSpec": "^3.0.1", "rawSpec": "^4.0.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^3.0.1" "fetchSpec": "^4.0.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/minify" "/minify"
], ],
"_resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", "_resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
"_shasum": "d0040e054730e354db008463593194015212d20c", "_shasum": "cca9aad8bce1175e02e17a8c33e46d8988889f56",
"_spec": "html-minifier@^3.0.1", "_spec": "html-minifier@^4.0.0",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\minify", "_where": "/home/s2/Code/minifyfromhtml/node_modules/minify",
"author": { "author": {
"name": "Juriy \"kangax\" Zaytsev" "name": "Juriy \"kangax\" Zaytsev"
}, },
"benchmarkDependencies": { "benchmarkDependencies": {
"brotli": "1.3.x", "brotli": "^1.3.2",
"chalk": "2.4.x", "chalk": "^2.4.2",
"cli-table": "0.3.x", "cli-table": "^0.3.1",
"lzma": "2.3.x", "lzma": "^2.3.2",
"minimize": "2.2.x", "minimize": "^2.2.0",
"progress": "2.0.x" "progress": "^2.0.3"
}, },
"bin": { "bin": {
"html-minifier": "./cli.js" "html-minifier": "cli.js"
}, },
"bugs": { "bugs": {
"url": "https://github.com/kangax/html-minifier/issues" "url": "https://github.com/kangax/html-minifier/issues"
@@ -55,26 +55,26 @@
} }
], ],
"dependencies": { "dependencies": {
"camel-case": "3.0.x", "camel-case": "^3.0.0",
"clean-css": "4.2.x", "clean-css": "^4.2.1",
"commander": "2.17.x", "commander": "^2.19.0",
"he": "1.2.x", "he": "^1.2.0",
"param-case": "2.1.x", "param-case": "^2.1.1",
"relateurl": "0.2.x", "relateurl": "^0.2.7",
"uglify-js": "3.4.x" "uglify-js": "^3.5.1"
}, },
"deprecated": false, "deprecated": false,
"description": "Highly configurable, well-tested, JavaScript-based HTML minifier.", "description": "Highly configurable, well-tested, JavaScript-based HTML minifier.",
"devDependencies": { "devDependencies": {
"grunt": "1.0.x", "grunt": "^1.0.4",
"grunt-browserify": "5.3.x", "grunt-browserify": "^5.3.0",
"grunt-contrib-uglify": "3.4.x", "grunt-contrib-uglify": "^4.0.1",
"gruntify-eslint": "4.0.x", "grunt-eslint": "^21.0.0",
"phantomjs-prebuilt": "2.1.x", "phantomjs-prebuilt": "^2.1.16",
"qunit": "2.x" "qunit": "^2.9.2"
}, },
"engines": { "engines": {
"node": ">=4" "node": ">=6"
}, },
"files": [ "files": [
"src/*.js", "src/*.js",
@@ -125,5 +125,5 @@
"dist": "grunt dist", "dist": "grunt dist",
"test": "grunt test" "test": "grunt test"
}, },
"version": "3.5.21" "version": "4.0.0"
} }

View File

@@ -4,6 +4,7 @@
"collapseInlineTagWhitespace": false, "collapseInlineTagWhitespace": false,
"collapseWhitespace": true, "collapseWhitespace": true,
"conservativeCollapse": false, "conservativeCollapse": false,
"continueOnParseError": true,
"customAttrCollapse": ".*", "customAttrCollapse": ".*",
"decodeEntities": true, "decodeEntities": true,
"html5": true, "html5": true,

View File

@@ -311,6 +311,9 @@ function cleanAttributeValue(tag, attrName, attrValue, options, attrs) {
return (+numString).toString(); return (+numString).toString();
}); });
} }
else if (isContentSecurityPolicy(tag, attrs) && attrName.toLowerCase() === 'content') {
return collapseWhitespaceAll(attrValue);
}
else if (options.customAttrCollapse && options.customAttrCollapse.test(attrName)) { else if (options.customAttrCollapse && options.customAttrCollapse.test(attrName)) {
attrValue = attrValue.replace(/\n+|\r+|\s{2,}/g, ''); attrValue = attrValue.replace(/\n+|\r+|\s{2,}/g, '');
} }
@@ -335,6 +338,17 @@ function isMetaViewport(tag, attrs) {
} }
} }
function isContentSecurityPolicy(tag, attrs) {
if (tag !== 'meta') {
return false;
}
for (var i = 0, len = attrs.length; i < len; i++) {
if (attrs[i].name.toLowerCase() === 'http-equiv' && attrs[i].value.toLowerCase() === 'content-security-policy') {
return true;
}
}
}
function ignoreCSS(id) { function ignoreCSS(id) {
return '/* clean-css ignore:start */' + id + '/* clean-css ignore:end */'; return '/* clean-css ignore:start */' + id + '/* clean-css ignore:end */';
} }
@@ -864,19 +878,19 @@ function minify(value, options, partialMarkup) {
value = value.replace(reCustomIgnore, function(match) { value = value.replace(reCustomIgnore, function(match) {
if (!uidAttr) { if (!uidAttr) {
uidAttr = uniqueId(value); uidAttr = uniqueId(value);
uidPattern = new RegExp('(\\s*)' + uidAttr + '([0-9]+)(\\s*)', 'g'); uidPattern = new RegExp('(\\s*)' + uidAttr + '([0-9]+)' + uidAttr + '(\\s*)', 'g');
if (options.minifyCSS) { if (options.minifyCSS) {
options.minifyCSS = (function(fn) { options.minifyCSS = (function(fn) {
return function(text, type) { return function(text, type) {
text = text.replace(uidPattern, function(match, prefix, index) { text = text.replace(uidPattern, function(match, prefix, index) {
var chunks = ignoredCustomMarkupChunks[+index]; var chunks = ignoredCustomMarkupChunks[+index];
return chunks[1] + uidAttr + index + chunks[2]; return chunks[1] + uidAttr + index + uidAttr + chunks[2];
}); });
var ids = []; var ids = [];
new CleanCSS().minify(wrapCSS(text, type)).warnings.forEach(function(warning) { new CleanCSS().minify(wrapCSS(text, type)).warnings.forEach(function(warning) {
var match = uidPattern.exec(warning); var match = uidPattern.exec(warning);
if (match) { if (match) {
var id = uidAttr + match[2]; var id = uidAttr + match[2] + uidAttr;
text = text.replace(id, ignoreCSS(id)); text = text.replace(id, ignoreCSS(id));
ids.push(id); ids.push(id);
} }
@@ -894,13 +908,13 @@ function minify(value, options, partialMarkup) {
return function(text, type) { return function(text, type) {
return fn(text.replace(uidPattern, function(match, prefix, index) { return fn(text.replace(uidPattern, function(match, prefix, index) {
var chunks = ignoredCustomMarkupChunks[+index]; var chunks = ignoredCustomMarkupChunks[+index];
return chunks[1] + uidAttr + index + chunks[2]; return chunks[1] + uidAttr + index + uidAttr + chunks[2];
}), type); }), type);
}; };
})(options.minifyJS); })(options.minifyJS);
} }
} }
var token = uidAttr + ignoredCustomMarkupChunks.length; var token = uidAttr + ignoredCustomMarkupChunks.length + uidAttr;
ignoredCustomMarkupChunks.push(/^(\s*)[\s\S]*?(\s*)$/.exec(match)); ignoredCustomMarkupChunks.push(/^(\s*)[\s\S]*?(\s*)$/.exec(match));
return '\t' + token + '\t'; return '\t' + token + '\t';
}); });
@@ -965,6 +979,9 @@ function minify(value, options, partialMarkup) {
new HTMLParser(value, { new HTMLParser(value, {
partialMarkup: partialMarkup, partialMarkup: partialMarkup,
continueOnParseError: options.continueOnParseError,
customAttrAssign: options.customAttrAssign,
customAttrSurround: options.customAttrSurround,
html5: options.html5, html5: options.html5,
start: function(tag, attrs, unary, unarySlash, autoGenerated) { start: function(tag, attrs, unary, unarySlash, autoGenerated) {
@@ -1241,9 +1258,7 @@ function minify(value, options, partialMarkup) {
buffer.push(options.useShortDoctype ? '<!doctype' + buffer.push(options.useShortDoctype ? '<!doctype' +
(options.removeTagWhitespace ? '' : ' ') + 'html>' : (options.removeTagWhitespace ? '' : ' ') + 'html>' :
collapseWhitespaceAll(doctype)); collapseWhitespaceAll(doctype));
}, }
customAttrAssign: options.customAttrAssign,
customAttrSurround: options.customAttrSurround
}); });
if (options.removeOptionalTags) { if (options.removeOptionalTags) {

View File

@@ -182,6 +182,11 @@ function HTMLParser(html, handler) {
prevTag = startTagMatch.tagName.toLowerCase(); prevTag = startTagMatch.tagName.toLowerCase();
continue; continue;
} }
// Treat `<` as text
if (handler.continueOnParseError) {
textEnd = html.indexOf('<', 1);
}
} }
var text; var text;
@@ -213,7 +218,6 @@ function HTMLParser(html, handler) {
handler.chars(text, prevTag, nextTag); handler.chars(text, prevTag, nextTag);
} }
prevTag = ''; prevTag = '';
} }
else { else {
var stackedTag = lastTag.toLowerCase(); var stackedTag = lastTag.toLowerCase();

36
node_modules/minify/ChangeLog generated vendored
View File

@@ -1,3 +1,39 @@
2020.01.22, v5.1.0
feature:
- (package) eslint-plugin-node v11.0.0
- (package) nyc v15.0.0
- (minify) add ability to pass options to HTML, JS, CSS and IMG parsers (#52)
2019.12.18, v5.0.0
feature:
- (minify) drop support of node < 10
- (package) putout v7.3.1
- (package) eslint-plugin-node v10.0.0
- (package) eslint-plugin-putout v3.0.0
- (package) madrun v5.0.1
- (package) try-to-catch v2.0.0
2019.07.11, v4.1.3
feature:
- (minify) forEach -> for-of
2019.06.23, v4.1.2
feature:
- (package) html-minifier v4.0.0
- (package) terser v4.0.0
- (package) eslint v6.0.0
- (minify) add madrun
- (package) eslint-plugin-node v9.1.0
- (package) nyc v14.1.1
2019.02.22, v4.1.1 2019.02.22, v4.1.1
fix: fix:

2
node_modules/minify/LICENSE generated vendored
View File

@@ -1,6 +1,6 @@
(The MIT License) (The MIT License)
Copyright (c) 2012-2016 Coderaiser <mnemonic.enemy@gmail.com> Copyright (c) 2012-2019 Coderaiser <mnemonic.enemy@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the

60
node_modules/minify/README.md generated vendored
View File

@@ -42,8 +42,14 @@ const hello="world";for(let l=0;l<hello.length;l++)console.log(hello[l]);
```js ```js
const minify = require('minify'); const minify = require('minify');
const options = {
html: {
removeAttributeQuotes: false,
removeOptionalTags: false
},
};
minify('./client.js') minify('./client.js', options)
.then(console.log) .then(console.log)
.catch(console.error); .catch(console.error);
@@ -54,9 +60,15 @@ Or with `async-await` and [try-to-catch](https://github.com/coderaiser/try-to-ca
```js ```js
const minify = require('minify'); const minify = require('minify');
const tryToCatch = require('try-to-catch'); const tryToCatch = require('try-to-catch');
const options = {
html: {
removeAttributeQuotes: false,
removeOptionalTags: false
}
};
async () => { async () => {
const [error, data] = await tryToCatch(minify, './client.js'); const [error, data] = await tryToCatch(minify, './client.js', options);
if (error) if (error)
return console.error(error.message); return console.error(error.message);
@@ -65,6 +77,50 @@ async () => {
}(); }();
``` ```
## Options
The options object accepts configuration for `html`, `css`, `js`, and `img` like so:
```js
const options = {
html: {
removeAttributeQuotes: false,
},
css: {
compatibility: '*',
},
js: {
ecma: 5,
},
img: {
maxSize: 4096,
}
}
```
Full documentation for options that each file type accepts can be found on the pages of the libraries used by minify to process the files:
- HTML: https://github.com/kangax/html-minifier
- CSS: https://github.com/jakubpawlowicz/clean-css
- JS: https://github.com/terser/terser
- IMG: https://github.com/Filirom1/css-base64-images
Minify sets a few defaults for HTML that may differ from the base `html-minifier` settings:
- removeComments: true
- removeCommentsFromCDATA: true
- removeCDATASectionsFromCDATA: true
- collapseWhitespace: true
- collapseBooleanAttributes: true
- removeAttributeQuotes: true
- removeRedundantAttributes: true
- useShortDoctype: true
- removeEmptyAttributes: true
- removeEmptyElements: false
- removeOptionalTags: true
- removeScriptTypeAttributes: true
- removeStyleLinkTypeAttributes: true
- minifyJS: true
- minifyCSS: true
## License ## License
MIT MIT

11
node_modules/minify/bin/minify.js generated vendored Normal file → Executable file
View File

@@ -14,7 +14,7 @@ const Argv = process.argv;
const files = Argv.slice(2); const files = Argv.slice(2);
const [In] = files; const [In] = files;
log.error = function(e) { log.error = (e) => {
console.error(e); console.error(e);
process.stdin.pause(); process.stdin.pause();
}; };
@@ -27,7 +27,7 @@ process.on('uncaughtException', (error) => {
minify(); minify();
function readStd(callback) { function readStd(callback) {
const stdin = process.stdin; const {stdin} = process;
let chunks = ''; let chunks = '';
const read = () => { const read = () => {
const chunk = stdin.read(); const chunk = stdin.read();
@@ -66,9 +66,10 @@ function processStream(chunks) {
const name = In.replace('--', ''); const name = In.replace('--', '');
const [e, data] = tryCatch(minify[name], chunks); const [e, data] = tryCatch(minify[name], chunks);
if (e) if (e)
return log.error(e); return log.error(e);
log(data); log(data);
} }
@@ -93,8 +94,8 @@ function help() {
console.log(usage); console.log(usage);
console.log('Options:'); console.log('Options:');
Object.keys(bin).forEach((name) => { for (const name of Object.keys(bin)) {
console.log(' %s %s', name, bin[name]); console.log(' %s %s', name, bin[name]);
}); }
} }

8
node_modules/minify/lib/css.js generated vendored
View File

@@ -1,4 +1,5 @@
/* сжимаем код через clean-css */ /* сжимаем код через clean-css */
'use strict'; 'use strict';
const assert = require('assert'); const assert = require('assert');
@@ -8,14 +9,17 @@ const Clean = require('clean-css');
* minify css data. * minify css data.
* *
* @param data * @param data
* @param userOptions - (optional) object that may contain a `css` key with an object of options
*/ */
module.exports = (data) => { module.exports = (data, userOptions) => {
assert(data); assert(data);
const options = userOptions && userOptions.css || {};
const { const {
styles, styles,
errors, errors,
} = new Clean().minify(data); } = new Clean(options).minify(data);
const [error] = errors; const [error] = errors;

15
node_modules/minify/lib/html.js generated vendored
View File

@@ -5,7 +5,7 @@
const assert = require('assert'); const assert = require('assert');
const Minifier = require('html-minifier'); const Minifier = require('html-minifier');
const Options = { const defaultOptions = {
removeComments: true, removeComments: true,
removeCommentsFromCDATA: true, removeCommentsFromCDATA: true,
removeCDATASectionsFromCDATA: true, removeCDATASectionsFromCDATA: true,
@@ -25,18 +25,23 @@ const Options = {
removeStyleLinkTypeAttributes: true, removeStyleLinkTypeAttributes: true,
minifyJS: true, minifyJS: true,
minifyCSS: true minifyCSS: true,
}; };
/** /**
* minify html data. * minify html data.
* *
* @param data * @param data
* @param callback * @param userOptions - (optional) object that may contain an `html` key with an object of options
*/ */
module.exports = (data) => { module.exports = (data, userOptions) => {
assert(data); assert(data);
return Minifier.minify(data, Options); const options = {
...defaultOptions,
...userOptions && userOptions.html || {},
};
return Minifier.minify(data, options);
}; };

22
node_modules/minify/lib/img.js generated vendored
View File

@@ -2,15 +2,15 @@
const path = require('path'); const path = require('path');
const assert = require('assert'); const assert = require('assert');
const { const {promisify} = require('util');
promisify,
} = require('util');
const fromString = promisify(require('css-b64-images').fromString); const fromString = promisify(require('css-b64-images').fromString);
const ONE_KB = Math.pow(2, 10); const ONE_KB = 2 ** 10;
const maxSize = 100 * ONE_KB; const defaultOptions = {
maxSize: 100 * ONE_KB,
};
/** /**
* minify css data. * minify css data.
@@ -18,16 +18,20 @@ const maxSize = 100 * ONE_KB;
* *
* @param name * @param name
* @param data * @param data
* @param userOptions - (optional) object that may contain an `img` key with an object of options
*/ */
module.exports = async (name, data) => { module.exports = async (name, data, userOptions) => {
const dir = path.dirname(name); const dir = path.dirname(name);
const dirRelative = dir + '/../'; const dirRelative = dir + '/../';
const options = {
...defaultOptions,
...userOptions && userOptions.img || {},
};
assert(name); assert(name);
assert(data); assert(data);
return fromString(data, dir, dirRelative, { return fromString(data, dir, dirRelative, options);
maxSize
});
}; };

7
node_modules/minify/lib/js.js generated vendored
View File

@@ -7,14 +7,17 @@ const assert = require('assert');
* minify js data. * minify js data.
* *
* @param data * @param data
* @param userOptions - (optional) object that may contain a `js` key with an object of options
*/ */
module.exports = (data) => { module.exports = (data, userOptions) => {
assert(data); assert(data);
const options = userOptions && userOptions.js || {};
const { const {
error, error,
code, code,
} = terser.minify(data); } = terser.minify(data, options);
if (error) if (error)
throw error; throw error;

34
node_modules/minify/lib/minify.js generated vendored
View File

@@ -2,20 +2,16 @@
const DIR = __dirname + '/'; const DIR = __dirname + '/';
const fs = require('fs'); const {readFile} = require('fs').promises;
const path = require('path'); const path = require('path');
const {
promisify,
} = require('util');
const tryToCatch = require('try-to-catch'); const tryToCatch = require('try-to-catch');
const readFile = promisify(fs.readFile);
const log = require('debug')('minify'); const log = require('debug')('minify');
['js', 'html', 'css', 'img'].forEach((name) => { for (const name of ['js', 'html', 'css', 'img']) {
minify[name] = require(DIR + name); minify[name] = require(DIR + name);
}); }
module.exports = minify; module.exports = minify;
@@ -24,7 +20,7 @@ function check(name) {
throw Error('name could not be empty!'); throw Error('name could not be empty!');
} }
async function minify(name) { async function minify(name, userOptions) {
const EXT = ['js', 'html', 'css']; const EXT = ['js', 'html', 'css'];
check(name); check(name);
@@ -36,7 +32,7 @@ async function minify(name) {
throw Error(`File type "${ext}" not supported.`); throw Error(`File type "${ext}" not supported.`);
log('optimizing ' + path.basename(name)); log('optimizing ' + path.basename(name));
return optimize(name); return optimize(name, userOptions);
} }
function getName(file) { function getName(file) {
@@ -51,9 +47,10 @@ function getName(file) {
/** /**
* function minificate js,css and html files * function minificate js,css and html files
* *
* @param files - js, css or html file path * @param {string} file - js, css or html file path
* @param {object} userOptions - object with optional `html`, `css, `js`, and `img` keys, which each can contain options to be combined with defaults and passed to the respective minifier
*/ */
async function optimize(file) { async function optimize(file, userOptions) {
check(file); check(file);
const name = getName(file); const name = getName(file);
@@ -61,23 +58,26 @@ async function optimize(file) {
log('reading file ' + path.basename(name)); log('reading file ' + path.basename(name));
const data = await readFile(name, 'utf8'); const data = await readFile(name, 'utf8');
return onDataRead(file, data); return onDataRead(file, data, userOptions);
} }
/** /**
* Processing of files * Processing of files
* @param fileData {name, data} * @param {string} filename
* @param {string} data - the contents of the file
* @param {object} userOptions - object with optional `html`, `css, `js`, and `img` keys, which each can contain options to be combined with defaults and passed to the respective minifier
*/ */
async function onDataRead(filename, data) { async function onDataRead(filename, data, userOptions) {
log('file ' + path.basename(filename) + ' read'); log('file ' + path.basename(filename) + ' read');
const ext = path.extname(filename).replace(/^\./, ''); const ext = path.extname(filename).replace(/^\./, '');
const optimizedData = await minify[ext](data); const optimizedData = await minify[ext](data, userOptions);
let b64Optimize; let b64Optimize;
if (ext === 'css') if (ext === 'css')
[, b64Optimize] = await tryToCatch(minify.img, filename, optimizedData); [, b64Optimize] = await tryToCatch(minify.img, filename, optimizedData, userOptions);
return b64Optimize || optimizedData; return b64Optimize || optimizedData;
} }

60
node_modules/minify/package.json generated vendored
View File

@@ -1,27 +1,28 @@
{ {
"_from": "minify@^4.1.1", "_from": "minify",
"_id": "minify@4.1.1", "_id": "minify@5.1.0",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-D99KM2lBtJbAAAtKkekL5R1rCFQqhx2dMeFl5etybEdTwGjMYvPsWPDH0CSxTXWSmI2Q7Tx7Gx4rRxik5ahgQA==", "_integrity": "sha512-qlvHtYYjhDpdp05jfxFEdZ7u37tqaltOuuH4TbqyEcjubpY5BBOesJa513wBwjOFI0GmrLVENLooGRX/j2IoDQ==",
"_location": "/minify", "_location": "/minify",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "tag",
"registry": true, "registry": true,
"raw": "minify@^4.1.1", "raw": "minify",
"name": "minify", "name": "minify",
"escapedName": "minify", "escapedName": "minify",
"rawSpec": "^4.1.1", "rawSpec": "",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^4.1.1" "fetchSpec": "latest"
}, },
"_requiredBy": [ "_requiredBy": [
"#USER",
"/" "/"
], ],
"_resolved": "https://registry.npmjs.org/minify/-/minify-4.1.1.tgz", "_resolved": "https://registry.npmjs.org/minify/-/minify-5.1.0.tgz",
"_shasum": "06d7a6faf5c171ac3075b79e5afdbe606c0c1fe5", "_shasum": "ccfd406c8b37eecc32db49cb894f6e87d7cd4efd",
"_spec": "minify@^4.1.1", "_spec": "minify",
"_where": "F:\\projects\\p\\minifyfromhtml", "_where": "/home/s2/Code/minifyfromhtml",
"author": { "author": {
"name": "coderaiser", "name": "coderaiser",
"email": "mnemonic.enemy@gmail.com", "email": "mnemonic.enemy@gmail.com",
@@ -38,24 +39,25 @@
"clean-css": "^4.1.6", "clean-css": "^4.1.6",
"css-b64-images": "~0.2.5", "css-b64-images": "~0.2.5",
"debug": "^4.1.0", "debug": "^4.1.0",
"html-minifier": "^3.0.1", "html-minifier": "^4.0.0",
"terser": "^3.16.1", "terser": "^4.0.0",
"try-catch": "^2.0.0", "try-catch": "^2.0.0",
"try-to-catch": "^1.0.2" "try-to-catch": "^2.0.0"
}, },
"deprecated": false, "deprecated": false,
"description": "Minifier of js, css, html and img", "description": "Minifier of js, css, html and img",
"devDependencies": { "devDependencies": {
"coveralls": "^3.0.0", "coveralls": "^3.0.0",
"eslint": "^5.7.0", "eslint": "^6.0.0",
"eslint-plugin-node": "^8.0.0", "eslint-plugin-node": "^11.0.0",
"nyc": "^13.1.0", "eslint-plugin-putout": "^3.0.0",
"redrun": "^7.0.2", "madrun": "^5.0.1",
"rimraf": "^2.6.1", "nyc": "^15.0.0",
"tape": "^4.2.2" "putout": "^7.3.1",
"supertape": "^1.2.3"
}, },
"engines": { "engines": {
"node": ">= 8.0.0" "node": ">= 10"
}, },
"homepage": "http://coderaiser.github.io/minify", "homepage": "http://coderaiser.github.io/minify",
"keywords": [ "keywords": [
@@ -78,12 +80,14 @@
"url": "git+ssh://git@github.com/coderaiser/minify.git" "url": "git+ssh://git@github.com/coderaiser/minify.git"
}, },
"scripts": { "scripts": {
"coverage": "nyc npm test", "coverage": "madrun coverage",
"lint": "redrun lint:*", "fix:lint": "madrun fix:lint",
"lint:bin": "eslint --rule no-console:0 bin", "lint": "madrun lint",
"lint:lib": "eslint lib test", "lint:bin": "madrun lint:bin",
"report": "nyc report --reporter=text-lcov | coveralls", "lint:lib": "madrun lint:lib",
"test": "tape test/minify.js" "putout": "madrun putout",
"report": "madrun report",
"test": "madrun test"
}, },
"version": "4.1.1" "version": "5.1.0"
} }

4
node_modules/ms/index.js generated vendored
View File

@@ -28,7 +28,7 @@ module.exports = function(val, options) {
var type = typeof val; var type = typeof val;
if (type === 'string' && val.length > 0) { if (type === 'string' && val.length > 0) {
return parse(val); return parse(val);
} else if (type === 'number' && isNaN(val) === false) { } else if (type === 'number' && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val); return options.long ? fmtLong(val) : fmtShort(val);
} }
throw new Error( throw new Error(
@@ -50,7 +50,7 @@ function parse(str) {
if (str.length > 100) { if (str.length > 100) {
return; return;
} }
var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( 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 str
); );
if (!match) { if (!match) {

12
node_modules/ms/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{ {
"_from": "ms@^2.1.1", "_from": "ms@^2.1.1",
"_id": "ms@2.1.1", "_id": "ms@2.1.2",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"_location": "/ms", "_location": "/ms",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [ "_requiredBy": [
"/debug" "/debug"
], ],
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"_shasum": "30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a", "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
"_spec": "ms@^2.1.1", "_spec": "ms@^2.1.1",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\debug", "_where": "/home/s2/Code/minifyfromhtml/node_modules/debug",
"bugs": { "bugs": {
"url": "https://github.com/zeit/ms/issues" "url": "https://github.com/zeit/ms/issues"
}, },
@@ -65,5 +65,5 @@
"precommit": "lint-staged", "precommit": "lint-staged",
"test": "mocha tests.js" "test": "mocha tests.js"
}, },
"version": "2.1.1" "version": "2.1.2"
} }

2
node_modules/ms/readme.md generated vendored
View File

@@ -1,7 +1,7 @@
# ms # ms
[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
Use this package to easily convert various time formats to milliseconds. Use this package to easily convert various time formats to milliseconds.

View File

@@ -8,26 +8,26 @@
@author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
license MIT license MIT
*/ */
(this.define||function(G,J){this.sourceMapSupport=J()})("browser-source-map-support",function(G){(function b(n,u,m){function e(d,a){if(!u[d]){if(!n[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=u[d]={exports:{}};n[d][0].call(l.exports,function(a){var b=n[d][1][a];return e(b?b:a)},l,l.exports,b,n,u,m)}return u[d].exports}for(var g="function"==typeof require&&require,h=0;h<m.length;h++)e(m[h]);return e})({1:[function(n, (this.define||function(G,J){this.sourceMapSupport=J()})("browser-source-map-support",function(G){(function b(p,u,m){function e(d,a){if(!u[d]){if(!p[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=u[d]={exports:{}};p[d][0].call(l.exports,function(a){var b=p[d][1][a];return e(b?b:a)},l,l.exports,b,p,u,m)}return u[d].exports}for(var g="function"==typeof require&&require,h=0;h<m.length;h++)e(m[h]);return e})({1:[function(p,
u,m){G=n("./source-map-support")},{"./source-map-support":21}],2:[function(n,u,m){(function(b){function e(b){b=b.charCodeAt(0);if(43===b)return 62;if(47===b)return 63;if(48>b)return-1;if(58>b)return b-48+52;if(91>b)return b-65;if(123>b)return b-97+26}var g="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function d(a){r[w++]=a}if(0<b.length%4)throw Error("Invalid string. Length must be a multiple of 4");var a=b.length;var l="="===b.charAt(a-2)?2:"="===b.charAt(a-1)?1:0;var r= u,m){G=p("./source-map-support")},{"./source-map-support":21}],2:[function(p,u,m){(function(b){function e(b){b=b.charCodeAt(0);if(43===b)return 62;if(47===b)return 63;if(48>b)return-1;if(58>b)return b-48+52;if(91>b)return b-65;if(123>b)return b-97+26}var g="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function d(a){r[w++]=a}if(0<b.length%4)throw Error("Invalid string. Length must be a multiple of 4");var a=b.length;var l="="===b.charAt(a-2)?2:"="===b.charAt(a-1)?1:0;var r=
new g(3*b.length/4-l);var q=0<l?b.length-4:b.length;var w=0;for(a=0;a<q;a+=4){var h=e(b.charAt(a))<<18|e(b.charAt(a+1))<<12|e(b.charAt(a+2))<<6|e(b.charAt(a+3));d((h&16711680)>>16);d((h&65280)>>8);d(h&255)}2===l?(h=e(b.charAt(a))<<2|e(b.charAt(a+1))>>4,d(h&255)):1===l&&(h=e(b.charAt(a))<<10|e(b.charAt(a+1))<<4|e(b.charAt(a+2))>>2,d(h>>8&255),d(h&255));return r};b.fromByteArray=function(b){var d=b.length%3,a="",l;var e=0;for(l=b.length-d;e<l;e+=3){var g=(b[e]<<16)+(b[e+1]<<8)+b[e+2];g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>> new g(3*b.length/4-l);var q=0<l?b.length-4:b.length;var w=0;for(a=0;a<q;a+=4){var h=e(b.charAt(a))<<18|e(b.charAt(a+1))<<12|e(b.charAt(a+2))<<6|e(b.charAt(a+3));d((h&16711680)>>16);d((h&65280)>>8);d(h&255)}2===l?(h=e(b.charAt(a))<<2|e(b.charAt(a+1))>>4,d(h&255)):1===l&&(h=e(b.charAt(a))<<10|e(b.charAt(a+1))<<4|e(b.charAt(a+2))>>2,d(h>>8&255),d(h&255));return r};b.fromByteArray=function(b){var d=b.length%3,a="",l;var e=0;for(l=b.length-d;e<l;e+=3){var g=(b[e]<<16)+(b[e+1]<<8)+b[e+2];g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>
18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63);a+=g}switch(d){case 1:g=b[b.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<4&63);a+="==";break;case 2:g=(b[b.length-2]<<8)+ 18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63);a+=g}switch(d){case 1:g=b[b.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<4&63);a+="==";break;case 2:g=(b[b.length-2]<<8)+
b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(n,u,m){},{}],4:[function(n,u,m){(function(b){var e=Object.prototype.toString,g="function"===typeof b.alloc&&"function"===typeof b.allocUnsafe&&"function"=== b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(p,u,m){},{}],4:[function(p,u,m){(function(b){var e=Object.prototype.toString,g="function"===typeof b.alloc&&"function"===typeof b.allocUnsafe&&"function"===
typeof b.from;u.exports=function(h,d,a){if("number"===typeof h)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===e.call(h).slice(8,-1)){d>>>=0;var l=h.byteLength-d;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===a)a=l;else if(a>>>=0,a>l)throw new RangeError("'length' is out of bounds");return g?b.from(h.slice(d,d+a)):new b(new Uint8Array(h.slice(d,d+a)))}if("string"===typeof h){a=d;if("string"!==typeof a||""===a)a="utf8";if(!b.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding'); typeof b.from;u.exports=function(h,d,a){if("number"===typeof h)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===e.call(h).slice(8,-1)){d>>>=0;var l=h.byteLength-d;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===a)a=l;else if(a>>>=0,a>l)throw new RangeError("'length' is out of bounds");return g?b.from(h.slice(d,d+a)):new b(new Uint8Array(h.slice(d,d+a)))}if("string"===typeof h){a=d;if("string"!==typeof a||""===a)a="utf8";if(!b.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding');
return g?b.from(h,a):new b(h,a)}return g?b.from(h):new b(h)}}).call(this,n("buffer").Buffer)},{buffer:5}],5:[function(n,u,m){function b(f,p,a){if(!(this instanceof b))return new b(f,p,a);var c=typeof f;if("number"===c)var d=0<f?f>>>0:0;else if("string"===c){if("base64"===p)for(f=(f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")).replace(H,"");0!==f.length%4;)f+="=";d=b.byteLength(f,p)}else if("object"===c&&null!==f)"Buffer"===f.type&&F(f.data)&&(f=f.data),d=0<+f.length?Math.floor(+f.length):0;else throw new TypeError("must start with number, buffer, array or string"); return g?b.from(h,a):new b(h,a)}return g?b.from(h):new b(h)}}).call(this,p("buffer").Buffer)},{buffer:5}],5:[function(p,u,m){function b(f,n,a){if(!(this instanceof b))return new b(f,n,a);var c=typeof f;if("number"===c)var d=0<f?f>>>0:0;else if("string"===c){if("base64"===n)for(f=(f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")).replace(H,"");0!==f.length%4;)f+="=";d=b.byteLength(f,n)}else if("object"===c&&null!==f)"Buffer"===f.type&&F(f.data)&&(f=f.data),d=0<+f.length?Math.floor(+f.length):0;else throw new TypeError("must start with number, buffer, array or string");
if(this.length>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");if(b.TYPED_ARRAY_SUPPORT)var k=b._augment(new Uint8Array(d));else k=this,k.length=d,k._isBuffer=!0;if(b.TYPED_ARRAY_SUPPORT&&"number"===typeof f.byteLength)k._set(f);else{var C=f;if(F(C)||b.isBuffer(C)||C&&"object"===typeof C&&"number"===typeof C.length)if(b.isBuffer(f))for(p=0;p<d;p++)k[p]=f.readUInt8(p);else for(p=0;p<d;p++)k[p]=(f[p]%256+256)%256;else if("string"===c)k.write(f, if(this.length>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");if(b.TYPED_ARRAY_SUPPORT)var k=b._augment(new Uint8Array(d));else k=this,k.length=d,k._isBuffer=!0;if(b.TYPED_ARRAY_SUPPORT&&"number"===typeof f.byteLength)k._set(f);else{var C=f;if(F(C)||b.isBuffer(C)||C&&"object"===typeof C&&"number"===typeof C.length)if(b.isBuffer(f))for(n=0;n<d;n++)k[n]=f.readUInt8(n);else for(n=0;n<d;n++)k[n]=(f[n]%256+256)%256;else if("string"===c)k.write(f,
0,p);else if("number"===c&&!b.TYPED_ARRAY_SUPPORT&&!a)for(p=0;p<d;p++)k[p]=0}return k}function e(f,p,b){var a="";for(b=Math.min(f.length,b);p<b;p++)a+=String.fromCharCode(f[p]);return a}function g(f,p,b){if(0!==f%1||0>f)throw new RangeError("offset is not uint");if(f+p>b)throw new RangeError("Trying to access beyond buffer length");}function h(f,p,a,c,d,k){if(!b.isBuffer(f))throw new TypeError("buffer must be a Buffer instance");if(p>d||p<k)throw new TypeError("value is out of bounds");if(a+c>f.length)throw new TypeError("index out of range"); 0,n);else if("number"===c&&!b.TYPED_ARRAY_SUPPORT&&!a)for(n=0;n<d;n++)k[n]=0}return k}function e(f,n,b){var a="";for(b=Math.min(f.length,b);n<b;n++)a+=String.fromCharCode(f[n]);return a}function g(f,n,b){if(0!==f%1||0>f)throw new RangeError("offset is not uint");if(f+n>b)throw new RangeError("Trying to access beyond buffer length");}function h(f,n,a,c,d,k){if(!b.isBuffer(f))throw new TypeError("buffer must be a Buffer instance");if(n>d||n<k)throw new TypeError("value is out of bounds");if(a+c>f.length)throw new TypeError("index out of range");
}function d(f,p,b,a){0>p&&(p=65535+p+1);for(var c=0,d=Math.min(f.length-b,2);c<d;c++)f[b+c]=(p&255<<8*(a?c:1-c))>>>8*(a?c:1-c)}function a(f,p,b,a){0>p&&(p=4294967295+p+1);for(var c=0,d=Math.min(f.length-b,4);c<d;c++)f[b+c]=p>>>8*(a?c:3-c)&255}function l(f,p,b,a,c,d){if(p>c||p<d)throw new TypeError("value is out of bounds");if(b+a>f.length)throw new TypeError("index out of range");}function r(f,p,b,a,c){c||l(f,p,b,4,3.4028234663852886E38,-3.4028234663852886E38);z.write(f,p,b,a,23,4);return b+4}function q(f, }function d(f,n,b,a){0>n&&(n=65535+n+1);for(var c=0,d=Math.min(f.length-b,2);c<d;c++)f[b+c]=(n&255<<8*(a?c:1-c))>>>8*(a?c:1-c)}function a(f,n,b,a){0>n&&(n=4294967295+n+1);for(var c=0,d=Math.min(f.length-b,4);c<d;c++)f[b+c]=n>>>8*(a?c:3-c)&255}function l(f,n,b,a,c,d){if(n>c||n<d)throw new TypeError("value is out of bounds");if(b+a>f.length)throw new TypeError("index out of range");}function r(f,n,b,a,c){c||l(f,n,b,4,3.4028234663852886E38,-3.4028234663852886E38);z.write(f,n,b,a,23,4);return b+4}function q(f,
p,b,a,c){c||l(f,p,b,8,1.7976931348623157E308,-1.7976931348623157E308);z.write(f,p,b,a,52,8);return b+8}function w(f){for(var p=[],b=0;b<f.length;b++){var a=f.charCodeAt(b);if(127>=a)p.push(a);else{var c=b;55296<=a&&57343>=a&&b++;a=encodeURIComponent(f.slice(c,b+1)).substr(1).split("%");for(c=0;c<a.length;c++)p.push(parseInt(a[c],16))}}return p}function v(f){for(var b=[],a=0;a<f.length;a++)b.push(f.charCodeAt(a)&255);return b}function c(f,b,a,c,d){d&&(c-=c%d);for(d=0;d<c&&!(d+a>=b.length||d>=f.length);d++)b[d+ n,b,a,c){c||l(f,n,b,8,1.7976931348623157E308,-1.7976931348623157E308);z.write(f,n,b,a,52,8);return b+8}function w(f){for(var n=[],b=0;b<f.length;b++){var a=f.charCodeAt(b);if(127>=a)n.push(a);else{var c=b;55296<=a&&57343>=a&&b++;a=encodeURIComponent(f.slice(c,b+1)).substr(1).split("%");for(c=0;c<a.length;c++)n.push(parseInt(a[c],16))}}return n}function v(f){for(var b=[],a=0;a<f.length;a++)b.push(f.charCodeAt(a)&255);return b}function c(f,b,a,c,d){d&&(c-=c%d);for(d=0;d<c&&!(d+a>=b.length||d>=f.length);d++)b[d+
a]=f[d];return d}function k(f){try{return decodeURIComponent(f)}catch(p){return String.fromCharCode(65533)}}var x=n("base64-js"),z=n("ieee754"),F=n("is-array");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;var D=1073741823;b.TYPED_ARRAY_SUPPORT=function(){try{var f=new ArrayBuffer(0),b=new Uint8Array(f);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(C){return!1}}();b.isBuffer=function(f){return!(null== a]=f[d];return d}function k(f){try{return decodeURIComponent(f)}catch(n){return String.fromCharCode(65533)}}var x=p("base64-js"),z=p("ieee754"),F=p("is-array");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;var D=1073741823;b.TYPED_ARRAY_SUPPORT=function(){try{var f=new ArrayBuffer(0),b=new Uint8Array(f);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(C){return!1}}();b.isBuffer=function(f){return!(null==
f||!f._isBuffer)};b.compare=function(f,a){if(!b.isBuffer(f)||!b.isBuffer(a))throw new TypeError("Arguments must be Buffers");for(var c=f.length,p=a.length,d=0,k=Math.min(c,p);d<k&&f[d]===a[d];d++);d!==k&&(c=f[d],p=a[d]);return c<p?-1:p<c?1:0};b.isEncoding=function(f){switch(String(f).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};b.concat=function(f,a){if(!F(f))throw new TypeError("Usage: Buffer.concat(list[, length])"); f||!f._isBuffer)};b.compare=function(f,a){if(!b.isBuffer(f)||!b.isBuffer(a))throw new TypeError("Arguments must be Buffers");for(var c=f.length,n=a.length,d=0,k=Math.min(c,n);d<k&&f[d]===a[d];d++);d!==k&&(c=f[d],n=a[d]);return c<n?-1:n<c?1:0};b.isEncoding=function(f){switch(String(f).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};b.concat=function(f,a){if(!F(f))throw new TypeError("Usage: Buffer.concat(list[, length])");
if(0===f.length)return new b(0);if(1===f.length)return f[0];var c;if(void 0===a)for(c=a=0;c<f.length;c++)a+=f[c].length;var p=new b(a),d=0;for(c=0;c<f.length;c++){var k=f[c];k.copy(p,d);d+=k.length}return p};b.byteLength=function(f,a){f+="";switch(a||"utf8"){case "ascii":case "binary":case "raw":var b=f.length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=2*f.length;break;case "hex":b=f.length>>>1;break;case "utf8":case "utf-8":b=w(f).length;break;case "base64":b=x.toByteArray(f).length; if(0===f.length)return new b(0);if(1===f.length)return f[0];var c;if(void 0===a)for(c=a=0;c<f.length;c++)a+=f[c].length;var n=new b(a),d=0;for(c=0;c<f.length;c++){var k=f[c];k.copy(n,d);d+=k.length}return n};b.byteLength=function(f,a){f+="";switch(a||"utf8"){case "ascii":case "binary":case "raw":var b=f.length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=2*f.length;break;case "hex":b=f.length>>>1;break;case "utf8":case "utf-8":b=w(f).length;break;case "base64":b=x.toByteArray(f).length;
break;default:b=f.length}return b};b.prototype.length=void 0;b.prototype.parent=void 0;b.prototype.toString=function(f,b,a){var c=!1;b>>>=0;a=void 0===a||Infinity===a?this.length:a>>>0;f||(f="utf8");0>b&&(b=0);a>this.length&&(a=this.length);if(a<=b)return"";for(;;)switch(f){case "hex":f=b;b=a;a=this.length;if(!f||0>f)f=0;if(!b||0>b||b>a)b=a;c="";for(a=f;a<b;a++)f=c,c=this[a],c=16>c?"0"+c.toString(16):c.toString(16),c=f+c;return c;case "utf8":case "utf-8":c=f="";for(a=Math.min(this.length,a);b<a;b++)127>= break;default:b=f.length}return b};b.prototype.length=void 0;b.prototype.parent=void 0;b.prototype.toString=function(f,b,a){var c=!1;b>>>=0;a=void 0===a||Infinity===a?this.length:a>>>0;f||(f="utf8");0>b&&(b=0);a>this.length&&(a=this.length);if(a<=b)return"";for(;;)switch(f){case "hex":f=b;b=a;a=this.length;if(!f||0>f)f=0;if(!b||0>b||b>a)b=a;c="";for(a=f;a<b;a++)f=c,c=this[a],c=16>c?"0"+c.toString(16):c.toString(16),c=f+c;return c;case "utf8":case "utf-8":c=f="";for(a=Math.min(this.length,a);b<a;b++)127>=
this[b]?(f+=k(c)+String.fromCharCode(this[b]),c=""):c+="%"+this[b].toString(16);return f+k(c);case "ascii":return e(this,b,a);case "binary":return e(this,b,a);case "base64":return b=0===b&&a===this.length?x.fromByteArray(this):x.fromByteArray(this.slice(b,a)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,a);a="";for(f=0;f<b.length;f+=2)a+=String.fromCharCode(b[f]+256*b[f+1]);return a;default:if(c)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase();c=!0}}; this[b]?(f+=k(c)+String.fromCharCode(this[b]),c=""):c+="%"+this[b].toString(16);return f+k(c);case "ascii":return e(this,b,a);case "binary":return e(this,b,a);case "base64":return b=0===b&&a===this.length?x.fromByteArray(this):x.fromByteArray(this.slice(b,a)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,a);a="";for(f=0;f<b.length;f+=2)a+=String.fromCharCode(b[f]+256*b[f+1]);return a;default:if(c)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase();c=!0}};
b.prototype.equals=function(f){if(!b.isBuffer(f))throw new TypeError("Argument must be a Buffer");return 0===b.compare(this,f)};b.prototype.inspect=function(){var f="",b=m.INSPECT_MAX_BYTES;0<this.length&&(f=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(f+=" ... "));return"<Buffer "+f+">"};b.prototype.compare=function(f){if(!b.isBuffer(f))throw new TypeError("Argument must be a Buffer");return b.compare(this,f)};b.prototype.get=function(f){console.log(".get() is deprecated. Access using array indexes instead."); b.prototype.equals=function(f){if(!b.isBuffer(f))throw new TypeError("Argument must be a Buffer");return 0===b.compare(this,f)};b.prototype.inspect=function(){var f="",b=m.INSPECT_MAX_BYTES;0<this.length&&(f=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(f+=" ... "));return"<Buffer "+f+">"};b.prototype.compare=function(f){if(!b.isBuffer(f))throw new TypeError("Argument must be a Buffer");return b.compare(this,f)};b.prototype.get=function(f){console.log(".get() is deprecated. Access using array indexes instead.");
return this.readUInt8(f)};b.prototype.set=function(f,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(f,b)};b.prototype.write=function(f,b,a,d){if(isFinite(b))isFinite(a)||(d=a,a=void 0);else{var p=d;d=b;b=a;a=p}b=Number(b)||0;p=this.length-b;a?(a=Number(a),a>p&&(a=p)):a=p;d=String(d||"utf8").toLowerCase();switch(d){case "hex":b=Number(b)||0;d=this.length-b;a?(a=Number(a),a>d&&(a=d)):a=d;d=f.length;if(0!==d%2)throw Error("Invalid hex string");a>d/ return this.readUInt8(f)};b.prototype.set=function(f,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(f,b)};b.prototype.write=function(f,b,a,d){if(isFinite(b))isFinite(a)||(d=a,a=void 0);else{var n=d;d=b;b=a;a=n}b=Number(b)||0;n=this.length-b;a?(a=Number(a),a>n&&(a=n)):a=n;d=String(d||"utf8").toLowerCase();switch(d){case "hex":b=Number(b)||0;d=this.length-b;a?(a=Number(a),a>d&&(a=d)):a=d;d=f.length;if(0!==d%2)throw Error("Invalid hex string");a>d/
2&&(a=d/2);for(d=0;d<a;d++){p=parseInt(f.substr(2*d,2),16);if(isNaN(p))throw Error("Invalid hex string");this[b+d]=p}f=d;break;case "utf8":case "utf-8":f=c(w(f),this,b,a);break;case "ascii":f=c(v(f),this,b,a);break;case "binary":f=c(v(f),this,b,a);break;case "base64":f=c(x.toByteArray(f),this,b,a);break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":p=[];for(var k=0;k<f.length;k++){var l=f.charCodeAt(k);d=l>>8;l%=256;p.push(l);p.push(d)}f=c(p,this,b,a,2);break;default:throw new TypeError("Unknown encoding: "+ 2&&(a=d/2);for(d=0;d<a;d++){n=parseInt(f.substr(2*d,2),16);if(isNaN(n))throw Error("Invalid hex string");this[b+d]=n}f=d;break;case "utf8":case "utf-8":f=c(w(f),this,b,a);break;case "ascii":f=c(v(f),this,b,a);break;case "binary":f=c(v(f),this,b,a);break;case "base64":f=c(x.toByteArray(f),this,b,a);break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":n=[];for(var k=0;k<f.length;k++){var l=f.charCodeAt(k);d=l>>8;l%=256;n.push(l);n.push(d)}f=c(n,this,b,a,2);break;default:throw new TypeError("Unknown encoding: "+
d);}return f};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(f,a){var c=this.length;f=~~f;a=void 0===a?c:~~a;0>f?(f+=c,0>f&&(f=0)):f>c&&(f=c);0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c);a<f&&(a=f);if(b.TYPED_ARRAY_SUPPORT)return b._augment(this.subarray(f,a));c=a-f;for(var d=new b(c,void 0,!0),p=0;p<c;p++)d[p]=this[p+f];return d};b.prototype.readUInt8=function(f,a){a||g(f,1,this.length);return this[f]};b.prototype.readUInt16LE= d);}return f};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(f,a){var c=this.length;f=~~f;a=void 0===a?c:~~a;0>f?(f+=c,0>f&&(f=0)):f>c&&(f=c);0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c);a<f&&(a=f);if(b.TYPED_ARRAY_SUPPORT)return b._augment(this.subarray(f,a));c=a-f;for(var d=new b(c,void 0,!0),n=0;n<c;n++)d[n]=this[n+f];return d};b.prototype.readUInt8=function(f,a){a||g(f,1,this.length);return this[f]};b.prototype.readUInt16LE=
function(f,a){a||g(f,2,this.length);return this[f]|this[f+1]<<8};b.prototype.readUInt16BE=function(f,a){a||g(f,2,this.length);return this[f]<<8|this[f+1]};b.prototype.readUInt32LE=function(f,a){a||g(f,4,this.length);return(this[f]|this[f+1]<<8|this[f+2]<<16)+16777216*this[f+3]};b.prototype.readUInt32BE=function(f,a){a||g(f,4,this.length);return 16777216*this[f]+(this[f+1]<<16|this[f+2]<<8|this[f+3])};b.prototype.readInt8=function(f,a){a||g(f,1,this.length);return this[f]&128?-1*(255-this[f]+1):this[f]}; function(f,a){a||g(f,2,this.length);return this[f]|this[f+1]<<8};b.prototype.readUInt16BE=function(f,a){a||g(f,2,this.length);return this[f]<<8|this[f+1]};b.prototype.readUInt32LE=function(f,a){a||g(f,4,this.length);return(this[f]|this[f+1]<<8|this[f+2]<<16)+16777216*this[f+3]};b.prototype.readUInt32BE=function(f,a){a||g(f,4,this.length);return 16777216*this[f]+(this[f+1]<<16|this[f+2]<<8|this[f+3])};b.prototype.readInt8=function(f,a){a||g(f,1,this.length);return this[f]&128?-1*(255-this[f]+1):this[f]};
b.prototype.readInt16LE=function(f,a){a||g(f,2,this.length);var b=this[f]|this[f+1]<<8;return b&32768?b|4294901760:b};b.prototype.readInt16BE=function(f,a){a||g(f,2,this.length);var b=this[f+1]|this[f]<<8;return b&32768?b|4294901760:b};b.prototype.readInt32LE=function(f,a){a||g(f,4,this.length);return this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24};b.prototype.readInt32BE=function(a,b){b||g(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};b.prototype.readFloatLE=function(a, b.prototype.readInt16LE=function(f,a){a||g(f,2,this.length);var b=this[f]|this[f+1]<<8;return b&32768?b|4294901760:b};b.prototype.readInt16BE=function(f,a){a||g(f,2,this.length);var b=this[f+1]|this[f]<<8;return b&32768?b|4294901760:b};b.prototype.readInt32LE=function(f,a){a||g(f,4,this.length);return this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24};b.prototype.readInt32BE=function(a,b){b||g(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};b.prototype.readFloatLE=function(a,
b){b||g(a,4,this.length);return z.read(this,a,!0,23,4)};b.prototype.readFloatBE=function(a,b){b||g(a,4,this.length);return z.read(this,a,!1,23,4)};b.prototype.readDoubleLE=function(a,b){b||g(a,8,this.length);return z.read(this,a,!0,52,8)};b.prototype.readDoubleBE=function(a,b){b||g(a,8,this.length);return z.read(this,a,!1,52,8)};b.prototype.writeUInt8=function(a,c,d){a=+a;c>>>=0;d||h(this,a,c,1,255,0);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[c]=a;return c+1};b.prototype.writeUInt16LE=function(a, b){b||g(a,4,this.length);return z.read(this,a,!0,23,4)};b.prototype.readFloatBE=function(a,b){b||g(a,4,this.length);return z.read(this,a,!1,23,4)};b.prototype.readDoubleLE=function(a,b){b||g(a,8,this.length);return z.read(this,a,!0,52,8)};b.prototype.readDoubleBE=function(a,b){b||g(a,8,this.length);return z.read(this,a,!1,52,8)};b.prototype.writeUInt8=function(a,c,d){a=+a;c>>>=0;d||h(this,a,c,1,255,0);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[c]=a;return c+1};b.prototype.writeUInt16LE=function(a,
@@ -39,32 +39,32 @@ if(0>d||d>=this.length)throw new TypeError("sourceStart out of bounds");if(0>k||
if(0>b||b>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;c<b;c++)this[c]=a;else{a=w(a.toString());for(var d=a.length;c<b;c++)this[c]=a[c%d]}return this}};b.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(b.TYPED_ARRAY_SUPPORT)return(new b(this)).buffer;for(var a=new Uint8Array(this.length),c=0,d=a.length;c<d;c+=1)a[c]=this[c];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser");};var t=b.prototype;b._augment= if(0>b||b>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;c<b;c++)this[c]=a;else{a=w(a.toString());for(var d=a.length;c<b;c++)this[c]=a[c%d]}return this}};b.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(b.TYPED_ARRAY_SUPPORT)return(new b(this)).buffer;for(var a=new Uint8Array(this.length),c=0,d=a.length;c<d;c+=1)a[c]=this[c];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser");};var t=b.prototype;b._augment=
function(a){a.constructor=b;a._isBuffer=!0;a._get=a.get;a._set=a.set;a.get=t.get;a.set=t.set;a.write=t.write;a.toString=t.toString;a.toLocaleString=t.toString;a.toJSON=t.toJSON;a.equals=t.equals;a.compare=t.compare;a.copy=t.copy;a.slice=t.slice;a.readUInt8=t.readUInt8;a.readUInt16LE=t.readUInt16LE;a.readUInt16BE=t.readUInt16BE;a.readUInt32LE=t.readUInt32LE;a.readUInt32BE=t.readUInt32BE;a.readInt8=t.readInt8;a.readInt16LE=t.readInt16LE;a.readInt16BE=t.readInt16BE;a.readInt32LE=t.readInt32LE;a.readInt32BE= function(a){a.constructor=b;a._isBuffer=!0;a._get=a.get;a._set=a.set;a.get=t.get;a.set=t.set;a.write=t.write;a.toString=t.toString;a.toLocaleString=t.toString;a.toJSON=t.toJSON;a.equals=t.equals;a.compare=t.compare;a.copy=t.copy;a.slice=t.slice;a.readUInt8=t.readUInt8;a.readUInt16LE=t.readUInt16LE;a.readUInt16BE=t.readUInt16BE;a.readUInt32LE=t.readUInt32LE;a.readUInt32BE=t.readUInt32BE;a.readInt8=t.readInt8;a.readInt16LE=t.readInt16LE;a.readInt16BE=t.readInt16BE;a.readInt32LE=t.readInt32LE;a.readInt32BE=
t.readInt32BE;a.readFloatLE=t.readFloatLE;a.readFloatBE=t.readFloatBE;a.readDoubleLE=t.readDoubleLE;a.readDoubleBE=t.readDoubleBE;a.writeUInt8=t.writeUInt8;a.writeUInt16LE=t.writeUInt16LE;a.writeUInt16BE=t.writeUInt16BE;a.writeUInt32LE=t.writeUInt32LE;a.writeUInt32BE=t.writeUInt32BE;a.writeInt8=t.writeInt8;a.writeInt16LE=t.writeInt16LE;a.writeInt16BE=t.writeInt16BE;a.writeInt32LE=t.writeInt32LE;a.writeInt32BE=t.writeInt32BE;a.writeFloatLE=t.writeFloatLE;a.writeFloatBE=t.writeFloatBE;a.writeDoubleLE= t.readInt32BE;a.readFloatLE=t.readFloatLE;a.readFloatBE=t.readFloatBE;a.readDoubleLE=t.readDoubleLE;a.readDoubleBE=t.readDoubleBE;a.writeUInt8=t.writeUInt8;a.writeUInt16LE=t.writeUInt16LE;a.writeUInt16BE=t.writeUInt16BE;a.writeUInt32LE=t.writeUInt32LE;a.writeUInt32BE=t.writeUInt32BE;a.writeInt8=t.writeInt8;a.writeInt16LE=t.writeInt16LE;a.writeInt16BE=t.writeInt16BE;a.writeInt32LE=t.writeInt32LE;a.writeInt32BE=t.writeInt32BE;a.writeFloatLE=t.writeFloatLE;a.writeFloatBE=t.writeFloatBE;a.writeDoubleLE=
t.writeDoubleLE;a.writeDoubleBE=t.writeDoubleBE;a.fill=t.fill;a.inspect=t.inspect;a.toArrayBuffer=t.toArrayBuffer;return a};var H=/[^+\/0-9A-z]/g},{"base64-js":2,ieee754:6,"is-array":7}],6:[function(n,u,m){m.read=function(b,e,g,h,d){var a=8*d-h-1;var l=(1<<a)-1,r=l>>1,q=-7;d=g?d-1:0;var w=g?-1:1,v=b[e+d];d+=w;g=v&(1<<-q)-1;v>>=-q;for(q+=a;0<q;g=256*g+b[e+d],d+=w,q-=8);a=g&(1<<-q)-1;g>>=-q;for(q+=h;0<q;a=256*a+b[e+d],d+=w,q-=8);if(0===g)g=1-r;else{if(g===l)return a?NaN:Infinity*(v?-1:1);a+=Math.pow(2, t.writeDoubleLE;a.writeDoubleBE=t.writeDoubleBE;a.fill=t.fill;a.inspect=t.inspect;a.toArrayBuffer=t.toArrayBuffer;return a};var H=/[^+\/0-9A-z]/g},{"base64-js":2,ieee754:6,"is-array":7}],6:[function(p,u,m){m.read=function(b,e,g,h,d){var a=8*d-h-1;var l=(1<<a)-1,r=l>>1,q=-7;d=g?d-1:0;var w=g?-1:1,v=b[e+d];d+=w;g=v&(1<<-q)-1;v>>=-q;for(q+=a;0<q;g=256*g+b[e+d],d+=w,q-=8);a=g&(1<<-q)-1;g>>=-q;for(q+=h;0<q;a=256*a+b[e+d],d+=w,q-=8);if(0===g)g=1-r;else{if(g===l)return a?NaN:Infinity*(v?-1:1);a+=Math.pow(2,
h);g-=r}return(v?-1:1)*a*Math.pow(2,g-h)};m.write=function(b,e,g,h,d,a){var l,r=8*a-d-1,q=(1<<r)-1,w=q>>1,v=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;a=h?0:a-1;var c=h?1:-1,k=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,h=q):(h=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-h))&&(h--,l*=2),e=1<=h+w?e+v/l:e+v*Math.pow(2,1-w),2<=e*l&&(h++,l/=2),h+w>=q?(e=0,h=q):1<=h+w?(e=(e*l-1)*Math.pow(2,d),h+=w):(e=e*Math.pow(2,w-1)*Math.pow(2,d),h=0));for(;8<=d;b[g+a]=e&255,a+= h);g-=r}return(v?-1:1)*a*Math.pow(2,g-h)};m.write=function(b,e,g,h,d,a){var l,r=8*a-d-1,q=(1<<r)-1,w=q>>1,v=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;a=h?0:a-1;var c=h?1:-1,k=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,h=q):(h=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-h))&&(h--,l*=2),e=1<=h+w?e+v/l:e+v*Math.pow(2,1-w),2<=e*l&&(h++,l/=2),h+w>=q?(e=0,h=q):1<=h+w?(e=(e*l-1)*Math.pow(2,d),h+=w):(e=e*Math.pow(2,w-1)*Math.pow(2,d),h=0));for(;8<=d;b[g+a]=e&255,a+=
c,e/=256,d-=8);h=h<<d|e;for(r+=d;0<r;b[g+a]=h&255,a+=c,h/=256,r-=8);b[g+a-c]|=128*k}},{}],7:[function(n,u,m){var b=Object.prototype.toString;u.exports=Array.isArray||function(e){return!!e&&"[object Array]"==b.call(e)}},{}],8:[function(n,u,m){(function(b){function e(a,b){for(var d=0,l=a.length-1;0<=l;l--){var w=a[l];"."===w?a.splice(l,1):".."===w?(a.splice(l,1),d++):d&&(a.splice(l,1),d--)}if(b)for(;d--;d)a.unshift("..");return a}function g(a,b){if(a.filter)return a.filter(b);for(var d=[],l=0;l<a.length;l++)b(a[l], c,e/=256,d-=8);h=h<<d|e;for(r+=d;0<r;b[g+a]=h&255,a+=c,h/=256,r-=8);b[g+a-c]|=128*k}},{}],7:[function(p,u,m){var b=Object.prototype.toString;u.exports=Array.isArray||function(e){return!!e&&"[object Array]"==b.call(e)}},{}],8:[function(p,u,m){(function(b){function e(a,b){for(var d=0,l=a.length-1;0<=l;l--){var w=a[l];"."===w?a.splice(l,1):".."===w?(a.splice(l,1),d++):d&&(a.splice(l,1),d--)}if(b)for(;d--;d)a.unshift("..");return a}function g(a,b){if(a.filter)return a.filter(b);for(var d=[],l=0;l<a.length;l++)b(a[l],
l,a)&&d.push(a[l]);return d}var h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;m.resolve=function(){for(var a="",d=!1,h=arguments.length-1;-1<=h&&!d;h--){var q=0<=h?arguments[h]:b.cwd();if("string"!==typeof q)throw new TypeError("Arguments to path.resolve must be strings");q&&(a=q+"/"+a,d="/"===q.charAt(0))}a=e(g(a.split("/"),function(a){return!!a}),!d).join("/");return(d?"/":"")+a||"."};m.normalize=function(a){var b=m.isAbsolute(a),h="/"===d(a,-1);(a=e(g(a.split("/"),function(a){return!!a}), l,a)&&d.push(a[l]);return d}var h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;m.resolve=function(){for(var a="",d=!1,h=arguments.length-1;-1<=h&&!d;h--){var q=0<=h?arguments[h]:b.cwd();if("string"!==typeof q)throw new TypeError("Arguments to path.resolve must be strings");q&&(a=q+"/"+a,d="/"===q.charAt(0))}a=e(g(a.split("/"),function(a){return!!a}),!d).join("/");return(d?"/":"")+a||"."};m.normalize=function(a){var b=m.isAbsolute(a),h="/"===d(a,-1);(a=e(g(a.split("/"),function(a){return!!a}),
!b).join("/"))||b||(a=".");a&&h&&(a+="/");return(b?"/":"")+a};m.isAbsolute=function(a){return"/"===a.charAt(0)};m.join=function(){var a=Array.prototype.slice.call(arguments,0);return m.normalize(g(a,function(a,b){if("string"!==typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))};m.relative=function(a,b){function d(a){for(var c=0;c<a.length&&""===a[c];c++);for(var b=a.length-1;0<=b&&""===a[b];b--);return c>b?[]:a.slice(c,b-c+1)}a=m.resolve(a).substr(1);b=m.resolve(b).substr(1); !b).join("/"))||b||(a=".");a&&h&&(a+="/");return(b?"/":"")+a};m.isAbsolute=function(a){return"/"===a.charAt(0)};m.join=function(){var a=Array.prototype.slice.call(arguments,0);return m.normalize(g(a,function(a,b){if("string"!==typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))};m.relative=function(a,b){function d(a){for(var c=0;c<a.length&&""===a[c];c++);for(var b=a.length-1;0<=b&&""===a[b];b--);return c>b?[]:a.slice(c,b-c+1)}a=m.resolve(a).substr(1);b=m.resolve(b).substr(1);
for(var l=d(a.split("/")),w=d(b.split("/")),e=Math.min(l.length,w.length),c=e,k=0;k<e;k++)if(l[k]!==w[k]){c=k;break}e=[];for(k=c;k<l.length;k++)e.push("..");e=e.concat(w.slice(c));return e.join("/")};m.sep="/";m.delimiter=":";m.dirname=function(a){var b=h.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b};m.basename=function(a,b){var d=h.exec(a).slice(1)[2];b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d};m.extname=function(a){return h.exec(a).slice(1)[3]}; for(var l=d(a.split("/")),w=d(b.split("/")),e=Math.min(l.length,w.length),c=e,k=0;k<e;k++)if(l[k]!==w[k]){c=k;break}e=[];for(k=c;k<l.length;k++)e.push("..");e=e.concat(w.slice(c));return e.join("/")};m.sep="/";m.delimiter=":";m.dirname=function(a){var b=h.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b};m.basename=function(a,b){var d=h.exec(a).slice(1)[2];b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d};m.extname=function(a){return h.exec(a).slice(1)[3]};
var d="b"==="ab".substr(-1)?function(a,b,d){return a.substr(b,d)}:function(a,b,d){0>b&&(b=a.length+b);return a.substr(b,d)}}).call(this,n("g5I+bs"))},{"g5I+bs":9}],9:[function(n,u,m){function b(){}n=u.exports={};n.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(e){var g=e.source;g!==window&&null!== var d="b"==="ab".substr(-1)?function(a,b,d){return a.substr(b,d)}:function(a,b,d){0>b&&(b=a.length+b);return a.substr(b,d)}}).call(this,p("g5I+bs"))},{"g5I+bs":9}],9:[function(p,u,m){function b(){}p=u.exports={};p.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(e){var g=e.source;g!==window&&null!==
g||"process-tick"!==e.data||(e.stopPropagation(),0<b.length&&b.shift()())},!0);return function(e){b.push(e);window.postMessage("process-tick","*")}}return function(b){setTimeout(b,0)}}();n.title="browser";n.browser=!0;n.env={};n.argv=[];n.on=b;n.addListener=b;n.once=b;n.off=b;n.removeListener=b;n.removeAllListeners=b;n.emit=b;n.binding=function(b){throw Error("process.binding is not supported");};n.cwd=function(){return"/"};n.chdir=function(b){throw Error("process.chdir is not supported");}},{}], g||"process-tick"!==e.data||(e.stopPropagation(),0<b.length&&b.shift()())},!0);return function(e){b.push(e);window.postMessage("process-tick","*")}}return function(b){setTimeout(b,0)}}();p.title="browser";p.browser=!0;p.env={};p.argv=[];p.on=b;p.addListener=b;p.once=b;p.off=b;p.removeListener=b;p.removeAllListeners=b;p.emit=b;p.binding=function(b){throw Error("process.binding is not supported");};p.cwd=function(){return"/"};p.chdir=function(b){throw Error("process.chdir is not supported");}},{}],
10:[function(n,u,m){function b(){this._array=[];this._set=h?new Map:Object.create(null)}var e=n("./util"),g=Object.prototype.hasOwnProperty,h="undefined"!==typeof Map;b.fromArray=function(d,a){for(var e=new b,g=0,h=d.length;g<h;g++)e.add(d[g],a);return e};b.prototype.size=function(){return h?this._set.size:Object.getOwnPropertyNames(this._set).length};b.prototype.add=function(b,a){var d=h?b:e.toSetString(b),r=h?this.has(b):g.call(this._set,d),q=this._array.length;r&&!a||this._array.push(b);r||(h? 10:[function(p,u,m){function b(){this._array=[];this._set=h?new Map:Object.create(null)}var e=p("./util"),g=Object.prototype.hasOwnProperty,h="undefined"!==typeof Map;b.fromArray=function(d,a){for(var e=new b,g=0,h=d.length;g<h;g++)e.add(d[g],a);return e};b.prototype.size=function(){return h?this._set.size:Object.getOwnPropertyNames(this._set).length};b.prototype.add=function(b,a){var d=h?b:e.toSetString(b),r=h?this.has(b):g.call(this._set,d),q=this._array.length;r&&!a||this._array.push(b);r||(h?
this._set.set(b,q):this._set[d]=q)};b.prototype.has=function(b){if(h)return this._set.has(b);b=e.toSetString(b);return g.call(this._set,b)};b.prototype.indexOf=function(b){if(h){var a=this._set.get(b);if(0<=a)return a}else if(a=e.toSetString(b),g.call(this._set,a))return this._set[a];throw Error('"'+b+'" is not in the set.');};b.prototype.at=function(b){if(0<=b&&b<this._array.length)return this._array[b];throw Error("No element indexed by "+b);};b.prototype.toArray=function(){return this._array.slice()}; this._set.set(b,q):this._set[d]=q)};b.prototype.has=function(b){if(h)return this._set.has(b);b=e.toSetString(b);return g.call(this._set,b)};b.prototype.indexOf=function(b){if(h){var a=this._set.get(b);if(0<=a)return a}else if(a=e.toSetString(b),g.call(this._set,a))return this._set[a];throw Error('"'+b+'" is not in the set.');};b.prototype.at=function(b){if(0<=b&&b<this._array.length)return this._array[b];throw Error("No element indexed by "+b);};b.prototype.toArray=function(){return this._array.slice()};
m.ArraySet=b},{"./util":19}],11:[function(n,u,m){var b=n("./base64");m.encode=function(e){var g="",h=0>e?(-e<<1)+1:e<<1;do e=h&31,h>>>=5,0<h&&(e|=32),g+=b.encode(e);while(0<h);return g};m.decode=function(e,g,h){var d=e.length,a=0,l=0;do{if(g>=d)throw Error("Expected more digits in base 64 VLQ value.");var r=b.decode(e.charCodeAt(g++));if(-1===r)throw Error("Invalid base64 digit: "+e.charAt(g-1));var q=!!(r&32);r&=31;a+=r<<l;l+=5}while(q);e=a>>1;h.value=1===(a&1)?-e:e;h.rest=g}},{"./base64":12}],12:[function(n, m.ArraySet=b},{"./util":19}],11:[function(p,u,m){var b=p("./base64");m.encode=function(e){var g="",h=0>e?(-e<<1)+1:e<<1;do e=h&31,h>>>=5,0<h&&(e|=32),g+=b.encode(e);while(0<h);return g};m.decode=function(e,g,h){var d=e.length,a=0,l=0;do{if(g>=d)throw Error("Expected more digits in base 64 VLQ value.");var r=b.decode(e.charCodeAt(g++));if(-1===r)throw Error("Invalid base64 digit: "+e.charAt(g-1));var q=!!(r&32);r&=31;a+=r<<l;l+=5}while(q);e=a>>1;h.value=1===(a&1)?-e:e;h.rest=g}},{"./base64":12}],12:[function(p,
u,m){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(e){if(0<=e&&e<b.length)return b[e];throw new TypeError("Must be between 0 and 63: "+e);};m.decode=function(b){return 65<=b&&90>=b?b-65:97<=b&&122>=b?b-97+26:48<=b&&57>=b?b-48+52:43==b?62:47==b?63:-1}},{}],13:[function(n,u,m){function b(e,g,h,d,a,l){var r=Math.floor((g-e)/2)+e,q=a(h,d[r],!0);return 0===q?r:0<q?1<g-r?b(r,g,h,d,a,l):l==m.LEAST_UPPER_BOUND?g<d.length?g:-1:r:1<r-e?b(e,r,h,d,a,l):l== u,m){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(e){if(0<=e&&e<b.length)return b[e];throw new TypeError("Must be between 0 and 63: "+e);};m.decode=function(b){return 65<=b&&90>=b?b-65:97<=b&&122>=b?b-97+26:48<=b&&57>=b?b-48+52:43==b?62:47==b?63:-1}},{}],13:[function(p,u,m){function b(e,g,h,d,a,l){var r=Math.floor((g-e)/2)+e,q=a(h,d[r],!0);return 0===q?r:0<q?1<g-r?b(r,g,h,d,a,l):l==m.LEAST_UPPER_BOUND?g<d.length?g:-1:r:1<r-e?b(e,r,h,d,a,l):l==
m.LEAST_UPPER_BOUND?r:0>e?-1:e}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(e,g,h,d){if(0===g.length)return-1;e=b(-1,g.length,e,g,h,d||m.GREATEST_LOWER_BOUND);if(0>e)return-1;for(;0<=e-1&&0===h(g[e],g[e-1],!0);)--e;return e}},{}],14:[function(n,u,m){function b(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var e=n("./util");b.prototype.unsortedForEach=function(b,e){this._array.forEach(b,e)};b.prototype.add=function(b){var g=this._last,d=g.generatedLine, m.LEAST_UPPER_BOUND?r:0>e?-1:e}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(e,g,h,d){if(0===g.length)return-1;e=b(-1,g.length,e,g,h,d||m.GREATEST_LOWER_BOUND);if(0>e)return-1;for(;0<=e-1&&0===h(g[e],g[e-1],!0);)--e;return e}},{}],14:[function(p,u,m){function b(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var e=p("./util");b.prototype.unsortedForEach=function(b,e){this._array.forEach(b,e)};b.prototype.add=function(b){var g=this._last,d=g.generatedLine,
a=b.generatedLine,l=g.generatedColumn,r=b.generatedColumn;a>d||a==d&&r>=l||0>=e.compareByGeneratedPositionsInflated(g,b)?this._last=b:this._sorted=!1;this._array.push(b)};b.prototype.toArray=function(){this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=b},{"./util":19}],15:[function(n,u,m){function b(b,e,d){var a=b[e];b[e]=b[d];b[d]=a}function e(g,h,d,a){if(d<a){var l=d-1;b(g,Math.round(d+Math.random()*(a-d)),a);for(var r=g[a], a=b.generatedLine,l=g.generatedColumn,r=b.generatedColumn;a>d||a==d&&r>=l||0>=e.compareByGeneratedPositionsInflated(g,b)?this._last=b:this._sorted=!1;this._array.push(b)};b.prototype.toArray=function(){this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=b},{"./util":19}],15:[function(p,u,m){function b(b,e,d){var a=b[e];b[e]=b[d];b[d]=a}function e(g,h,d,a){if(d<a){var l=d-1;b(g,Math.round(d+Math.random()*(a-d)),a);for(var r=g[a],
q=d;q<a;q++)0>=h(g[q],r)&&(l+=1,b(g,l,q));b(g,l+1,q);l+=1;e(g,h,d,l-1);e(g,h,l+1,a)}}m.quickSort=function(b,h){e(b,h,0,b.length-1)}},{}],16:[function(n,u,m){function b(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));return null!=c.sections?new h(c,b):new e(c,b)}function e(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version"),e=d.getArg(c,"sources"),w=d.getArg(c,"names",[]),g=d.getArg(c,"sourceRoot",null),h=d.getArg(c,"sourcesContent",null),q=d.getArg(c, q=d;q<a;q++)0>=h(g[q],r)&&(l+=1,b(g,l,q));b(g,l+1,q);l+=1;e(g,h,d,l-1);e(g,h,l+1,a)}}m.quickSort=function(b,h){e(b,h,0,b.length-1)}},{}],16:[function(p,u,m){function b(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));return null!=c.sections?new h(c,b):new e(c,b)}function e(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version"),e=d.getArg(c,"sources"),w=d.getArg(c,"names",[]),g=d.getArg(c,"sourceRoot",null),h=d.getArg(c,"sourcesContent",null),q=d.getArg(c,
"mappings");c=d.getArg(c,"file",null);if(k!=this._version)throw Error("Unsupported version: "+k);g&&(g=d.normalize(g));e=e.map(String).map(d.normalize).map(function(a){return g&&d.isAbsolute(g)&&d.isAbsolute(a)?d.relative(g,a):a});this._names=l.fromArray(w.map(String),!0);this._sources=l.fromArray(e,!0);this.sourceRoot=g;this.sourcesContent=h;this._mappings=q;this._sourceMapURL=b;this.file=c}function g(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= "mappings");c=d.getArg(c,"file",null);if(k!=this._version)throw Error("Unsupported version: "+k);g&&(g=d.normalize(g));e=e.map(String).map(d.normalize).map(function(a){return g&&d.isAbsolute(g)&&d.isAbsolute(a)?d.relative(g,a):a});this._names=l.fromArray(w.map(String),!0);this._sources=l.fromArray(e,!0);this.sourceRoot=g;this.sourcesContent=h;this._mappings=q;this._sourceMapURL=b;this.file=c}function g(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source=
null}function h(a,e){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version");c=d.getArg(c,"sections");if(k!=this._version)throw Error("Unsupported version: "+k);this._sources=new l;this._names=new l;var w={line:-1,column:0};this._sections=c.map(function(a){if(a.url)throw Error("Support for url field in sections not implemented.");var c=d.getArg(a,"offset"),k=d.getArg(c,"line"),g=d.getArg(c,"column");if(k<w.line||k===w.line&&g<w.column)throw Error("Section offsets must be ordered and non-overlapping."); null}function h(a,e){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version");c=d.getArg(c,"sections");if(k!=this._version)throw Error("Unsupported version: "+k);this._sources=new l;this._names=new l;var w={line:-1,column:0};this._sections=c.map(function(a){if(a.url)throw Error("Support for url field in sections not implemented.");var c=d.getArg(a,"offset"),k=d.getArg(c,"line"),g=d.getArg(c,"column");if(k<w.line||k===w.line&&g<w.column)throw Error("Section offsets must be ordered and non-overlapping.");
w=c;return{generatedOffset:{generatedLine:k+1,generatedColumn:g+1},consumer:new b(d.getArg(a,"map"),e)}})}var d=n("./util"),a=n("./binary-search"),l=n("./array-set").ArraySet,r=n("./base64-vlq"),q=n("./quick-sort").quickSort;b.fromSourceMap=function(a){return e.fromSourceMap(a)};b.prototype._version=3;b.prototype.__generatedMappings=null;Object.defineProperty(b.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){this.__generatedMappings||this._parseMappings(this._mappings, w=c;return{generatedOffset:{generatedLine:k+1,generatedColumn:g+1},consumer:new b(d.getArg(a,"map"),e)}})}var d=p("./util"),a=p("./binary-search"),l=p("./array-set").ArraySet,r=p("./base64-vlq"),q=p("./quick-sort").quickSort;b.fromSourceMap=function(a){return e.fromSourceMap(a)};b.prototype._version=3;b.prototype.__generatedMappings=null;Object.defineProperty(b.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){this.__generatedMappings||this._parseMappings(this._mappings,
this.sourceRoot);return this.__generatedMappings}});b.prototype.__originalMappings=null;Object.defineProperty(b.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});b.prototype._charIsMappingSeparator=function(a,b){var c=a.charAt(b);return";"===c||","===c};b.prototype._parseMappings=function(a,b){throw Error("Subclasses must implement _parseMappings");};b.GENERATED_ORDER= this.sourceRoot);return this.__generatedMappings}});b.prototype.__originalMappings=null;Object.defineProperty(b.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});b.prototype._charIsMappingSeparator=function(a,b){var c=a.charAt(b);return";"===c||","===c};b.prototype._parseMappings=function(a,b){throw Error("Subclasses must implement _parseMappings");};b.GENERATED_ORDER=
1;b.ORIGINAL_ORDER=2;b.GREATEST_LOWER_BOUND=1;b.LEAST_UPPER_BOUND=2;b.prototype.eachMapping=function(a,e,c){e=e||null;switch(c||b.GENERATED_ORDER){case b.GENERATED_ORDER:c=this._generatedMappings;break;case b.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var k=this.sourceRoot;c.map(function(a){var b=null===a.source?null:this._sources.at(a.source);b=d.computeSourceURL(k,b,this._sourceMapURL);return{source:b,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn, 1;b.ORIGINAL_ORDER=2;b.GREATEST_LOWER_BOUND=1;b.LEAST_UPPER_BOUND=2;b.prototype.eachMapping=function(a,e,c){e=e||null;switch(c||b.GENERATED_ORDER){case b.GENERATED_ORDER:c=this._generatedMappings;break;case b.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var k=this.sourceRoot;c.map(function(a){var b=null===a.source?null:this._sources.at(a.source);b=d.computeSourceURL(k,b,this._sourceMapURL);return{source:b,generatedLine:a.generatedLine,generatedColumn:a.generatedColumn,
originalLine:a.originalLine,originalColumn:a.originalColumn,name:null===a.name?null:this._names.at(a.name)}},this).forEach(a,e)};b.prototype.allGeneratedPositionsFor=function(b){var e=d.getArg(b,"line"),c={source:d.getArg(b,"source"),originalLine:e,originalColumn:d.getArg(b,"column",0)};null!=this.sourceRoot&&(c.source=d.relative(this.sourceRoot,c.source));if(!this._sources.has(c.source))return[];c.source=this._sources.indexOf(c.source);var k=[];c=this._findMapping(c,this._originalMappings,"originalLine", originalLine:a.originalLine,originalColumn:a.originalColumn,name:null===a.name?null:this._names.at(a.name)}},this).forEach(a,e)};b.prototype.allGeneratedPositionsFor=function(b){var e=d.getArg(b,"line"),c={source:d.getArg(b,"source"),originalLine:e,originalColumn:d.getArg(b,"column",0)};null!=this.sourceRoot&&(c.source=d.relative(this.sourceRoot,c.source));if(!this._sources.has(c.source))return[];c.source=this._sources.indexOf(c.source);var k=[];c=this._findMapping(c,this._originalMappings,"originalLine",
"originalColumn",d.compareByOriginalPositions,a.LEAST_UPPER_BOUND);if(0<=c){var g=this._originalMappings[c];if(void 0===b.column)for(e=g.originalLine;g&&g.originalLine===e;)k.push({line:d.getArg(g,"generatedLine",null),column:d.getArg(g,"generatedColumn",null),lastColumn:d.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++c];else for(b=g.originalColumn;g&&g.originalLine===e&&g.originalColumn==b;)k.push({line:d.getArg(g,"generatedLine",null),column:d.getArg(g,"generatedColumn",null), "originalColumn",d.compareByOriginalPositions,a.LEAST_UPPER_BOUND);if(0<=c){var g=this._originalMappings[c];if(void 0===b.column)for(e=g.originalLine;g&&g.originalLine===e;)k.push({line:d.getArg(g,"generatedLine",null),column:d.getArg(g,"generatedColumn",null),lastColumn:d.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++c];else for(b=g.originalColumn;g&&g.originalLine===e&&g.originalColumn==b;)k.push({line:d.getArg(g,"generatedLine",null),column:d.getArg(g,"generatedColumn",null),
lastColumn:d.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++c]}return k};m.SourceMapConsumer=b;e.prototype=Object.create(b.prototype);e.prototype.consumer=b;e.fromSourceMap=function(a,b){var c=Object.create(e.prototype),k=c._names=l.fromArray(a._names.toArray(),!0),w=c._sources=l.fromArray(a._sources.toArray(),!0);c.sourceRoot=a._sourceRoot;c.sourcesContent=a._generateSourcesContent(c._sources.toArray(),c.sourceRoot);c.file=a._file;c._sourceMapURL=b;for(var h=a._mappings.toArray().slice(), lastColumn:d.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++c]}return k};m.SourceMapConsumer=b;e.prototype=Object.create(b.prototype);e.prototype.consumer=b;e.fromSourceMap=function(a,b){var c=Object.create(e.prototype),k=c._names=l.fromArray(a._names.toArray(),!0),w=c._sources=l.fromArray(a._sources.toArray(),!0);c.sourceRoot=a._sourceRoot;c.sourcesContent=a._generateSourcesContent(c._sources.toArray(),c.sourceRoot);c.file=a._file;c._sourceMapURL=b;for(var h=a._mappings.toArray().slice(),
r=c.__generatedMappings=[],m=c.__originalMappings=[],v=0,n=h.length;v<n;v++){var f=h[v],p=new g;p.generatedLine=f.generatedLine;p.generatedColumn=f.generatedColumn;f.source&&(p.source=w.indexOf(f.source),p.originalLine=f.originalLine,p.originalColumn=f.originalColumn,f.name&&(p.name=k.indexOf(f.name)),m.push(p));r.push(p)}q(c.__originalMappings,d.compareByOriginalPositions);return c};e.prototype._version=3;Object.defineProperty(e.prototype,"sources",{get:function(){return this._sources.toArray().map(function(a){return d.computeSourceURL(this.sourceRoot, r=c.__generatedMappings=[],m=c.__originalMappings=[],v=0,p=h.length;v<p;v++){var f=h[v],n=new g;n.generatedLine=f.generatedLine;n.generatedColumn=f.generatedColumn;f.source&&(n.source=w.indexOf(f.source),n.originalLine=f.originalLine,n.originalColumn=f.originalColumn,f.name&&(n.name=k.indexOf(f.name)),m.push(n));r.push(n)}q(c.__originalMappings,d.compareByOriginalPositions);return c};e.prototype._version=3;Object.defineProperty(e.prototype,"sources",{get:function(){return this._sources.toArray().map(function(a){return d.computeSourceURL(this.sourceRoot,
a,this._sourceMapURL)},this)}});e.prototype._parseMappings=function(a,b){for(var c=1,k=0,e=0,l=0,w=0,h=0,m=a.length,v=0,f={},p={},n=[],u=[],y,B,A,E,I;v<m;)if(";"===a.charAt(v))c++,v++,k=0;else if(","===a.charAt(v))v++;else{y=new g;y.generatedLine=c;for(E=v;E<m&&!this._charIsMappingSeparator(a,E);E++);B=a.slice(v,E);if(A=f[B])v+=B.length;else{for(A=[];v<E;)r.decode(a,v,p),I=p.value,v=p.rest,A.push(I);if(2===A.length)throw Error("Found a source, but no line and column");if(3===A.length)throw Error("Found a source and line, but no column"); a,this._sourceMapURL)},this)}});e.prototype._parseMappings=function(a,b){for(var c=1,k=0,e=0,l=0,w=0,h=0,m=a.length,v=0,f={},n={},p=[],u=[],y,B,A,E,I;v<m;)if(";"===a.charAt(v))c++,v++,k=0;else if(","===a.charAt(v))v++;else{y=new g;y.generatedLine=c;for(E=v;E<m&&!this._charIsMappingSeparator(a,E);E++);B=a.slice(v,E);if(A=f[B])v+=B.length;else{for(A=[];v<E;)r.decode(a,v,n),I=n.value,v=n.rest,A.push(I);if(2===A.length)throw Error("Found a source, but no line and column");if(3===A.length)throw Error("Found a source and line, but no column");
f[B]=A}y.generatedColumn=k+A[0];k=y.generatedColumn;1<A.length&&(y.source=w+A[1],w+=A[1],y.originalLine=e+A[2],e=y.originalLine,y.originalLine+=1,y.originalColumn=l+A[3],l=y.originalColumn,4<A.length&&(y.name=h+A[4],h+=A[4]));u.push(y);"number"===typeof y.originalLine&&n.push(y)}q(u,d.compareByGeneratedPositionsDeflated);this.__generatedMappings=u;q(n,d.compareByOriginalPositions);this.__originalMappings=n};e.prototype._findMapping=function(b,d,c,k,e,g){if(0>=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+ f[B]=A}y.generatedColumn=k+A[0];k=y.generatedColumn;1<A.length&&(y.source=w+A[1],w+=A[1],y.originalLine=e+A[2],e=y.originalLine,y.originalLine+=1,y.originalColumn=l+A[3],l=y.originalColumn,4<A.length&&(y.name=h+A[4],h+=A[4]));u.push(y);"number"===typeof y.originalLine&&p.push(y)}q(u,d.compareByGeneratedPositionsDeflated);this.__generatedMappings=u;q(p,d.compareByOriginalPositions);this.__originalMappings=p};e.prototype._findMapping=function(b,d,c,k,e,g){if(0>=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+
b[c]);if(0>b[k])throw new TypeError("Column must be greater than or equal to 0, got "+b[k]);return a.search(b,d,e,g)};e.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var b=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var c=this._generatedMappings[a+1];if(b.generatedLine===c.generatedLine){b.lastGeneratedColumn=c.generatedColumn-1;continue}}b.lastGeneratedColumn=Infinity}};e.prototype.originalPositionFor=function(a){var e={generatedLine:d.getArg(a, b[c]);if(0>b[k])throw new TypeError("Column must be greater than or equal to 0, got "+b[k]);return a.search(b,d,e,g)};e.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var b=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var c=this._generatedMappings[a+1];if(b.generatedLine===c.generatedLine){b.lastGeneratedColumn=c.generatedColumn-1;continue}}b.lastGeneratedColumn=Infinity}};e.prototype.originalPositionFor=function(a){var e={generatedLine:d.getArg(a,
"line"),generatedColumn:d.getArg(a,"column")};a=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",d.compareByGeneratedPositionsDeflated,d.getArg(a,"bias",b.GREATEST_LOWER_BOUND));if(0<=a&&(a=this._generatedMappings[a],a.generatedLine===e.generatedLine)){e=d.getArg(a,"source",null);null!==e&&(e=this._sources.at(e),e=d.computeSourceURL(this.sourceRoot,e,this._sourceMapURL));var c=d.getArg(a,"name",null);null!==c&&(c=this._names.at(c));return{source:e,line:d.getArg(a,"originalLine", "line"),generatedColumn:d.getArg(a,"column")};a=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",d.compareByGeneratedPositionsDeflated,d.getArg(a,"bias",b.GREATEST_LOWER_BOUND));if(0<=a&&(a=this._generatedMappings[a],a.generatedLine===e.generatedLine)){e=d.getArg(a,"source",null);null!==e&&(e=this._sources.at(e),e=d.computeSourceURL(this.sourceRoot,e,this._sourceMapURL));var c=d.getArg(a,"name",null);null!==c&&(c=this._names.at(c));return{source:e,line:d.getArg(a,"originalLine",
null),column:d.getArg(a,"originalColumn",null),name:c}}return{source:null,line:null,column:null,name:null}};e.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return null==a}):!1};e.prototype.sourceContentFor=function(a,b){if(!this.sourcesContent)return null;var c=a;null!=this.sourceRoot&&(c=d.relative(this.sourceRoot,c));if(this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)]; null),column:d.getArg(a,"originalColumn",null),name:c}}return{source:null,line:null,column:null,name:null}};e.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return null==a}):!1};e.prototype.sourceContentFor=function(a,b){if(!this.sourcesContent)return null;var c=a;null!=this.sourceRoot&&(c=d.relative(this.sourceRoot,c));if(this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];
@@ -75,39 +75,39 @@ function(b){var e={generatedLine:d.getArg(b,"line"),generatedColumn:d.getArg(b,"
line:null,column:null,name:null}};h.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})};h.prototype.sourceContentFor=function(a,b){for(var c=0;c<this._sections.length;c++){var d=this._sections[c].consumer.sourceContentFor(a,!0);if(d)return d}if(b)return null;throw Error('"'+a+'" is not in the SourceMap.');};h.prototype.generatedPositionFor=function(a){for(var b=0;b<this._sections.length;b++){var c=this._sections[b];if(-1!== line:null,column:null,name:null}};h.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})};h.prototype.sourceContentFor=function(a,b){for(var c=0;c<this._sections.length;c++){var d=this._sections[c].consumer.sourceContentFor(a,!0);if(d)return d}if(b)return null;throw Error('"'+a+'" is not in the SourceMap.');};h.prototype.generatedPositionFor=function(a){for(var b=0;b<this._sections.length;b++){var c=this._sections[b];if(-1!==
c.consumer.sources.indexOf(d.getArg(a,"source"))){var k=c.consumer.generatedPositionFor(a);if(k)return{line:k.line+(c.generatedOffset.generatedLine-1),column:k.column+(c.generatedOffset.generatedLine===k.line?c.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}};h.prototype._parseMappings=function(a,b){this.__generatedMappings=[];this.__originalMappings=[];for(var c=0;c<this._sections.length;c++)for(var k=this._sections[c],e=k.consumer._generatedMappings,g=0;g<e.length;g++){var l= c.consumer.sources.indexOf(d.getArg(a,"source"))){var k=c.consumer.generatedPositionFor(a);if(k)return{line:k.line+(c.generatedOffset.generatedLine-1),column:k.column+(c.generatedOffset.generatedLine===k.line?c.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}};h.prototype._parseMappings=function(a,b){this.__generatedMappings=[];this.__originalMappings=[];for(var c=0;c<this._sections.length;c++)for(var k=this._sections[c],e=k.consumer._generatedMappings,g=0;g<e.length;g++){var l=
e[g],h=k.consumer._sources.at(l.source);h=d.computeSourceURL(k.consumer.sourceRoot,h,this._sourceMapURL);this._sources.add(h);h=this._sources.indexOf(h);var r=null;l.name&&(r=k.consumer._names.at(l.name),this._names.add(r),r=this._names.indexOf(r));l={source:h,generatedLine:l.generatedLine+(k.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(k.generatedOffset.generatedLine===l.generatedLine?k.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn, e[g],h=k.consumer._sources.at(l.source);h=d.computeSourceURL(k.consumer.sourceRoot,h,this._sourceMapURL);this._sources.add(h);h=this._sources.indexOf(h);var r=null;l.name&&(r=k.consumer._names.at(l.name),this._names.add(r),r=this._names.indexOf(r));l={source:h,generatedLine:l.generatedLine+(k.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(k.generatedOffset.generatedLine===l.generatedLine?k.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,
name:r};this.__generatedMappings.push(l);"number"===typeof l.originalLine&&this.__originalMappings.push(l)}q(this.__generatedMappings,d.compareByGeneratedPositionsDeflated);q(this.__originalMappings,d.compareByOriginalPositions)};m.IndexedSourceMapConsumer=h},{"./array-set":10,"./base64-vlq":11,"./binary-search":13,"./quick-sort":15,"./util":19}],17:[function(n,u,m){function b(a){a||(a={});this._file=g.getArg(a,"file",null);this._sourceRoot=g.getArg(a,"sourceRoot",null);this._skipValidation=g.getArg(a, name:r};this.__generatedMappings.push(l);"number"===typeof l.originalLine&&this.__originalMappings.push(l)}q(this.__generatedMappings,d.compareByGeneratedPositionsDeflated);q(this.__originalMappings,d.compareByOriginalPositions)};m.IndexedSourceMapConsumer=h},{"./array-set":10,"./base64-vlq":11,"./binary-search":13,"./quick-sort":15,"./util":19}],17:[function(p,u,m){function b(a){a||(a={});this._file=g.getArg(a,"file",null);this._sourceRoot=g.getArg(a,"sourceRoot",null);this._skipValidation=g.getArg(a,
"skipValidation",!1);this._sources=new h;this._names=new h;this._mappings=new d;this._sourcesContents=null}var e=n("./base64-vlq"),g=n("./util"),h=n("./array-set").ArraySet,d=n("./mapping-list").MappingList;b.prototype._version=3;b.fromSourceMap=function(a){var d=a.sourceRoot,e=new b({file:a.file,sourceRoot:d});a.eachMapping(function(a){var b={generated:{line:a.generatedLine,column:a.generatedColumn}};null!=a.source&&(b.source=a.source,null!=d&&(b.source=g.relative(d,b.source)),b.original={line:a.originalLine, "skipValidation",!1);this._sources=new h;this._names=new h;this._mappings=new d;this._sourcesContents=null}var e=p("./base64-vlq"),g=p("./util"),h=p("./array-set").ArraySet,d=p("./mapping-list").MappingList;b.prototype._version=3;b.fromSourceMap=function(a){var d=a.sourceRoot,e=new b({file:a.file,sourceRoot:d});a.eachMapping(function(a){var b={generated:{line:a.generatedLine,column:a.generatedColumn}};null!=a.source&&(b.source=a.source,null!=d&&(b.source=g.relative(d,b.source)),b.original={line:a.originalLine,
column:a.originalColumn},null!=a.name&&(b.name=a.name));e.addMapping(b)});a.sources.forEach(function(b){var l=b;null!==d&&(l=g.relative(d,b));e._sources.has(l)||e._sources.add(l);l=a.sourceContentFor(b);null!=l&&e.setSourceContent(b,l)});return e};b.prototype.addMapping=function(a){var b=g.getArg(a,"generated"),d=g.getArg(a,"original",null),e=g.getArg(a,"source",null);a=g.getArg(a,"name",null);this._skipValidation||this._validateMapping(b,d,e,a);null!=e&&(e=String(e),this._sources.has(e)||this._sources.add(e)); column:a.originalColumn},null!=a.name&&(b.name=a.name));e.addMapping(b)});a.sources.forEach(function(b){var l=b;null!==d&&(l=g.relative(d,b));e._sources.has(l)||e._sources.add(l);l=a.sourceContentFor(b);null!=l&&e.setSourceContent(b,l)});return e};b.prototype.addMapping=function(a){var b=g.getArg(a,"generated"),d=g.getArg(a,"original",null),e=g.getArg(a,"source",null);a=g.getArg(a,"name",null);this._skipValidation||this._validateMapping(b,d,e,a);null!=e&&(e=String(e),this._sources.has(e)||this._sources.add(e));
null!=a&&(a=String(a),this._names.has(a)||this._names.add(a));this._mappings.add({generatedLine:b.line,generatedColumn:b.column,originalLine:null!=d&&d.line,originalColumn:null!=d&&d.column,source:e,name:a})};b.prototype.setSourceContent=function(a,b){var d=a;null!=this._sourceRoot&&(d=g.relative(this._sourceRoot,d));null!=b?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[g.toSetString(d)]=b):this._sourcesContents&&(delete this._sourcesContents[g.toSetString(d)], null!=a&&(a=String(a),this._names.has(a)||this._names.add(a));this._mappings.add({generatedLine:b.line,generatedColumn:b.column,originalLine:null!=d&&d.line,originalColumn:null!=d&&d.column,source:e,name:a})};b.prototype.setSourceContent=function(a,b){var d=a;null!=this._sourceRoot&&(d=g.relative(this._sourceRoot,d));null!=b?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[g.toSetString(d)]=b):this._sourcesContents&&(delete this._sourcesContents[g.toSetString(d)],
0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};b.prototype.applySourceMap=function(a,b,d){var e=b;if(null==b){if(null==a.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');e=a.file}var l=this._sourceRoot;null!=l&&(e=g.relative(l,e));var m=new h,c=new h;this._mappings.unsortedForEach(function(b){if(b.source===e&&null!=b.originalLine){var k=a.originalPositionFor({line:b.originalLine, 0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};b.prototype.applySourceMap=function(a,b,d){var e=b;if(null==b){if(null==a.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');e=a.file}var l=this._sourceRoot;null!=l&&(e=g.relative(l,e));var m=new h,c=new h;this._mappings.unsortedForEach(function(b){if(b.source===e&&null!=b.originalLine){var k=a.originalPositionFor({line:b.originalLine,
column:b.originalColumn});null!=k.source&&(b.source=k.source,null!=d&&(b.source=g.join(d,b.source)),null!=l&&(b.source=g.relative(l,b.source)),b.originalLine=k.line,b.originalColumn=k.column,null!=k.name&&(b.name=k.name))}k=b.source;null==k||m.has(k)||m.add(k);b=b.name;null==b||c.has(b)||c.add(b)},this);this._sources=m;this._names=c;a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=d&&(b=g.join(d,b)),null!=l&&(b=g.relative(l,b)),this.setSourceContent(b,c))},this)};b.prototype._validateMapping= column:b.originalColumn});null!=k.source&&(b.source=k.source,null!=d&&(b.source=g.join(d,b.source)),null!=l&&(b.source=g.relative(l,b.source)),b.originalLine=k.line,b.originalColumn=k.column,null!=k.name&&(b.name=k.name))}k=b.source;null==k||m.has(k)||m.add(k);b=b.name;null==b||c.has(b)||c.add(b)},this);this._sources=m;this._names=c;a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=d&&(b=g.join(d,b)),null!=l&&(b=g.relative(l,b)),this.setSourceContent(b,c))},this)};b.prototype._validateMapping=
function(a,b,d,e){if(b&&"number"!==typeof b.line&&"number"!==typeof b.column)throw 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(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&!b&&!d&&!e||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&& function(a,b,d,e){if(b&&"number"!==typeof b.line&&"number"!==typeof b.column)throw 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(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&!b&&!d&&!e||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&&
d))throw Error("Invalid mapping: "+JSON.stringify({generated:a,source:d,original:b,name:e}));};b.prototype._serializeMappings=function(){for(var a=0,b=1,d=0,h=0,m=0,n=0,c="",k,x,z,F=this._mappings.toArray(),D=0,t=F.length;D<t;D++){x=F[D];k="";if(x.generatedLine!==b)for(a=0;x.generatedLine!==b;)k+=";",b++;else if(0<D){if(!g.compareByGeneratedPositionsInflated(x,F[D-1]))continue;k+=","}k+=e.encode(x.generatedColumn-a);a=x.generatedColumn;null!=x.source&&(z=this._sources.indexOf(x.source),k+=e.encode(z- d))throw Error("Invalid mapping: "+JSON.stringify({generated:a,source:d,original:b,name:e}));};b.prototype._serializeMappings=function(){for(var a=0,b=1,d=0,h=0,m=0,p=0,c="",k,x,z,F=this._mappings.toArray(),D=0,t=F.length;D<t;D++){x=F[D];k="";if(x.generatedLine!==b)for(a=0;x.generatedLine!==b;)k+=";",b++;else if(0<D){if(!g.compareByGeneratedPositionsInflated(x,F[D-1]))continue;k+=","}k+=e.encode(x.generatedColumn-a);a=x.generatedColumn;null!=x.source&&(z=this._sources.indexOf(x.source),k+=e.encode(z-
n),n=z,k+=e.encode(x.originalLine-1-h),h=x.originalLine-1,k+=e.encode(x.originalColumn-d),d=x.originalColumn,null!=x.name&&(x=this._names.indexOf(x.name),k+=e.encode(x-m),m=x));c+=k}return c};b.prototype._generateSourcesContent=function(a,b){return a.map(function(a){if(!this._sourcesContents)return null;null!=b&&(a=g.relative(b,a));a=g.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,a)?this._sourcesContents[a]:null},this)};b.prototype.toJSON=function(){var a={version:this._version, p),p=z,k+=e.encode(x.originalLine-1-h),h=x.originalLine-1,k+=e.encode(x.originalColumn-d),d=x.originalColumn,null!=x.name&&(x=this._names.indexOf(x.name),k+=e.encode(x-m),m=x));c+=k}return c};b.prototype._generateSourcesContent=function(a,b){return a.map(function(a){if(!this._sourcesContents)return null;null!=b&&(a=g.relative(b,a));a=g.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,a)?this._sourcesContents[a]:null},this)};b.prototype.toJSON=function(){var a={version:this._version,
sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};null!=this._file&&(a.file=this._file);null!=this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot));return a};b.prototype.toString=function(){return JSON.stringify(this.toJSON())};m.SourceMapGenerator=b},{"./array-set":10,"./base64-vlq":11,"./mapping-list":14,"./util":19}],18:[function(n,u,m){function b(b,a,e,g,h){this.children= sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};null!=this._file&&(a.file=this._file);null!=this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot));return a};b.prototype.toString=function(){return JSON.stringify(this.toJSON())};m.SourceMapGenerator=b},{"./array-set":10,"./base64-vlq":11,"./mapping-list":14,"./util":19}],18:[function(p,u,m){function b(b,a,e,g,h){this.children=
[];this.sourceContents={};this.line=null==b?null:b;this.column=null==a?null:a;this.source=null==e?null:e;this.name=null==h?null:h;this.$$$isSourceNode$$$=!0;null!=g&&this.add(g)}var e=n("./source-map-generator").SourceMapGenerator,g=n("./util"),h=/(\r?\n)/;b.fromStringWithSourceMap=function(d,a,e){function l(a,c){if(null===a||void 0===a.source)m.add(c);else{var d=e?g.join(e,a.source):a.source;m.add(new b(a.originalLine,a.originalColumn,d,c,a.name))}}var m=new b,n=d.split(h),v=0,c=function(){var a= [];this.sourceContents={};this.line=null==b?null:b;this.column=null==a?null:a;this.source=null==e?null:e;this.name=null==h?null:h;this.$$$isSourceNode$$$=!0;null!=g&&this.add(g)}var e=p("./source-map-generator").SourceMapGenerator,g=p("./util"),h=/(\r?\n)/;b.fromStringWithSourceMap=function(d,a,e){function l(a,c){if(null===a||void 0===a.source)m.add(c);else{var d=e?g.join(e,a.source):a.source;m.add(new b(a.originalLine,a.originalColumn,d,c,a.name))}}var m=new b,p=d.split(h),v=0,c=function(){var a=
v<n.length?n[v++]:void 0,b=(v<n.length?n[v++]:void 0)||"";return a+b},k=1,x=0,z=null;a.eachMapping(function(a){if(null!==z)if(k<a.generatedLine)l(z,c()),k++,x=0;else{var b=n[v]||"",d=b.substr(0,a.generatedColumn-x);n[v]=b.substr(a.generatedColumn-x);x=a.generatedColumn;l(z,d);z=a;return}for(;k<a.generatedLine;)m.add(c()),k++;x<a.generatedColumn&&(b=n[v]||"",m.add(b.substr(0,a.generatedColumn)),n[v]=b.substr(a.generatedColumn),x=a.generatedColumn);z=a},this);v<n.length&&(z&&l(z,c()),m.add(n.splice(v).join(""))); v<p.length?p[v++]:void 0,b=(v<p.length?p[v++]:void 0)||"";return a+b},k=1,x=0,z=null;a.eachMapping(function(a){if(null!==z)if(k<a.generatedLine)l(z,c()),k++,x=0;else{var b=p[v]||"",d=b.substr(0,a.generatedColumn-x);p[v]=b.substr(a.generatedColumn-x);x=a.generatedColumn;l(z,d);z=a;return}for(;k<a.generatedLine;)m.add(c()),k++;x<a.generatedColumn&&(b=p[v]||"",m.add(b.substr(0,a.generatedColumn)),p[v]=b.substr(a.generatedColumn),x=a.generatedColumn);z=a},this);v<p.length&&(z&&l(z,c()),m.add(p.splice(v).join("")));
a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=e&&(b=g.join(e,b)),m.setSourceContent(b,c))});return m};b.prototype.add=function(b){if(Array.isArray(b))b.forEach(function(a){this.add(a)},this);else if(b.$$$isSourceNode$$$||"string"===typeof b)b&&this.children.push(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+b);return this};b.prototype.prepend=function(b){if(Array.isArray(b))for(var a=b.length-1;0<=a;a--)this.prepend(b[a]); a.sources.forEach(function(b){var c=a.sourceContentFor(b);null!=c&&(null!=e&&(b=g.join(e,b)),m.setSourceContent(b,c))});return m};b.prototype.add=function(b){if(Array.isArray(b))b.forEach(function(a){this.add(a)},this);else if(b.$$$isSourceNode$$$||"string"===typeof b)b&&this.children.push(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+b);return this};b.prototype.prepend=function(b){if(Array.isArray(b))for(var a=b.length-1;0<=a;a--)this.prepend(b[a]);
else if(b.$$$isSourceNode$$$||"string"===typeof b)this.children.unshift(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+b);return this};b.prototype.walk=function(b){for(var a,d=0,e=this.children.length;d<e;d++)a=this.children[d],a.$$$isSourceNode$$$?a.walk(b):""!==a&&b(a,{source:this.source,line:this.line,column:this.column,name:this.name})};b.prototype.join=function(b){var a,d=this.children.length;if(0<d){var e=[];for(a=0;a<d-1;a++)e.push(this.children[a]), else if(b.$$$isSourceNode$$$||"string"===typeof b)this.children.unshift(b);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+b);return this};b.prototype.walk=function(b){for(var a,d=0,e=this.children.length;d<e;d++)a=this.children[d],a.$$$isSourceNode$$$?a.walk(b):""!==a&&b(a,{source:this.source,line:this.line,column:this.column,name:this.name})};b.prototype.join=function(b){var a,d=this.children.length;if(0<d){var e=[];for(a=0;a<d-1;a++)e.push(this.children[a]),
e.push(b);e.push(this.children[a]);this.children=e}return this};b.prototype.replaceRight=function(b,a){var d=this.children[this.children.length-1];d.$$$isSourceNode$$$?d.replaceRight(b,a):"string"===typeof d?this.children[this.children.length-1]=d.replace(b,a):this.children.push("".replace(b,a));return this};b.prototype.setSourceContent=function(b,a){this.sourceContents[g.toSetString(b)]=a};b.prototype.walkSourceContents=function(b){for(var a=0,d=this.children.length;a<d;a++)this.children[a].$$$isSourceNode$$$&& e.push(b);e.push(this.children[a]);this.children=e}return this};b.prototype.replaceRight=function(b,a){var d=this.children[this.children.length-1];d.$$$isSourceNode$$$?d.replaceRight(b,a):"string"===typeof d?this.children[this.children.length-1]=d.replace(b,a):this.children.push("".replace(b,a));return this};b.prototype.setSourceContent=function(b,a){this.sourceContents[g.toSetString(b)]=a};b.prototype.walkSourceContents=function(b){for(var a=0,d=this.children.length;a<d;a++)this.children[a].$$$isSourceNode$$$&&
this.children[a].walkSourceContents(b);var e=Object.keys(this.sourceContents);a=0;for(d=e.length;a<d;a++)b(g.fromSetString(e[a]),this.sourceContents[e[a]])};b.prototype.toString=function(){var b="";this.walk(function(a){b+=a});return b};b.prototype.toStringWithSourceMap=function(b){var a="",d=1,g=0,h=new e(b),m=!1,n=null,c=null,k=null,x=null;this.walk(function(b,e){a+=b;null!==e.source&&null!==e.line&&null!==e.column?(n===e.source&&c===e.line&&k===e.column&&x===e.name||h.addMapping({source:e.source, this.children[a].walkSourceContents(b);var e=Object.keys(this.sourceContents);a=0;for(d=e.length;a<d;a++)b(g.fromSetString(e[a]),this.sourceContents[e[a]])};b.prototype.toString=function(){var b="";this.walk(function(a){b+=a});return b};b.prototype.toStringWithSourceMap=function(b){var a="",d=1,g=0,h=new e(b),m=!1,p=null,c=null,k=null,x=null;this.walk(function(b,e){a+=b;null!==e.source&&null!==e.line&&null!==e.column?(p===e.source&&c===e.line&&k===e.column&&x===e.name||h.addMapping({source:e.source,
original:{line:e.line,column:e.column},generated:{line:d,column:g},name:e.name}),n=e.source,c=e.line,k=e.column,x=e.name,m=!0):m&&(h.addMapping({generated:{line:d,column:g}}),n=null,m=!1);for(var l=0,z=b.length;l<z;l++)10===b.charCodeAt(l)?(d++,g=0,l+1===z?(n=null,m=!1):m&&h.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:d,column:g},name:e.name})):g++});this.walkSourceContents(function(a,b){h.setSourceContent(a,b)});return{code:a,map:h}};m.SourceNode=b},{"./source-map-generator":17, original:{line:e.line,column:e.column},generated:{line:d,column:g},name:e.name}),p=e.source,c=e.line,k=e.column,x=e.name,m=!0):m&&(h.addMapping({generated:{line:d,column:g}}),p=null,m=!1);for(var l=0,z=b.length;l<z;l++)10===b.charCodeAt(l)?(d++,g=0,l+1===z?(p=null,m=!1):m&&h.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:d,column:g},name:e.name})):g++});this.walkSourceContents(function(a,b){h.setSourceContent(a,b)});return{code:a,map:h}};m.SourceNode=b},{"./source-map-generator":17,
"./util":19}],19:[function(n,u,m){function b(a){return(a=a.match(w))?{scheme:a[1],auth:a[2],host:a[3],port:a[4],path:a[5]}:null}function e(a){var b="";a.scheme&&(b+=a.scheme+":");b+="//";a.auth&&(b+=a.auth+"@");a.host&&(b+=a.host);a.port&&(b+=":"+a.port);a.path&&(b+=a.path);return b}function g(a){var c=a,d=b(a);if(d){if(!d.path)return a;c=d.path}a=m.isAbsolute(c);c=c.split(/\/+/);for(var g,h=0,l=c.length-1;0<=l;l--)g=c[l],"."===g?c.splice(l,1):".."===g?h++:0<h&&(""===g?(c.splice(l+1,h),h=0):(c.splice(l, "./util":19}],19:[function(p,u,m){function b(a){return(a=a.match(w))?{scheme:a[1],auth:a[2],host:a[3],port:a[4],path:a[5]}:null}function e(a){var b="";a.scheme&&(b+=a.scheme+":");b+="//";a.auth&&(b+=a.auth+"@");a.host&&(b+=a.host);a.port&&(b+=":"+a.port);a.path&&(b+=a.path);return b}function g(a){var c=a,d=b(a);if(d){if(!d.path)return a;c=d.path}a=m.isAbsolute(c);c=c.split(/\/+/);for(var g,h=0,l=c.length-1;0<=l;l--)g=c[l],"."===g?c.splice(l,1):".."===g?h++:0<h&&(""===g?(c.splice(l+1,h),h=0):(c.splice(l,
2),h--));c=c.join("/");""===c&&(c=a?"/":".");return d?(d.path=c,e(d)):c}function h(a,d){""===a&&(a=".");""===d&&(d=".");var c=b(d),k=b(a);k&&(a=k.path||"/");if(c&&!c.scheme)return k&&(c.scheme=k.scheme),e(c);if(c||d.match(v))return d;if(k&&!k.host&&!k.path)return k.host=d,e(k);c="/"===d.charAt(0)?d:g(a.replace(/\/+$/,"")+"/"+d);return k?(k.path=c,e(k)):c}function d(a){return a}function a(a){return r(a)?"$"+a:a}function l(a){return r(a)?a.slice(1):a}function r(a){if(!a)return!1;var b=a.length;if(9> 2),h--));c=c.join("/");""===c&&(c=a?"/":".");return d?(d.path=c,e(d)):c}function h(a,d){""===a&&(a=".");""===d&&(d=".");var c=b(d),k=b(a);k&&(a=k.path||"/");if(c&&!c.scheme)return k&&(c.scheme=k.scheme),e(c);if(c||d.match(v))return d;if(k&&!k.host&&!k.path)return k.host=d,e(k);c="/"===d.charAt(0)?d:g(a.replace(/\/+$/,"")+"/"+d);return k?(k.path=c,e(k)):c}function d(a){return a}function a(a){return r(a)?"$"+a:a}function l(a){return r(a)?a.slice(1):a}function r(a){if(!a)return!1;var b=a.length;if(9>
b||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b-9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}function q(a,b){return a===b?0:null===a?1:null===b?-1:a>b?1:-1}m.getArg=function(a,b,d){if(b in a)return a[b];if(3===arguments.length)return d;throw Error('"'+b+'" is a required argument.');};var w=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, b||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b-9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}function q(a,b){return a===b?0:null===a?1:null===b?-1:a>b?1:-1}m.getArg=function(a,b,d){if(b in a)return a[b];if(3===arguments.length)return d;throw Error('"'+b+'" is a required argument.');};var w=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,
v=/^data:.+,.+$/;m.urlParse=b;m.urlGenerate=e;m.normalize=g;m.join=h;m.isAbsolute=function(a){return"/"===a.charAt(0)||w.test(a)};m.relative=function(a,b){""===a&&(a=".");a=a.replace(/\/$/,"");for(var c=0;0!==b.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return b;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return b;++c}return Array(c+1).join("../")+b.substr(a.length+1)};n=!("__proto__"in Object.create(null));m.toSetString=n?d:a;m.fromSetString=n?d:l;m.compareByOriginalPositions=function(a, v=/^data:.+,.+$/;m.urlParse=b;m.urlGenerate=e;m.normalize=g;m.join=h;m.isAbsolute=function(a){return"/"===a.charAt(0)||w.test(a)};m.relative=function(a,b){""===a&&(a=".");a=a.replace(/\/$/,"");for(var c=0;0!==b.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return b;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return b;++c}return Array(c+1).join("../")+b.substr(a.length+1)};p=!("__proto__"in Object.create(null));m.toSetString=p?d:a;m.fromSetString=p?d:l;m.compareByOriginalPositions=function(a,
b,d){var c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;if(0!==c||d)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=a.generatedLine-b.generatedLine;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsDeflated=function(a,b,d){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c||d)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine- b,d){var c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;if(0!==c||d)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=a.generatedLine-b.generatedLine;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsDeflated=function(a,b,d){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c||d)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-
b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsInflated=function(a,b){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.parseSourceMapInput=function(a){return JSON.parse(a.replace(/^\)]}'[^\n]*\n/, b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsInflated=function(a,b){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.parseSourceMapInput=function(a){return JSON.parse(a.replace(/^\)]}'[^\n]*\n/,
""))};m.computeSourceURL=function(a,d,l){d=d||"";a&&("/"!==a[a.length-1]&&"/"!==d[0]&&(a+="/"),d=a+d);if(l){a=b(l);if(!a)throw Error("sourceMapURL could not be parsed");a.path&&(l=a.path.lastIndexOf("/"),0<=l&&(a.path=a.path.substring(0,l+1)));d=h(e(a),d)}return g(d)}},{}],20:[function(n,u,m){m.SourceMapGenerator=n("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=n("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=n("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, ""))};m.computeSourceURL=function(a,d,l){d=d||"";a&&("/"!==a[a.length-1]&&"/"!==d[0]&&(a+="/"),d=a+d);if(l){a=b(l);if(!a)throw Error("sourceMapURL could not be parsed");a.path&&(l=a.path.lastIndexOf("/"),0<=l&&(a.path=a.path.substring(0,l+1)));d=h(e(a),d)}return g(d)}},{}],20:[function(p,u,m){m.SourceMapGenerator=p("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=p("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=p("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16,
"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(n,u,m){(function(b){function e(){return"browser"===f?!0:"node"===f?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function g(a){return function(b){for(var c=0;c<a.length;c++){var d=a[c](b);if(d)return d}return null}}function h(a,b){if(!a)return b;var c=x.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c);d=d?d[0]:"";var e=c.slice(d.length); "./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(p,u,m){(function(b){function e(){return"browser"===f?!0:"node"===f?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function g(a){return function(b){for(var c=0;c<a.length;c++){var d=a[c](b);if(d)return d}return null}}function h(a,b){if(!a)return b;var c=x.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c);d=d?d[0]:"";var e=c.slice(d.length);
return d&&/^\/\w:/.test(e)?(d+="/",d+x.resolve(c.slice(d.length),b).replace(/\\/g,"/")):d+x.resolve(c.slice(d.length),b)}function d(a){var b=C[a.source];if(!b){var c=E(a.source);c?(b=C[a.source]={url:c.url,map:new k(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var d=b.map.sourcesContent[c];if(d){var e=h(b.url,a);p[e]=d}})):b=C[a.source]={url:null,map:null}}return b&&b.map&&"function"===typeof b.map.originalPositionFor&&(c=b.map.originalPositionFor(a),null!==c.source)?(c.source= return d&&/^\/\w:/.test(e)?(d+="/",d+x.resolve(c.slice(d.length),b).replace(/\\/g,"/")):d+x.resolve(c.slice(d.length),b)}function d(a){var b=C[a.source];if(!b){var c=E(a.source);c?(b=C[a.source]={url:c.url,map:new k(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var d=b.map.sourcesContent[c];if(d){var e=h(b.url,a);n[e]=d}})):b=C[a.source]={url:null,map:null}}return b&&b.map&&"function"===typeof b.map.originalPositionFor&&(c=b.map.originalPositionFor(a),null!==c.source)?(c.source=
h(b.url,c.source),c):a}function a(b){var c=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(b);return c?(b=d({source:c[2],line:+c[3],column:c[4]-1}),"eval at "+c[1]+" ("+b.source+":"+b.line+":"+(b.column+1)+")"):(c=/^eval at ([^(]+) \((.+)\)$/.exec(b))?"eval at "+c[1]+" ("+a(c[2])+")":b}function l(){var a="";if(this.isNative())a="native";else{var b=this.getScriptNameOrSourceURL();!b&&this.isEval()&&(a=this.getEvalOrigin(),a+=", ");a=b?a+b:a+"<anonymous>";b=this.getLineNumber();null!=b&&(a+=":"+b,(b= h(b.url,c.source),c):a}function a(b){var c=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(b);return c?(b=d({source:c[2],line:+c[3],column:c[4]-1}),"eval at "+c[1]+" ("+b.source+":"+b.line+":"+(b.column+1)+")"):(c=/^eval at ([^(]+) \((.+)\)$/.exec(b))?"eval at "+c[1]+" ("+a(c[2])+")":b}function l(){var a="";if(this.isNative())a="native";else{var b=this.getScriptNameOrSourceURL();!b&&this.isEval()&&(a=this.getEvalOrigin(),a+=", ");a=b?a+b:a+"<anonymous>";b=this.getLineNumber();null!=b&&(a+=":"+b,(b=
this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||"<anonymous>"):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"<anonymous>")}d&&(b+=" ("+a+")");return b}function r(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]= this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||"<anonymous>"):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"<anonymous>")}d&&(b+=" ("+a+")");return b}function r(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=
/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=l;return b}function q(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var f=b.getLineNumber(),g=b.getColumnNumber()-1;1===f&&62<g&&!e()&&!b.isEval()&&(g-=62);var h=d({source:c,line:f,column:g});b=r(b);var k=b.getFunctionName;b.getFunctionName=function(){return h.name||k()};b.getFileName=function(){return h.source};b.getLineNumber=function(){return h.line};b.getColumnNumber=function(){return h.column+ /^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=l;return b}function q(c,f){void 0===f&&(f={nextPosition:null,curPosition:null});if(c.isNative())return f.curPosition=null,c;var g=c.getFileName()||c.getScriptNameOrSourceURL();if(g){var h=c.getLineNumber(),k=c.getColumnNumber()-1,l=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test(b.version)?0:62;1===h&&k>l&&!e()&&!c.isEval()&&(k-=l);var m=d({source:g,line:h,column:k});f.curPosition=m;c=r(c);var p=
1};b.getScriptNameOrSourceURL=function(){return h.source};return b}var l=b.isEval()&&b.getEvalOrigin();l&&(l=a(l),b=r(b),b.getEvalOrigin=function(){return l});return b}function w(a,b){H&&(p={},C={});return(a.name||"Error")+": "+(a.message||"")+b.map(function(a){return"\n at "+q(a)}).join("")}function v(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=p[a];if(!d&&u&&u.existsSync(a))try{d=u.readFileSync(a,"utf8")}catch(N){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c- c.getFunctionName;c.getFunctionName=function(){return null==f.nextPosition?p():f.nextPosition.name||p()};c.getFileName=function(){return m.source};c.getLineNumber=function(){return m.line};c.getColumnNumber=function(){return m.column+1};c.getScriptNameOrSourceURL=function(){return m.source};return c}var n=c.isEval()&&c.getEvalOrigin();n&&(n=a(n),c=r(c),c.getEvalOrigin=function(){return n});return c}function w(a,b){H&&(n={},C={});for(var c=(a.name||"Error")+": "+(a.message||""),d={nextPosition:null,
1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function c(){var a=b.emit;b.emit=function(c){if("uncaughtException"===c){var d=arguments[1]&&arguments[1].stack,e=0<this.listeners(c).length;if(d&&!e){d=arguments[1];e=v(d);b.stderr._handle&&b.stderr._handle.setBlocking&&b.stderr._handle.setBlocking(!0);e&&(console.error(),console.error(e));console.error(d.stack);b.exit(1);return}}return a.apply(this,arguments)}}var k=n("source-map").SourceMapConsumer,x=n("path");try{var u=n("fs"); curPosition:null},e=[],f=b.length-1;0<=f;f--)e.push("\n at "+q(b[f],d)),d.nextPosition=d.curPosition;d.curPosition=d.nextPosition=null;return c+e.reverse().join("")}function v(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=n[a];if(!d&&u&&u.existsSync(a))try{d=u.readFileSync(a,"utf8")}catch(N){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function c(){var a=b.emit;b.emit=function(c){if("uncaughtException"===
u.existsSync&&u.readFileSync||(u=null)}catch(M){}var F=n("buffer-from"),D=!1,t=!1,H=!1,f="auto",p={},C={},G=/^data:application\/json[^,]+base64,/,y=[],B=[],A=g(y);y.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in p)return p[a];var b="";try{if(u)u.existsSync(a)&&(b=u.readFileSync(a,"utf8"));else{var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);4===c.readyState&&200===c.status&&(b=c.responseText)}}catch(K){}return p[a]= c){var d=arguments[1]&&arguments[1].stack,e=0<this.listeners(c).length;if(d&&!e){d=arguments[1];e=v(d);b.stderr._handle&&b.stderr._handle.setBlocking&&b.stderr._handle.setBlocking(!0);e&&(console.error(),console.error(e));console.error(d.stack);b.exit(1);return}}return a.apply(this,arguments)}}var k=p("source-map").SourceMapConsumer,x=p("path");try{var u=p("fs");u.existsSync&&u.readFileSync||(u=null)}catch(M){}var F=p("buffer-from"),D=!1,t=!1,H=!1,f="auto",n={},C={},G=/^data:application\/json[^,]+base64,/,
b});var E=g(B);B.push(function(a){a:{if(e())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap");if(c){var d=c;break a}}catch(O){}d=A(a);b=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;for(var f;c=b.exec(d);)f=c;d=f?f[1]:null}if(!d)return null;G.test(d)?(f=d.slice(d.indexOf(",")+1),f=F(f,"base64").toString(),d=a):(d=h(a,d),f=A(d));return f? y=[],B=[],A=g(y);y.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in n)return n[a];var b="";try{if(u)u.existsSync(a)&&(b=u.readFileSync(a,"utf8"));else{var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);4===c.readyState&&200===c.status&&(b=c.responseText)}}catch(K){}return n[a]=b});var E=g(B);B.push(function(a){a:{if(e())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap");
{url:d,map:f}:null});var I=y.slice(0),L=B.slice(0);m.wrapCallSite=q;m.getErrorSource=v;m.mapSourcePosition=d;m.retrieveSourceMap=E;m.install=function(a){a=a||{};if(a.environment&&(f=a.environment,-1===["node","browser","auto"].indexOf(f)))throw Error("environment "+f+" was unknown. Available options are {auto, browser, node}");a.retrieveFile&&(a.overrideRetrieveFile&&(y.length=0),y.unshift(a.retrieveFile));a.retrieveSourceMap&&(a.overrideRetrieveSourceMap&&(B.length=0),B.unshift(a.retrieveSourceMap)); if(c){var d=c;break a}}catch(O){}d=A(a);b=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;for(var f;c=b.exec(d);)f=c;d=f?f[1]:null}if(!d)return null;G.test(d)?(f=d.slice(d.indexOf(",")+1),f=F(f,"base64").toString(),d=a):(d=h(a,d),f=A(d));return f?{url:d,map:f}:null});var I=y.slice(0),L=B.slice(0);m.wrapCallSite=q;m.getErrorSource=v;m.mapSourcePosition=d;m.retrieveSourceMap=E;m.install=function(a){a=a||{};if(a.environment&&(f=
if(a.hookRequire&&!e()){try{var d=n("module")}catch(K){}var g=d.prototype._compile;g.__sourceMapSupport||(d.prototype._compile=function(a,b){p[b]=a;C[b]=void 0;return g.call(this,a,b)},d.prototype._compile.__sourceMapSupport=!0)}H||(H="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);D||(D=!0,Error.prepareStackTrace=w);!t&&("handleUncaughtExceptions"in a?a.handleUncaughtExceptions:1)&&"object"===typeof b&&null!==b&&"function"===typeof b.on&&(t=!0,c())};m.resetRetrieveHandlers=function(){y.length= a.environment,-1===["node","browser","auto"].indexOf(f)))throw Error("environment "+f+" was unknown. Available options are {auto, browser, node}");a.retrieveFile&&(a.overrideRetrieveFile&&(y.length=0),y.unshift(a.retrieveFile));a.retrieveSourceMap&&(a.overrideRetrieveSourceMap&&(B.length=0),B.unshift(a.retrieveSourceMap));if(a.hookRequire&&!e()){try{var d=p("module")}catch(K){}var g=d.prototype._compile;g.__sourceMapSupport||(d.prototype._compile=function(a,b){n[b]=a;C[b]=void 0;return g.call(this,
0;B.length=0;y=I.slice(0);B=L.slice(0);E=g(B);A=g(y)}}).call(this,n("g5I+bs"))},{"buffer-from":4,fs:3,"g5I+bs":9,module:3,path:8,"source-map":20}]},{},[1]);return G}); a,b)},d.prototype._compile.__sourceMapSupport=!0)}H||(H="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);D||(D=!0,Error.prepareStackTrace=w);!t&&("handleUncaughtExceptions"in a?a.handleUncaughtExceptions:1)&&"object"===typeof b&&null!==b&&"function"===typeof b.on&&(t=!0,c())};m.resetRetrieveHandlers=function(){y.length=0;B.length=0;y=I.slice(0);B=L.slice(0);E=g(B);A=g(y)}}).call(this,p("g5I+bs"))},{"buffer-from":4,fs:3,"g5I+bs":9,module:3,path:8,"source-map":20}]},{},[1]);return G});

View File

@@ -1,27 +1,27 @@
{ {
"_from": "source-map-support@~0.5.10", "_from": "source-map-support@~0.5.12",
"_id": "source-map-support@0.5.12", "_id": "source-map-support@0.5.16",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "_integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
"_location": "/source-map-support", "_location": "/source-map-support",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "source-map-support@~0.5.10", "raw": "source-map-support@~0.5.12",
"name": "source-map-support", "name": "source-map-support",
"escapedName": "source-map-support", "escapedName": "source-map-support",
"rawSpec": "~0.5.10", "rawSpec": "~0.5.12",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "~0.5.10" "fetchSpec": "~0.5.12"
}, },
"_requiredBy": [ "_requiredBy": [
"/terser" "/terser"
], ],
"_resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", "_resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
"_shasum": "b4f3b10d51857a5af0138d3ce8003b201613d599", "_shasum": "0ae069e7fe3ba7538c64c98515e35339eac5a042",
"_spec": "source-map-support@~0.5.10", "_spec": "source-map-support@~0.5.12",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\terser", "_where": "/home/s2/Code/minifyfromhtml/node_modules/terser",
"bugs": { "bugs": {
"url": "https://github.com/evanw/node-source-map-support/issues" "url": "https://github.com/evanw/node-source-map-support/issues"
}, },
@@ -53,5 +53,5 @@
"serve-tests": "http-server -p 1336", "serve-tests": "http-server -p 1336",
"test": "mocha" "test": "mocha"
}, },
"version": "0.5.12" "version": "0.5.16"
} }

View File

@@ -137,7 +137,7 @@ function retrieveSourceMapURL(source) {
// Get the URL of the source map // Get the URL of the source map
fileData = retrieveFile(source); fileData = retrieveFile(source);
var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg; var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
// Keep executing the search to find the *last* sourceMappingURL to avoid // Keep executing the search to find the *last* sourceMappingURL to avoid
// picking up sourceMappingURLs from comments, strings, etc. // picking up sourceMappingURLs from comments, strings, etc.
var lastMatch, match; var lastMatch, match;
@@ -335,8 +335,13 @@ function cloneCallSite(frame) {
return object; return object;
} }
function wrapCallSite(frame) { function wrapCallSite(frame, state) {
// provides interface backward compatibility
if (state === undefined) {
state = { nextPosition: null, curPosition: null }
}
if(frame.isNative()) { if(frame.isNative()) {
state.curPosition = null;
return frame; return frame;
} }
@@ -350,7 +355,11 @@ function wrapCallSite(frame) {
// Fix position in Node where some (internal) code is prepended. // Fix position in Node where some (internal) code is prepended.
// See https://github.com/evanw/node-source-map-support/issues/36 // See https://github.com/evanw/node-source-map-support/issues/36
var headerLength = 62; // Header removed in node at ^10.16 || >=11.11.0
// v11 is not an LTS candidate, we can just test the one version with it.
// Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
var headerLength = noHeader.test(process.version) ? 0 : 62;
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
column -= headerLength; column -= headerLength;
} }
@@ -360,9 +369,15 @@ function wrapCallSite(frame) {
line: line, line: line,
column: column column: column
}); });
state.curPosition = position;
frame = cloneCallSite(frame); frame = cloneCallSite(frame);
var originalFunctionName = frame.getFunctionName; var originalFunctionName = frame.getFunctionName;
frame.getFunctionName = function() { return position.name || originalFunctionName(); }; frame.getFunctionName = function() {
if (state.nextPosition == null) {
return originalFunctionName();
}
return state.nextPosition.name || originalFunctionName();
};
frame.getFileName = function() { return position.source; }; frame.getFileName = function() { return position.source; };
frame.getLineNumber = function() { return position.line; }; frame.getLineNumber = function() { return position.line; };
frame.getColumnNumber = function() { return position.column + 1; }; frame.getColumnNumber = function() { return position.column + 1; };
@@ -395,9 +410,14 @@ function prepareStackTrace(error, stack) {
var message = error.message || ''; var message = error.message || '';
var errorString = name + ": " + message; var errorString = name + ": " + message;
return errorString + stack.map(function(frame) { var state = { nextPosition: null, curPosition: null };
return '\n at ' + wrapCallSite(frame); var processedStack = [];
}).join(''); for (var i = stack.length - 1; i >= 0; i--) {
processedStack.push('\n at ' + wrapCallSite(stack[i], state));
state.nextPosition = state.curPosition;
}
state.curPosition = state.nextPosition = null;
return errorString + processedStack.reverse().join('');
} }
// Generate position and snippet of original source with pointer // Generate position and snippet of original source with pointer
@@ -561,7 +581,7 @@ exports.resetRetrieveHandlers = function() {
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0); retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
retrieveMapHandlers = originalRetrieveMapHandlers.slice(0); retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
retrieveSourceMap = handlerExec(retrieveMapHandlers); retrieveSourceMap = handlerExec(retrieveMapHandlers);
retrieveFile = handlerExec(retrieveFileHandlers); retrieveFile = handlerExec(retrieveFileHandlers);
} }

197
node_modules/terser/CHANGELOG.md generated vendored
View File

@@ -1,5 +1,202 @@
# Changelog # Changelog
## v4.6.3
- Annotations such as `/*#__NOINLINE__*/` and `/*#__PURE__*/` may now be preserved using the `preserve_annotations` output option
- A TypeScript definition update for the `keep_quoted` output option.
## v4.6.2
- A bug where functions were inlined into other functions with scope conflicts has been fixed.
- `/*#__NOINLINE__*/` annotation fixed for more use cases where inlining happens.
## v4.6.1
- Fixed an issue where a class is duplicated by reduce_vars when there's a recursive reference to the class.
## v4.6.0
- Fixed issues with recursive class references.
- BigInt evaluation has been prevented, stopping Terser from evaluating BigInts like it would do regular numbers.
- Class property support has been added
## v4.5.1
(hotfix release)
- Fixed issue where `() => ({})[something]` was not parenthesised correctly.
## v4.5.0
- Inlining has been improved
- An issue where keep_fnames combined with functions declared through variables was causing name shadowing has been fixed
- You can now set the ES version through their year
- The output option `keep_numbers` has been added, which prevents Terser from turning `1000` into `1e3` and such
- Internal small optimisations and refactors
## v4.4.3
- Number and BigInt parsing has been fixed
- `/*#__INLINE__*/` annotation fixed for arrow functions with non-block bodies.
- Functional tests have been added, using [this repository](https://github.com/terser/terser-functional-tests).
- A memory leak, where the entire AST lives on after compression, has been plugged.
## v4.4.2
- Fixed a problem with inlining identity functions
## v4.4.1
*note:* This introduced a feature, therefore it should have been a minor release.
- Fixed a crash when `unsafe` was enabled.
- An issue has been fixed where `let` statements might be collapsed out of their scope.
- Some error messages have been improved by adding quotes around variable names.
## v4.4.0
- Added `/*#__INLINE__*/` and `/*#__NOINLINE__*/` annotations for calls. If a call has one of these, it either forces or forbids inlining.
## v4.3.11
- Fixed a problem where `window` was considered safe to access, even though there are situations where it isn't (Node.js, workers...)
- Fixed an error where `++` and `--` were considered side-effect free
- `Number(x)` now needs both `unsafe` and and `unsafe_math` to be compressed into `+x` because `x` might be a `BigInt`
- `keep_fnames` now correctly supports regexes when the function is in a variable declaration
## v4.3.10
- Fixed syntax error when repeated semicolons were encountered in classes
- Fixed invalid output caused by the creation of empty sequences internally
- Scopes are now updated when scopes are inlined into them
## v4.3.9
- Fixed issue with mangle's `keep_fnames` option, introduced when adding code to keep variable names of anonymous functions
## v4.3.8
- Typescript typings fix
## v4.3.7
- Parsing of regex options in the CLI (which broke in v4.3.5) was fixed.
- typescript definition updates
## v4.3.6
(crash hotfix)
## v4.3.5
- Fixed an issue with DOS line endings strings separated by `\` and a new line.
- Improved fix for the output size regression related to unused references within the extends section of a class.
- Variable names of anonymous functions (eg: `const x = () => { ... }` or `var func = function () {...}`) are now preserved when keep_fnames is true.
- Fixed performance degradation introduced for large payloads in v4.2.0
## v4.3.4
- Fixed a regression where the output size was increased when unused classes were referred to in the extends clause of a class.
- Small typescript typings fixes.
- Comments with `@preserve`, `@license`, `@cc_on` as well as comments starting with `/*!` and `/**!` are now preserved by default.
## v4.3.3
- Fixed a problem where parsing template strings would mix up octal notation and a slash followed by a zero representing a null character.
- Started accepting the name `async` in destructuring arguments with default value.
- Now Terser takes into account side effects inside class `extends` clauses.
- Added parens whenever there's a comment between a return statement and the returned value, to prevent issues with ASI.
- Stopped using raw RegExp objects, since the spec is going to continue to evolve. This ensures Terser is able to process new, unknown RegExp flags and features. This is a breaking change in the AST node AST_RegExp.
## v4.3.2
- Typescript typing fix
- Ensure that functions can't be inlined, by reduce_vars, into places where they're accessing variables with the same name, but from somewhere else.
## v4.3.1
- Fixed an issue from 4.3.0 where any block scope within a for loop erroneously had its parent set to the function scopee
- Fixed an issue where compressing IIFEs with argument expansions would result in some parameters becoming undefined
- addEventListener options argument's properties are now part of the DOM properties list.
## v4.3.0
- Do not drop computed object keys with side effects
- Functions passed to other functions in calls are now wrapped in parentheses by default, which speeds up loading most modules
- Objects with computed properties are now less likely to be hoisted
- Speed and memory efficiency optimizations
- Fixed scoping issues with `try` and `switch`
## v4.2.1
- Minor refactors
- Fixed a bug similar to #369 in collapse_vars
- Functions can no longer be inlined into a place where they're going to be compared with themselves.
- reduce_funcs option is now legacy, as using reduce_vars without reduce_funcs caused some weird corner cases. As a result, it is now implied in reduce_vars and can't be turned off without turning off reduce_vars.
- Bug which would cause a random stack overflow has now been fixed.
## v4.2.0
- When the source map URL is `inline`, don't write it to a file.
- Fixed output parens when a lambda literal is the tag on a tagged template string.
- The `mangle.properties.undeclared` option was added. This enables the property mangler to mangle properties of variables which can be found in the name cache, but whose properties are not known to this Terser run.
- The v8 bug where the toString and source representations of regexes like `RegExp("\\\n")` includes an actual newline is now fixed.
- Now we're guaranteed to not have duplicate comments in the output
- Domprops updates
## v4.1.4
- Fixed a crash when inlining a function into somewhere else when it has interdependent, non-removable variables.
## v4.1.3
- Several issues with the `reduce_vars` option were fixed.
- Starting this version, we only have a dist/bundle.min.js
## v4.1.2
- The hotfix was hotfixed
## v4.1.1
- Fixed a bug where toplevel scopes were being mixed up with lambda scopes
## v4.1.0
- Internal functions were replaced by `Object.assign`, `Array.prototype.some`, `Array.prototype.find` and `Array.prototype.every`.
- A serious issue where some ESM-native code was broken was fixed.
- Performance improvements were made.
- Support for BigInt was added.
- Inline efficiency was improved. Functions are now being inlined more proactively instead of being inlined only after another Compressor pass.
## v4.0.2
(Hotfix release. Reverts unmapped segments PR [#342](https://github.com/terser/terser/pull/342), which will be put back on Terser when the upstream issue is resolved)
## v4.0.1
- Collisions between the arguments of inlined functions and names in the outer scope are now being avoided while inlining
- Unmapped segments are now preserved when compressing a file which has source maps
- Default values of functions are now correctly converted from Mozilla AST to Terser AST
- JSON ⊂ ECMAScript spec (if you don't know what this is you don't need to)
- Export AST_* classes to library users
- Fixed issue with `collapse_vars` when functions are created with the same name as a variable which already exists
- Added `MutationObserverInit` (Object with options for initialising a mutation observer) properties to the DOM property list
- Custom `Error` subclasses are now internally used instead of old-school Error inheritance hacks.
- Documentation fixes
- Performance optimizations
## v4.0.0
- **breaking change**: The `variables` property of all scopes has become a standard JavaScript `Map` as opposed to the old bespoke `Dictionary` object.
- Typescript definitions were fixed
- `terser --help` was fixed
- The public interface was cleaned up
- Fixed optimisation of `Array` and `new Array`
- Added the `keep_quoted=strict` mode to mangle_props, which behaves more like Google Closure Compiler by mangling all unquoted property names, instead of reserving quoted property names automatically.
- Fixed parent functions' parameters being shadowed in some cases
- Allowed Terser to run in a situation where there are custom functions attached to Object.prototype
- And more bug fixes, optimisations and internal changes
## v3.17.0 ## v3.17.0
- More DOM properties added to --mangle-properties's DOM property list - More DOM properties added to --mangle-properties's DOM property list

10
node_modules/terser/PATRONS.md generated vendored
View File

@@ -1,5 +1,15 @@
# Our patrons
These are the first-tier patrons from [Patreon](https://www.patreon.com/fabiosantoscode). My appreciation goes to everyone on this list for supporting the project!
* 38elements * 38elements
* Alan Orozco
* Aria Buckles
* CKEditor * CKEditor
* Mariusz Nowak
* Nakshatra Mukhopadhyay
* Philippe Léger * Philippe Léger
* Piotrek Koszuliński * Piotrek Koszuliński
* Serhiy Shyyko
* Viktor Hubert * Viktor Hubert
* 龙腾道

179
node_modules/terser/README.md generated vendored
View File

@@ -1,29 +1,37 @@
terser <h1><img src="https://terser.org/img/terser-banner-logo.png" alt="Terser" width="400"></h1>
======
![Terser](https://raw.githubusercontent.com/terser-js/terser/master/logo.png) [![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Travis Build][travis-image]][travis-url]
[![Opencollective financial contributors][opencollective-contributors]][opencollective-url]
A JavaScript parser and mangler/compressor toolkit for ES6+. A JavaScript parser and mangler/compressor toolkit for ES6+.
*note*: You can support this project on patreon: <a target="_blank" rel="nofollow" href="https://www.patreon.com/fabiosantoscode"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="patron" width="100px" height="auto"></a>. Check out PATRONS.md for our first-tier patrons. *note*: You can support this project on patreon: <a target="_blank" rel="nofollow" href="https://www.patreon.com/fabiosantoscode"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="patron" width="100px" height="auto"></a>. Check out [PATRONS.md](https://github.com/terser/terser/blob/master/PATRONS.md) for our first-tier patrons.
Terser recommends you use RollupJS to bundle your modules, as that produces smaller code overall. Terser recommends you use RollupJS to bundle your modules, as that produces smaller code overall.
*Beautification* has been undocumented and is *being removed* from terser, we recommend you use [prettier](https://npmjs.com/package/prettier). *Beautification* has been undocumented and is *being removed* from terser, we recommend you use [prettier](https://npmjs.com/package/prettier).
[![Build Status](https://travis-ci.org/terser-js/terser.svg?branch=master)](https://travis-ci.org/terser-js/terser) Find the changelog in [CHANGELOG.md](https://github.com/terser/terser/blob/master/CHANGELOG.md)
Find the changelog in [CHANGELOG.md](https://github.com/terser-js/terser/blob/master/CHANGELOG.md)
A JavaScript parser, mangler/compressor and beautifier toolkit for ES6+.
[npm-image]: https://img.shields.io/npm/v/terser.svg
[npm-url]: https://npmjs.org/package/terser
[downloads-image]: https://img.shields.io/npm/dm/terser.svg
[downloads-url]: https://npmjs.org/package/terser
[travis-image]: https://img.shields.io/travis/terser/terser/master.svg
[travis-url]: https://travis-ci.org/terser/terser
[opencollective-contributors]: https://opencollective.com/terser/tiers/badge.svg
[opencollective-url]: https://opencollective.com/terser
Why choose terser? Why choose terser?
------------------ ------------------
`uglify-es` is [no longer maintained](https://github.com/mishoo/UglifyJS2/issues/3156#issuecomment-392943058) and `uglify-js` does not support ES6+. `uglify-es` is [no longer maintained](https://github.com/mishoo/UglifyJS2/issues/3156#issuecomment-392943058) and `uglify-js` does not support ES6+.
**`terser`** is a fork of `uglify-es` that retains API and CLI compatibility **`terser`** is a fork of `uglify-es` that mostly retains API and CLI compatibility
with `uglify-es` and `uglify-js@3`. with `uglify-es` and `uglify-js@3`.
Install Install
@@ -39,7 +47,7 @@ From NPM for use as a command line app:
From NPM for programmatic use: From NPM for programmatic use:
npm install terser npm install terser
# Command line usage # Command line usage
terser [input files] [options] terser [input files] [options]
@@ -86,7 +94,10 @@ a double dash to prevent input files being used as option arguments:
`debug` Add debug prefix and suffix. `debug` Add debug prefix and suffix.
`domprops` Mangle property names that overlaps `domprops` Mangle property names that overlaps
with DOM properties. with DOM properties.
`keep_quoted` Only mangle unquoted properties. `keep_quoted` Only mangle unquoted properties, quoted
properties are automatically reserved.
`strict` disables quoted properties
being automatically reserved.
`regex` Only mangle matched property names. `regex` Only mangle matched property names.
`reserved` List of names that should not be mangled. `reserved` List of names that should not be mangled.
-b, --beautify [options] Specify output options: -b, --beautify [options] Specify output options:
@@ -103,6 +114,7 @@ a double dash to prevent input files being used as option arguments:
`wrap_iife` Wrap IIFEs in parenthesis. Note: you may `wrap_iife` Wrap IIFEs in parenthesis. Note: you may
want to disable `negate_iife` under want to disable `negate_iife` under
compressor options. compressor options.
`wrap_func_args` Wrap function arguments in parenthesis.
-o, --output <file> Output file path (default STDOUT). Specify `ast` or -o, --output <file> Output file path (default STDOUT). Specify `ast` or
`spidermonkey` to write Terser or SpiderMonkey AST `spidermonkey` to write Terser or SpiderMonkey AST
as JSON to STDOUT respectively. as JSON to STDOUT respectively.
@@ -112,6 +124,7 @@ a double dash to prevent input files being used as option arguments:
"@preserve". You can optionally pass one of the "@preserve". You can optionally pass one of the
following arguments to this flag: following arguments to this flag:
- "all" to keep all comments - "all" to keep all comments
- `false` to omit comments in the output
- a valid JS RegExp like `/foo/` or `/^!/` to - a valid JS RegExp like `/foo/` or `/^!/` to
keep only matching comments. keep only matching comments.
Note that currently not *all* comments can be Note that currently not *all* comments can be
@@ -252,7 +265,7 @@ way to use this is to use the `regex` option like so:
terser example.js -c -m --mangle-props regex=/_$/ terser example.js -c -m --mangle-props regex=/_$/
``` ```
This will mangle all properties that start with an This will mangle all properties that end with an
underscore. So you can use it to mangle internal methods. underscore. So you can use it to mangle internal methods.
By default, it will mangle all properties in the By default, it will mangle all properties in the
@@ -280,38 +293,38 @@ console.log(x.calc());
``` ```
Mangle all properties (except for JavaScript `builtins`) (**very** unsafe): Mangle all properties (except for JavaScript `builtins`) (**very** unsafe):
```bash ```bash
$ terser example.js -c -m --mangle-props $ terser example.js -c passes=2 -m --mangle-props
``` ```
```javascript ```javascript
var x={o:0,_:1,l:function(){return this._+this.o}};x.t=2,x.o=3,console.log(x.l()); var x={o:3,t:1,i:function(){return this.t+this.o},s:2};console.log(x.i());
``` ```
Mangle all properties except for `reserved` properties (still very unsafe): Mangle all properties except for `reserved` properties (still very unsafe):
```bash ```bash
$ terser example.js -c -m --mangle-props reserved=[foo_,bar_] $ terser example.js -c passes=2 -m --mangle-props reserved=[foo_,bar_]
``` ```
```javascript ```javascript
var x={o:0,foo_:1,_:function(){return this.foo_+this.o}};x.bar_=2,x.o=3,console.log(x._()); var x={o:3,foo_:1,t:function(){return this.foo_+this.o},bar_:2};console.log(x.t());
``` ```
Mangle all properties matching a `regex` (not as unsafe but still unsafe): Mangle all properties matching a `regex` (not as unsafe but still unsafe):
```bash ```bash
$ terser example.js -c -m --mangle-props regex=/_$/ $ terser example.js -c passes=2 -m --mangle-props regex=/_$/
``` ```
```javascript ```javascript
var x={o:0,_:1,calc:function(){return this._+this.o}};x.l=2,x.o=3,console.log(x.calc()); var x={o:3,t:1,calc:function(){return this.t+this.o},i:2};console.log(x.calc());
``` ```
Combining mangle properties options: Combining mangle properties options:
```bash ```bash
$ terser example.js -c -m --mangle-props regex=/_$/,reserved=[bar_] $ terser example.js -c passes=2 -m --mangle-props regex=/_$/,reserved=[bar_]
``` ```
```javascript ```javascript
var x={o:0,_:1,calc:function(){return this._+this.o}};x.bar_=2,x.o=3,console.log(x.calc()); var x={o:3,t:1,calc:function(){return this.t+this.o},bar_:2};console.log(x.calc());
``` ```
In order for this to be of any use, we avoid mangling standard JS names by In order for this to be of any use, we avoid mangling standard JS names by
default (`--mangle-props builtins` to override). default (`--mangle-props builtins` to override).
A default exclusion file is provided in `tools/domprops.json` which should A default exclusion file is provided in `tools/domprops.js` which should
cover most standard JS and DOM properties defined in various browsers. Pass cover most standard JS and DOM properties defined in various browsers. Pass
`--mangle-props domprops` to disable this feature. `--mangle-props domprops` to disable this feature.
@@ -521,8 +534,8 @@ if (result.error) throw result.error;
## Minify options ## Minify options
- `ecma` (default `undefined`) - pass `5`, `6`, `7` or `8` to override `parse`, - `ecma` (default `undefined`) - pass `5`, `2015`, `2016` or `2017` to override `parse`,
`compress` and `output` options. `compress` and `output`'s `ecma` options.
- `warnings` (default `false`) — pass `true` to return compressor warnings - `warnings` (default `false`) — pass `true` to return compressor warnings
in `result.warnings`. Use the value `"verbose"` for more detailed warnings. in `result.warnings`. Use the value `"verbose"` for more detailed warnings.
@@ -598,7 +611,7 @@ if (result.error) throw result.error;
sourceMap: { sourceMap: {
// source map options // source map options
}, },
ecma: 5, // specify one of: 5, 6, 7 or 8 ecma: 5, // specify one of: 5, 2015, 2016, 2017 or 2018
keep_classnames: false, keep_classnames: false,
keep_fnames: false, keep_fnames: false,
ie8: false, ie8: false,
@@ -657,13 +670,15 @@ var result = Terser.minify({"compiled.js": "compiled code"}, {
If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.url`. If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.url`.
If you happen to need the source map as a raw object, set `sourceMap.asObject` to `true`.
## Parse options ## Parse options
- `bare_returns` (default `false`) -- support top level `return` statements - `bare_returns` (default `false`) -- support top level `return` statements
- `ecma` (default: `8`) -- specify one of `5`, `6`, `7` or `8`. Note: this setting - `ecma` (default: `2017`) -- specify one of `5`, `2015`, `2016` or `2017`. Note: this setting
is not presently enforced except for ES8 optional trailing commas in function is not presently enforced except for ES8 optional trailing commas in function
parameter lists and calls with `ecma` `8`. parameter lists and calls with `ecma` `2017`.
- `html5_comments` (default `true`) - `html5_comments` (default `true`)
@@ -671,9 +686,10 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
## Compress options ## Compress options
- `arrows` (default: `true`) -- Converts `()=>{return x}` to `()=>x`. Class - `arrows` (default: `true`) -- Class and object literal methods are converted
and object literal methods will also be converted to arrow expressions if will also be converted to arrow expressions if the resultant code is shorter:
the resultant code is shorter: `m(){return x}` becomes `m:()=>x`. `m(){return x}` becomes `m:()=>x`. To do this to regular ES5 functions which
don't use `this` or `arguments`, see `unsafe_arrows`.
- `arguments` (default: `false`) -- replace `arguments[index]` with function - `arguments` (default: `false`) -- replace `arguments[index]` with function
parameter name whenever possible. parameter name whenever possible.
@@ -712,7 +728,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `drop_debugger` (default: `true`) -- remove `debugger;` statements - `drop_debugger` (default: `true`) -- remove `debugger;` statements
- `ecma` (default: `5`) -- Pass `6` or greater to enable `compress` options that - `ecma` (default: `5`) -- Pass `2015` or greater to enable `compress` options that
will transform ES5 code into smaller ES6+ equivalent forms. will transform ES5 code into smaller ES6+ equivalent forms.
- `evaluate` (default: `true`) -- attempt to evaluate constant expressions - `evaluate` (default: `true`) -- attempt to evaluate constant expressions
@@ -754,7 +770,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `keep_fnames` (default: `false`) -- Pass `true` to prevent the - `keep_fnames` (default: `false`) -- Pass `true` to prevent the
compressor from discarding function names. Pass a regular expression to only keep compressor from discarding function names. Pass a regular expression to only keep
class names matching that regex. Useful for code relying on `Function.prototype.name`. function names matching that regex. Useful for code relying on `Function.prototype.name`.
See also: the `keep_fnames` [mangle option](#mangle). See also: the `keep_fnames` [mangle option](#mangle).
- `keep_infinity` (default: `false`) -- Pass `true` to prevent `Infinity` from - `keep_infinity` (default: `false`) -- Pass `true` to prevent `Infinity` from
@@ -794,11 +810,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
Specify `"strict"` to treat `foo.bar` as side-effect-free only when Specify `"strict"` to treat `foo.bar` as side-effect-free only when
`foo` is certain to not throw, i.e. not `null` or `undefined`. `foo` is certain to not throw, i.e. not `null` or `undefined`.
- `reduce_funcs` (default: `true`) -- Allows single-use functions to be - `reduce_funcs` (legacy option, safely ignored for backwards compatibility).
inlined as function expressions when permissible allowing further
optimization. Enabled by default. Option depends on `reduce_vars`
being enabled. Some code runs faster in the Chrome V8 engine if this
option is disabled. Does not negatively impact other major browsers.
- `reduce_vars` (default: `true`) -- Improve optimization on variables assigned with and - `reduce_vars` (default: `true`) -- Improve optimization on variables assigned with and
used as constant values. used as constant values.
@@ -813,7 +825,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
case a value of `20` or less is recommended. case a value of `20` or less is recommended.
- `side_effects` (default: `true`) -- Pass `false` to disable potentially dropping - `side_effects` (default: `true`) -- Pass `false` to disable potentially dropping
functions marked as "pure". A function call is marked as "pure" if a comment function calls marked as "pure". A function call is marked as "pure" if a comment
annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For
example: `/*@__PURE__*/foo();` example: `/*@__PURE__*/foo();`
@@ -838,7 +850,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
expressions to arrow functions if the function body does not reference `this`. expressions to arrow functions if the function body does not reference `this`.
Note: it is not always safe to perform this conversion if code relies on the Note: it is not always safe to perform this conversion if code relies on the
the function having a `prototype`, which arrow functions lack. the function having a `prototype`, which arrow functions lack.
This transform requires that the `ecma` compress option is set to `6` or greater. This transform requires that the `ecma` compress option is set to `2015` or greater.
- `unsafe_comps` (default: `false`) -- Reverse `<` and `<=` to `>` and `>=` to - `unsafe_comps` (default: `false`) -- Reverse `<` and `<=` to `>` and `>=` to
allow improved compression. This might be unsafe when an at least one of two allow improved compression. This might be unsafe when an at least one of two
@@ -928,20 +940,28 @@ Terser.minify(code, { mangle: { toplevel: true } }).code;
### Mangle properties options ### Mangle properties options
- `builtins` (default: `false`) -- Use `true` to allow the mangling of builtin - `builtins` (default: `false`) Use `true` to allow the mangling of builtin
DOM properties. Not recommended to override this setting. DOM properties. Not recommended to override this setting.
- `debug` (default: `false`) -— Mangle names with the original name still present. - `debug` (default: `false`) — Mangle names with the original name still present.
Pass an empty string `""` to enable, or a non-empty string to set the debug suffix. Pass an empty string `""` to enable, or a non-empty string to set the debug suffix.
- `keep_quoted` (default: `false`) -— Only mangle unquoted property names. - `keep_quoted` (default: `false`) — Only mangle unquoted property names.
- `true` -- Quoted property names are automatically reserved and any unquoted
property names will not be mangled.
- `"strict"` -- Advanced, all unquoted property names are mangled unless
explicitly reserved.
- `regex` (default: `null`) -— Pass a RegExp literal to only mangle property - `regex` (default: `null`) — Pass a [RegExp literal or pattern string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to only mangle property matching the regular expression.
names matching the regular expression.
- `reserved` (default: `[]`) -- Do not mangle property names listed in the - `reserved` (default: `[]`) Do not mangle property names listed in the
`reserved` array. `reserved` array.
- `undeclared` (default: `false`) - Mangle those names when they are accessed
as properties of known top level variables but their declarations are never
found in input code. May be useful when only minifying parts of a project.
See [#397](https://github.com/terser/terser/issues/397) for more details.
## Output options ## Output options
The code generator tries to output shortest code possible by default. In The code generator tries to output shortest code possible by default. In
@@ -960,11 +980,12 @@ can pass additional arguments that control the code output:
`do`, `while` or `with` statements, even if their body is a single `do`, `while` or `with` statements, even if their body is a single
statement. statement.
- `comments` (default `false`) -- pass `true` or `"all"` to preserve all - `comments` (default `"some"`) -- by default it keeps JSDoc-style comments
comments, `"some"` to preserve some comments, a regular expression string that contain "@license" or "@preserve", pass `true` or `"all"` to preserve all
comments, `false` to omit comments in the output, a regular expression string
(e.g. `/^!/`) or a function. (e.g. `/^!/`) or a function.
- `ecma` (default `5`) -- set output printing mode. Set `ecma` to `6` or - `ecma` (default `5`) -- set output printing mode. Set `ecma` to `2015` or
greater to emit shorthand object properties - i.e.: `{a}` instead of `{a: a}`. greater to emit shorthand object properties - i.e.: `{a}` instead of `{a: a}`.
The `ecma` option will only change the output in direct control of the The `ecma` option will only change the output in direct control of the
beautifier. Non-compatible features in the abstract syntax tree will still beautifier. Non-compatible features in the abstract syntax tree will still
@@ -978,6 +999,9 @@ can pass additional arguments that control the code output:
- `inline_script` (default `true`) -- escape HTML comments and the slash in - `inline_script` (default `true`) -- escape HTML comments and the slash in
occurrences of `</script>` in strings occurrences of `</script>` in strings
- `keep_numbers` (default `false`) -- keep number literals as it was in original code
(disables optimizations like converting `1000000` into `1e6`)
- `keep_quoted_props` (default `false`) -- when turned on, prevents stripping - `keep_quoted_props` (default `false`) -- when turned on, prevents stripping
quotes from property names in object literals. quotes from property names in object literals.
@@ -999,6 +1023,8 @@ can pass additional arguments that control the code output:
- `2` -- always use double quotes - `2` -- always use double quotes
- `3` -- always use the original quotes - `3` -- always use the original quotes
- `preserve_annotations` -- (default `false`) -- Preserve [Terser annotations](#annotations) in the output.
- `safari10` (default `false`) -- set this option to `true` to work around - `safari10` (default `false`) -- set this option to `true` to work around
the [Safari 10/11 await bug](https://bugs.webkit.org/show_bug.cgi?id=176685). the [Safari 10/11 await bug](https://bugs.webkit.org/show_bug.cgi?id=176685).
See also: the `safari10` [mangle option](#mangle-options). See also: the `safari10` [mangle option](#mangle-options).
@@ -1017,6 +1043,10 @@ can pass additional arguments that control the code output:
function expressions. See function expressions. See
[#640](https://github.com/mishoo/UglifyJS2/issues/640) for more details. [#640](https://github.com/mishoo/UglifyJS2/issues/640) for more details.
- `wrap_func_args` (default `true`) -- pass `false` if you do not want to wrap
function expressions that are passed as arguments, in parenthesis. See
[OptimizeJS](https://github.com/nolanlawson/optimize-js) for more details.
# Miscellaneous # Miscellaneous
### Keeping copyright notices or other comments ### Keeping copyright notices or other comments
@@ -1173,6 +1203,30 @@ var result = Terser.minify(ast, {
// result.code contains the minified code in string form. // result.code contains the minified code in string form.
``` ```
### Annotations
Annotations in Terser are a way to tell it to treat a certain function call differently. The following annotations are available:
* `/*@__INLINE__*/` - forces a function to be inlined somewhere.
* `/*@__NOINLINE__*/` - Makes sure the called function is not inlined into the call site.
* `/*@__PURE__*/` - Marks a function call as pure. That means, it can safely be dropped.
You can use either a `@` sign at the start, or a `#`.
Here are some examples on how to use them:
```javascript
/*@__INLINE__*/
function_always_inlined_here()
/*#__NOINLINE__*/
function_cant_be_inlined_into_here()
const x = /*#__PURE__*/i_am_dropped_if_x_is_not_used()
```
### Working with Terser AST ### Working with Terser AST
Traversal and transformation of the native AST can be performed through Traversal and transformation of the native AST can be performed through
@@ -1298,8 +1352,39 @@ In the terser CLI we use [source-map-support](https://npmjs.com/source-map-suppo
# README.md Patrons: # README.md Patrons:
*note*: You can support this project on patreon: <a target="_blank" rel="nofollow" href="https://www.patreon.com/terser_ecmacomp_maintainer"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="patron" width="100px" height="auto"></a>. Check out PATRONS.md for our first-tier patrons. *note*: You can support this project on patreon: <a target="_blank" rel="nofollow" href="https://www.patreon.com/fabiosantoscode"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="patron" width="100px" height="auto"></a>. Check out [PATRONS.md](https://github.com/terser/terser/blob/master/PATRONS.md) for our first-tier patrons.
These are the second-tier patrons. Great thanks for your support!
* CKEditor ![](https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/15452278/f8548dcf48d740619071e8d614459280/1?token-time=2145916800&token-hash=SIQ54PhIPHv3M7CVz9LxS8_8v4sOw4H304HaXsXj8MM%3D) * CKEditor ![](https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/15452278/f8548dcf48d740619071e8d614459280/1?token-time=2145916800&token-hash=SIQ54PhIPHv3M7CVz9LxS8_8v4sOw4H304HaXsXj8MM%3D)
* 38elements ![](https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12501844/88e7fc5dd62d45c6a5626533bbd48cfb/1?token-time=2145916800&token-hash=c3AsQ5T0IQWic0zKxFHu-bGGQJkXQFvafvJ4bPerFR4%3D) * 38elements ![](https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12501844/88e7fc5dd62d45c6a5626533bbd48cfb/1?token-time=2145916800&token-hash=c3AsQ5T0IQWic0zKxFHu-bGGQJkXQFvafvJ4bPerFR4%3D)
## Contributors
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/terser/terser/graphs/contributors"><img src="https://opencollective.com/terser/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/terser/contribute)]
#### Individuals
<a href="https://opencollective.com/terser"><img src="https://opencollective.com/terser/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/terser/contribute)]
<a href="https://opencollective.com/terser/organization/0/website"><img src="https://opencollective.com/terser/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/1/website"><img src="https://opencollective.com/terser/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/2/website"><img src="https://opencollective.com/terser/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/3/website"><img src="https://opencollective.com/terser/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/4/website"><img src="https://opencollective.com/terser/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/5/website"><img src="https://opencollective.com/terser/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/6/website"><img src="https://opencollective.com/terser/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/7/website"><img src="https://opencollective.com/terser/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/8/website"><img src="https://opencollective.com/terser/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/terser/organization/9/website"><img src="https://opencollective.com/terser/organization/9/avatar.svg"></a>

476
node_modules/terser/bin/terser generated vendored Executable file
View File

@@ -0,0 +1,476 @@
#!/usr/bin/env node
// -*- js -*-
/* eslint-env node */
"use strict";
require("../tools/exit.js");
var fs = require("fs");
var info = require("../package.json");
var path = require("path");
var program = require("commander");
var Terser = require("..");
try {
require("source-map-support").install();
} catch (err) {}
const skip_keys = new Set([ "cname", "parent_scope", "scope", "uses_eval", "uses_with", "_var_name_cache" ]);
var files = {};
var options = {
compress: false,
mangle: false
};
program.version(info.name + " " + info.version);
program.parseArgv = program.parse;
program.parse = undefined;
if (process.argv.includes("ast")) program.helpInformation = describe_ast;
else if (process.argv.includes("options")) program.helpInformation = function() {
var text = [];
var options = Terser.default_options();
for (var option in options) {
text.push("--" + (option === "output" ? "beautify" : option === "sourceMap" ? "source-map" : option) + " options:");
text.push(format_object(options[option]));
text.push("");
}
return text.join("\n");
};
program.option("-p, --parse <options>", "Specify parser options.", parse_js());
program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js());
program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js());
program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js());
program.option("-b, --beautify [options]", "Beautify output/specify output options.", parse_js());
program.option("-o, --output <file>", "Output file (default STDOUT).");
program.option("--comments [filter]", "Preserve copyright comments in the output.");
program.option("--config-file <file>", "Read minify() options from JSON file.");
program.option("-d, --define <expr>[=value]", "Global definitions.", parse_js("define"));
program.option("--ecma <version>", "Specify ECMAScript release: 5, 2015, 2016 or 2017...");
program.option("-e, --enclose [arg[,...][:value[,...]]]", "Embed output in a big function with configurable arguments and values.");
program.option("--ie8", "Support non-standard Internet Explorer 8.");
program.option("--keep-classnames", "Do not mangle/drop class names.");
program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");
program.option("--module", "Input is an ES6 module");
program.option("--name-cache <file>", "File to hold mangled name mappings.");
program.option("--rename", "Force symbol expansion.");
program.option("--no-rename", "Disable symbol expansion.");
program.option("--safari10", "Support non-standard Safari 10.");
program.option("--source-map [options]", "Enable source map/specify source map options.", parse_js());
program.option("--timings", "Display operations run time on STDERR.");
program.option("--toplevel", "Compress and/or mangle variables in toplevel scope.");
program.option("--verbose", "Print diagnostic messages.");
program.option("--warn", "Print warning messages.");
program.option("--wrap <name>", "Embed everything as a function with “exports” corresponding to “name” globally.");
program.arguments("[files...]").parseArgv(process.argv);
if (program.configFile) {
options = JSON.parse(read_file(program.configFile));
}
if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
fatal("ERROR: cannot write source map to STDOUT");
}
[
"compress",
"enclose",
"ie8",
"mangle",
"module",
"safari10",
"sourceMap",
"toplevel",
"wrap"
].forEach(function(name) {
if (name in program) {
options[name] = program[name];
}
});
if ("ecma" in program) {
if (program.ecma != (program.ecma | 0)) fatal("ERROR: ecma must be an integer");
const ecma = program.ecma | 0;
if (ecma > 5 && ecma < 2015)
options.ecma = ecma + 2009;
else
options.ecma = ecma;
}
if (program.beautify) {
options.output = typeof program.beautify == "object" ? program.beautify : {};
if (!("beautify" in options.output)) {
options.output.beautify = true;
}
}
if (program.comments) {
if (typeof options.output != "object") options.output = {};
options.output.comments = typeof program.comments == "string" ? program.comments : "some";
}
if (program.define) {
if (typeof options.compress != "object") options.compress = {};
if (typeof options.compress.global_defs != "object") options.compress.global_defs = {};
for (var expr in program.define) {
options.compress.global_defs[expr] = program.define[expr];
}
}
if (program.keepClassnames) {
options.keep_classnames = true;
}
if (program.keepFnames) {
options.keep_fnames = true;
}
if (program.mangleProps) {
if (program.mangleProps.domprops) {
delete program.mangleProps.domprops;
} else {
if (typeof program.mangleProps != "object") program.mangleProps = {};
if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = [];
}
if (typeof options.mangle != "object") options.mangle = {};
options.mangle.properties = program.mangleProps;
}
if (program.nameCache) {
options.nameCache = JSON.parse(read_file(program.nameCache, "{}"));
}
if (program.output == "ast") {
options.output = {
ast: true,
code: false
};
}
if (program.parse) {
if (!program.parse.acorn && !program.parse.spidermonkey) {
options.parse = program.parse;
} else if (program.sourceMap && program.sourceMap.content == "inline") {
fatal("ERROR: inline source map only works with built-in parser");
}
}
if (~program.rawArgs.indexOf("--rename")) {
options.rename = true;
} else if (!program.rename) {
options.rename = false;
}
var convert_path = function(name) {
return name;
};
if (typeof program.sourceMap == "object" && "base" in program.sourceMap) {
convert_path = function() {
var base = program.sourceMap.base;
delete options.sourceMap.base;
return function(name) {
return path.relative(base, name);
};
}();
}
if (program.verbose) {
options.warnings = "verbose";
} else if (program.warn) {
options.warnings = true;
}
let filesList;
if (options.files && options.files.length) {
filesList = options.files;
delete options.files;
} else if (program.args.length) {
filesList = program.args;
}
if (filesList) {
simple_glob(filesList).forEach(function(name) {
files[convert_path(name)] = read_file(name);
});
run();
} else {
var chunks = [];
process.stdin.setEncoding("utf8");
process.stdin.on("data", function(chunk) {
chunks.push(chunk);
}).on("end", function() {
files = [ chunks.join("") ];
run();
});
process.stdin.resume();
}
function convert_ast(fn) {
return Terser.AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null));
}
function run() {
Terser.AST_Node.warn_function = function(msg) {
print_error("WARN: " + msg);
};
var content = program.sourceMap && program.sourceMap.content;
if (content && content !== "inline") {
options.sourceMap.content = read_file(content, content);
}
if (program.timings) options.timings = true;
try {
if (program.parse) {
if (program.parse.acorn) {
files = convert_ast(function(toplevel, name) {
return require("acorn").parse(files[name], {
ecmaVersion: 2018,
locations: true,
program: toplevel,
sourceFile: name,
sourceType: options.module || program.parse.module ? "module" : "script"
});
});
} else if (program.parse.spidermonkey) {
files = convert_ast(function(toplevel, name) {
var obj = JSON.parse(files[name]);
if (!toplevel) return obj;
toplevel.body = toplevel.body.concat(obj.body);
return toplevel;
});
}
}
} catch (ex) {
fatal(ex);
}
var result = Terser.minify(files, options);
if (result.error) {
var ex = result.error;
if (ex.name == "SyntaxError") {
print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
var col = ex.col;
var lines = files[ex.filename].split(/\r?\n/);
var line = lines[ex.line - 1];
if (!line && !col) {
line = lines[ex.line - 2];
col = line.length;
}
if (line) {
var limit = 70;
if (col > limit) {
line = line.slice(col - limit);
col = limit;
}
print_error(line.slice(0, 80));
print_error(line.slice(0, col).replace(/\S/g, " ") + "^");
}
}
if (ex.defs) {
print_error("Supported options:");
print_error(format_object(ex.defs));
}
fatal(ex);
} else if (program.output == "ast") {
if (!options.compress && !options.mangle) {
result.ast.figure_out_scope({});
}
print(JSON.stringify(result.ast, function(key, value) {
if (value) switch (key) {
case "thedef":
return symdef(value);
case "enclosed":
return value.length ? value.map(symdef) : undefined;
case "variables":
case "functions":
case "globals":
return value.size ? collect_from_map(value, symdef) : undefined;
}
if (skip_keys.has(key)) return;
if (value instanceof Terser.AST_Token) return;
if (value instanceof Map) return;
if (value instanceof Terser.AST_Node) {
var result = {
_class: "AST_" + value.TYPE
};
if (value.block_scope) {
result.variables = value.block_scope.variables;
result.functions = value.block_scope.functions;
result.enclosed = value.block_scope.enclosed;
}
value.CTOR.PROPS.forEach(function(prop) {
result[prop] = value[prop];
});
return result;
}
return value;
}, 2));
} else if (program.output == "spidermonkey") {
print(JSON.stringify(Terser.minify(result.code, {
compress: false,
mangle: false,
output: {
ast: true,
code: false
}
}).ast.to_mozilla_ast(), null, 2));
} else if (program.output) {
fs.writeFileSync(program.output, result.code);
if (options.sourceMap.url !== "inline" && result.map) {
fs.writeFileSync(program.output + ".map", result.map);
}
} else {
print(result.code);
}
if (program.nameCache) {
fs.writeFileSync(program.nameCache, JSON.stringify(options.nameCache));
}
if (result.timings) for (var phase in result.timings) {
print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s");
}
}
function fatal(message) {
if (message instanceof Error) message = message.stack.replace(/^\S*?Error:/, "ERROR:");
print_error(message);
process.exit(1);
}
// A file glob function that only supports "*" and "?" wildcards in the basename.
// Example: "foo/bar/*baz??.*.js"
// Argument `glob` may be a string or an array of strings.
// Returns an array of strings. Garbage in, garbage out.
function simple_glob(glob) {
if (Array.isArray(glob)) {
return [].concat.apply([], glob.map(simple_glob));
}
if (glob && glob.match(/[*?]/)) {
var dir = path.dirname(glob);
try {
var entries = fs.readdirSync(dir);
} catch (ex) {}
if (entries) {
var pattern = "^" + path.basename(glob)
.replace(/[.+^$[\]\\(){}]/g, "\\$&")
.replace(/\*/g, "[^/\\\\]*")
.replace(/\?/g, "[^/\\\\]") + "$";
var mod = process.platform === "win32" ? "i" : "";
var rx = new RegExp(pattern, mod);
var results = entries.filter(function(name) {
return rx.test(name);
}).map(function(name) {
return path.join(dir, name);
});
if (results.length) return results;
}
}
return [ glob ];
}
function read_file(path, default_value) {
try {
return fs.readFileSync(path, "utf8");
} catch (ex) {
if ((ex.code == "ENOENT" || ex.code == "ENAMETOOLONG") && default_value != null) return default_value;
fatal(ex);
}
}
function parse_js(flag) {
return function(value, options) {
options = options || {};
try {
Terser.parse(value, {
expression: true
}).walk(new Terser.TreeWalker(function(node) {
if (node instanceof Terser.AST_Assign) {
var name = node.left.print_to_string();
var value = node.right;
if (flag) {
options[name] = value;
} else if (value instanceof Terser.AST_Array) {
options[name] = value.elements.map(to_string);
} else if (value instanceof Terser.AST_RegExp) {
value = value.value;
options[name] = new RegExp(value.source, value.flags);
} else {
options[name] = to_string(value);
}
return true;
}
if (node instanceof Terser.AST_Symbol || node instanceof Terser.AST_PropAccess) {
var name = node.print_to_string();
options[name] = true;
return true;
}
if (!(node instanceof Terser.AST_Sequence)) throw node;
function to_string(value) {
return value instanceof Terser.AST_Constant ? value.getValue() : value.print_to_string({
quote_keys: true
});
}
}));
} catch(ex) {
if (flag) {
fatal("Error parsing arguments for '" + flag + "': " + value);
} else {
options[value] = null;
}
}
return options;
};
}
function symdef(def) {
var ret = (1e6 + def.id) + " " + def.name;
if (def.mangled_name) ret += " " + def.mangled_name;
return ret;
}
function collect_from_map(map, callback) {
var result = [];
map.forEach(function (def) {
result.push(callback(def));
});
return result;
}
function format_object(obj) {
var lines = [];
var padding = "";
Object.keys(obj).map(function(name) {
if (padding.length < name.length) padding = Array(name.length + 1).join(" ");
return [ name, JSON.stringify(obj[name]) ];
}).forEach(function(tokens) {
lines.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]);
});
return lines.join("\n");
}
function print_error(msg) {
process.stderr.write(msg);
process.stderr.write("\n");
}
function print(txt) {
process.stdout.write(txt);
process.stdout.write("\n");
}
function describe_ast() {
var out = Terser.OutputStream({ beautify: true });
function doitem(ctor) {
out.print("AST_" + ctor.TYPE);
var props = ctor.SELF_PROPS.filter(function(prop) {
return !/^\$/.test(prop);
});
if (props.length > 0) {
out.space();
out.with_parens(function() {
props.forEach(function(prop, i) {
if (i) out.space();
out.print(prop);
});
});
}
if (ctor.documentation) {
out.space();
out.print_string(ctor.documentation);
}
if (ctor.SUBCLASSES.length > 0) {
out.space();
out.with_block(function() {
ctor.SUBCLASSES.forEach(function(ctor, i) {
out.indent();
doitem(ctor);
out.newline();
});
});
}
}
doitem(Terser.AST_Node);
return out + "\n";
}

480
node_modules/terser/bin/uglifyjs generated vendored Normal file → Executable file
View File

@@ -4,481 +4,7 @@
"use strict"; "use strict";
require("../tools/exit.js"); process.stderr.write( "DEPRECATION WARNING: uglifyjs binary will soon be discontinued!\n");
process.stderr.write("Please use \"terser\" instead.\n\n");
var fs = require("fs"); require("./terser");
var info = require("../package.json");
var path = require("path");
var program = require("commander");
var bundle_path = __dirname + (process.env.TERSER_NO_BUNDLE ?
"/../dist/bundle.js" :
"/../dist/bundle.min.js");
var UglifyJS = require(bundle_path);
try {
require("source-map-support").install();
} catch (err) {}
var skip_keys = [ "cname", "inlined", "parent_scope", "scope", "uses_eval", "uses_with" ];
var files = {};
var options = {
compress: false,
mangle: false
};
program.version(info.name + " " + info.version);
program.parseArgv = program.parse;
program.parse = undefined;
if (process.argv.includes("ast")) program.helpInformation = describe_ast;
else if (process.argv.includes("options")) program.helpInformation = function() {
var text = [];
var options = UglifyJS.default_options();
for (var option in options) {
text.push("--" + (option === "output" ? "beautify" : option === "sourceMap" ? "source-map" : option) + " options:");
text.push(format_object(options[option]));
text.push("");
}
return text.join("\n");
};
program.option("-p, --parse <options>", "Specify parser options.", parse_js());
program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js());
program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js());
program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js());
program.option("-b, --beautify [options]", "Beautify output/specify output options.", parse_js());
program.option("-o, --output <file>", "Output file (default STDOUT).");
program.option("--comments [filter]", "Preserve copyright comments in the output.");
program.option("--config-file <file>", "Read minify() options from JSON file.");
program.option("-d, --define <expr>[=value]", "Global definitions.", parse_js("define"));
program.option("--ecma <version>", "Specify ECMAScript release: 5, 6, 7 or 8.");
program.option("-e, --enclose [arg[,...][:value[,...]]]", "Embed output in a big function with configurable arguments and values.");
program.option("--ie8", "Support non-standard Internet Explorer 8.");
program.option("--keep-classnames", "Do not mangle/drop class names.");
program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");
program.option("--module", "Input is an ES6 module");
program.option("--name-cache <file>", "File to hold mangled name mappings.");
program.option("--rename", "Force symbol expansion.");
program.option("--no-rename", "Disable symbol expansion.");
program.option("--safari10", "Support non-standard Safari 10.");
program.option("--source-map [options]", "Enable source map/specify source map options.", parse_source_map());
program.option("--timings", "Display operations run time on STDERR.");
program.option("--toplevel", "Compress and/or mangle variables in toplevel scope.");
program.option("--verbose", "Print diagnostic messages.");
program.option("--warn", "Print warning messages.");
program.option("--wrap <name>", "Embed everything as a function with “exports” corresponding to “name” globally.");
program.arguments("[files...]").parseArgv(process.argv);
if (program.configFile) {
options = JSON.parse(read_file(program.configFile));
}
if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
fatal("ERROR: cannot write source map to STDOUT");
}
[
"compress",
"enclose",
"ie8",
"mangle",
"module",
"safari10",
"sourceMap",
"toplevel",
"wrap"
].forEach(function(name) {
if (name in program) {
options[name] = program[name];
}
});
if ("ecma" in program) {
if (program.ecma != (program.ecma | 0)) fatal("ERROR: ecma must be an integer");
options.ecma = program.ecma | 0;
}
if (program.beautify) {
options.output = typeof program.beautify == "object" ? program.beautify : {};
if (!("beautify" in options.output)) {
options.output.beautify = true;
}
}
if (program.comments) {
if (typeof options.output != "object") options.output = {};
options.output.comments = typeof program.comments == "string" ? program.comments : "some";
}
if (program.define) {
if (typeof options.compress != "object") options.compress = {};
if (typeof options.compress.global_defs != "object") options.compress.global_defs = {};
for (var expr in program.define) {
options.compress.global_defs[expr] = program.define[expr];
}
}
if (program.keepClassnames) {
options.keep_classnames = true;
}
if (program.keepFnames) {
options.keep_fnames = true;
}
if (program.mangleProps) {
if (program.mangleProps.domprops) {
delete program.mangleProps.domprops;
} else {
if (typeof program.mangleProps != "object") program.mangleProps = {};
if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = [];
}
if (typeof options.mangle != "object") options.mangle = {};
options.mangle.properties = program.mangleProps;
}
if (program.nameCache) {
options.nameCache = JSON.parse(read_file(program.nameCache, "{}"));
}
if (program.output == "ast") {
options.output = {
ast: true,
code: false
};
}
if (program.parse) {
if (!program.parse.acorn && !program.parse.spidermonkey) {
options.parse = program.parse;
} else if (program.sourceMap && program.sourceMap.content == "inline") {
fatal("ERROR: inline source map only works with built-in parser");
}
}
if (~program.rawArgs.indexOf("--rename")) {
options.rename = true;
} else if (!program.rename) {
options.rename = false;
}
var convert_path = function(name) {
return name;
};
if (typeof program.sourceMap == "object" && "base" in program.sourceMap) {
convert_path = function() {
var base = program.sourceMap.base;
delete options.sourceMap.base;
return function(name) {
return path.relative(base, name);
};
}();
}
if (program.verbose) {
options.warnings = "verbose";
} else if (program.warn) {
options.warnings = true;
}
let filesList;
if (options.files && options.files.length) {
filesList = options.files;
delete options.files;
} else if (program.args.length) {
filesList = program.args;
}
if (filesList) {
simple_glob(filesList).forEach(function(name) {
files[convert_path(name)] = read_file(name);
});
run();
} else {
var chunks = [];
process.stdin.setEncoding("utf8");
process.stdin.on("data", function(chunk) {
chunks.push(chunk);
}).on("end", function() {
files = [ chunks.join("") ];
run();
});
process.stdin.resume();
}
function convert_ast(fn) {
return UglifyJS.AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null));
}
function run() {
UglifyJS.AST_Node.warn_function = function(msg) {
print_error("WARN: " + msg);
};
if (program.timings) options.timings = true;
try {
if (program.parse) {
if (program.parse.acorn) {
files = convert_ast(function(toplevel, name) {
return require("acorn").parse(files[name], {
ecmaVersion: 2018,
locations: true,
program: toplevel,
sourceFile: name,
sourceType: options.module || program.parse.module ? "module" : "script"
});
});
} else if (program.parse.spidermonkey) {
files = convert_ast(function(toplevel, name) {
var obj = JSON.parse(files[name]);
if (!toplevel) return obj;
toplevel.body = toplevel.body.concat(obj.body);
return toplevel;
});
}
}
} catch (ex) {
fatal(ex);
}
var result = UglifyJS.minify(files, options);
if (result.error) {
var ex = result.error;
if (ex.name == "SyntaxError") {
print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
var col = ex.col;
var lines = files[ex.filename].split(/\r?\n/);
var line = lines[ex.line - 1];
if (!line && !col) {
line = lines[ex.line - 2];
col = line.length;
}
if (line) {
var limit = 70;
if (col > limit) {
line = line.slice(col - limit);
col = limit;
}
print_error(line.slice(0, 80));
print_error(line.slice(0, col).replace(/\S/g, " ") + "^");
}
}
if (ex.defs) {
print_error("Supported options:");
print_error(format_object(ex.defs));
}
fatal(ex);
} else if (program.output == "ast") {
if (!options.compress && !options.mangle) {
result.ast.figure_out_scope({});
}
print(JSON.stringify(result.ast, function(key, value) {
if (value) switch (key) {
case "thedef":
return symdef(value);
case "enclosed":
return value.length ? value.map(symdef) : undefined;
case "variables":
case "functions":
case "globals":
return value.size() ? value.map(symdef) : undefined;
}
if (skip_key(key)) return;
if (value instanceof UglifyJS.AST_Token) return;
if (value instanceof UglifyJS.Dictionary) return;
if (value instanceof UglifyJS.AST_Node) {
var result = {
_class: "AST_" + value.TYPE
};
if (value.block_scope) {
result.variables = value.block_scope.variables;
result.functions = value.block_scope.functions;
result.enclosed = value.block_scope.enclosed;
}
value.CTOR.PROPS.forEach(function(prop) {
result[prop] = value[prop];
});
return result;
}
return value;
}, 2));
} else if (program.output == "spidermonkey") {
print(JSON.stringify(UglifyJS.minify(result.code, {
compress: false,
mangle: false,
output: {
ast: true,
code: false
}
}).ast.to_mozilla_ast(), null, 2));
} else if (program.output) {
fs.writeFileSync(program.output, result.code);
if (result.map) {
fs.writeFileSync(program.output + ".map", result.map);
}
} else {
print(result.code);
}
if (program.nameCache) {
fs.writeFileSync(program.nameCache, JSON.stringify(options.nameCache));
}
if (result.timings) for (var phase in result.timings) {
print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s");
}
}
function fatal(message) {
if (message instanceof Error) message = message.stack.replace(/^\S*?Error:/, "ERROR:");
print_error(message);
process.exit(1);
}
// A file glob function that only supports "*" and "?" wildcards in the basename.
// Example: "foo/bar/*baz??.*.js"
// Argument `glob` may be a string or an array of strings.
// Returns an array of strings. Garbage in, garbage out.
function simple_glob(glob) {
if (Array.isArray(glob)) {
return [].concat.apply([], glob.map(simple_glob));
}
if (glob && glob.match(/[*?]/)) {
var dir = path.dirname(glob);
try {
var entries = fs.readdirSync(dir);
} catch (ex) {}
if (entries) {
var pattern = "^" + path.basename(glob)
.replace(/[.+^$[\]\\(){}]/g, "\\$&")
.replace(/\*/g, "[^/\\\\]*")
.replace(/\?/g, "[^/\\\\]") + "$";
var mod = process.platform === "win32" ? "i" : "";
var rx = new RegExp(pattern, mod);
var results = entries.filter(function(name) {
return rx.test(name);
}).map(function(name) {
return path.join(dir, name);
});
if (results.length) return results;
}
}
return [ glob ];
}
function read_file(path, default_value) {
try {
return fs.readFileSync(path, "utf8");
} catch (ex) {
if ((ex.code == "ENOENT" || ex.code == "ENAMETOOLONG") && default_value != null) return default_value;
fatal(ex);
}
}
function parse_js(flag) {
return function(value, options) {
options = options || {};
try {
UglifyJS.minify(value, {
parse: {
expression: true
},
compress: false,
mangle: false,
output: {
ast: true,
code: false
}
}).ast.walk(new UglifyJS.TreeWalker(function(node) {
if (node instanceof UglifyJS.AST_Assign) {
var name = node.left.print_to_string();
var value = node.right;
if (flag) {
options[name] = value;
} else if (value instanceof UglifyJS.AST_Array) {
options[name] = value.elements.map(to_string);
} else {
options[name] = to_string(value);
}
return true;
}
if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_PropAccess) {
var name = node.print_to_string();
options[name] = true;
return true;
}
if (!(node instanceof UglifyJS.AST_Sequence)) throw node;
function to_string(value) {
return value instanceof UglifyJS.AST_Constant ? value.getValue() : value.print_to_string({
quote_keys: true
});
}
}));
} catch(ex) {
if (flag) {
fatal("Error parsing arguments for '" + flag + "': " + value);
} else {
options[value] = null;
}
}
return options;
};
}
function parse_source_map() {
var parse = parse_js();
return function(value, options) {
var hasContent = options && "content" in options;
var settings = parse(value, options);
if (!hasContent && settings.content && settings.content != "inline") {
settings.content = read_file(settings.content, settings.content);
}
return settings;
};
}
function skip_key(key) {
return skip_keys.includes(key);
}
function symdef(def) {
var ret = (1e6 + def.id) + " " + def.name;
if (def.mangled_name) ret += " " + def.mangled_name;
return ret;
}
function format_object(obj) {
var lines = [];
var padding = "";
Object.keys(obj).map(function(name) {
if (padding.length < name.length) padding = Array(name.length + 1).join(" ");
return [ name, JSON.stringify(obj[name]) ];
}).forEach(function(tokens) {
lines.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]);
});
return lines.join("\n");
}
function print_error(msg) {
process.stderr.write(msg);
process.stderr.write("\n");
}
function print(txt) {
process.stdout.write(txt);
process.stdout.write("\n");
}
function describe_ast() {
var out = UglifyJS.OutputStream({ beautify: true });
function doitem(ctor) {
out.print("AST_" + ctor.TYPE);
var props = ctor.SELF_PROPS.filter(function(prop) {
return !/^\$/.test(prop);
});
if (props.length > 0) {
out.space();
out.with_parens(function() {
props.forEach(function(prop, i) {
if (i) out.space();
out.print(prop);
});
});
}
if (ctor.documentation) {
out.space();
out.print_string(ctor.documentation);
}
if (ctor.SUBCLASSES.length > 0) {
out.space();
out.with_block(function() {
ctor.SUBCLASSES.forEach(function(ctor, i) {
out.indent();
doitem(ctor);
out.newline();
});
});
}
}
doitem(UglifyJS.AST_Node);
return out + "\n";
}

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env node
/* eslint-env node */
process.env.TERSER_NO_BUNDLE = "1";
require("./uglifyjs");

21955
node_modules/terser/dist/bundle.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

64
node_modules/terser/package.json generated vendored
View File

@@ -1,59 +1,58 @@
{ {
"_from": "terser@^3.16.1", "_from": "terser@^4.0.0",
"_id": "terser@3.17.0", "_id": "terser@4.6.3",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", "_integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==",
"_location": "/terser", "_location": "/terser",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "terser@^3.16.1", "raw": "terser@^4.0.0",
"name": "terser", "name": "terser",
"escapedName": "terser", "escapedName": "terser",
"rawSpec": "^3.16.1", "rawSpec": "^4.0.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^3.16.1" "fetchSpec": "^4.0.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/minify" "/minify"
], ],
"_resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", "_resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz",
"_shasum": "f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2", "_shasum": "e33aa42461ced5238d352d2df2a67f21921f8d87",
"_spec": "terser@^3.16.1", "_spec": "terser@^4.0.0",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\minify", "_where": "/home/s2/Code/minifyfromhtml/node_modules/minify",
"author": { "author": {
"name": "Mihai Bazon", "name": "Mihai Bazon",
"email": "mihai.bazon@gmail.com", "email": "mihai.bazon@gmail.com",
"url": "http://lisperator.net/" "url": "http://lisperator.net/"
}, },
"bin": { "bin": {
"terser": "bin/uglifyjs" "terser": "bin/terser"
}, },
"bugs": { "bugs": {
"url": "https://github.com/fabiosantoscode/terser/issues" "url": "https://github.com/terser/terser/issues"
}, },
"bundleDependencies": false, "bundleDependencies": false,
"dependencies": { "dependencies": {
"commander": "^2.19.0", "commander": "^2.20.0",
"source-map": "~0.6.1", "source-map": "~0.6.1",
"source-map-support": "~0.5.10" "source-map-support": "~0.5.12"
}, },
"deprecated": false, "deprecated": false,
"description": "JavaScript parser, mangler/compressor and beautifier toolkit for ES6+", "description": "JavaScript parser, mangler/compressor and beautifier toolkit for ES6+",
"devDependencies": { "devDependencies": {
"acorn": "^6.0.4", "acorn": "^7.0.0",
"cross-env": "^5.2.0", "astring": "^1.4.1",
"csv": "^5.1.0", "eslint": "^6.3.0",
"escodegen": "^1.11.0",
"eslint": "^4.19.1",
"eslump": "^2.0.0", "eslump": "^2.0.0",
"mocha": "^3.0.0", "mocha": "^5.2.0",
"mochallel": "^1.8.6", "mochallel": "^2.0.0",
"pre-commit": "^1.2.2", "pre-commit": "^1.2.2",
"rimraf": "^2.6.2", "rimraf": "^3.0.0",
"rollup": "^1.0.1", "rollup": "^1.20.3",
"semver": "~5.6.0" "rollup-plugin-terser": "^5.1.1",
"semver": "^6.3.0"
}, },
"engines": { "engines": {
"node": ">=6.0.0" "node": ">=6.0.0"
@@ -69,7 +68,8 @@
"describe": false, "describe": false,
"it": false, "it": false,
"require": false, "require": false,
"global": false "global": false,
"process": false
}, },
"rules": { "rules": {
"brace-style": [ "brace-style": [
@@ -86,6 +86,7 @@
], ],
"no-debugger": "error", "no-debugger": "error",
"no-undef": "error", "no-undef": "error",
"no-tabs": "error",
"semi": [ "semi": [
"error", "error",
"always" "always"
@@ -107,7 +108,7 @@
"CHANGELOG.md", "CHANGELOG.md",
"PATRONS.md" "PATRONS.md"
], ],
"homepage": "https://github.com/fabiosantoscode/terser", "homepage": "https://terser.org",
"keywords": [ "keywords": [
"uglify", "uglify",
"terser", "terser",
@@ -142,15 +143,18 @@
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/fabiosantoscode/terser.git" "url": "git+https://github.com/terser/terser.git"
}, },
"scripts": { "scripts": {
"build": "rimraf dist/* && rollup --config --silent",
"lint": "eslint lib", "lint": "eslint lib",
"lint-fix": "eslint --fix lib", "lint-fix": "eslint --fix lib",
"postversion": "echo 'Remember to update the changelog!'", "postversion": "echo 'Remember to update the changelog!'",
"prepare": "rimraf dist/* && rollup -c && cd dist && cross-env TERSER_NO_BUNDLE=1 ../bin/uglifyjs bundle.js -mc --source-map 'content=bundle.js.map,includeSources=true,url=bundle.min.js.map' -o bundle.min.js", "prepare": "npm run build",
"test": "npm run prepare --silent && istanbul instrument dist/bundle.min.js > dist/bundle.instrumented.js && node test/run-tests.js" "test": "npm run build -- --configTest && node test/run-tests.js",
"test:compress": "npm run build -- --configTest && node test/compress.js",
"test:mocha": "npm run build -- --configTest && node test/mocha.js"
}, },
"types": "tools/terser.d.ts", "types": "tools/terser.d.ts",
"version": "3.17.0" "version": "4.6.3"
} }

View File

@@ -2079,6 +2079,7 @@ export var domprops = [
"alignmentBaseline", "alignmentBaseline",
"alinkColor", "alinkColor",
"all", "all",
"allSettled",
"allowFullscreen", "allowFullscreen",
"allowedDirections", "allowedDirections",
"alpha", "alpha",
@@ -2122,6 +2123,7 @@ export var domprops = [
"animationTimingFunction", "animationTimingFunction",
"animationsPaused", "animationsPaused",
"anniversary", "anniversary",
"any",
"app", "app",
"appCodeName", "appCodeName",
"appMinorVersion", "appMinorVersion",
@@ -2161,12 +2163,15 @@ export var domprops = [
"atob", "atob",
"attachEvent", "attachEvent",
"attachShader", "attachShader",
"attachShadow",
"attachments", "attachments",
"attack", "attack",
"attrChange", "attrChange",
"attrName", "attrName",
"attributeFilter",
"attributeName", "attributeName",
"attributeNamespace", "attributeNamespace",
"attributeOldValue",
"attributes", "attributes",
"audioTracks", "audioTracks",
"autoIncrement", "autoIncrement",
@@ -2379,6 +2384,7 @@ export var domprops = [
"caption", "caption",
"caption-side", "caption-side",
"captionSide", "captionSide",
"capture",
"captureEvents", "captureEvents",
"captureStackTrace", "captureStackTrace",
"caretPositionFromPoint", "caretPositionFromPoint",
@@ -2407,6 +2413,8 @@ export var domprops = [
"charCode", "charCode",
"charCodeAt", "charCodeAt",
"charIndex", "charIndex",
"characterData",
"characterDataOldValue",
"characterSet", "characterSet",
"charging", "charging",
"chargingTime", "chargingTime",
@@ -2417,6 +2425,7 @@ export var domprops = [
"checkValidity", "checkValidity",
"checked", "checked",
"childElementCount", "childElementCount",
"childList",
"childNodes", "childNodes",
"children", "children",
"chrome", "chrome",
@@ -2732,9 +2741,9 @@ export var domprops = [
"declare", "declare",
"decode", "decode",
"decodeAudioData", "decodeAudioData",
"decodingInfo",
"decodeURI", "decodeURI",
"decodeURIComponent", "decodeURIComponent",
"decodingInfo",
"decrypt", "decrypt",
"default", "default",
"defaultCharset", "defaultCharset",
@@ -3060,6 +3069,7 @@ export var domprops = [
"formNoValidate", "formNoValidate",
"formTarget", "formTarget",
"format", "format",
"formatToParts",
"forms", "forms",
"forward", "forward",
"fr", "fr",
@@ -4093,6 +4103,7 @@ export var domprops = [
"oncandidatewindowupdate", "oncandidatewindowupdate",
"oncanplay", "oncanplay",
"oncanplaythrough", "oncanplaythrough",
"once",
"oncellchange", "oncellchange",
"onchange", "onchange",
"onchargingchange", "onchargingchange",
@@ -4411,6 +4422,7 @@ export var domprops = [
"parseFromString", "parseFromString",
"parseInt", "parseInt",
"participants", "participants",
"passive",
"password", "password",
"pasteHTML", "pasteHTML",
"path", "path",
@@ -4500,6 +4512,7 @@ export var domprops = [
"preferredStylesheetSet", "preferredStylesheetSet",
"prefix", "prefix",
"preload", "preload",
"prepend",
"preserveAlpha", "preserveAlpha",
"preserveAspectRatio", "preserveAspectRatio",
"preserveAspectRatioString", "preserveAspectRatioString",
@@ -4981,8 +4994,8 @@ export var domprops = [
"slice", "slice",
"slope", "slope",
"small", "small",
"smooth",
"smil", "smil",
"smooth",
"smoothingTimeConstant", "smoothingTimeConstant",
"snapToLines", "snapToLines",
"snapshotItem", "snapshotItem",
@@ -5097,6 +5110,7 @@ export var domprops = [
"substring", "substring",
"substringData", "substringData",
"subtle", "subtle",
"subtree",
"suffix", "suffix",
"suffixes", "suffixes",
"summary", "summary",
@@ -5602,4 +5616,4 @@ export var domprops = [
"zoom", "zoom",
"zoomAndPan", "zoomAndPan",
"zoomRectScreen" "zoomRectScreen"
] ];

31
node_modules/terser/tools/node.js generated vendored
View File

@@ -1,22 +1,19 @@
var fs = require("fs"); import { minify } from "../lib/minify";
var bundle_path = __dirname + "/../dist/bundle.js"; export function default_options() {
var UglifyJS = require(bundle_path); const defs = {};
module.exports = UglifyJS;
function infer_options(options) { Object.keys(infer_options({ 0: 0 })).forEach((component) => {
var result = UglifyJS.minify("", options); const options = infer_options({
return result.error && result.error.defs; [component]: {0: 0}
} });
UglifyJS.default_options = function() { if (options) defs[component] = options;
var defs = {};
Object.keys(infer_options({ 0: 0 })).forEach(function(component) {
var options = {};
options[component] = { 0: 0 };
if (options = infer_options(options)) {
defs[component] = options;
}
}); });
return defs; return defs;
}; }
function infer_options(options) {
var result = minify("", options);
return result.error && result.error.defs;
}

7
node_modules/terser/tools/postinstall.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
if (process.env.CI || process.env.ADBLOCK || process.env.DISABLE_OPENCOLLECTIVE) return;
console.log(
`###########################################################
# contribute to Terser! https://opencollective.com/terser #
###########################################################
`)

View File

@@ -42,13 +42,7 @@
ta.style.width = "100%"; ta.style.width = "100%";
ta.style.height = "20em"; ta.style.height = "20em";
ta.style.boxSizing = "border-box"; ta.style.boxSizing = "border-box";
<!-- ta.value = Object.keys(props).sort(cmp).map(function(name){ --> ta.value = 'export var domprops = ' + JSON.stringify(Object.keys(props).sort(cmp), null, 4);
<!-- return JSON.stringify(name); -->
<!-- }).join(",\n"); -->
ta.value = 'var domprops = ' + JSON.stringify({
vars: [],
props: Object.keys(props).sort(cmp)
}, null, 2);
document.body.appendChild(ta); document.body.appendChild(ta);
function cmp(a, b) { function cmp(a, b) {

View File

@@ -1,6 +1,11 @@
/// <reference lib="es2015" />
import { RawSourceMap } from 'source-map'; import { RawSourceMap } from 'source-map';
export type ECMA = 5 | 6 | 7 | 8 | 9; /** @deprecated since this versions basically do not exist */
type ECMA_UNOFFICIAL = 6 | 7 | 8 | 9;
export type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | ECMA_UNOFFICIAL;
export interface ParseOptions { export interface ParseOptions {
bare_returns?: boolean; bare_returns?: boolean;
@@ -12,21 +17,25 @@ export interface ParseOptions {
export interface CompressOptions { export interface CompressOptions {
arguments?: boolean; arguments?: boolean;
arrows?: boolean; arrows?: boolean;
booleans_as_integers?: boolean;
booleans?: boolean; booleans?: boolean;
collapse_vars?: boolean; collapse_vars?: boolean;
comparisons?: boolean; comparisons?: boolean;
computed_props?: boolean;
conditionals?: boolean; conditionals?: boolean;
dead_code?: boolean; dead_code?: boolean;
defaults?: boolean; defaults?: boolean;
directives?: boolean; directives?: boolean;
drop_console?: boolean; drop_console?: boolean;
drop_debugger?: boolean; drop_debugger?: boolean;
ecma?: ECMA;
evaluate?: boolean; evaluate?: boolean;
expression?: boolean; expression?: boolean;
global_defs?: object; global_defs?: object;
hoist_funs?: boolean; hoist_funs?: boolean;
hoist_props?: boolean; hoist_props?: boolean;
hoist_vars?: boolean; hoist_vars?: boolean;
ie8?: boolean;
if_return?: boolean; if_return?: boolean;
inline?: boolean | InlineFunctions; inline?: boolean | InlineFunctions;
join_vars?: boolean; join_vars?: boolean;
@@ -35,6 +44,7 @@ export interface CompressOptions {
keep_fnames?: boolean | RegExp; keep_fnames?: boolean | RegExp;
keep_infinity?: boolean; keep_infinity?: boolean;
loops?: boolean; loops?: boolean;
module?: boolean;
negate_iife?: boolean; negate_iife?: boolean;
passes?: number; passes?: number;
properties?: boolean; properties?: boolean;
@@ -48,8 +58,8 @@ export interface CompressOptions {
toplevel?: boolean; toplevel?: boolean;
top_retain?: null | string | string[] | RegExp; top_retain?: null | string | string[] | RegExp;
typeofs?: boolean; typeofs?: boolean;
unsafe?: boolean;
unsafe_arrows?: boolean; unsafe_arrows?: boolean;
unsafe?: boolean;
unsafe_comps?: boolean; unsafe_comps?: boolean;
unsafe_Function?: boolean; unsafe_Function?: boolean;
unsafe_math?: boolean; unsafe_math?: boolean;
@@ -82,8 +92,8 @@ export interface MangleOptions {
export interface ManglePropertiesOptions { export interface ManglePropertiesOptions {
builtins?: boolean; builtins?: boolean;
debug?: boolean; debug?: boolean;
keep_quoted?: boolean; keep_quoted?: boolean | 'strict';
regex?: RegExp; regex?: RegExp | string;
reserved?: string[]; reserved?: string[];
} }
@@ -91,15 +101,16 @@ export interface OutputOptions {
ascii_only?: boolean; ascii_only?: boolean;
beautify?: boolean; beautify?: boolean;
braces?: boolean; braces?: boolean;
comments?: boolean | 'all' | 'some' | RegExp; comments?: boolean | 'all' | 'some' | RegExp | Function;
ecma?: ECMA; ecma?: ECMA;
indent_level?: number;
indent_start?: boolean;
inline_script?: boolean;
ie8?: boolean; ie8?: boolean;
indent_level?: number;
indent_start?: number;
inline_script?: boolean;
keep_quoted_props?: boolean; keep_quoted_props?: boolean;
max_line_len?: boolean; max_line_len?: number | false;
preamble?: string; preamble?: string;
preserve_annotations?: boolean;
quote_keys?: boolean; quote_keys?: boolean;
quote_style?: OutputQuoteStyle; quote_style?: OutputQuoteStyle;
safari10?: boolean; safari10?: boolean;
@@ -140,7 +151,7 @@ export interface MinifyOutput {
ast?: AST_Node; ast?: AST_Node;
code?: string; code?: string;
error?: Error; error?: Error;
map?: string; map?: RawSourceMap | string;
warnings?: string[]; warnings?: string[];
} }
@@ -179,21 +190,6 @@ export class TreeTransformer extends TreeWalker {
export function push_uniq<T>(array: T[], el: T): void; export function push_uniq<T>(array: T[], el: T): void;
type DictEachCallback = (val: any, key: string) => any;
export class Dictionary {
static fromObject(obj: object): Dictionary;
add(key: string, val: any): this;
clone(): Dictionary;
del(key: string): this;
each(fn: DictEachCallback): void;
get(key: string): any;
has(key: string): boolean;
map(fn: DictEachCallback): any[];
set(key: string, val: any): this;
size(): number;
}
export function minify(files: string | string[] | { [file: string]: string } | AST_Node, options?: MinifyOptions): MinifyOutput; export function minify(files: string | string[] | { [file: string]: string } | AST_Node, options?: MinifyOptions): MinifyOutput;
export class AST_Node { export class AST_Node {
@@ -292,17 +288,14 @@ declare class AST_Accessor extends AST_Lambda {
declare class AST_Function extends AST_Lambda { declare class AST_Function extends AST_Lambda {
constructor(props?: object); constructor(props?: object);
inlined: boolean;
} }
declare class AST_Arrow extends AST_Lambda { declare class AST_Arrow extends AST_Lambda {
constructor(props?: object); constructor(props?: object);
inlined: boolean;
} }
declare class AST_Defun extends AST_Lambda { declare class AST_Defun extends AST_Lambda {
constructor(props?: object); constructor(props?: object);
inlined: boolean;
} }
declare class AST_Class extends AST_Scope { declare class AST_Class extends AST_Scope {
@@ -310,7 +303,6 @@ declare class AST_Class extends AST_Scope {
name: AST_SymbolClass | AST_SymbolDefClass | null; name: AST_SymbolClass | AST_SymbolDefClass | null;
extends: AST_Node | null; extends: AST_Node | null;
properties: AST_ObjectProperty[]; properties: AST_ObjectProperty[];
inlined: boolean;
} }
declare class AST_DefClass extends AST_Class { declare class AST_DefClass extends AST_Class {
@@ -739,7 +731,10 @@ declare class AST_Number extends AST_Constant {
declare class AST_RegExp extends AST_Constant { declare class AST_RegExp extends AST_Constant {
constructor(props?: object); constructor(props?: object);
value: RegExp; value: {
source: string,
flags: string
};
} }
declare class AST_Atom extends AST_Constant { declare class AST_Atom extends AST_Constant {

10
node_modules/try-catch/ChangeLog generated vendored
View File

@@ -1,3 +1,13 @@
2019.09.12, v2.0.1
feature:
- (try-catch) add madrun
- (package) eslint v6.3.0
- (package) nyc v14.1.1
- (package) nyc v12.0.2
- (try-catch) changed the way result is returned
2018.02.08, v2.0.0 2018.02.08, v2.0.0
feature: feature:

28
node_modules/try-catch/README.md generated vendored
View File

@@ -1,11 +1,29 @@
# TryCatch # Try Catch [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
`Try-catch` wrapper. [NPMIMGURL]: https://img.shields.io/npm/v/try-catch.svg?style=flat
[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/try-catch/master.svg?style=flat
[DependencyStatusIMGURL]: https://img.shields.io/david/coderaiser/try-catch.svg?style=flat
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[NPMURL]: https://npmjs.org/package/try-catch "npm"
[BuildStatusURL]: https://travis-ci.org/coderaiser/try-catch "Build Status"
[DependencyStatusURL]: https://david-dm.org/coderaiser/try-catch "Dependency Status"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[CoverageURL]: https://coveralls.io/github/coderaiser/readify?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/readify/badge.svg?branch=master&service=github
Functional `try-catch` wrapper
## Install
```
npm i try-catch
```
## Example ## Example
```js ```js
const tryCatch = require('tryCatch'); const tryCatch = require('try-catch');
const {parse} = JSON; const {parse} = JSON;
const [error, result] = tryCatch(parse, 'hello'); const [error, result] = tryCatch(parse, 'hello');
@@ -14,6 +32,10 @@ if (error)
``` ```
## Related
- [try-to-catch](https://github.com/coderaiser/try-to-catch "TryToCatch") - functional try-catch wrapper for promises.
## License ## License
MIT MIT

33
node_modules/try-catch/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{ {
"_from": "try-catch@^2.0.0", "_from": "try-catch@^2.0.0",
"_id": "try-catch@2.0.0", "_id": "try-catch@2.0.1",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-RPXpVjsbtWgymwGq5F/OWDFsjEzdvzwHFaMjWWW6f/p6+uk/N7YSKJHQfIfGqITfj8qH4cBqCLMnhKZBaKk7Kg==", "_integrity": "sha512-LsOrmObN/2WdM+y2xG+t16vhYrQsnV8wftXIcIOWZhQcBJvKGYuamJGwnU98A7Jxs2oZNkJztXlphEOoA0DWqg==",
"_location": "/try-catch", "_location": "/try-catch",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [ "_requiredBy": [
"/minify" "/minify"
], ],
"_resolved": "https://registry.npmjs.org/try-catch/-/try-catch-2.0.0.tgz", "_resolved": "https://registry.npmjs.org/try-catch/-/try-catch-2.0.1.tgz",
"_shasum": "a491141d597f8b72b46757fe1c47059341a16aed", "_shasum": "a35d354187c422f291a0bcfd9eb77e3a4f90c1e5",
"_spec": "try-catch@^2.0.0", "_spec": "try-catch@^2.0.0",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\minify", "_where": "/home/s2/Code/minifyfromhtml/node_modules/minify",
"author": { "author": {
"name": "coderaiser", "name": "coderaiser",
"email": "mnemonic.enemy@gmail.com", "email": "mnemonic.enemy@gmail.com",
@@ -33,12 +33,16 @@
"bundleDependencies": false, "bundleDependencies": false,
"dependencies": {}, "dependencies": {},
"deprecated": false, "deprecated": false,
"description": "try-catch wrapper", "description": "functional try-catch wrapper",
"devDependencies": { "devDependencies": {
"coveralls": "^3.0.0", "coveralls": "^3.0.0",
"eslint": "^4.17.0", "eslint": "^6.3.0",
"nyc": "^11.4.1", "eslint-plugin-node": "^10.0.0",
"tape": "^4.8.0" "eslint-plugin-putout": "^2.0.0",
"madrun": "^3.0.3",
"nyc": "^14.1.1",
"putout": "^5.27.0",
"supertape": "^1.2.3"
}, },
"engines": { "engines": {
"node": ">=0.4" "node": ">=0.4"
@@ -52,10 +56,11 @@
"url": "git://github.com/coderaiser/try-catch.git" "url": "git://github.com/coderaiser/try-catch.git"
}, },
"scripts": { "scripts": {
"coverage": "nyc npm test", "coverage": "madrun coverage",
"lint": "eslint lib test", "fix:lint": "madrun fix:lint",
"report": "nyc report --reporter=text-lcov | coveralls", "lint": "madrun lint",
"test": "tape 'test/*.js'" "report": "madrun report",
"test": "madrun test"
}, },
"version": "2.0.0" "version": "2.0.1"
} }

21
node_modules/try-to-catch/ChangeLog generated vendored
View File

@@ -1,3 +1,24 @@
2019.12.30, v2.0.1
fix:
- (try-to-catch) minimal node: v4 -> v6
feature:
- (package) putout v7.3.4
- (package) nyc v15.0.0
- (package) nodemon v2.0.2
2019.10.16, v2.0.0
feature:
- (package) putout v6.15.1
- (package) madrun v3.0.6
- (try-to-catch) drop support of node < 4
- (package) nyc v14.1.1
- (package) eslint v6.1.0
2018.11.08, v1.1.1 2018.11.08, v1.1.1
fix: fix:

18
node_modules/try-to-catch/README.md generated vendored
View File

@@ -30,7 +30,8 @@ Simplest example with `async-await`:
```js ```js
const tryToCatch = require('try-to-catch'); const tryToCatch = require('try-to-catch');
await tryToCatch(Promise.reject('hi')); const reject = Promise.reject.bind(Promise);
await tryToCatch(reject, 'hi');
// returns // returns
[ Error: hi] [ Error: hi]
``` ```
@@ -47,11 +48,8 @@ await tryToCatch(() => 5);
Advanced example: Advanced example:
```js ```js
const fs = require('fs'); const {readFile, readdir} = require('fs').promises;
const tryToCatch = require('try-to-catch'); const tryToCatch = require('try-to-catch');
const {promisify} = require('util');
const readFile = promisify(fs.readFile);
const readDir = promisify(fs.readdir);
read(process.argv[2]) read(process.argv[2])
.then(console.log) .then(console.log)
@@ -66,18 +64,10 @@ async function read(path) {
if (error.code !== 'EISDIR') if (error.code !== 'EISDIR')
return error; return error;
return await readDir(path); return await readdir(path);
} }
``` ```
## Environments
In old `node.js` environments that not fully supports `es2015`, `try-to-catch` can be used with:
```js
var tryToCatch = require('try-to-catch/legacy');
```
## Related ## Related
- [try-catch](https://github.com/coderaiser/try-catch "try-catch") - functional try-catch wrapper. - [try-catch](https://github.com/coderaiser/try-catch "try-catch") - functional try-catch wrapper.

View File

@@ -1 +0,0 @@
module.exports = require('./try-to-catch')

View File

@@ -1,37 +0,0 @@
'use strict';
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
var success = function success(a) {
return [null, a];
};
var fail = function fail(a) {
return [a];
};
var noArg = function noArg(f, a) {
return function () {
return f.apply(void 0, _toConsumableArray(a));
};
};
module.exports = function (fn) {
check(fn);
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return Promise.resolve().then(noArg(fn, args)).then(success).catch(fail);
};
function check(fn) {
if (typeof fn !== 'function') throw Error('fn should be a function!');
}

View File

@@ -1,27 +1,27 @@
{ {
"_from": "try-to-catch@^1.0.2", "_from": "try-to-catch@^2.0.0",
"_id": "try-to-catch@1.1.1", "_id": "try-to-catch@2.0.1",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-ikUlS+/BcImLhNYyIgZcEmq4byc31QpC+46/6Jm5ECWkVFhf8SM2Fp/0pMVXPX6vk45SMCwrP4Taxucne8I0VA==", "_integrity": "sha512-QYH/PR3ogChy82e2l1UgrEgutcf6Jtfu3TAQWC+Vs6MKpoaFs1atDHUPzfaERugZlESb2Xku7J2my6iUQ7+tcQ==",
"_location": "/try-to-catch", "_location": "/try-to-catch",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "try-to-catch@^1.0.2", "raw": "try-to-catch@^2.0.0",
"name": "try-to-catch", "name": "try-to-catch",
"escapedName": "try-to-catch", "escapedName": "try-to-catch",
"rawSpec": "^1.0.2", "rawSpec": "^2.0.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "^1.0.2" "fetchSpec": "^2.0.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/minify" "/minify"
], ],
"_resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-1.1.1.tgz", "_resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-2.0.1.tgz",
"_shasum": "770162dd13b9a0e55da04db5b7f888956072038a", "_shasum": "4a943ba6f2921bd3ba945ea5d4459119ec3ec079",
"_spec": "try-to-catch@^1.0.2", "_spec": "try-to-catch@^2.0.0",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\minify", "_where": "/home/s2/Code/minifyfromhtml/node_modules/minify",
"author": { "author": {
"name": "coderaiser", "name": "coderaiser",
"email": "mnemonic.enemy@gmail.com", "email": "mnemonic.enemy@gmail.com",
@@ -39,12 +39,17 @@
"@babel/core": "^7.0.0", "@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0", "@babel/preset-env": "^7.0.0",
"coveralls": "^3.0.0", "coveralls": "^3.0.0",
"eslint": "^5.6.0", "eslint": "^6.1.0",
"nodemon": "^1.14.12", "eslint-plugin-node": "^11.0.0",
"nyc": "^13.0.1", "eslint-plugin-putout": "^3.0.0",
"redrun": "^7.0.2", "madrun": "^5.4.0",
"tape": "^4.8.0", "nodemon": "^2.0.2",
"try-to-tape": "^1.0.0" "nyc": "^15.0.0",
"putout": "^7.3.4",
"supertape": "^1.2.4"
},
"engines": {
"node": ">=6"
}, },
"homepage": "http://github.com/coderaiser/try-to-catch", "homepage": "http://github.com/coderaiser/try-to-catch",
"keywords": [ "keywords": [
@@ -65,14 +70,12 @@
"url": "git://github.com/coderaiser/try-to-catch.git" "url": "git://github.com/coderaiser/try-to-catch.git"
}, },
"scripts": { "scripts": {
"build": "babel lib -d legacy", "coverage": "madrun coverage",
"coverage": "nyc npm test", "fix:lint": "madrun fix:lint",
"legacy": "echo \"module.exports = require('./try-to-catch')\" > legacy/index.js", "lint": "madrun lint",
"lint": "eslint lib test", "report": "madrun report",
"report": "nyc report --reporter=text-lcov | coveralls", "test": "madrun test",
"test": "tape 'test/*.js'", "watch:test": "madrun watch:test"
"watch:test": "nodemon -w lib -w test -x \"npm test\"",
"wisdom": "redrun build legacy"
}, },
"version": "1.1.1" "version": "2.0.1"
} }

2
node_modules/uglify-js/LICENSE generated vendored
View File

@@ -1,6 +1,6 @@
UglifyJS is released under the BSD license: UglifyJS is released under the BSD license:
Copyright 2012-2018 (c) Mihai Bazon <mihai.bazon@gmail.com> Copyright 2012-2019 (c) Mihai Bazon <mihai.bazon@gmail.com>
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions

63
node_modules/uglify-js/README.md generated vendored
View File

@@ -87,6 +87,7 @@ a double dash to prevent input files being used as option arguments:
`wrap_iife` Wrap IIFEs in parenthesis. Note: you may `wrap_iife` Wrap IIFEs in parenthesis. Note: you may
want to disable `negate_iife` under want to disable `negate_iife` under
compressor options. compressor options.
-O, --output-opts [options] Specify output options (`beautify` disabled by default).
-o, --output <file> Output file path (default STDOUT). Specify `ast` or -o, --output <file> Output file path (default STDOUT). Specify `ast` or
`spidermonkey` to write UglifyJS or SpiderMonkey AST `spidermonkey` to write UglifyJS or SpiderMonkey AST
as JSON to STDOUT respectively. as JSON to STDOUT respectively.
@@ -478,42 +479,42 @@ if (result.error) throw result.error;
## Minify options ## Minify options
- `warnings` (default `false`) — pass `true` to return compressor warnings
in `result.warnings`. Use the value `"verbose"` for more detailed warnings.
- `parse` (default `{}`) — pass an object if you wish to specify some
additional [parse options](#parse-options).
- `compress` (default `{}`) — pass `false` to skip compressing entirely. - `compress` (default `{}`) — pass `false` to skip compressing entirely.
Pass an object to specify custom [compress options](#compress-options). Pass an object to specify custom [compress options](#compress-options).
- `ie8` (default `false`) -- set to `true` to support IE8.
- `keep_fnames` (default: `false`) -- pass `true` to prevent discarding or mangling
of function names. Useful for code relying on `Function.prototype.name`.
- `mangle` (default `true`) — pass `false` to skip mangling names, or pass - `mangle` (default `true`) — pass `false` to skip mangling names, or pass
an object to specify [mangle options](#mangle-options) (see below). an object to specify [mangle options](#mangle-options) (see below).
- `mangle.properties` (default `false`) — a subcategory of the mangle option. - `mangle.properties` (default `false`) — a subcategory of the mangle option.
Pass an object to specify custom [mangle property options](#mangle-properties-options). Pass an object to specify custom [mangle property options](#mangle-properties-options).
- `output` (default `null`) pass an object if you wish to specify - `nameCache` (default `null`) -- pass an empty object `{}` or a previously
additional [output options](#output-options). The defaults are optimized
for best compression.
- `sourceMap` (default `false`) - pass an object if you wish to specify
[source map options](#source-map-options).
- `toplevel` (default `false`) - set to `true` if you wish to enable top level
variable and function name mangling and to drop unused variables and functions.
- `nameCache` (default `null`) - pass an empty object `{}` or a previously
used `nameCache` object if you wish to cache mangled variable and used `nameCache` object if you wish to cache mangled variable and
property names across multiple invocations of `minify()`. Note: this is property names across multiple invocations of `minify()`. Note: this is
a read/write property. `minify()` will read the name cache state of this a read/write property. `minify()` will read the name cache state of this
object and update it during minification so that it may be object and update it during minification so that it may be
reused or externally persisted by the user. reused or externally persisted by the user.
- `ie8` (default `false`) - set to `true` to support IE8. - `output` (default `null`) — pass an object if you wish to specify
additional [output options](#output-options). The defaults are optimized
for best compression.
- `keep_fnames` (default: `false`) - pass `true` to prevent discarding or mangling - `parse` (default `{}`) pass an object if you wish to specify some
of function names. Useful for code relying on `Function.prototype.name`. additional [parse options](#parse-options).
- `sourceMap` (default `false`) -- pass an object if you wish to specify
[source map options](#source-map-options).
- `toplevel` (default `false`) -- set to `true` if you wish to enable top level
variable and function name mangling and to drop unused variables and functions.
- `warnings` (default `false`) — pass `true` to return compressor warnings
in `result.warnings`. Use the value `"verbose"` for more detailed warnings.
## Minify options structure ## Minify options structure
@@ -605,6 +606,8 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `arguments` (default: `true`) -- replace `arguments[index]` with function - `arguments` (default: `true`) -- replace `arguments[index]` with function
parameter name whenever possible. parameter name whenever possible.
- `assignments` (default: `true`) -- apply optimizations to assignment expressions.
- `booleans` (default: `true`) -- various optimizations for boolean context, - `booleans` (default: `true`) -- various optimizations for boolean context,
for example `!!a ? b : c → a ? b : c` for example `!!a ? b : c → a ? b : c`
@@ -629,11 +632,17 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `drop_debugger` (default: `true`) -- remove `debugger;` statements - `drop_debugger` (default: `true`) -- remove `debugger;` statements
- `evaluate` (default: `true`) -- attempt to evaluate constant expressions - `evaluate` (default: `true`) -- Evaluate expression for shorter constant
representation. Pass `"eager"` to always replace function calls whenever
possible, or a positive integer to specify an upper bound for each individual
evaluation in number of characters.
- `expression` (default: `false`) -- Pass `true` to preserve completion values - `expression` (default: `false`) -- Pass `true` to preserve completion values
from terminal statements without `return`, e.g. in bookmarklets. from terminal statements without `return`, e.g. in bookmarklets.
- `functions` (default: `true`) -- convert declarations from `var`to `function`
whenever possible.
- `global_defs` (default: `{}`) -- see [conditional compilation](#conditional-compilation) - `global_defs` (default: `{}`) -- see [conditional compilation](#conditional-compilation)
- `hoist_funs` (default: `false`) -- hoist function declarations - `hoist_funs` (default: `false`) -- hoist function declarations
@@ -659,8 +668,9 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `join_vars` (default: `true`) -- join consecutive `var` statements - `join_vars` (default: `true`) -- join consecutive `var` statements
- `keep_fargs` (default: `true`) -- Prevents the compressor from discarding unused - `keep_fargs` (default: `strict`) -- Discard unused function arguments. Code
function arguments. You need this for code which relies on `Function.length`. which relies on `Function.length` will break if this is done indiscriminately,
i.e. when passing `true`. Pass `false` to always retain function arguments.
- `keep_fnames` (default: `false`) -- Pass `true` to prevent the - `keep_fnames` (default: `false`) -- Pass `true` to prevent the
compressor from discarding function names. Useful for code relying on compressor from discarding function names. Useful for code relying on
@@ -676,6 +686,8 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
where the return value is discarded, to avoid the parens that the where the return value is discarded, to avoid the parens that the
code generator would insert. code generator would insert.
- `objects` (default: `true`) -- compact duplicate keys in object literals.
- `passes` (default: `1`) -- The maximum number of times to run compress. - `passes` (default: `1`) -- The maximum number of times to run compress.
In some cases more than one pass leads to further compressed code. Keep in In some cases more than one pass leads to further compressed code. Keep in
mind more passes will take more time. mind more passes will take more time.
@@ -724,6 +736,8 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For
example: `/*@__PURE__*/foo();` example: `/*@__PURE__*/foo();`
- `strings` (default: `true`) -- compact string concatenations.
- `switches` (default: `true`) -- de-duplicate and remove unreachable `switch` branches - `switches` (default: `true`) -- de-duplicate and remove unreachable `switch` branches
- `toplevel` (default: `false`) -- drop unreferenced functions (`"funcs"`) and/or - `toplevel` (default: `false`) -- drop unreferenced functions (`"funcs"`) and/or
@@ -762,9 +776,6 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `unused` (default: `true`) -- drop unreferenced functions and variables (simple - `unused` (default: `true`) -- drop unreferenced functions and variables (simple
direct variable assignments do not count as references unless set to `"keep_assign"`) direct variable assignments do not count as references unless set to `"keep_assign"`)
- `warnings` (default: `false`) -- display warnings when dropping unreachable
code or unused declarations etc.
## Mangle options ## Mangle options
- `eval` (default `false`) -- Pass `true` to mangle names visible in scopes - `eval` (default `false`) -- Pass `true` to mangle names visible in scopes

80
node_modules/uglify-js/bin/uglifyjs generated vendored Normal file → Executable file
View File

@@ -36,6 +36,7 @@ program.option("-c, --compress [options]", "Enable compressor/specify compressor
program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js()); program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js());
program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js()); program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js());
program.option("-b, --beautify [options]", "Beautify output/specify output options.", parse_js()); program.option("-b, --beautify [options]", "Beautify output/specify output options.", parse_js());
program.option("-O, --output-opts [options]", "Output options (beautify disabled).", parse_js());
program.option("-o, --output <file>", "Output file (default STDOUT)."); program.option("-o, --output <file>", "Output file (default STDOUT).");
program.option("--comments [filter]", "Preserve copyright comments in the output."); program.option("--comments [filter]", "Preserve copyright comments in the output.");
program.option("--config-file <file>", "Read minify() options from JSON file."); program.option("--config-file <file>", "Read minify() options from JSON file.");
@@ -59,11 +60,11 @@ if (program.configFile) {
if (options.mangle && options.mangle.properties && options.mangle.properties.regex) { if (options.mangle && options.mangle.properties && options.mangle.properties.regex) {
options.mangle.properties.regex = UglifyJS.parse(options.mangle.properties.regex, { options.mangle.properties.regex = UglifyJS.parse(options.mangle.properties.regex, {
expression: true expression: true
}).getValue(); }).value;
} }
} }
if (!program.output && program.sourceMap && program.sourceMap.url != "inline") { if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
fatal("ERROR: cannot write source map to STDOUT"); fatal("cannot write source map to STDOUT");
} }
[ [
"compress", "compress",
@@ -78,12 +79,25 @@ if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
options[name] = program[name]; options[name] = program[name];
} }
}); });
if (program.verbose) {
options.warnings = "verbose";
} else if (program.warn) {
options.warnings = true;
}
if (options.warnings) {
UglifyJS.AST_Node.log_function(print_error, options.warnings == "verbose");
delete options.warnings;
}
if (program.beautify) { if (program.beautify) {
options.output = typeof program.beautify == "object" ? program.beautify : {}; options.output = typeof program.beautify == "object" ? program.beautify : {};
if (!("beautify" in options.output)) { if (!("beautify" in options.output)) {
options.output.beautify = true; options.output.beautify = true;
} }
} }
if (program.outputOpts) {
if (program.beautify) fatal("--beautify cannot be used with --output-opts");
options.output = typeof program.outputOpts == "object" ? program.outputOpts : {};
}
if (program.comments) { if (program.comments) {
if (typeof options.output != "object") options.output = {}; if (typeof options.output != "object") options.output = {};
options.output.comments = typeof program.comments == "string" ? program.comments : "some"; options.output.comments = typeof program.comments == "string" ? program.comments : "some";
@@ -124,7 +138,7 @@ if (program.parse) {
if (!program.parse.acorn && !program.parse.spidermonkey) { if (!program.parse.acorn && !program.parse.spidermonkey) {
options.parse = program.parse; options.parse = program.parse;
} else if (program.sourceMap && program.sourceMap.content == "inline") { } else if (program.sourceMap && program.sourceMap.content == "inline") {
fatal("ERROR: inline source map only works with built-in parser"); fatal("inline source map only works with built-in parser");
} }
} }
if (~program.rawArgs.indexOf("--rename")) { if (~program.rawArgs.indexOf("--rename")) {
@@ -144,15 +158,8 @@ if (typeof program.sourceMap == "object" && "base" in program.sourceMap) {
}; };
}(); }();
} }
if (program.verbose) {
options.warnings = "verbose";
} else if (program.warn) {
options.warnings = true;
}
if (program.self) { if (program.self) {
if (program.args.length) { if (program.args.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed");
print_error("WARN: Ignoring input files since --self was passed");
}
if (!options.wrap) options.wrap = "UglifyJS"; if (!options.wrap) options.wrap = "UglifyJS";
simple_glob(UglifyJS.FILES).forEach(function(name) { simple_glob(UglifyJS.FILES).forEach(function(name) {
files[convert_path(name)] = read_file(name); files[convert_path(name)] = read_file(name);
@@ -180,12 +187,9 @@ function convert_ast(fn) {
} }
function run() { function run() {
UglifyJS.AST_Node.warn_function = function(msg) {
print_error("WARN: " + msg);
};
var content = program.sourceMap && program.sourceMap.content; var content = program.sourceMap && program.sourceMap.content;
if (content && content != "inline") { if (content && content != "inline") {
print_error("INFO: Using input source map: " + content); UglifyJS.AST_Node.info("Using input source map: " + content);
options.sourceMap.content = read_file(content, content); options.sourceMap.content = read_file(content, content);
} }
if (program.timings) options.timings = true; if (program.timings) options.timings = true;
@@ -216,24 +220,26 @@ function run() {
var ex = result.error; var ex = result.error;
if (ex.name == "SyntaxError") { if (ex.name == "SyntaxError") {
print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col); print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
var col = ex.col; var file = files[ex.filename];
var lines = files[ex.filename].split(/\r?\n/); if (file) {
var line = lines[ex.line - 1]; var col = ex.col;
if (!line && !col) { var lines = file.split(/\r?\n/);
line = lines[ex.line - 2]; var line = lines[ex.line - 1];
col = line.length; if (!line && !col) {
} line = lines[ex.line - 2];
if (line) { col = line.length;
var limit = 70; }
if (col > limit) { if (line) {
line = line.slice(col - limit); var limit = 70;
col = limit; if (col > limit) {
line = line.slice(col - limit);
col = limit;
}
print_error(line.slice(0, 80));
print_error(line.slice(0, col).replace(/\S/g, " ") + "^");
} }
print_error(line.slice(0, 80));
print_error(line.slice(0, col).replace(/\S/g, " ") + "^");
} }
} } else if (ex.defs) {
if (ex.defs) {
print_error("Supported options:"); print_error("Supported options:");
print_error(format_object(ex.defs)); print_error(format_object(ex.defs));
} }
@@ -293,7 +299,11 @@ function run() {
} }
function fatal(message) { function fatal(message) {
if (message instanceof Error) message = message.stack.replace(/^\S*?Error:/, "ERROR:") if (message instanceof Error) {
message = message.stack.replace(/^\S*?Error:/, "ERROR:")
} else {
message = "ERROR: " + message;
}
print_error(message); print_error(message);
process.exit(1); process.exit(1);
} }
@@ -365,14 +375,14 @@ function parse_js(flag) {
if (!(node instanceof UglifyJS.AST_Sequence)) throw node; if (!(node instanceof UglifyJS.AST_Sequence)) throw node;
function to_string(value) { function to_string(value) {
return value instanceof UglifyJS.AST_Constant ? value.getValue() : value.print_to_string({ return value instanceof UglifyJS.AST_Constant ? value.value : value.print_to_string({
quote_keys: true quote_keys: true
}); });
} }
})); }));
} catch(ex) { } catch (ex) {
if (flag) { if (flag) {
fatal("Error parsing arguments for '" + flag + "': " + value); fatal("cannot parse arguments for '" + flag + "': " + value);
} else { } else {
options[value] = null; options[value] = null;
} }

82
node_modules/uglify-js/lib/ast.js generated vendored
View File

@@ -118,9 +118,25 @@ var AST_Node = DEFNODE("Node", "start end", {
} }
}, null); }, null);
AST_Node.warn = function(txt, props) { (AST_Node.log_function = function(fn, verbose) {
if (AST_Node.warn_function) AST_Node.warn_function(string_template(txt, props)); var printed = Object.create(null);
}; if (fn) {
AST_Node.info = verbose ? function(text, props) {
log("INFO: " + string_template(text, props));
} : noop;
AST_Node.warn = function(text, props) {
log("WARN: " + string_template(text, props));
};
} else {
AST_Node.info = AST_Node.warn = noop;
}
function log(msg) {
if (printed[msg]) return;
printed[msg] = true;
fn(msg);
}
})();
/* -----[ statements ]----- */ /* -----[ statements ]----- */
@@ -321,18 +337,25 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", {
$propdoc: { $propdoc: {
globals: "[Object/S] a map of name -> SymbolDef for all undeclared names", globals: "[Object/S] a map of name -> SymbolDef for all undeclared names",
}, },
wrap_commonjs: function(name) { wrap: function(name) {
var body = this.body; var body = this.body;
var wrapped_tl = "(function(exports){'$ORIG';})(typeof " + name + "=='undefined'?(" + name + "={}):" + name + ");"; return parse([
wrapped_tl = parse(wrapped_tl); "(function(exports){'$ORIG';})(typeof ",
wrapped_tl = wrapped_tl.transform(new TreeTransformer(function(node) { name,
"=='undefined'?(",
name,
"={}):",
name,
");"
].join(""), {
filename: "wrap=" + JSON.stringify(name)
}).transform(new TreeTransformer(function(node) {
if (node instanceof AST_Directive && node.value == "$ORIG") { if (node instanceof AST_Directive && node.value == "$ORIG") {
return MAP.splice(body); return MAP.splice(body);
} }
})); }));
return wrapped_tl;
}, },
wrap_enclose: function(args_values) { enclose: function(args_values) {
if (typeof args_values != "string") args_values = ""; if (typeof args_values != "string") args_values = "";
var index = args_values.indexOf(":"); var index = args_values.indexOf(":");
if (index < 0) index = args_values.length; if (index < 0) index = args_values.length;
@@ -343,7 +366,9 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", {
'){"$ORIG"})(', '){"$ORIG"})(',
args_values.slice(index + 1), args_values.slice(index + 1),
")" ")"
].join("")).transform(new TreeTransformer(function(node) { ].join(""), {
filename: "enclose=" + JSON.stringify(args_values)
}).transform(new TreeTransformer(function(node) {
if (node instanceof AST_Directive && node.value == "$ORIG") { if (node instanceof AST_Directive && node.value == "$ORIG") {
return MAP.splice(body); return MAP.splice(body);
} }
@@ -351,7 +376,7 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", {
} }
}, AST_Scope); }, AST_Scope);
var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments length_read", {
$documentation: "Base class for functions", $documentation: "Base class for functions",
$propdoc: { $propdoc: {
name: "[AST_SymbolDeclaration?] the name of this function", name: "[AST_SymbolDeclaration?] the name of this function",
@@ -589,6 +614,18 @@ var AST_PropAccess = DEFNODE("PropAccess", "expression property", {
$propdoc: { $propdoc: {
expression: "[AST_Node] the “container” expression", expression: "[AST_Node] the “container” expression",
property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node"
},
getProperty: function() {
var p = this.property;
if (p instanceof AST_Constant) {
return p.value;
}
if (p instanceof AST_UnaryPrefix
&& p.operator == "void"
&& p.expression instanceof AST_Constant) {
return;
}
return p;
} }
}); });
@@ -773,7 +810,7 @@ var AST_Label = DEFNODE("Label", "references", {
} }
}, AST_Symbol); }, AST_Symbol);
var AST_SymbolRef = DEFNODE("SymbolRef", null, { var AST_SymbolRef = DEFNODE("SymbolRef", "fixed", {
$documentation: "Reference to some symbol (not definition/declaration)", $documentation: "Reference to some symbol (not definition/declaration)",
}, AST_Symbol); }, AST_Symbol);
@@ -787,9 +824,6 @@ var AST_This = DEFNODE("This", null, {
var AST_Constant = DEFNODE("Constant", null, { var AST_Constant = DEFNODE("Constant", null, {
$documentation: "Base class for all constants", $documentation: "Base class for all constants",
getValue: function() {
return this.value;
}
}); });
var AST_String = DEFNODE("String", "value quote", { var AST_String = DEFNODE("String", "value quote", {
@@ -800,11 +834,10 @@ var AST_String = DEFNODE("String", "value quote", {
} }
}, AST_Constant); }, AST_Constant);
var AST_Number = DEFNODE("Number", "value literal", { var AST_Number = DEFNODE("Number", "value", {
$documentation: "A number literal", $documentation: "A number literal",
$propdoc: { $propdoc: {
value: "[number] the numeric value", value: "[number] the numeric value",
literal: "[string] numeric value as string (optional)"
} }
}, AST_Constant); }, AST_Constant);
@@ -931,11 +964,13 @@ TreeWalker.prototype = {
in_boolean_context: function() { in_boolean_context: function() {
var self = this.self(); var self = this.self();
for (var i = 0, p; p = this.parent(i); i++) { for (var i = 0, p; p = this.parent(i); i++) {
if (p instanceof AST_SimpleStatement if (p instanceof AST_Conditional && p.condition === self
|| p instanceof AST_Conditional && p.condition === self
|| p instanceof AST_DWLoop && p.condition === self || p instanceof AST_DWLoop && p.condition === self
|| p instanceof AST_For && p.condition === self || p instanceof AST_For && p.condition === self
|| p instanceof AST_If && p.condition === self || p instanceof AST_If && p.condition === self
|| p instanceof AST_Return && p.in_bool
|| p instanceof AST_Sequence && p.tail_node() !== self
|| p instanceof AST_SimpleStatement
|| p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) { || p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) {
return true; return true;
} }
@@ -943,6 +978,15 @@ TreeWalker.prototype = {
|| p instanceof AST_Conditional || p instanceof AST_Conditional
|| p.tail_node() === self) { || p.tail_node() === self) {
self = p; self = p;
} else if (p instanceof AST_Return) {
var fn;
do {
fn = this.parent(++i);
if (!fn) return false;
} while (!(fn instanceof AST_Lambda));
if (fn.name) return false;
self = this.parent(++i);
if (!self || self.TYPE != "Call" || self.expression !== fn) return false;
} else { } else {
return false; return false;
} }

3269
node_modules/uglify-js/lib/compress.js generated vendored

File diff suppressed because it is too large Load Diff

88
node_modules/uglify-js/lib/minify.js generated vendored
View File

@@ -1,19 +1,39 @@
"use strict"; "use strict";
var to_ascii = typeof atob == "undefined" ? function(b64) { var to_ascii, to_base64;
return new Buffer(b64, "base64").toString(); if (typeof Buffer == "undefined") {
} : atob; to_ascii = atob;
var to_base64 = typeof btoa == "undefined" ? function(str) { to_base64 = btoa;
return new Buffer(str).toString("base64"); } else if (typeof Buffer.alloc == "undefined") {
} : btoa; to_ascii = function(b64) {
return new Buffer(b64, "base64").toString();
};
to_base64 = function(str) {
return new Buffer(str).toString("base64");
};
} else {
to_ascii = function(b64) {
return Buffer.from(b64, "base64").toString();
};
to_base64 = function(str) {
return Buffer.from(str).toString("base64");
};
}
function read_source_map(name, code) { function read_source_map(name, toplevel) {
var match = /\n\/\/# sourceMappingURL=data:application\/json(;.*?)?;base64,(.*)/.exec(code); var comments = toplevel.end.comments_after;
if (!match) { for (var i = comments.length; --i >= 0;) {
AST_Node.warn("inline source map not found: " + name); var comment = comments[i];
return null; if (comment.type != "comment1") break;
var match = /^# ([^\s=]+)=(\S+)\s*$/.exec(comment.value);
if (!match) break;
if (match[1] == "sourceMappingURL") {
match = /^data:application\/json(;.*?)?;base64,(\S+)$/.exec(match[2]);
if (!match) break;
return to_ascii(match[2]);
}
} }
return to_ascii(match[2]); AST_Node.warn("inline source map not found: " + name);
} }
function parse_source_map(content) { function parse_source_map(content) {
@@ -51,7 +71,6 @@ function to_json(cache) {
} }
function minify(files, options) { function minify(files, options) {
var warn_function = AST_Node.warn_function;
try { try {
options = defaults(options, { options = defaults(options, {
compress: {}, compress: {},
@@ -78,7 +97,6 @@ function minify(files, options) {
set_shorthand("ie8", options, [ "compress", "mangle", "output" ]); set_shorthand("ie8", options, [ "compress", "mangle", "output" ]);
set_shorthand("keep_fnames", options, [ "compress", "mangle" ]); set_shorthand("keep_fnames", options, [ "compress", "mangle" ]);
set_shorthand("toplevel", options, [ "compress", "mangle" ]); set_shorthand("toplevel", options, [ "compress", "mangle" ]);
set_shorthand("warnings", options, [ "compress" ]);
var quoted_props; var quoted_props;
if (options.mangle) { if (options.mangle) {
options.mangle = defaults(options.mangle, { options.mangle = defaults(options.mangle, {
@@ -116,11 +134,9 @@ function minify(files, options) {
}, true); }, true);
} }
var warnings = []; var warnings = [];
if (options.warnings && !AST_Node.warn_function) { if (options.warnings) AST_Node.log_function(function(warning) {
AST_Node.warn_function = function(warning) { warnings.push(warning);
warnings.push(warning); }, options.warnings == "verbose");
};
}
if (timings) timings.parse = Date.now(); if (timings) timings.parse = Date.now();
var source_maps, toplevel; var source_maps, toplevel;
if (files instanceof AST_Toplevel) { if (files instanceof AST_Toplevel) {
@@ -138,10 +154,10 @@ function minify(files, options) {
source_maps = source_map_content && Object.create(null); source_maps = source_map_content && Object.create(null);
for (var name in files) if (HOP(files, name)) { for (var name in files) if (HOP(files, name)) {
options.parse.filename = name; options.parse.filename = name;
options.parse.toplevel = parse(files[name], options.parse); options.parse.toplevel = toplevel = parse(files[name], options.parse);
if (source_maps) { if (source_maps) {
if (source_map_content == "inline") { if (source_map_content == "inline") {
var inlined_content = read_source_map(name, files[name]); var inlined_content = read_source_map(name, toplevel);
if (inlined_content) { if (inlined_content) {
source_maps[name] = parse_source_map(inlined_content); source_maps[name] = parse_source_map(inlined_content);
} }
@@ -150,17 +166,17 @@ function minify(files, options) {
} }
} }
} }
toplevel = options.parse.toplevel;
} }
if (quoted_props) { if (quoted_props) {
reserve_quoted_keys(toplevel, quoted_props); reserve_quoted_keys(toplevel, quoted_props);
} }
if (options.wrap) { [ "enclose", "wrap" ].forEach(function(action) {
toplevel = toplevel.wrap_commonjs(options.wrap); var option = options[action];
} if (!option) return;
if (options.enclose) { var orig = toplevel.print_to_string().slice(0, -1);
toplevel = toplevel.wrap_enclose(options.enclose); toplevel = toplevel[action](option);
} files[toplevel.start.file] = toplevel.print_to_string().replace(orig, "");
});
if (timings) timings.rename = Date.now(); if (timings) timings.rename = Date.now();
if (options.rename) { if (options.rename) {
toplevel.figure_out_scope(options.mangle); toplevel.figure_out_scope(options.mangle);
@@ -208,10 +224,14 @@ function minify(files, options) {
result.code = stream.get(); result.code = stream.get();
if (options.sourceMap) { if (options.sourceMap) {
result.map = options.output.source_map.toString(); result.map = options.output.source_map.toString();
if (options.sourceMap.url == "inline") { var url = options.sourceMap.url;
result.code += "\n//# sourceMappingURL=data:application/json;charset=utf-8;base64," + to_base64(result.map); if (url) {
} else if (options.sourceMap.url) { result.code = result.code.replace(/\n\/\/# sourceMappingURL=\S+\s*$/, "");
result.code += "\n//# sourceMappingURL=" + options.sourceMap.url; if (url == "inline") {
result.code += "\n//# sourceMappingURL=data:application/json;charset=utf-8;base64," + to_base64(result.map);
} else {
result.code += "\n//# sourceMappingURL=" + url;
}
} }
} }
} }
@@ -232,7 +252,7 @@ function minify(files, options) {
properties: 1e-3 * (timings.output - timings.properties), properties: 1e-3 * (timings.output - timings.properties),
output: 1e-3 * (timings.end - timings.output), output: 1e-3 * (timings.end - timings.output),
total: 1e-3 * (timings.end - timings.start) total: 1e-3 * (timings.end - timings.start)
} };
} }
if (warnings.length) { if (warnings.length) {
result.warnings = warnings; result.warnings = warnings;
@@ -240,7 +260,5 @@ function minify(files, options) {
return result; return result;
} catch (ex) { } catch (ex) {
return { error: ex }; return { error: ex };
} finally {
AST_Node.warn_function = warn_function;
} }
} }

View File

@@ -403,7 +403,7 @@
var def = M.definition(); var def = M.definition();
return { return {
type: "Identifier", type: "Identifier",
name: def ? def.mangled_name || def.name : M.name name: def && def.mangled_name || M.name
}; };
}); });

278
node_modules/uglify-js/lib/output.js generated vendored
View File

@@ -43,8 +43,6 @@
"use strict"; "use strict";
var EXPECT_DIRECTIVE = /^$|[;{][\s\n]*$/;
function is_some_comments(comment) { function is_some_comments(comment) {
// multiline comment // multiline comment
return comment.type == "comment2" && /@preserve|@license|@cc_on/i.test(comment.value); return comment.type == "comment2" && /@preserve|@license|@cc_on/i.test(comment.value);
@@ -91,13 +89,11 @@ function OutputStream(options) {
comment_filter = function(comment) { comment_filter = function(comment) {
return comment.type != "comment5" && comments.test(comment.value); return comment.type != "comment5" && comments.test(comment.value);
}; };
} } else if (typeof comments === "function") {
else if (typeof comments === "function") {
comment_filter = function(comment) { comment_filter = function(comment) {
return comment.type != "comment5" && comments(this, comment); return comment.type != "comment5" && comments(this, comment);
}; };
} } else if (comments === "some") {
else if (comments === "some") {
comment_filter = is_some_comments; comment_filter = is_some_comments;
} else { // NOTE includes "all" option } else { // NOTE includes "all" option
comment_filter = return_true; comment_filter = return_true;
@@ -123,21 +119,25 @@ function OutputStream(options) {
}); });
} : function(str) { } : function(str) {
var s = ""; var s = "";
for (var i = 0, len = str.length; i < len; i++) { for (var i = 0, j = 0; i < str.length; i++) {
if (is_surrogate_pair_head(str[i]) && !is_surrogate_pair_tail(str[i + 1]) var code = str.charCodeAt(i);
|| is_surrogate_pair_tail(str[i]) && !is_surrogate_pair_head(str[i - 1])) { if (is_surrogate_pair_head(code)) {
s += "\\u" + str.charCodeAt(i).toString(16); if (is_surrogate_pair_tail(str.charCodeAt(i + 1))) {
} else { i++;
s += str[i]; continue;
}
} else if (!is_surrogate_pair_tail(code)) {
continue;
} }
s += str.slice(j, i) + "\\u" + code.toString(16);
j = i + 1;
} }
return s; return j == 0 ? str : s + str.slice(j);
}; };
function make_string(str, quote) { function make_string(str, quote) {
var dq = 0, sq = 0; var dq = 0, sq = 0;
str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s, i) {
function(s, i) {
switch (s) { switch (s) {
case '"': ++dq; return '"'; case '"': ++dq; return '"';
case "'": ++sq; return "'"; case "'": ++sq; return "'";
@@ -217,23 +217,12 @@ function OutputStream(options) {
var flush_mappings = mappings ? function() { var flush_mappings = mappings ? function() {
mappings.forEach(function(mapping) { mappings.forEach(function(mapping) {
try { options.source_map.add(
options.source_map.add( mapping.token.file,
mapping.token.file, mapping.line, mapping.col,
mapping.line, mapping.col, mapping.token.line, mapping.token.col,
mapping.token.line, mapping.token.col, !mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name
!mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name );
);
} catch(ex) {
AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", {
file: mapping.token.file,
line: mapping.token.line,
col: mapping.token.col,
cline: mapping.line,
ccol: mapping.col,
name: mapping.name || ""
})
}
}); });
mappings = []; mappings = [];
} : noop; } : noop;
@@ -283,7 +272,7 @@ function OutputStream(options) {
} }
} }
newline_insert = -1; newline_insert = -1;
var prev = last.charAt(last.length - 1); var prev = last.slice(-1);
if (might_need_semicolon) { if (might_need_semicolon) {
might_need_semicolon = false; might_need_semicolon = false;
@@ -312,16 +301,16 @@ function OutputStream(options) {
} }
if (might_need_space) { if (might_need_space) {
if ((is_identifier_char(prev) if (is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\")
&& (is_identifier_char(ch) || ch == "\\"))
|| (ch == "/" && ch == prev) || (ch == "/" && ch == prev)
|| ((ch == "+" || ch == "-") && ch == last)) || ((ch == "+" || ch == "-") && ch == last)
{ || str == "--" && last == "!"
|| last == "--" && ch == ">") {
OUTPUT += " "; OUTPUT += " ";
current_col++; current_col++;
current_pos++; current_pos++;
} }
might_need_space = false; if (prev != "<" || str != "!") might_need_space = false;
} }
if (mapping_token) { if (mapping_token) {
@@ -336,7 +325,7 @@ function OutputStream(options) {
} }
OUTPUT += str; OUTPUT += str;
has_parens = str[str.length - 1] == "("; has_parens = str.slice(-1) == "(";
current_pos += str.length; current_pos += str.length;
var a = str.split(/\r?\n/), n = a.length - 1; var a = str.split(/\r?\n/), n = a.length - 1;
current_line += n; current_line += n;
@@ -392,7 +381,7 @@ function OutputStream(options) {
}; };
function force_semicolon() { function force_semicolon() {
might_need_semicolon = false; if (might_need_semicolon) print(";");
print(";"); print(";");
} }
@@ -462,16 +451,11 @@ function OutputStream(options) {
function prepend_comments(node) { function prepend_comments(node) {
var self = this; var self = this;
var start = node.start; var scan = node instanceof AST_Exit && node.value;
if (!start) return; var comments = dump(node);
if (start.comments_before && start.comments_before._dumped === self) return; if (!comments) comments = [];
var comments = start.comments_before;
if (!comments) {
comments = start.comments_before = [];
}
comments._dumped = self;
if (node instanceof AST_Exit && node.value) { if (scan) {
var tw = new TreeWalker(function(node) { var tw = new TreeWalker(function(node) {
var parent = tw.parent(); var parent = tw.parent();
if (parent instanceof AST_Exit if (parent instanceof AST_Exit
@@ -482,11 +466,8 @@ function OutputStream(options) {
|| parent instanceof AST_Sequence && parent.expressions[0] === node || parent instanceof AST_Sequence && parent.expressions[0] === node
|| parent instanceof AST_Sub && parent.expression === node || parent instanceof AST_Sub && parent.expression === node
|| parent instanceof AST_UnaryPostfix) { || parent instanceof AST_UnaryPostfix) {
var text = node.start.comments_before; var before = dump(node);
if (text && text._dumped !== self) { if (before) comments = comments.concat(before);
text._dumped = self;
comments = comments.concat(text);
}
} else { } else {
return true; return true;
} }
@@ -529,13 +510,29 @@ function OutputStream(options) {
} }
}); });
if (!last_nlb) { if (!last_nlb) {
if (start.nlb) { if (node.start.nlb) {
print("\n"); print("\n");
indent(); indent();
} else { } else {
space(); space();
} }
} }
function dump(node) {
var token = node.start;
if (!token) {
if (!scan) return;
node.start = token = new AST_Token();
}
var comments = token.comments_before;
if (!comments) {
if (!scan) return;
token.comments_before = comments = [];
}
if (comments._dumped === self) return;
comments._dumped = self;
return comments;
}
} }
function append_comments(node, tail) { function append_comments(node, tail) {
@@ -591,18 +588,7 @@ function OutputStream(options) {
force_semicolon : force_semicolon, force_semicolon : force_semicolon,
to_utf8 : to_utf8, to_utf8 : to_utf8,
print_name : function(name) { print(make_name(name)) }, print_name : function(name) { print(make_name(name)) },
print_string : function(str, quote, escape_directive) { print_string : function(str, quote) { print(encode_string(str, quote)) },
var encoded = encode_string(str, quote);
if (escape_directive === true && encoded.indexOf("\\") === -1) {
// Insert semicolons to break directive prologue
if (!EXPECT_DIRECTIVE.test(OUTPUT)) {
force_semicolon();
}
force_semicolon();
}
print(encoded);
},
encode_string : encode_string,
next_indent : next_indent, next_indent : next_indent,
with_indent : with_indent, with_indent : with_indent,
with_block : with_block, with_block : with_block,
@@ -640,18 +626,10 @@ function OutputStream(options) {
nodetype.DEFMETHOD("_codegen", generator); nodetype.DEFMETHOD("_codegen", generator);
} }
var in_directive = false; var use_asm = false;
var active_scope = null;
var use_asm = null;
AST_Node.DEFMETHOD("print", function(stream, force_parens) { AST_Node.DEFMETHOD("print", function(stream, force_parens) {
var self = this, generator = self._codegen; var self = this, generator = self._codegen;
if (self instanceof AST_Scope) {
active_scope = self;
}
else if (!use_asm && self instanceof AST_Directive && self.value == "use asm") {
use_asm = active_scope;
}
function doit() { function doit() {
stream.prepend_comments(self); stream.prepend_comments(self);
self.add_source_map(stream); self.add_source_map(stream);
@@ -665,9 +643,6 @@ function OutputStream(options) {
doit(); doit();
} }
stream.pop_node(); stream.pop_node();
if (self === use_asm) {
use_asm = null;
}
}); });
AST_Node.DEFMETHOD("_print", AST_Node.prototype.print); AST_Node.DEFMETHOD("_print", AST_Node.prototype.print);
@@ -719,16 +694,23 @@ function OutputStream(options) {
PARENS(AST_Sequence, function(output) { PARENS(AST_Sequence, function(output) {
var p = output.parent(); var p = output.parent();
return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) // (foo, bar)() or foo(1, (2, 3), 4)
|| p instanceof AST_Unary // !(foo, bar, baz) return p instanceof AST_Call
|| p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 // !(foo, bar, baz)
|| p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 || p instanceof AST_Unary
|| p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2 // 1 + (2, 3) + 4 ==> 8
|| p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] || p instanceof AST_Binary
|| p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 // var a = (1, 2), b = a + a; ==> b == 4
|| p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) || p instanceof AST_VarDef
* ==> 20 (side effect, set a := 10 and b := 20) */ // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2
; || p instanceof AST_PropAccess && p.expression === this
// [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ]
|| p instanceof AST_Array
// { foo: (1, 2) }.foo ==> 2
|| p instanceof AST_ObjectProperty
// (false, true) ? (a = 10, b = 20) : (c = 30)
// ==> 20 (side effect, set a := 10 and b := 20)
|| p instanceof AST_Conditional;
}); });
PARENS(AST_Binary, function(output) { PARENS(AST_Binary, function(output) {
@@ -800,7 +782,7 @@ function OutputStream(options) {
PARENS(AST_Number, function(output) { PARENS(AST_Number, function(output) {
var p = output.parent(); var p = output.parent();
if (p instanceof AST_PropAccess && p.expression === this) { if (p instanceof AST_PropAccess && p.expression === this) {
var value = this.getValue(); var value = this.value;
if (value < 0 || /^0/.test(make_num(value))) { if (value < 0 || /^0/.test(make_num(value))) {
return true; return true;
} }
@@ -829,7 +811,18 @@ function OutputStream(options) {
/* -----[ PRINTERS ]----- */ /* -----[ PRINTERS ]----- */
DEFPRINT(AST_Directive, function(self, output) { DEFPRINT(AST_Directive, function(self, output) {
output.print_string(self.value, self.quote); var quote = self.quote;
var value = self.value;
switch (output.option("quote_style")) {
case 0:
case 2:
if (value.indexOf('"') == -1) quote = '"';
break;
case 1:
if (value.indexOf("'") == -1) quote = "'";
break;
}
output.print(quote + value + quote);
output.semicolon(); output.semicolon();
}); });
DEFPRINT(AST_Debugger, function(self, output) { DEFPRINT(AST_Debugger, function(self, output) {
@@ -841,30 +834,27 @@ function OutputStream(options) {
function display_body(body, is_toplevel, output, allow_directives) { function display_body(body, is_toplevel, output, allow_directives) {
var last = body.length - 1; var last = body.length - 1;
in_directive = allow_directives; var in_directive = allow_directives;
var was_asm = use_asm;
body.forEach(function(stmt, i) { body.forEach(function(stmt, i) {
if (in_directive === true && !(stmt instanceof AST_Directive || if (in_directive) {
stmt instanceof AST_EmptyStatement || if (stmt instanceof AST_Directive) {
(stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) if (stmt.value == "use asm") use_asm = true;
)) { } else if (!(stmt instanceof AST_EmptyStatement)) {
in_directive = false; if (stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) {
} output.force_semicolon();
if (!(stmt instanceof AST_EmptyStatement)) { }
output.indent(); in_directive = false;
stmt.print(output);
if (!(i == last && is_toplevel)) {
output.newline();
if (is_toplevel) output.newline();
} }
} }
if (in_directive === true && if (stmt instanceof AST_EmptyStatement) return;
stmt instanceof AST_SimpleStatement && output.indent();
stmt.body instanceof AST_String stmt.print(output);
) { if (i == last && is_toplevel) return;
in_directive = false; output.newline();
} if (is_toplevel) output.newline();
}); });
in_directive = false; use_asm = was_asm;
} }
AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output) { AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output) {
@@ -1048,11 +1038,9 @@ function OutputStream(options) {
return; return;
} }
b = b.alternative; b = b.alternative;
} } else if (b instanceof AST_StatementWithBody) {
else if (b instanceof AST_StatementWithBody) {
b = b.body; b = b.body;
} } else break;
else break;
} }
force_statement(self.body, output); force_statement(self.body, output);
} }
@@ -1224,7 +1212,7 @@ function OutputStream(options) {
output.print_string(prop); output.print_string(prop);
output.print("]"); output.print("]");
} else { } else {
if (expr instanceof AST_Number && expr.getValue() >= 0) { if (expr instanceof AST_Number && expr.value >= 0) {
if (!/[xa-f.)]/i.test(output.last())) { if (!/[xa-f.)]/i.test(output.last())) {
output.print("."); output.print(".");
} }
@@ -1257,29 +1245,10 @@ function OutputStream(options) {
output.print(self.operator); output.print(self.operator);
}); });
DEFPRINT(AST_Binary, function(self, output) { DEFPRINT(AST_Binary, function(self, output) {
var op = self.operator;
self.left.print(output); self.left.print(output);
if (op[0] == ">" /* ">>" ">>>" ">" ">=" */ output.space();
&& self.left instanceof AST_UnaryPostfix output.print(self.operator);
&& self.left.operator == "--") { output.space();
// space is mandatory to avoid outputting -->
output.print(" ");
} else {
// the space is optional depending on "beautify"
output.space();
}
output.print(op);
if ((op == "<" || op == "<<")
&& self.right instanceof AST_UnaryPrefix
&& self.right.operator == "!"
&& self.right.expression instanceof AST_UnaryPrefix
&& self.right.expression.operator == "--") {
// space is mandatory to avoid outputting <!--
output.print(" ");
} else {
// the space is optional depending on "beautify"
output.space();
}
self.right.print(output); self.right.print(output);
}); });
DEFPRINT(AST_Conditional, function(self, output) { DEFPRINT(AST_Conditional, function(self, output) {
@@ -1360,34 +1329,53 @@ function OutputStream(options) {
}); });
DEFPRINT(AST_Symbol, function(self, output) { DEFPRINT(AST_Symbol, function(self, output) {
var def = self.definition(); var def = self.definition();
output.print_name(def ? def.mangled_name || def.name : self.name); output.print_name(def && def.mangled_name || self.name);
}); });
DEFPRINT(AST_Hole, noop); DEFPRINT(AST_Hole, noop);
DEFPRINT(AST_This, function(self, output) { DEFPRINT(AST_This, function(self, output) {
output.print("this"); output.print("this");
}); });
DEFPRINT(AST_Constant, function(self, output) { DEFPRINT(AST_Constant, function(self, output) {
output.print(self.getValue()); output.print(self.value);
}); });
DEFPRINT(AST_String, function(self, output) { DEFPRINT(AST_String, function(self, output) {
output.print_string(self.getValue(), self.quote, in_directive); output.print_string(self.value, self.quote);
}); });
DEFPRINT(AST_Number, function(self, output) { DEFPRINT(AST_Number, function(self, output) {
if (use_asm && self.start && self.start.raw != null) { if (use_asm && self.start && self.start.raw != null) {
output.print(self.start.raw); output.print(self.start.raw);
} else { } else {
output.print(make_num(self.getValue())); output.print(make_num(self.value));
} }
}); });
DEFPRINT(AST_RegExp, function(self, output) { DEFPRINT(AST_RegExp, function(self, output) {
var regexp = self.getValue(); var regexp = self.value;
var str = regexp.toString(); var str = regexp.toString();
if (regexp.raw_source) { if (regexp.raw_source) {
str = "/" + regexp.raw_source + str.slice(str.lastIndexOf("/")); str = "/" + regexp.raw_source + str.slice(str.lastIndexOf("/"));
} }
str = output.to_utf8(str); output.print(output.to_utf8(str).replace(/\\(?:\0(?![0-9])|[^\0])/g, function(seq) {
output.print(str); switch (seq[1]) {
case "\n": return "\\n";
case "\r": return "\\r";
case "\t": return "\t";
case "\b": return "\b";
case "\f": return "\f";
case "\0": return "\0";
case "\x0B": return "\v";
case "\u2028": return "\\u2028";
case "\u2029": return "\\u2029";
default: return seq;
}
}).replace(/[\n\r\u2028\u2029]/g, function(c) {
switch (c) {
case "\n": return "\\n";
case "\r": return "\\r";
case "\u2028": return "\\u2028";
case "\u2029": return "\\u2029";
}
}));
var p = output.parent(); var p = output.parent();
if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self) if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self)
output.print(" "); output.print(" ");

140
node_modules/uglify-js/lib/parse.js generated vendored
View File

@@ -133,14 +133,10 @@ function is_letter(code) {
} }
function is_surrogate_pair_head(code) { function is_surrogate_pair_head(code) {
if (typeof code == "string")
code = code.charCodeAt(0);
return code >= 0xd800 && code <= 0xdbff; return code >= 0xd800 && code <= 0xdbff;
} }
function is_surrogate_pair_tail(code) { function is_surrogate_pair_tail(code) {
if (typeof code == "string")
code = code.charCodeAt(0);
return code >= 0xdc00 && code <= 0xdfff; return code >= 0xdc00 && code <= 0xdfff;
} }
@@ -164,10 +160,6 @@ function is_unicode_connector_punctuation(ch) {
return UNICODE.connector_punctuation.test(ch); return UNICODE.connector_punctuation.test(ch);
} }
function is_identifier(name) {
return !RESERVED_WORDS[name] && /^[a-z_$][a-z0-9_$]*$/i.test(name);
}
function is_identifier_start(code) { function is_identifier_start(code) {
return code == 36 || code == 95 || is_letter(code); return code == 36 || code == 95 || is_letter(code);
} }
@@ -238,6 +230,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
directives : {}, directives : {},
directive_stack : [] directive_stack : []
}; };
var prev_was_dot = false;
function peek() { function peek() {
return S.text.charAt(S.pos); return S.text.charAt(S.pos);
@@ -272,10 +265,8 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
function find_eol() { function find_eol() {
var text = S.text; var text = S.text;
for (var i = S.pos, n = S.text.length; i < n; ++i) { for (var i = S.pos; i < S.text.length; ++i) {
var ch = text[i]; if (NEWLINE_CHARS[text[i]]) return i;
if (NEWLINE_CHARS[ch])
return i;
} }
return -1; return -1;
} }
@@ -292,16 +283,12 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
S.tokpos = S.pos; S.tokpos = S.pos;
} }
var prev_was_dot = false;
function token(type, value, is_comment) { function token(type, value, is_comment) {
S.regex_allowed = ((type == "operator" && !UNARY_POSTFIX[value]) || S.regex_allowed = type == "operator" && !UNARY_POSTFIX[value]
(type == "keyword" && KEYWORDS_BEFORE_EXPRESSION[value]) || || type == "keyword" && KEYWORDS_BEFORE_EXPRESSION[value]
(type == "punc" && PUNC_BEFORE_EXPRESSION[value])); || type == "punc" && PUNC_BEFORE_EXPRESSION[value];
if (type == "punc" && value == ".") { if (type == "punc" && value == ".") prev_was_dot = true;
prev_was_dot = true; else if (!is_comment) prev_was_dot = false;
} else if (!is_comment) {
prev_was_dot = false;
}
var ret = { var ret = {
type : type, type : type,
value : value, value : value,
@@ -364,11 +351,8 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
parse_error("Legacy octal literals are not allowed in strict mode"); parse_error("Legacy octal literals are not allowed in strict mode");
} }
var valid = parse_js_number(num); var valid = parse_js_number(num);
if (!isNaN(valid)) { if (!isNaN(valid)) return token("num", valid);
return token("num", valid); parse_error("Invalid syntax: " + num);
} else {
parse_error("Invalid syntax: " + num);
}
} }
function read_escaped_char(in_string) { function read_escaped_char(in_string) {
@@ -469,8 +453,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
if (ch == "\\") escaped = backslash = true, next(); if (ch == "\\") escaped = backslash = true, next();
else if (is_identifier_char(ch)) name += next(); else if (is_identifier_char(ch)) name += next();
else break; else break;
} } else {
else {
if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX");
ch = read_escaped_char(); ch = read_escaped_char();
if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier");
@@ -510,7 +493,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
var regexp = new RegExp(source, mods); var regexp = new RegExp(source, mods);
regexp.raw_source = source; regexp.raw_source = source;
return token("regexp", regexp); return token("regexp", regexp);
} catch(e) { } catch (e) {
parse_error(e.message); parse_error(e.message);
} }
}); });
@@ -544,9 +527,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
function handle_dot() { function handle_dot() {
next(); next();
return is_digit(peek().charCodeAt(0)) return is_digit(peek().charCodeAt(0)) ? read_num(".") : token("punc", ".");
? read_num(".")
: token("punc", ".");
} }
function read_word() { function read_word() {
@@ -562,7 +543,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
return function(x) { return function(x) {
try { try {
return cont(x); return cont(x);
} catch(ex) { } catch (ex) {
if (ex === EX_EOF) parse_error(eof_error); if (ex === EX_EOF) parse_error(eof_error);
else throw ex; else throw ex;
} }
@@ -598,11 +579,10 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
switch (code) { switch (code) {
case 34: case 39: return read_string(ch); case 34: case 39: return read_string(ch);
case 46: return handle_dot(); case 46: return handle_dot();
case 47: { case 47:
var tok = handle_slash(); var tok = handle_slash();
if (tok === next_token) continue; if (tok === next_token) continue;
return tok; return tok;
}
} }
if (is_digit(code)) return read_num(); if (is_digit(code)) return read_num();
if (PUNC_CHARS[ch]) return token("punc", next()); if (PUNC_CHARS[ch]) return token("punc", next());
@@ -620,12 +600,8 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
next_token.add_directive = function(directive) { next_token.add_directive = function(directive) {
S.directive_stack[S.directive_stack.length - 1].push(directive); S.directive_stack[S.directive_stack.length - 1].push(directive);
if (S.directives[directive]) S.directives[directive]++;
if (S.directives[directive] === undefined) { else S.directives[directive] = 1;
S.directives[directive] = 1;
} else {
S.directives[directive]++;
}
} }
next_token.push_directives_stack = function() { next_token.push_directives_stack = function() {
@@ -633,13 +609,10 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
} }
next_token.pop_directives_stack = function() { next_token.pop_directives_stack = function() {
var directives = S.directive_stack[S.directive_stack.length - 1]; var directives = S.directive_stack.pop();
for (var i = directives.length; --i >= 0;) {
for (var i = 0; i < directives.length; i++) {
S.directives[directives[i]]--; S.directives[directives[i]]--;
} }
S.directive_stack.pop();
} }
next_token.has_directive = function(directive) { next_token.has_directive = function(directive) {
@@ -651,27 +624,17 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
/* -----[ Parser (constants) ]----- */ /* -----[ Parser (constants) ]----- */
var UNARY_PREFIX = makePredicate([ var UNARY_PREFIX = makePredicate("typeof void delete -- ++ ! ~ - +");
"typeof",
"void",
"delete",
"--",
"++",
"!",
"~",
"-",
"+"
]);
var UNARY_POSTFIX = makePredicate([ "--", "++" ]); var UNARY_POSTFIX = makePredicate("-- ++");
var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); var ASSIGNMENT = makePredicate("= += -= /= *= %= >>= <<= >>>= |= ^= &=");
var PRECEDENCE = function(a, ret) { var PRECEDENCE = function(a, ret) {
for (var i = 0; i < a.length; ++i) { for (var i = 0; i < a.length;) {
var b = a[i]; var b = a[i++];
for (var j = 0; j < b.length; ++j) { for (var j = 0; j < b.length; j++) {
ret[b[j]] = i + 1; ret[b[j]] = i;
} }
} }
return ret; return ret;
@@ -688,7 +651,7 @@ var PRECEDENCE = function(a, ret) {
["*", "/", "%"] ["*", "/", "%"]
], {}); ], {});
var ATOMIC_START_TOKEN = makePredicate([ "atom", "num", "string", "regexp", "name" ]); var ATOMIC_START_TOKEN = makePredicate("atom num string regexp name");
/* -----[ Parser ]----- */ /* -----[ Parser ]----- */
@@ -704,10 +667,9 @@ function parse($TEXT, options) {
}, true); }, true);
var S = { var S = {
input : (typeof $TEXT == "string" input : typeof $TEXT == "string"
? tokenizer($TEXT, options.filename, ? tokenizer($TEXT, options.filename, options.html5_comments, options.shebang)
options.html5_comments, options.shebang) : $TEXT,
: $TEXT),
token : null, token : null,
prev : null, prev : null,
peeked : null, peeked : null,
@@ -763,15 +725,12 @@ function parse($TEXT, options) {
} }
function unexpected(token) { function unexpected(token) {
if (token == null) if (token == null) token = S.token;
token = S.token;
token_error(token, "Unexpected token: " + token_to_string(token.type, token.value)); token_error(token, "Unexpected token: " + token_to_string(token.type, token.value));
} }
function expect_token(type, val) { function expect_token(type, val) {
if (is(type, val)) { if (is(type, val)) return next();
return next();
}
token_error(S.token, "Unexpected token: " + token_to_string(S.token.type, S.token.value) + ", expected: " + token_to_string(type, val)); token_error(S.token, "Unexpected token: " + token_to_string(S.token.type, S.token.value) + ", expected: " + token_to_string(type, val));
} }
@@ -824,20 +783,19 @@ function parse($TEXT, options) {
handle_regexp(); handle_regexp();
switch (S.token.type) { switch (S.token.type) {
case "string": case "string":
if (S.in_directives) { var dir = S.in_directives;
var token = peek(); var body = expression(true);
if (S.token.raw.indexOf("\\") == -1 if (dir) {
&& (is_token(token, "punc", ";") if (body instanceof AST_String) {
|| is_token(token, "punc", "}") var value = body.start.raw.slice(1, -1);
|| has_newline_before(token) S.input.add_directive(value);
|| is_token(token, "eof"))) { body.value = value;
S.input.add_directive(S.token.value);
} else { } else {
S.in_directives = false; S.in_directives = dir = false;
} }
} }
var dir = S.in_directives, stat = simple_statement(); semicolon();
return dir ? new AST_Directive(stat.body) : stat; return dir ? new AST_Directive(body) : new AST_SimpleStatement({ body: body });
case "num": case "num":
case "regexp": case "regexp":
case "operator": case "operator":
@@ -1002,8 +960,10 @@ function parse($TEXT, options) {
return new AST_LabeledStatement({ body: stat, label: label }); return new AST_LabeledStatement({ body: stat, label: label });
} }
function simple_statement(tmp) { function simple_statement() {
return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) }); var body = expression(true);
semicolon();
return new AST_SimpleStatement({ body: body });
} }
function break_cont(type) { function break_cont(type) {
@@ -1290,6 +1250,7 @@ function parse($TEXT, options) {
var ex = expression(true); var ex = expression(true);
var len = start.comments_before.length; var len = start.comments_before.length;
[].unshift.apply(ex.start.comments_before, start.comments_before); [].unshift.apply(ex.start.comments_before, start.comments_before);
start.comments_before.length = 0;
start.comments_before = ex.start.comments_before; start.comments_before = ex.start.comments_before;
start.comments_before_length = len; start.comments_before_length = len;
if (len == 0 && start.comments_before.length > 0) { if (len == 0 && start.comments_before.length > 0) {
@@ -1305,6 +1266,7 @@ function parse($TEXT, options) {
var end = prev(); var end = prev();
end.comments_before = ex.end.comments_before; end.comments_before = ex.end.comments_before;
[].push.apply(ex.end.comments_after, end.comments_after); [].push.apply(ex.end.comments_after, end.comments_after);
end.comments_after.length = 0;
end.comments_after = ex.end.comments_after; end.comments_after = ex.end.comments_after;
ex.end = end; ex.end = end;
if (ex instanceof AST_Call) mark_pure(ex); if (ex instanceof AST_Call) mark_pure(ex);

97
node_modules/uglify-js/lib/scope.js generated vendored
View File

@@ -55,14 +55,13 @@ function SymbolDef(scope, orig, init) {
this.mangled_name = null; this.mangled_name = null;
this.undeclared = false; this.undeclared = false;
this.id = SymbolDef.next_id++; this.id = SymbolDef.next_id++;
this.lambda = orig instanceof AST_SymbolLambda;
} }
SymbolDef.next_id = 1; SymbolDef.next_id = 1;
SymbolDef.prototype = { SymbolDef.prototype = {
unmangleable: function(options) { unmangleable: function(options) {
if (!options) options = {};
return this.global && !options.toplevel return this.global && !options.toplevel
|| this.undeclared || this.undeclared
|| !options.eval && this.scope.pinned() || !options.eval && this.scope.pinned()
@@ -193,13 +192,19 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
// pass 3: fix up any scoping issue with IE8 // pass 3: fix up any scoping issue with IE8
if (options.ie8) self.walk(new TreeWalker(function(node) { if (options.ie8) self.walk(new TreeWalker(function(node) {
if (node instanceof AST_SymbolCatch) { if (node instanceof AST_SymbolCatch) {
redefine(node, node.thedef.defun); var scope = node.thedef.defun;
if (scope.name instanceof AST_SymbolLambda && scope.name.name == node.name) {
scope = scope.parent_scope.resolve();
}
redefine(node, scope);
return true; return true;
} }
if (node instanceof AST_SymbolLambda) { if (node instanceof AST_SymbolLambda) {
var def = node.thedef; var def = node.thedef;
if (def.orig.length == 1) { redefine(node, node.scope.parent_scope.resolve());
redefine(node, node.scope.parent_scope); if (typeof node.thedef.init !== "undefined") {
node.thedef.init = false;
} else if (def.init) {
node.thedef.init = def.init; node.thedef.init = def.init;
} }
return true; return true;
@@ -208,14 +213,20 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
function redefine(node, scope) { function redefine(node, scope) {
var name = node.name; var name = node.name;
var refs = node.thedef.references; var old_def = node.thedef;
var def = scope.find_variable(name) || self.globals.get(name) || scope.def_variable(node); var new_def = scope.find_variable(name);
refs.forEach(function(ref) { if (new_def) {
ref.thedef = def; var redef;
ref.reference(options); while (redef = new_def.redefined()) new_def = redef;
} else {
new_def = self.globals.get(name) || scope.def_variable(node);
}
old_def.orig.concat(old_def.references).forEach(function(node) {
node.thedef = new_def;
node.reference(options);
}); });
node.thedef = def; if (old_def.lambda) new_def.lambda = true;
node.reference(options); if (new_def.undeclared) self.variables.set(name, new_def);
} }
}); });
@@ -287,9 +298,7 @@ AST_Scope.DEFMETHOD("def_variable", function(symbol, init) {
var def = this.variables.get(symbol.name); var def = this.variables.get(symbol.name);
if (def) { if (def) {
def.orig.push(symbol); def.orig.push(symbol);
if (def.init && (def.scope !== symbol.scope || def.init instanceof AST_Function)) { if (def.init instanceof AST_Function) def.init = init;
def.init = init;
}
} else { } else {
def = new SymbolDef(this, symbol, init); def = new SymbolDef(this, symbol, init);
this.variables.set(symbol.name, def); this.variables.set(symbol.name, def);
@@ -300,7 +309,7 @@ AST_Scope.DEFMETHOD("def_variable", function(symbol, init) {
AST_Lambda.DEFMETHOD("resolve", return_this); AST_Lambda.DEFMETHOD("resolve", return_this);
AST_Scope.DEFMETHOD("resolve", function() { AST_Scope.DEFMETHOD("resolve", function() {
return this.parent_scope; return this.parent_scope.resolve();
}); });
AST_Toplevel.DEFMETHOD("resolve", return_this); AST_Toplevel.DEFMETHOD("resolve", return_this);
@@ -337,7 +346,7 @@ function next_mangled_name(scope, options, def) {
} while (scope = scope.parent_scope); } while (scope = scope.parent_scope);
}); });
var name; var name;
for (var i = 0, len = holes.length; i < len; i++) { for (var i = 0; i < holes.length; i++) {
name = base54(holes[i]); name = base54(holes[i]);
if (names[name]) continue; if (names[name]) continue;
holes.splice(i, 1); holes.splice(i, 1);
@@ -346,7 +355,7 @@ function next_mangled_name(scope, options, def) {
} }
while (true) { while (true) {
name = base54(++scope.cname); name = base54(++scope.cname);
if (in_use[name] || !is_identifier(name) || options.reserved.has[name]) continue; if (in_use[name] || RESERVED_WORDS[name] || options.reserved.has[name]) continue;
if (!names[name]) break; if (!names[name]) break;
holes.push(scope.cname); holes.push(scope.cname);
} }
@@ -419,35 +428,31 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options) {
if (options.cache && node instanceof AST_Toplevel) { if (options.cache && node instanceof AST_Toplevel) {
node.globals.each(mangle); node.globals.each(mangle);
} }
node.variables.each(mangle); if (node instanceof AST_Defun && tw.has_directive("use asm")) {
var sym = new AST_SymbolRef(node.name);
sym.scope = node;
sym.reference(options);
}
node.variables.each(function(def) {
if (!defer_redef(def)) mangle(def);
});
return true; return true;
} }
if (node instanceof AST_Label) { if (node instanceof AST_Label) {
var name; var name;
do { do {
name = base54(++lname); name = base54(++lname);
} while (!is_identifier(name)); } while (RESERVED_WORDS[name]);
node.mangled_name = name; node.mangled_name = name;
return true; return true;
} }
if (!options.ie8 && node instanceof AST_Catch) { if (!options.ie8 && node instanceof AST_Catch) {
var def = node.argname.definition(); var def = node.argname.definition();
var redef = def.redefined(); var redef = defer_redef(def, node.argname);
if (redef) {
redefined.push(def);
reference(node.argname);
def.references.forEach(reference);
}
descend(); descend();
if (!redef) mangle(def); if (!redef) mangle(def);
return true; return true;
} }
function reference(sym) {
sym.thedef = redef;
sym.reference(options);
sym.thedef = def;
}
}); });
this.walk(tw); this.walk(tw);
redefined.forEach(mangle); redefined.forEach(mangle);
@@ -456,6 +461,21 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options) {
if (options.reserved.has[def.name]) return; if (options.reserved.has[def.name]) return;
def.mangle(options); def.mangle(options);
} }
function defer_redef(def, node) {
var redef = def.redefined();
if (!redef) return false;
redefined.push(def);
def.references.forEach(reference);
if (node) reference(node);
return true;
function reference(sym) {
sym.thedef = redef;
sym.reference(options);
sym.thedef = def;
}
}
}); });
AST_Toplevel.DEFMETHOD("find_colliding_names", function(options) { AST_Toplevel.DEFMETHOD("find_colliding_names", function(options) {
@@ -497,7 +517,7 @@ AST_Toplevel.DEFMETHOD("expand_names", function(options) {
var name; var name;
do { do {
name = base54(cname++); name = base54(cname++);
} while (avoid[name] || !is_identifier(name)); } while (avoid[name] || RESERVED_WORDS[name]);
return name; return name;
} }
@@ -505,13 +525,14 @@ AST_Toplevel.DEFMETHOD("expand_names", function(options) {
if (def.global && options.cache) return; if (def.global && options.cache) return;
if (def.unmangleable(options)) return; if (def.unmangleable(options)) return;
if (options.reserved.has[def.name]) return; if (options.reserved.has[def.name]) return;
var d = def.redefined(); var redef = def.redefined();
def.name = d ? d.name : next_name(); var name = redef ? redef.rename || redef.name : next_name();
def.rename = name;
def.orig.forEach(function(sym) { def.orig.forEach(function(sym) {
sym.name = def.name; sym.name = name;
}); });
def.references.forEach(function(sym) { def.references.forEach(function(sym) {
sym.name = def.name; sym.name = name;
}); });
} }
}); });
@@ -559,7 +580,7 @@ var base54 = (function() {
var freq = Object.create(null); var freq = Object.create(null);
function init(chars) { function init(chars) {
var array = []; var array = [];
for (var i = 0, len = chars.length; i < len; i++) { for (var i = 0; i < chars.length; i++) {
var ch = chars[i]; var ch = chars[i];
array.push(ch); array.push(ch);
freq[ch] = -1e-2 * i; freq[ch] = -1e-2 * i;

View File

@@ -70,7 +70,7 @@ function configure_error_stack(fn) {
err.name = this.name; err.name = this.name;
try { try {
throw err; throw err;
} catch(e) { } catch (e) {
return e.stack; return e.stack;
} }
} }
@@ -127,8 +127,7 @@ var MAP = (function() {
} else { } else {
top.push(val); top.push(val);
} }
} } else if (val !== skip) {
else if (val !== skip) {
if (val instanceof Splice) { if (val instanceof Splice) {
ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v);
} else { } else {
@@ -145,8 +144,7 @@ var MAP = (function() {
} else { } else {
for (i = 0; i < a.length; ++i) if (doit()) break; for (i = 0; i < a.length; ++i) if (doit()) break;
} }
} } else {
else {
for (i in a) if (HOP(a, i)) if (doit()) break; for (i in a) if (HOP(a, i)) if (doit()) break;
} }
return top.concat(ret); return top.concat(ret);

30
node_modules/uglify-js/package.json generated vendored
View File

@@ -1,27 +1,27 @@
{ {
"_from": "uglify-js@3.4.x", "_from": "uglify-js@^3.5.1",
"_id": "uglify-js@3.4.10", "_id": "uglify-js@3.7.7",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", "_integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==",
"_location": "/uglify-js", "_location": "/uglify-js",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "range", "type": "range",
"registry": true, "registry": true,
"raw": "uglify-js@3.4.x", "raw": "uglify-js@^3.5.1",
"name": "uglify-js", "name": "uglify-js",
"escapedName": "uglify-js", "escapedName": "uglify-js",
"rawSpec": "3.4.x", "rawSpec": "^3.5.1",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "3.4.x" "fetchSpec": "^3.5.1"
}, },
"_requiredBy": [ "_requiredBy": [
"/html-minifier" "/html-minifier"
], ],
"_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz",
"_shasum": "9ad9563d8eb3acdfb8d38597d2af1d815f6a755f", "_shasum": "21e52c7dccda80a53bf7cde69628a7e511aec9c9",
"_spec": "uglify-js@3.4.x", "_spec": "uglify-js@^3.5.1",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\html-minifier", "_where": "/home/s2/Code/minifyfromhtml/node_modules/html-minifier",
"author": { "author": {
"name": "Mihai Bazon", "name": "Mihai Bazon",
"email": "mihai.bazon@gmail.com", "email": "mihai.bazon@gmail.com",
@@ -35,14 +35,14 @@
}, },
"bundleDependencies": false, "bundleDependencies": false,
"dependencies": { "dependencies": {
"commander": "~2.19.0", "commander": "~2.20.3",
"source-map": "~0.6.1" "source-map": "~0.6.1"
}, },
"deprecated": false, "deprecated": false,
"description": "JavaScript parser, mangler/compressor and beautifier toolkit", "description": "JavaScript parser, mangler/compressor and beautifier toolkit",
"devDependencies": { "devDependencies": {
"acorn": "~6.1.1", "acorn": "~7.1.0",
"semver": "~5.6.0" "semver": "~6.3.0"
}, },
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"
@@ -97,7 +97,7 @@
"url": "git+https://github.com/mishoo/UglifyJS2.git" "url": "git+https://github.com/mishoo/UglifyJS2.git"
}, },
"scripts": { "scripts": {
"test": "node test/run-tests.js" "test": "node test/compress.js && node test/mocha.js"
}, },
"version": "3.4.10" "version": "3.7.7"
} }

File diff suppressed because it is too large Load Diff

32
node_modules/uglify-js/tools/node.js generated vendored
View File

@@ -1,21 +1,19 @@
var fs = require("fs"); var fs = require("fs");
exports.FILES = [ exports.FILES = [
"../lib/utils.js", require.resolve("../lib/utils.js"),
"../lib/ast.js", require.resolve("../lib/ast.js"),
"../lib/parse.js", require.resolve("../lib/parse.js"),
"../lib/transform.js", require.resolve("../lib/transform.js"),
"../lib/scope.js", require.resolve("../lib/scope.js"),
"../lib/output.js", require.resolve("../lib/output.js"),
"../lib/compress.js", require.resolve("../lib/compress.js"),
"../lib/sourcemap.js", require.resolve("../lib/sourcemap.js"),
"../lib/mozilla-ast.js", require.resolve("../lib/mozilla-ast.js"),
"../lib/propmangle.js", require.resolve("../lib/propmangle.js"),
"../lib/minify.js", require.resolve("../lib/minify.js"),
"./exports.js", require.resolve("./exports.js"),
].map(function(file) { ];
return require.resolve(file);
});
new Function("MOZ_SourceMap", "exports", function() { new Function("MOZ_SourceMap", "exports", function() {
var code = exports.FILES.map(function(file) { var code = exports.FILES.map(function(file) {
@@ -48,7 +46,9 @@ function describe_ast() {
if (ctor.SUBCLASSES.length > 0) { if (ctor.SUBCLASSES.length > 0) {
out.space(); out.space();
out.with_block(function() { out.with_block(function() {
ctor.SUBCLASSES.forEach(function(ctor, i) { ctor.SUBCLASSES.sort(function(a, b) {
return a.TYPE < b.TYPE ? -1 : 1;
}).forEach(function(ctor, i) {
out.indent(); out.indent();
doitem(ctor); doitem(ctor);
out.newline(); out.newline();

View File

@@ -1,61 +1,540 @@
<!doctype html>
<html> <html>
<head> <body>
</head> <script>
<body> !function() {
<script>(function(){ var names = [];
var props = {}; var scanned = [];
var to_scan = [];
function addObject(obj) { function scan(obj) {
if (obj == null) return; if (obj && typeof obj == "object" && !~scanned.indexOf(obj)) {
try { scanned.push(obj);
Object.getOwnPropertyNames(obj).forEach(add); to_scan.push(obj);
} catch(ex) {} }
if (obj.prototype) { }
Object.getOwnPropertyNames(obj.prototype).forEach(add);
}
if (typeof obj == "function") {
try {
Object.getOwnPropertyNames(new obj).forEach(add);
} catch(ex) {}
}
}
function add(name) { scan(self);
props[name] = true; [
} "a",
"abbr",
"acronym",
"address",
"applet",
"area",
"article",
"aside",
"audio",
"b",
"base",
"basefont",
"bdi",
"bdo",
"bgsound",
"big",
"blink",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"center",
"checked",
"cite",
"code",
"col",
"colgroup",
"command",
"comment",
"compact",
"content",
"data",
"datalist",
"dd",
"declare",
"defer",
"del",
"details",
"dfn",
"dialog",
"dir",
"disabled",
"div",
"dl",
"dt",
"element",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"font",
"footer",
"form",
"frame",
"frameset",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"hr",
"html",
"i",
"iframe",
"image",
"img",
"input",
"ins",
"isindex",
"ismap",
"kbd",
"keygen",
"label",
"legend",
"li",
"link",
"listing",
"main",
"map",
"mark",
"marquee",
"math",
"menu",
"menuitem",
"meta",
"meter",
"multicol",
"multiple",
"nav",
"nobr",
"noembed",
"noframes",
"nohref",
"noresize",
"noscript",
"noshade",
"nowrap",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"picture",
"plaintext",
"pre",
"progress",
"q",
"rb",
"readonly",
"rp",
"rt",
"rtc",
"ruby",
"s",
"samp",
"script",
"section",
"select",
"selected",
"shadow",
"small",
"source",
"spacer",
"span",
"strike",
"strong",
"style",
"sub",
"summary",
"sup",
"svg",
"table",
"tbody",
"td",
"template",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"track",
"tt",
"u",
"ul",
"var",
"video",
"wbr",
"xmp",
"XXX",
].forEach(function(tag) {
scan(document.createElement(tag));
});
[
"abort",
"absolutedeviceorientation",
"activate",
"active",
"addsourcebuffer",
"addstream",
"addtrack",
"afterprint",
"afterscriptexecute",
"afterupdate",
"animationcancel",
"animationend",
"animationiteration",
"animationstart",
"appinstalled",
"audioend",
"audioprocess",
"audiostart",
"autocomplete",
"autocompleteerror",
"auxclick",
"beforeactivate",
"beforecopy",
"beforecut",
"beforedeactivate",
"beforeeditfocus",
"beforeinstallprompt",
"beforepaste",
"beforeprint",
"beforescriptexecute",
"beforeunload",
"beforeupdate",
"blocked",
"blur",
"bounce",
"boundary",
"cached",
"cancel",
"candidatewindowhide",
"candidatewindowshow",
"candidatewindowupdate",
"canplay",
"canplaythrough",
"cellchange",
"change",
"chargingchange",
"chargingtimechange",
"checking",
"click",
"close",
"compassneedscalibration",
"complete",
"connect",
"connecting",
"connectionstatechange",
"contextmenu",
"controllerchange",
"controlselect",
"copy",
"cuechange",
"cut",
"dataavailable",
"datachannel",
"datasetchanged",
"datasetcomplete",
"dblclick",
"deactivate",
"devicechange",
"devicelight",
"devicemotion",
"deviceorientation",
"deviceorientationabsolute",
"deviceproximity",
"dischargingtimechange",
"disconnect",
"display",
"downloading",
"drag",
"dragend",
"dragenter",
"dragexit",
"dragleave",
"dragover",
"dragstart",
"drop",
"durationchange",
"emptied",
"encrypted",
"end",
"ended",
"enter",
"enterpictureinpicture",
"error",
"errorupdate",
"exit",
"filterchange",
"finish",
"focus",
"focusin",
"focusout",
"freeze",
"fullscreenchange",
"fullscreenerror",
"gesturechange",
"gestureend",
"gesturestart",
"gotpointercapture",
"hashchange",
"help",
"icecandidate",
"iceconnectionstatechange",
"icegatheringstatechange",
"inactive",
"input",
"invalid",
"keydown",
"keypress",
"keyup",
"languagechange",
"layoutcomplete",
"leavepictureinpicture",
"levelchange",
"load",
"loadeddata",
"loadedmetadata",
"loadend",
"loading",
"loadingdone",
"loadingerror",
"loadstart",
"losecapture",
"lostpointercapture",
"mark",
"message",
"messageerror",
"mousedown",
"mouseenter",
"mouseleave",
"mousemove",
"mouseout",
"mouseover",
"mouseup",
"mousewheel",
"move",
"moveend",
"movestart",
"mozfullscreenchange",
"mozfullscreenerror",
"mozorientationchange",
"mozpointerlockchange",
"mozpointerlockerror",
"mscontentzoom",
"msfullscreenchange",
"msfullscreenerror",
"msgesturechange",
"msgesturedoubletap",
"msgestureend",
"msgesturehold",
"msgesturestart",
"msgesturetap",
"msgotpointercapture",
"msinertiastart",
"mslostpointercapture",
"msmanipulationstatechanged",
"msneedkey",
"msorientationchange",
"mspointercancel",
"mspointerdown",
"mspointerenter",
"mspointerhover",
"mspointerleave",
"mspointermove",
"mspointerout",
"mspointerover",
"mspointerup",
"mssitemodejumplistitemremoved",
"msthumbnailclick",
"negotiationneeded",
"nomatch",
"noupdate",
"obsolete",
"offline",
"online",
"open",
"orientationchange",
"pagechange",
"pagehide",
"pageshow",
"paste",
"pause",
"play",
"playing",
"pluginstreamstart",
"pointercancel",
"pointerdown",
"pointerenter",
"pointerleave",
"pointerlockchange",
"pointerlockerror",
"pointermove",
"pointerout",
"pointerover",
"pointerup",
"popstate",
"progress",
"propertychange",
"ratechange",
"reading",
"readystatechange",
"rejectionhandled",
"removesourcebuffer",
"removestream",
"removetrack",
"reset",
"resize",
"resizeend",
"resizestart",
"resourcetimingbufferfull",
"result",
"resume",
"rowenter",
"rowexit",
"rowsdelete",
"rowsinserted",
"scroll",
"search",
"seeked",
"seeking",
"select",
"selectionchange",
"selectstart",
"show",
"signalingstatechange",
"soundend",
"soundstart",
"sourceclose",
"sourceclosed",
"sourceended",
"sourceopen",
"speechend",
"speechstart",
"stalled",
"start",
"statechange",
"stop",
"storage",
"storagecommit",
"submit",
"success",
"suspend",
"textinput",
"timeout",
"timeupdate",
"toggle",
"touchcancel",
"touchend",
"touchmove",
"touchstart",
"track",
"transitioncancel",
"transitionend",
"transitionrun",
"transitionstart",
"unhandledrejection",
"unload",
"updateready",
"upgradeneeded",
"userproximity",
"versionchange",
"visibilitychange",
"voiceschanged",
"volumechange",
"vrdisplayactivate",
"vrdisplayconnect",
"vrdisplaydeactivate",
"vrdisplaydisconnect",
"vrdisplaypresentchange",
"waiting",
"waitingforkey",
"warning",
"webkitanimationend",
"webkitanimationiteration",
"webkitanimationstart",
"webkitcurrentplaybacktargetiswirelesschanged",
"webkitfullscreenchange",
"webkitfullscreenerror",
"webkitkeyadded",
"webkitkeyerror",
"webkitkeymessage",
"webkitneedkey",
"webkitorientationchange",
"webkitplaybacktargetavailabilitychanged",
"webkitpointerlockchange",
"webkitpointerlockerror",
"webkitresourcetimingbufferfull",
"webkittransitionend",
"wheel",
"zoom",
].forEach(function(type) {
[
"beforeunloadevent",
"compositionevent",
"customevent",
"devicemotionevent",
"deviceorientationevent",
"dragevent",
"event",
"events",
"focusevent",
"hashchangeevent",
"htmlevents",
"keyboardevent",
"messageevent",
"mouseevent",
"mouseevents",
"storageevent",
"svgevents",
"textevent",
"touchevent",
"uievent",
"uievents",
].forEach(function(interface) {
try {
var event = document.createEvent(interface);
event.initEvent(type, true, true);
scan(event);
} catch (e) {}
});
});
Object.getOwnPropertyNames(window).forEach(function(thing){ var obj;
addObject(window[thing]); while (obj = to_scan.shift()) {
}); var proto = obj;
do {
try { Object.getOwnPropertyNames(proto).forEach(function(name) {
addObject(new Event("click")); var visited = ~names.indexOf(name);
addObject(new Event("contextmenu")); if (!visited) names.push(name);
addObject(new Event("mouseup")); try {
addObject(new Event("mousedown")); scan(obj[name]);
addObject(new Event("keydown")); if (visited) return;
addObject(new Event("keypress")); if (/^create/.test(name)) {
addObject(new Event("keyup")); scan(obj[name]());
} catch(ex) {} }
if (/^[A-Z]/.test(name)) {
var ta = document.createElement("textarea"); scan(new obj[name]());
ta.style.width = "100%"; }
ta.style.height = "20em"; } catch (e) {}
ta.style.boxSizing = "border-box"; });
<!-- ta.value = Object.keys(props).sort(cmp).map(function(name){ --> } while (proto = Object.getPrototypeOf(proto));
<!-- return JSON.stringify(name); --> }
<!-- }).join(",\n"); --> names.sort();
ta.value = JSON.stringify({ document.write('<pre>[\n "');
vars: [], document.write(names.join('",\n "'));
props: Object.keys(props).sort(cmp) document.write('"\n]</pre>');
}, null, 2); }();
document.body.appendChild(ta); </script>
</body>
function cmp(a, b) {
a = a.toLowerCase();
b = b.toLowerCase();
return a < b ? -1 : a > b ? 1 : 0;
}
})();</script>
</body>
</html> </html>

100
package-lock.json generated
View File

@@ -110,9 +110,9 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
}, },
"clean-css": { "clean-css": {
"version": "4.2.1", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
"integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
"requires": { "requires": {
"source-map": "~0.6.0" "source-map": "~0.6.0"
} }
@@ -126,9 +126,9 @@
} }
}, },
"commander": { "commander": {
"version": "2.17.1", "version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@@ -309,17 +309,17 @@
} }
}, },
"html-minifier": { "html-minifier": {
"version": "3.5.21", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
"integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==",
"requires": { "requires": {
"camel-case": "3.0.x", "camel-case": "^3.0.0",
"clean-css": "4.2.x", "clean-css": "^4.2.1",
"commander": "2.17.x", "commander": "^2.19.0",
"he": "1.2.x", "he": "^1.2.0",
"param-case": "2.1.x", "param-case": "^2.1.1",
"relateurl": "0.2.x", "relateurl": "^0.2.7",
"uglify-js": "3.4.x" "uglify-js": "^3.5.1"
} }
}, },
"http-signature": { "http-signature": {
@@ -452,17 +452,17 @@
} }
}, },
"minify": { "minify": {
"version": "4.1.1", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/minify/-/minify-4.1.1.tgz", "resolved": "https://registry.npmjs.org/minify/-/minify-5.1.0.tgz",
"integrity": "sha512-D99KM2lBtJbAAAtKkekL5R1rCFQqhx2dMeFl5etybEdTwGjMYvPsWPDH0CSxTXWSmI2Q7Tx7Gx4rRxik5ahgQA==", "integrity": "sha512-qlvHtYYjhDpdp05jfxFEdZ7u37tqaltOuuH4TbqyEcjubpY5BBOesJa513wBwjOFI0GmrLVENLooGRX/j2IoDQ==",
"requires": { "requires": {
"clean-css": "^4.1.6", "clean-css": "^4.1.6",
"css-b64-images": "~0.2.5", "css-b64-images": "~0.2.5",
"debug": "^4.1.0", "debug": "^4.1.0",
"html-minifier": "^3.0.1", "html-minifier": "^4.0.0",
"terser": "^3.16.1", "terser": "^4.0.0",
"try-catch": "^2.0.0", "try-catch": "^2.0.0",
"try-to-catch": "^1.0.2" "try-to-catch": "^2.0.0"
} }
}, },
"minimist": { "minimist": {
@@ -471,9 +471,9 @@
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}, },
"ms": { "ms": {
"version": "2.1.1", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}, },
"no-case": { "no-case": {
"version": "2.3.2", "version": "2.3.2",
@@ -639,9 +639,9 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
}, },
"source-map-support": { "source-map-support": {
"version": "0.5.12", "version": "0.5.16",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
"requires": { "requires": {
"buffer-from": "^1.0.0", "buffer-from": "^1.0.0",
"source-map": "^0.6.0" "source-map": "^0.6.0"
@@ -674,20 +674,13 @@
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=" "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY="
}, },
"terser": { "terser": {
"version": "3.17.0", "version": "4.6.3",
"resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz",
"integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", "integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==",
"requires": { "requires": {
"commander": "^2.19.0", "commander": "^2.20.0",
"source-map": "~0.6.1", "source-map": "~0.6.1",
"source-map-support": "~0.5.10" "source-map-support": "~0.5.12"
},
"dependencies": {
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ=="
}
} }
}, },
"tough-cookie": { "tough-cookie": {
@@ -708,14 +701,14 @@
} }
}, },
"try-catch": { "try-catch": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/try-catch/-/try-catch-2.0.0.tgz", "resolved": "https://registry.npmjs.org/try-catch/-/try-catch-2.0.1.tgz",
"integrity": "sha512-RPXpVjsbtWgymwGq5F/OWDFsjEzdvzwHFaMjWWW6f/p6+uk/N7YSKJHQfIfGqITfj8qH4cBqCLMnhKZBaKk7Kg==" "integrity": "sha512-LsOrmObN/2WdM+y2xG+t16vhYrQsnV8wftXIcIOWZhQcBJvKGYuamJGwnU98A7Jxs2oZNkJztXlphEOoA0DWqg=="
}, },
"try-to-catch": { "try-to-catch": {
"version": "1.1.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-1.1.1.tgz", "resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-2.0.1.tgz",
"integrity": "sha512-ikUlS+/BcImLhNYyIgZcEmq4byc31QpC+46/6Jm5ECWkVFhf8SM2Fp/0pMVXPX6vk45SMCwrP4Taxucne8I0VA==" "integrity": "sha512-QYH/PR3ogChy82e2l1UgrEgutcf6Jtfu3TAQWC+Vs6MKpoaFs1atDHUPzfaERugZlESb2Xku7J2my6iUQ7+tcQ=="
}, },
"tunnel-agent": { "tunnel-agent": {
"version": "0.6.0", "version": "0.6.0",
@@ -739,19 +732,12 @@
} }
}, },
"uglify-js": { "uglify-js": {
"version": "3.4.10", "version": "3.7.7",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz",
"integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", "integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==",
"requires": { "requires": {
"commander": "~2.19.0", "commander": "~2.20.3",
"source-map": "~0.6.1" "source-map": "~0.6.1"
},
"dependencies": {
"commander": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg=="
}
} }
}, },
"upper-case": { "upper-case": {

View File

@@ -10,7 +10,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"jsdom": "^14.0.0", "jsdom": "^14.0.0",
"minify": "^4.1.1", "minify": "^5.1.0",
"minimist": "^1.2.0" "minimist": "^1.2.0"
}, },
"repository": { "repository": {