Bump version 1.5.0
diff --git a/component.json b/component.json
new file mode 100644
index 0000000..bd8716d
--- /dev/null
+++ b/component.json
@@ -0,0 +1,65 @@
+{
+ "name": "escodegen",
+ "description": "ECMAScript code generator",
+ "homepage": "http://github.com/estools/escodegen",
+ "main": "escodegen.js",
+ "bin": {
+ "esgenerate": "./bin/esgenerate.js",
+ "escodegen": "./bin/escodegen.js"
+ },
+ "files": [
+ "LICENSE.BSD",
+ "LICENSE.source-map",
+ "README.md",
+ "bin",
+ "escodegen.js",
+ "package.json"
+ ],
+ "version": "1.5.0",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "web": "http://github.com/Constellation"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/estools/escodegen.git"
+ },
+ "dependencies": {
+ "estraverse": "^1.9.1",
+ "esprima": "^1.2.2",
+ "esutils": "^1.1.6",
+ "optionator": "^0.5.0"
+ },
+ "optionalDependencies": {},
+ "devDependencies": {
+ "esprima-moz": "*",
+ "semver": "^4.1.0",
+ "bluebird": "^2.3.11",
+ "chai": "^1.10.0",
+ "gulp-mocha": "^2.0.0",
+ "gulp-eslint": "^0.2.0",
+ "gulp": "^3.8.10",
+ "bower-registry-client": "^0.2.1",
+ "commonjs-everywhere": "^0.9.7"
+ },
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "http://github.com/estools/escodegen/raw/master/LICENSE.BSD"
+ }
+ ],
+ "scripts": {
+ "test": "gulp travis",
+ "unit-test": "gulp test",
+ "lint": "gulp lint",
+ "release": "node tools/release.js",
+ "build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",
+ "build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"
+ }
+}
\ No newline at end of file
diff --git a/escodegen.browser.js b/escodegen.browser.js
new file mode 100644
index 0000000..685d403
--- /dev/null
+++ b/escodegen.browser.js
@@ -0,0 +1,4555 @@
+// Generated by CommonJS Everywhere 0.9.7
+(function (global) {
+ function require(file, parentModule) {
+ if ({}.hasOwnProperty.call(require.cache, file))
+ return require.cache[file];
+ var resolved = require.resolve(file);
+ if (!resolved)
+ throw new Error('Failed to resolve module ' + file);
+ var module$ = {
+ id: file,
+ require: require,
+ filename: file,
+ exports: {},
+ loaded: false,
+ parent: parentModule,
+ children: []
+ };
+ if (parentModule)
+ parentModule.children.push(module$);
+ var dirname = file.slice(0, file.lastIndexOf('/') + 1);
+ require.cache[file] = module$.exports;
+ resolved.call(module$.exports, module$, module$.exports, dirname, file);
+ module$.loaded = true;
+ return require.cache[file] = module$.exports;
+ }
+ require.modules = {};
+ require.cache = {};
+ require.resolve = function (file) {
+ return {}.hasOwnProperty.call(require.modules, file) ? require.modules[file] : void 0;
+ };
+ require.define = function (file, fn) {
+ require.modules[file] = fn;
+ };
+ var process = function () {
+ var cwd = '/';
+ return {
+ title: 'browser',
+ version: 'v0.10.26',
+ browser: true,
+ env: {},
+ argv: [],
+ nextTick: global.setImmediate || function (fn) {
+ setTimeout(fn, 0);
+ },
+ cwd: function () {
+ return cwd;
+ },
+ chdir: function (dir) {
+ cwd = dir;
+ }
+ };
+ }();
+ require.define('/tools/entry-point.js', function (module, exports, __dirname, __filename) {
+ (function () {
+ 'use strict';
+ global.escodegen = require('/escodegen.js', module);
+ escodegen.browser = true;
+ }());
+ });
+ require.define('/escodegen.js', function (module, exports, __dirname, __filename) {
+ (function () {
+ 'use strict';
+ var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse, esutils, isArray, base, indent, json, renumber, hexadecimal, quotes, escapeless, newline, space, parentheses, semicolons, safeConcatenation, directive, extra, parse, sourceMap, sourceCode, preserveBlankLines, FORMAT_MINIFY, FORMAT_DEFAULTS;
+ estraverse = require('/node_modules/estraverse/estraverse.js', module);
+ esutils = require('/node_modules/esutils/lib/utils.js', module);
+ Syntax = estraverse.Syntax;
+ function isExpression(node) {
+ return CodeGenerator.Expression.hasOwnProperty(node.type);
+ }
+ function isStatement(node) {
+ return CodeGenerator.Statement.hasOwnProperty(node.type);
+ }
+ Precedence = {
+ Sequence: 0,
+ Yield: 1,
+ Assignment: 1,
+ Conditional: 2,
+ ArrowFunction: 2,
+ LogicalOR: 3,
+ LogicalAND: 4,
+ BitwiseOR: 5,
+ BitwiseXOR: 6,
+ BitwiseAND: 7,
+ Equality: 8,
+ Relational: 9,
+ BitwiseSHIFT: 10,
+ Additive: 11,
+ Multiplicative: 12,
+ Unary: 13,
+ Postfix: 14,
+ Call: 15,
+ New: 16,
+ TaggedTemplate: 17,
+ Member: 18,
+ Primary: 19
+ };
+ BinaryPrecedence = {
+ '||': Precedence.LogicalOR,
+ '&&': Precedence.LogicalAND,
+ '|': Precedence.BitwiseOR,
+ '^': Precedence.BitwiseXOR,
+ '&': Precedence.BitwiseAND,
+ '==': Precedence.Equality,
+ '!=': Precedence.Equality,
+ '===': Precedence.Equality,
+ '!==': Precedence.Equality,
+ 'is': Precedence.Equality,
+ 'isnt': Precedence.Equality,
+ '<': Precedence.Relational,
+ '>': Precedence.Relational,
+ '<=': Precedence.Relational,
+ '>=': Precedence.Relational,
+ 'in': Precedence.Relational,
+ 'instanceof': Precedence.Relational,
+ '<<': Precedence.BitwiseSHIFT,
+ '>>': Precedence.BitwiseSHIFT,
+ '>>>': Precedence.BitwiseSHIFT,
+ '+': Precedence.Additive,
+ '-': Precedence.Additive,
+ '*': Precedence.Multiplicative,
+ '%': Precedence.Multiplicative,
+ '/': Precedence.Multiplicative
+ };
+ var F_ALLOW_IN = 1, F_ALLOW_CALL = 1 << 1, F_ALLOW_UNPARATH_NEW = 1 << 2, F_FUNC_BODY = 1 << 3, F_DIRECTIVE_CTX = 1 << 4, F_SEMICOLON_OPT = 1 << 5;
+ var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, E_TTF = F_ALLOW_IN | F_ALLOW_CALL, E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, E_TFF = F_ALLOW_IN, E_FFT = F_ALLOW_UNPARATH_NEW, E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW;
+ var S_TFFF = F_ALLOW_IN, S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT, S_FFFF = 0, S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX, S_TTFF = F_ALLOW_IN | F_FUNC_BODY;
+ function getDefaultOptions() {
+ return {
+ indent: null,
+ base: null,
+ parse: null,
+ comment: false,
+ format: {
+ indent: {
+ style: ' ',
+ base: 0,
+ adjustMultilineComment: false
+ },
+ newline: '\n',
+ space: ' ',
+ json: false,
+ renumber: false,
+ hexadecimal: false,
+ quotes: 'single',
+ escapeless: false,
+ compact: false,
+ parentheses: true,
+ semicolons: true,
+ safeConcatenation: false,
+ preserveBlankLines: false
+ },
+ moz: {
+ comprehensionExpressionStartsWithAssignment: false,
+ starlessGenerator: false
+ },
+ sourceMap: null,
+ sourceMapRoot: null,
+ sourceMapWithCode: false,
+ directive: false,
+ raw: true,
+ verbatim: null,
+ sourceCode: null
+ };
+ }
+ function stringRepeat(str, num) {
+ var result = '';
+ for (num |= 0; num > 0; num >>>= 1, str += str) {
+ if (num & 1) {
+ result += str;
+ }
+ }
+ return result;
+ }
+ isArray = Array.isArray;
+ if (!isArray) {
+ isArray = function isArray(array) {
+ return Object.prototype.toString.call(array) === '[object Array]';
+ };
+ }
+ function hasLineTerminator(str) {
+ return /[\r\n]/g.test(str);
+ }
+ function endsWithLineTerminator(str) {
+ var len = str.length;
+ return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1));
+ }
+ function merge(target, override) {
+ var key;
+ for (key in override) {
+ if (override.hasOwnProperty(key)) {
+ target[key] = override[key];
+ }
+ }
+ return target;
+ }
+ function updateDeeply(target, override) {
+ var key, val;
+ function isHashObject(target) {
+ return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp);
+ }
+ for (key in override) {
+ if (override.hasOwnProperty(key)) {
+ val = override[key];
+ if (isHashObject(val)) {
+ if (isHashObject(target[key])) {
+ updateDeeply(target[key], val);
+ } else {
+ target[key] = updateDeeply({}, val);
+ }
+ } else {
+ target[key] = val;
+ }
+ }
+ }
+ return target;
+ }
+ function generateNumber(value) {
+ var result, point, temp, exponent, pos;
+ if (value !== value) {
+ throw new Error('Numeric literal whose value is NaN');
+ }
+ if (value < 0 || value === 0 && 1 / value < 0) {
+ throw new Error('Numeric literal whose value is negative');
+ }
+ if (value === 1 / 0) {
+ return json ? 'null' : renumber ? '1e400' : '1e+400';
+ }
+ result = '' + value;
+ if (!renumber || result.length < 3) {
+ return result;
+ }
+ point = result.indexOf('.');
+ if (!json && result.charCodeAt(0) === 48 && point === 1) {
+ point = 0;
+ result = result.slice(1);
+ }
+ temp = result;
+ result = result.replace('e+', 'e');
+ exponent = 0;
+ if ((pos = temp.indexOf('e')) > 0) {
+ exponent = +temp.slice(pos + 1);
+ temp = temp.slice(0, pos);
+ }
+ if (point >= 0) {
+ exponent -= temp.length - point - 1;
+ temp = +(temp.slice(0, point) + temp.slice(point + 1)) + '';
+ }
+ pos = 0;
+ while (temp.charCodeAt(temp.length + pos - 1) === 48) {
+ --pos;
+ }
+ if (pos !== 0) {
+ exponent -= pos;
+ temp = temp.slice(0, pos);
+ }
+ if (exponent !== 0) {
+ temp += 'e' + exponent;
+ }
+ if ((temp.length < result.length || hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length) && +temp === value) {
+ result = temp;
+ }
+ return result;
+ }
+ function escapeRegExpCharacter(ch, previousIsBackslash) {
+ if ((ch & ~1) === 8232) {
+ return (previousIsBackslash ? 'u' : '\\u') + (ch === 8232 ? '2028' : '2029');
+ } else if (ch === 10 || ch === 13) {
+ return (previousIsBackslash ? '' : '\\') + (ch === 10 ? 'n' : 'r');
+ }
+ return String.fromCharCode(ch);
+ }
+ function generateRegExp(reg) {
+ var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
+ result = reg.toString();
+ if (reg.source) {
+ match = result.match(/\/([^/]*)$/);
+ if (!match) {
+ return result;
+ }
+ flags = match[1];
+ result = '';
+ characterInBrack = false;
+ previousIsBackslash = false;
+ for (i = 0, iz = reg.source.length; i < iz; ++i) {
+ ch = reg.source.charCodeAt(i);
+ if (!previousIsBackslash) {
+ if (characterInBrack) {
+ if (ch === 93) {
+ characterInBrack = false;
+ }
+ } else {
+ if (ch === 47) {
+ result += '\\';
+ } else if (ch === 91) {
+ characterInBrack = true;
+ }
+ }
+ result += escapeRegExpCharacter(ch, previousIsBackslash);
+ previousIsBackslash = ch === 92;
+ } else {
+ result += escapeRegExpCharacter(ch, previousIsBackslash);
+ previousIsBackslash = false;
+ }
+ }
+ return '/' + result + '/' + flags;
+ }
+ return result;
+ }
+ function escapeAllowedCharacter(code, next) {
+ var hex;
+ if (code === 8) {
+ return '\\b';
+ }
+ if (code === 12) {
+ return '\\f';
+ }
+ if (code === 9) {
+ return '\\t';
+ }
+ hex = code.toString(16).toUpperCase();
+ if (json || code > 255) {
+ return '\\u' + '0000'.slice(hex.length) + hex;
+ } else if (code === 0 && !esutils.code.isDecimalDigit(next)) {
+ return '\\0';
+ } else if (code === 11) {
+ return '\\x0B';
+ } else {
+ return '\\x' + '00'.slice(hex.length) + hex;
+ }
+ }
+ function escapeDisallowedCharacter(code) {
+ if (code === 92) {
+ return '\\\\';
+ }
+ if (code === 10) {
+ return '\\n';
+ }
+ if (code === 13) {
+ return '\\r';
+ }
+ if (code === 8232) {
+ return '\\u2028';
+ }
+ if (code === 8233) {
+ return '\\u2029';
+ }
+ throw new Error('Incorrectly classified character');
+ }
+ function escapeDirective(str) {
+ var i, iz, code, quote;
+ quote = quotes === 'double' ? '"' : "'";
+ for (i = 0, iz = str.length; i < iz; ++i) {
+ code = str.charCodeAt(i);
+ if (code === 39) {
+ quote = '"';
+ break;
+ } else if (code === 34) {
+ quote = "'";
+ break;
+ } else if (code === 92) {
+ ++i;
+ }
+ }
+ return quote + str + quote;
+ }
+ function escapeString(str) {
+ var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote;
+ for (i = 0, len = str.length; i < len; ++i) {
+ code = str.charCodeAt(i);
+ if (code === 39) {
+ ++singleQuotes;
+ } else if (code === 34) {
+ ++doubleQuotes;
+ } else if (code === 47 && json) {
+ result += '\\';
+ } else if (esutils.code.isLineTerminator(code) || code === 92) {
+ result += escapeDisallowedCharacter(code);
+ continue;
+ } else if (json && code < 32 || !(json || escapeless || code >= 32 && code <= 126)) {
+ result += escapeAllowedCharacter(code, str.charCodeAt(i + 1));
+ continue;
+ }
+ result += String.fromCharCode(code);
+ }
+ single = !(quotes === 'double' || quotes === 'auto' && doubleQuotes < singleQuotes);
+ quote = single ? "'" : '"';
+ if (!(single ? singleQuotes : doubleQuotes)) {
+ return quote + result + quote;
+ }
+ str = result;
+ result = quote;
+ for (i = 0, len = str.length; i < len; ++i) {
+ code = str.charCodeAt(i);
+ if (code === 39 && single || code === 34 && !single) {
+ result += '\\';
+ }
+ result += String.fromCharCode(code);
+ }
+ return result + quote;
+ }
+ function flattenToString(arr) {
+ var i, iz, elem, result = '';
+ for (i = 0, iz = arr.length; i < iz; ++i) {
+ elem = arr[i];
+ result += isArray(elem) ? flattenToString(elem) : elem;
+ }
+ return result;
+ }
+ function toSourceNodeWhenNeeded(generated, node) {
+ if (!sourceMap) {
+ if (isArray(generated)) {
+ return flattenToString(generated);
+ } else {
+ return generated;
+ }
+ }
+ if (node == null) {
+ if (generated instanceof SourceNode) {
+ return generated;
+ } else {
+ node = {};
+ }
+ }
+ if (node.loc == null) {
+ return new SourceNode(null, null, sourceMap, generated, node.name || null);
+ }
+ return new SourceNode(node.loc.start.line, node.loc.start.column, sourceMap === true ? node.loc.source || null : sourceMap, generated, node.name || null);
+ }
+ function noEmptySpace() {
+ return space ? space : ' ';
+ }
+ function join(left, right) {
+ var leftSource, rightSource, leftCharCode, rightCharCode;
+ leftSource = toSourceNodeWhenNeeded(left).toString();
+ if (leftSource.length === 0) {
+ return [right];
+ }
+ rightSource = toSourceNodeWhenNeeded(right).toString();
+ if (rightSource.length === 0) {
+ return [left];
+ }
+ leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
+ rightCharCode = rightSource.charCodeAt(0);
+ if ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPart(leftCharCode) && esutils.code.isIdentifierPart(rightCharCode) || leftCharCode === 47 && rightCharCode === 105) {
+ return [
+ left,
+ noEmptySpace(),
+ right
+ ];
+ } else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) {
+ return [
+ left,
+ right
+ ];
+ }
+ return [
+ left,
+ space,
+ right
+ ];
+ }
+ function addIndent(stmt) {
+ return [
+ base,
+ stmt
+ ];
+ }
+ function withIndent(fn) {
+ var previousBase;
+ previousBase = base;
+ base += indent;
+ fn(base);
+ base = previousBase;
+ }
+ function calculateSpaces(str) {
+ var i;
+ for (i = str.length - 1; i >= 0; --i) {
+ if (esutils.code.isLineTerminator(str.charCodeAt(i))) {
+ break;
+ }
+ }
+ return str.length - 1 - i;
+ }
+ function adjustMultilineComment(value, specialBase) {
+ var array, i, len, line, j, spaces, previousBase, sn;
+ array = value.split(/\r\n|[\r\n]/);
+ spaces = Number.MAX_VALUE;
+ for (i = 1, len = array.length; i < len; ++i) {
+ line = array[i];
+ j = 0;
+ while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) {
+ ++j;
+ }
+ if (spaces > j) {
+ spaces = j;
+ }
+ }
+ if (typeof specialBase !== 'undefined') {
+ previousBase = base;
+ if (array[1][spaces] === '*') {
+ specialBase += ' ';
+ }
+ base = specialBase;
+ } else {
+ if (spaces & 1) {
+ --spaces;
+ }
+ previousBase = base;
+ }
+ for (i = 1, len = array.length; i < len; ++i) {
+ sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces)));
+ array[i] = sourceMap ? sn.join('') : sn;
+ }
+ base = previousBase;
+ return array.join('\n');
+ }
+ function generateComment(comment, specialBase) {
+ if (comment.type === 'Line') {
+ if (endsWithLineTerminator(comment.value)) {
+ return '//' + comment.value;
+ } else {
+ var result = '//' + comment.value;
+ if (!preserveBlankLines) {
+ result += '\n';
+ }
+ return result;
+ }
+ }
+ if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) {
+ return adjustMultilineComment('/*' + comment.value + '*/', specialBase);
+ }
+ return '/*' + comment.value + '*/';
+ }
+ function addComments(stmt, result) {
+ var i, len, comment, save, tailingToStatement, specialBase, fragment, extRange, range, prevRange, prefix, infix, suffix, count;
+ if (stmt.leadingComments && stmt.leadingComments.length > 0) {
+ save = result;
+ if (preserveBlankLines) {
+ comment = stmt.leadingComments[0];
+ result = [];
+ extRange = comment.extendedRange;
+ range = comment.range;
+ prefix = sourceCode.substring(extRange[0], range[0]);
+ count = (prefix.match(/\n/g) || []).length;
+ if (count > 0) {
+ result.push(stringRepeat('\n', count));
+ result.push(addIndent(generateComment(comment)));
+ } else {
+ result.push(prefix);
+ result.push(generateComment(comment));
+ }
+ prevRange = range;
+ for (i = 1, len = stmt.leadingComments.length; i < len; i++) {
+ comment = stmt.leadingComments[i];
+ range = comment.range;
+ infix = sourceCode.substring(prevRange[1], range[0]);
+ count = (infix.match(/\n/g) || []).length;
+ result.push(stringRepeat('\n', count));
+ result.push(addIndent(generateComment(comment)));
+ prevRange = range;
+ }
+ suffix = sourceCode.substring(range[1], extRange[1]);
+ count = (suffix.match(/\n/g) || []).length;
+ result.push(stringRepeat('\n', count));
+ } else {
+ comment = stmt.leadingComments[0];
+ result = [];
+ if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) {
+ result.push('\n');
+ }
+ result.push(generateComment(comment));
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push('\n');
+ }
+ for (i = 1, len = stmt.leadingComments.length; i < len; ++i) {
+ comment = stmt.leadingComments[i];
+ fragment = [generateComment(comment)];
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
+ fragment.push('\n');
+ }
+ result.push(addIndent(fragment));
+ }
+ }
+ result.push(addIndent(save));
+ }
+ if (stmt.trailingComments) {
+ if (preserveBlankLines) {
+ comment = stmt.trailingComments[0];
+ extRange = comment.extendedRange;
+ range = comment.range;
+ prefix = sourceCode.substring(extRange[0], range[0]);
+ count = (prefix.match(/\n/g) || []).length;
+ if (count > 0) {
+ result.push(stringRepeat('\n', count));
+ result.push(addIndent(generateComment(comment)));
+ } else {
+ result.push(prefix);
+ result.push(generateComment(comment));
+ }
+ } else {
+ tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
+ specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([
+ base,
+ result,
+ indent
+ ]).toString()));
+ for (i = 0, len = stmt.trailingComments.length; i < len; ++i) {
+ comment = stmt.trailingComments[i];
+ if (tailingToStatement) {
+ if (i === 0) {
+ result = [
+ result,
+ indent
+ ];
+ } else {
+ result = [
+ result,
+ specialBase
+ ];
+ }
+ result.push(generateComment(comment, specialBase));
+ } else {
+ result = [
+ result,
+ addIndent(generateComment(comment))
+ ];
+ }
+ if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result = [
+ result,
+ '\n'
+ ];
+ }
+ }
+ }
+ }
+ return result;
+ }
+ function generateBlankLines(start, end, result) {
+ var j, newlineCount = 0;
+ for (j = start; j < end; j++) {
+ if (sourceCode[j] === '\n') {
+ newlineCount++;
+ }
+ }
+ for (j = 1; j < newlineCount; j++) {
+ result.push(newline);
+ }
+ }
+ function parenthesize(text, current, should) {
+ if (current < should) {
+ return [
+ '(',
+ text,
+ ')'
+ ];
+ }
+ return text;
+ }
+ function generateVerbatimString(string) {
+ var i, iz, result;
+ result = string.split(/\r\n|\n/);
+ for (i = 1, iz = result.length; i < iz; i++) {
+ result[i] = newline + base + result[i];
+ }
+ return result;
+ }
+ function generateVerbatim(expr, precedence) {
+ var verbatim, result, prec;
+ verbatim = expr[extra.verbatim];
+ if (typeof verbatim === 'string') {
+ result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence);
+ } else {
+ result = generateVerbatimString(verbatim.content);
+ prec = verbatim.precedence != null ? verbatim.precedence : Precedence.Sequence;
+ result = parenthesize(result, prec, precedence);
+ }
+ return toSourceNodeWhenNeeded(result, expr);
+ }
+ function CodeGenerator() {
+ }
+ CodeGenerator.prototype.maybeBlock = function (stmt, flags) {
+ var result, noLeadingComment, that = this;
+ noLeadingComment = !extra.comment || !stmt.leadingComments;
+ if (stmt.type === Syntax.BlockStatement && noLeadingComment) {
+ return [
+ space,
+ this.generateStatement(stmt, flags)
+ ];
+ }
+ if (stmt.type === Syntax.EmptyStatement && noLeadingComment) {
+ return ';';
+ }
+ withIndent(function () {
+ result = [
+ newline,
+ addIndent(that.generateStatement(stmt, flags))
+ ];
+ });
+ return result;
+ };
+ CodeGenerator.prototype.maybeBlockSuffix = function (stmt, result) {
+ var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
+ if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) {
+ return [
+ result,
+ space
+ ];
+ }
+ if (ends) {
+ return [
+ result,
+ base
+ ];
+ }
+ return [
+ result,
+ newline,
+ base
+ ];
+ };
+ function generateIdentifier(node) {
+ return toSourceNodeWhenNeeded(node.name, node);
+ }
+ CodeGenerator.prototype.generatePattern = function (node, precedence, flags) {
+ if (node.type === Syntax.Identifier) {
+ return generateIdentifier(node);
+ }
+ return this.generateExpression(node, precedence, flags);
+ };
+ CodeGenerator.prototype.generateFunctionParams = function (node) {
+ var i, iz, result, hasDefault;
+ hasDefault = false;
+ if (node.type === Syntax.ArrowFunctionExpression && !node.rest && (!node.defaults || node.defaults.length === 0) && node.params.length === 1 && node.params[0].type === Syntax.Identifier) {
+ result = [generateIdentifier(node.params[0])];
+ } else {
+ result = ['('];
+ if (node.defaults) {
+ hasDefault = true;
+ }
+ for (i = 0, iz = node.params.length; i < iz; ++i) {
+ if (hasDefault && node.defaults[i]) {
+ result.push(this.generateAssignment(node.params[i], node.defaults[i], '=', Precedence.Assignment, E_TTT));
+ } else {
+ result.push(this.generatePattern(node.params[i], Precedence.Assignment, E_TTT));
+ }
+ if (i + 1 < iz) {
+ result.push(',' + space);
+ }
+ }
+ if (node.rest) {
+ if (node.params.length) {
+ result.push(',' + space);
+ }
+ result.push('...');
+ result.push(generateIdentifier(node.rest));
+ }
+ result.push(')');
+ }
+ return result;
+ };
+ CodeGenerator.prototype.generateFunctionBody = function (node) {
+ var result, expr;
+ result = this.generateFunctionParams(node);
+ if (node.type === Syntax.ArrowFunctionExpression) {
+ result.push(space);
+ result.push('=>');
+ }
+ if (node.expression) {
+ result.push(space);
+ expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT);
+ if (expr.toString().charAt(0) === '{') {
+ expr = [
+ '(',
+ expr,
+ ')'
+ ];
+ }
+ result.push(expr);
+ } else {
+ result.push(this.maybeBlock(node.body, S_TTFF));
+ }
+ return result;
+ };
+ CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) {
+ var result = ['for' + space + '('], that = this;
+ withIndent(function () {
+ if (stmt.left.type === Syntax.VariableDeclaration) {
+ withIndent(function () {
+ result.push(stmt.left.kind + noEmptySpace());
+ result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF));
+ });
+ } else {
+ result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
+ }
+ result = join(result, operator);
+ result = [
+ join(result, that.generateExpression(stmt.right, Precedence.Sequence, E_TTT)),
+ ')'
+ ];
+ });
+ result.push(this.maybeBlock(stmt.body, flags));
+ return result;
+ };
+ CodeGenerator.prototype.generatePropertyKey = function (expr, computed) {
+ var result = [];
+ if (computed) {
+ result.push('[');
+ }
+ result.push(this.generateExpression(expr, Precedence.Sequence, E_TTT));
+ if (computed) {
+ result.push(']');
+ }
+ return result;
+ };
+ CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) {
+ if (Precedence.Assignment < precedence) {
+ flags |= F_ALLOW_IN;
+ }
+ return parenthesize([
+ this.generateExpression(left, Precedence.Call, flags),
+ space + operator + space,
+ this.generateExpression(right, Precedence.Assignment, flags)
+ ], Precedence.Assignment, precedence);
+ };
+ CodeGenerator.prototype.semicolon = function (flags) {
+ if (!semicolons && flags & F_SEMICOLON_OPT) {
+ return '';
+ }
+ return ';';
+ };
+ CodeGenerator.Statement = {
+ BlockStatement: function (stmt, flags) {
+ var range, content, result = [
+ '{',
+ newline
+ ], that = this;
+ withIndent(function () {
+ if (stmt.body.length === 0 && preserveBlankLines) {
+ range = stmt.range;
+ if (range[1] - range[0] > 2) {
+ content = sourceCode.substring(range[0] + 1, range[1] - 1);
+ if (content[0] === '\n') {
+ result = ['{'];
+ }
+ result.push(content);
+ }
+ }
+ var i, iz, fragment, bodyFlags;
+ bodyFlags = S_TFFF;
+ if (flags & F_FUNC_BODY) {
+ bodyFlags |= F_DIRECTIVE_CTX;
+ }
+ for (i = 0, iz = stmt.body.length; i < iz; ++i) {
+ if (preserveBlankLines) {
+ if (i === 0) {
+ if (stmt.body[0].leadingComments) {
+ range = stmt.body[0].leadingComments[0].extendedRange;
+ content = sourceCode.substring(range[0], range[1]);
+ if (content[0] === '\n') {
+ result = ['{'];
+ }
+ }
+ if (!stmt.body[0].leadingComments) {
+ generateBlankLines(stmt.range[0], stmt.body[0].range[0], result);
+ }
+ }
+ if (i > 0) {
+ if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
+ generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
+ }
+ }
+ }
+ if (i === iz - 1) {
+ bodyFlags |= F_SEMICOLON_OPT;
+ }
+ if (stmt.body[i].leadingComments && preserveBlankLines) {
+ fragment = that.generateStatement(stmt.body[i], bodyFlags);
+ } else {
+ fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags));
+ }
+ result.push(fragment);
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
+ if (preserveBlankLines && i < iz - 1) {
+ if (!stmt.body[i + 1].leadingComments) {
+ result.push(newline);
+ }
+ } else {
+ result.push(newline);
+ }
+ }
+ if (preserveBlankLines) {
+ if (i === iz - 1) {
+ if (!stmt.body[i].trailingComments) {
+ generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
+ }
+ }
+ }
+ }
+ });
+ result.push(addIndent('}'));
+ return result;
+ },
+ BreakStatement: function (stmt, flags) {
+ if (stmt.label) {
+ return 'break ' + stmt.label.name + this.semicolon(flags);
+ }
+ return 'break' + this.semicolon(flags);
+ },
+ ContinueStatement: function (stmt, flags) {
+ if (stmt.label) {
+ return 'continue ' + stmt.label.name + this.semicolon(flags);
+ }
+ return 'continue' + this.semicolon(flags);
+ },
+ ClassBody: function (stmt, flags) {
+ var result = [
+ '{',
+ newline
+ ], that = this;
+ withIndent(function (indent) {
+ var i, iz;
+ for (i = 0, iz = stmt.body.length; i < iz; ++i) {
+ result.push(indent);
+ result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT));
+ if (i + 1 < iz) {
+ result.push(newline);
+ }
+ }
+ });
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ result.push(base);
+ result.push('}');
+ return result;
+ },
+ ClassDeclaration: function (stmt, flags) {
+ var result, fragment;
+ result = ['class ' + stmt.id.name];
+ if (stmt.superClass) {
+ fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Assignment, E_TTT));
+ result = join(result, fragment);
+ }
+ result.push(space);
+ result.push(this.generateStatement(stmt.body, S_TFFT));
+ return result;
+ },
+ DirectiveStatement: function (stmt, flags) {
+ if (extra.raw && stmt.raw) {
+ return stmt.raw + this.semicolon(flags);
+ }
+ return escapeDirective(stmt.directive) + this.semicolon(flags);
+ },
+ DoWhileStatement: function (stmt, flags) {
+ var result = join('do', this.maybeBlock(stmt.body, S_TFFF));
+ result = this.maybeBlockSuffix(stmt.body, result);
+ return join(result, [
+ 'while' + space + '(',
+ this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
+ ')' + this.semicolon(flags)
+ ]);
+ },
+ CatchClause: function (stmt, flags) {
+ var result, that = this;
+ withIndent(function () {
+ var guard;
+ result = [
+ 'catch' + space + '(',
+ that.generateExpression(stmt.param, Precedence.Sequence, E_TTT),
+ ')'
+ ];
+ if (stmt.guard) {
+ guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT);
+ result.splice(2, 0, ' if ', guard);
+ }
+ });
+ result.push(this.maybeBlock(stmt.body, S_TFFF));
+ return result;
+ },
+ DebuggerStatement: function (stmt, flags) {
+ return 'debugger' + this.semicolon(flags);
+ },
+ EmptyStatement: function (stmt, flags) {
+ return ';';
+ },
+ ExportDeclaration: function (stmt, flags) {
+ var result = ['export'], bodyFlags, that = this;
+ bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
+ if (stmt['default']) {
+ result = join(result, 'default');
+ if (isStatement(stmt.declaration)) {
+ result = join(result, this.generateStatement(stmt.declaration, bodyFlags));
+ } else {
+ result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
+ }
+ return result;
+ }
+ if (stmt.declaration) {
+ return join(result, this.generateStatement(stmt.declaration, bodyFlags));
+ }
+ if (stmt.specifiers) {
+ if (stmt.specifiers.length === 0) {
+ result = join(result, '{' + space + '}');
+ } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
+ result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
+ } else {
+ result = join(result, '{');
+ withIndent(function (indent) {
+ var i, iz;
+ result.push(newline);
+ for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) {
+ result.push(indent);
+ result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
+ if (i + 1 < iz) {
+ result.push(',' + newline);
+ }
+ }
+ });
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ result.push(base + '}');
+ }
+ if (stmt.source) {
+ result = join(result, [
+ 'from' + space,
+ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
+ this.semicolon(flags)
+ ]);
+ } else {
+ result.push(this.semicolon(flags));
+ }
+ }
+ return result;
+ },
+ ExpressionStatement: function (stmt, flags) {
+ var result, fragment;
+ result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)];
+ fragment = toSourceNodeWhenNeeded(result).toString();
+ if (fragment.charAt(0) === '{' || fragment.slice(0, 5) === 'class' && ' {'.indexOf(fragment.charAt(5)) >= 0 || fragment.slice(0, 8) === 'function' && '* ('.indexOf(fragment.charAt(8)) >= 0 || directive && flags & F_DIRECTIVE_CTX && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string') {
+ result = [
+ '(',
+ result,
+ ')' + this.semicolon(flags)
+ ];
+ } else {
+ result.push(this.semicolon(flags));
+ }
+ return result;
+ },
+ ImportDeclaration: function (stmt, flags) {
+ var result, cursor, that = this;
+ if (stmt.specifiers.length === 0) {
+ return [
+ 'import',
+ space,
+ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
+ this.semicolon(flags)
+ ];
+ }
+ result = ['import'];
+ cursor = 0;
+ if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
+ result = join(result, [this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)]);
+ ++cursor;
+ }
+ if (stmt.specifiers[cursor]) {
+ if (cursor !== 0) {
+ result.push(',');
+ }
+ if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
+ result = join(result, [
+ space,
+ this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
+ ]);
+ } else {
+ result.push(space + '{');
+ if (stmt.specifiers.length - cursor === 1) {
+ result.push(space);
+ result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT));
+ result.push(space + '}' + space);
+ } else {
+ withIndent(function (indent) {
+ var i, iz;
+ result.push(newline);
+ for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) {
+ result.push(indent);
+ result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
+ if (i + 1 < iz) {
+ result.push(',' + newline);
+ }
+ }
+ });
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ result.push(base + '}' + space);
+ }
+ }
+ }
+ result = join(result, [
+ 'from' + space,
+ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
+ this.semicolon(flags)
+ ]);
+ return result;
+ },
+ VariableDeclarator: function (stmt, flags) {
+ var itemFlags = flags & F_ALLOW_IN ? E_TTT : E_FTT;
+ if (stmt.init) {
+ return [
+ this.generateExpression(stmt.id, Precedence.Assignment, itemFlags),
+ space,
+ '=',
+ space,
+ this.generateExpression(stmt.init, Precedence.Assignment, itemFlags)
+ ];
+ }
+ return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags);
+ },
+ VariableDeclaration: function (stmt, flags) {
+ var result, i, iz, node, bodyFlags, that = this;
+ result = [stmt.kind];
+ bodyFlags = flags & F_ALLOW_IN ? S_TFFF : S_FFFF;
+ function block() {
+ node = stmt.declarations[0];
+ if (extra.comment && node.leadingComments) {
+ result.push('\n');
+ result.push(addIndent(that.generateStatement(node, bodyFlags)));
+ } else {
+ result.push(noEmptySpace());
+ result.push(that.generateStatement(node, bodyFlags));
+ }
+ for (i = 1, iz = stmt.declarations.length; i < iz; ++i) {
+ node = stmt.declarations[i];
+ if (extra.comment && node.leadingComments) {
+ result.push(',' + newline);
+ result.push(addIndent(that.generateStatement(node, bodyFlags)));
+ } else {
+ result.push(',' + space);
+ result.push(that.generateStatement(node, bodyFlags));
+ }
+ }
+ }
+ if (stmt.declarations.length > 1) {
+ withIndent(block);
+ } else {
+ block();
+ }
+ result.push(this.semicolon(flags));
+ return result;
+ },
+ ThrowStatement: function (stmt, flags) {
+ return [
+ join('throw', this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)),
+ this.semicolon(flags)
+ ];
+ },
+ TryStatement: function (stmt, flags) {
+ var result, i, iz, guardedHandlers;
+ result = [
+ 'try',
+ this.maybeBlock(stmt.block, S_TFFF)
+ ];
+ result = this.maybeBlockSuffix(stmt.block, result);
+ if (stmt.handlers) {
+ for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
+ result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF));
+ if (stmt.finalizer || i + 1 !== iz) {
+ result = this.maybeBlockSuffix(stmt.handlers[i].body, result);
+ }
+ }
+ } else {
+ guardedHandlers = stmt.guardedHandlers || [];
+ for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
+ result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF));
+ if (stmt.finalizer || i + 1 !== iz) {
+ result = this.maybeBlockSuffix(guardedHandlers[i].body, result);
+ }
+ }
+ if (stmt.handler) {
+ if (isArray(stmt.handler)) {
+ for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
+ result = join(result, this.generateStatement(stmt.handler[i], S_TFFF));
+ if (stmt.finalizer || i + 1 !== iz) {
+ result = this.maybeBlockSuffix(stmt.handler[i].body, result);
+ }
+ }
+ } else {
+ result = join(result, this.generateStatement(stmt.handler, S_TFFF));
+ if (stmt.finalizer) {
+ result = this.maybeBlockSuffix(stmt.handler.body, result);
+ }
+ }
+ }
+ }
+ if (stmt.finalizer) {
+ result = join(result, [
+ 'finally',
+ this.maybeBlock(stmt.finalizer, S_TFFF)
+ ]);
+ }
+ return result;
+ },
+ SwitchStatement: function (stmt, flags) {
+ var result, fragment, i, iz, bodyFlags, that = this;
+ withIndent(function () {
+ result = [
+ 'switch' + space + '(',
+ that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT),
+ ')' + space + '{' + newline
+ ];
+ });
+ if (stmt.cases) {
+ bodyFlags = S_TFFF;
+ for (i = 0, iz = stmt.cases.length; i < iz; ++i) {
+ if (i === iz - 1) {
+ bodyFlags |= F_SEMICOLON_OPT;
+ }
+ fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags));
+ result.push(fragment);
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
+ result.push(newline);
+ }
+ }
+ }
+ result.push(addIndent('}'));
+ return result;
+ },
+ SwitchCase: function (stmt, flags) {
+ var result, fragment, i, iz, bodyFlags, that = this;
+ withIndent(function () {
+ if (stmt.test) {
+ result = [
+ join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
+ ':'
+ ];
+ } else {
+ result = ['default:'];
+ }
+ i = 0;
+ iz = stmt.consequent.length;
+ if (iz && stmt.consequent[0].type === Syntax.BlockStatement) {
+ fragment = that.maybeBlock(stmt.consequent[0], S_TFFF);
+ result.push(fragment);
+ i = 1;
+ }
+ if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ bodyFlags = S_TFFF;
+ for (; i < iz; ++i) {
+ if (i === iz - 1 && flags & F_SEMICOLON_OPT) {
+ bodyFlags |= F_SEMICOLON_OPT;
+ }
+ fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags));
+ result.push(fragment);
+ if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
+ result.push(newline);
+ }
+ }
+ });
+ return result;
+ },
+ IfStatement: function (stmt, flags) {
+ var result, bodyFlags, semicolonOptional, that = this;
+ withIndent(function () {
+ result = [
+ 'if' + space + '(',
+ that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
+ ')'
+ ];
+ });
+ semicolonOptional = flags & F_SEMICOLON_OPT;
+ bodyFlags = S_TFFF;
+ if (semicolonOptional) {
+ bodyFlags |= F_SEMICOLON_OPT;
+ }
+ if (stmt.alternate) {
+ result.push(this.maybeBlock(stmt.consequent, S_TFFF));
+ result = this.maybeBlockSuffix(stmt.consequent, result);
+ if (stmt.alternate.type === Syntax.IfStatement) {
+ result = join(result, [
+ 'else ',
+ this.generateStatement(stmt.alternate, bodyFlags)
+ ]);
+ } else {
+ result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags)));
+ }
+ } else {
+ result.push(this.maybeBlock(stmt.consequent, bodyFlags));
+ }
+ return result;
+ },
+ ForStatement: function (stmt, flags) {
+ var result, that = this;
+ withIndent(function () {
+ result = ['for' + space + '('];
+ if (stmt.init) {
+ if (stmt.init.type === Syntax.VariableDeclaration) {
+ result.push(that.generateStatement(stmt.init, S_FFFF));
+ } else {
+ result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT));
+ result.push(';');
+ }
+ } else {
+ result.push(';');
+ }
+ if (stmt.test) {
+ result.push(space);
+ result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT));
+ result.push(';');
+ } else {
+ result.push(';');
+ }
+ if (stmt.update) {
+ result.push(space);
+ result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT));
+ result.push(')');
+ } else {
+ result.push(')');
+ }
+ });
+ result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
+ return result;
+ },
+ ForInStatement: function (stmt, flags) {
+ return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
+ },
+ ForOfStatement: function (stmt, flags) {
+ return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
+ },
+ LabeledStatement: function (stmt, flags) {
+ return [
+ stmt.label.name + ':',
+ this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)
+ ];
+ },
+ Program: function (stmt, flags) {
+ var result, fragment, i, iz, bodyFlags;
+ iz = stmt.body.length;
+ result = [safeConcatenation && iz > 0 ? '\n' : ''];
+ bodyFlags = S_TFTF;
+ for (i = 0; i < iz; ++i) {
+ if (!safeConcatenation && i === iz - 1) {
+ bodyFlags |= F_SEMICOLON_OPT;
+ }
+ if (preserveBlankLines) {
+ if (i === 0) {
+ if (!stmt.body[0].leadingComments) {
+ generateBlankLines(stmt.range[0], stmt.body[i].range[0], result);
+ }
+ }
+ if (i > 0) {
+ if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
+ generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
+ }
+ }
+ }
+ fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags));
+ result.push(fragment);
+ if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
+ if (preserveBlankLines) {
+ if (!stmt.body[i + 1].leadingComments) {
+ result.push(newline);
+ }
+ } else {
+ result.push(newline);
+ }
+ }
+ if (preserveBlankLines) {
+ if (i === iz - 1) {
+ if (!stmt.body[i].trailingComments) {
+ generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
+ }
+ }
+ }
+ }
+ return result;
+ },
+ FunctionDeclaration: function (stmt, flags) {
+ var isGenerator = stmt.generator && !extra.moz.starlessGenerator;
+ return [
+ isGenerator ? 'function*' : 'function',
+ isGenerator ? space : noEmptySpace(),
+ generateIdentifier(stmt.id),
+ this.generateFunctionBody(stmt)
+ ];
+ },
+ ReturnStatement: function (stmt, flags) {
+ if (stmt.argument) {
+ return [
+ join('return', this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)),
+ this.semicolon(flags)
+ ];
+ }
+ return ['return' + this.semicolon(flags)];
+ },
+ WhileStatement: function (stmt, flags) {
+ var result, that = this;
+ withIndent(function () {
+ result = [
+ 'while' + space + '(',
+ that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
+ ')'
+ ];
+ });
+ result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
+ return result;
+ },
+ WithStatement: function (stmt, flags) {
+ var result, that = this;
+ withIndent(function () {
+ result = [
+ 'with' + space + '(',
+ that.generateExpression(stmt.object, Precedence.Sequence, E_TTT),
+ ')'
+ ];
+ });
+ result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
+ return result;
+ }
+ };
+ merge(CodeGenerator.prototype, CodeGenerator.Statement);
+ CodeGenerator.Expression = {
+ SequenceExpression: function (expr, precedence, flags) {
+ var result, i, iz;
+ if (Precedence.Sequence < precedence) {
+ flags |= F_ALLOW_IN;
+ }
+ result = [];
+ for (i = 0, iz = expr.expressions.length; i < iz; ++i) {
+ result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags));
+ if (i + 1 < iz) {
+ result.push(',' + space);
+ }
+ }
+ return parenthesize(result, Precedence.Sequence, precedence);
+ },
+ AssignmentExpression: function (expr, precedence, flags) {
+ return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags);
+ },
+ ArrowFunctionExpression: function (expr, precedence, flags) {
+ return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence);
+ },
+ ConditionalExpression: function (expr, precedence, flags) {
+ if (Precedence.Conditional < precedence) {
+ flags |= F_ALLOW_IN;
+ }
+ return parenthesize([
+ this.generateExpression(expr.test, Precedence.LogicalOR, flags),
+ space + '?' + space,
+ this.generateExpression(expr.consequent, Precedence.Assignment, flags),
+ space + ':' + space,
+ this.generateExpression(expr.alternate, Precedence.Assignment, flags)
+ ], Precedence.Conditional, precedence);
+ },
+ LogicalExpression: function (expr, precedence, flags) {
+ return this.BinaryExpression(expr, precedence, flags);
+ },
+ BinaryExpression: function (expr, precedence, flags) {
+ var result, currentPrecedence, fragment, leftSource;
+ currentPrecedence = BinaryPrecedence[expr.operator];
+ if (currentPrecedence < precedence) {
+ flags |= F_ALLOW_IN;
+ }
+ fragment = this.generateExpression(expr.left, currentPrecedence, flags);
+ leftSource = fragment.toString();
+ if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPart(expr.operator.charCodeAt(0))) {
+ result = [
+ fragment,
+ noEmptySpace(),
+ expr.operator
+ ];
+ } else {
+ result = join(fragment, expr.operator);
+ }
+ fragment = this.generateExpression(expr.right, currentPrecedence + 1, flags);
+ if (expr.operator === '/' && fragment.toString().charAt(0) === '/' || expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') {
+ result.push(noEmptySpace());
+ result.push(fragment);
+ } else {
+ result = join(result, fragment);
+ }
+ if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) {
+ return [
+ '(',
+ result,
+ ')'
+ ];
+ }
+ return parenthesize(result, currentPrecedence, precedence);
+ },
+ CallExpression: function (expr, precedence, flags) {
+ var result, i, iz;
+ result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)];
+ result.push('(');
+ for (i = 0, iz = expr['arguments'].length; i < iz; ++i) {
+ result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
+ if (i + 1 < iz) {
+ result.push(',' + space);
+ }
+ }
+ result.push(')');
+ if (!(flags & F_ALLOW_CALL)) {
+ return [
+ '(',
+ result,
+ ')'
+ ];
+ }
+ return parenthesize(result, Precedence.Call, precedence);
+ },
+ NewExpression: function (expr, precedence, flags) {
+ var result, length, i, iz, itemFlags;
+ length = expr['arguments'].length;
+ itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
+ result = join('new', this.generateExpression(expr.callee, Precedence.New, itemFlags));
+ if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
+ result.push('(');
+ for (i = 0, iz = length; i < iz; ++i) {
+ result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
+ if (i + 1 < iz) {
+ result.push(',' + space);
+ }
+ }
+ result.push(')');
+ }
+ return parenthesize(result, Precedence.New, precedence);
+ },
+ MemberExpression: function (expr, precedence, flags) {
+ var result, fragment;
+ result = [this.generateExpression(expr.object, Precedence.Call, flags & F_ALLOW_CALL ? E_TTF : E_TFF)];
+ if (expr.computed) {
+ result.push('[');
+ result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT));
+ result.push(']');
+ } else {
+ if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') {
+ fragment = toSourceNodeWhenNeeded(result).toString();
+ if (fragment.indexOf('.') < 0 && !/[eExX]/.test(fragment) && esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) && !(fragment.length >= 2 && fragment.charCodeAt(0) === 48)) {
+ result.push('.');
+ }
+ }
+ result.push('.');
+ result.push(generateIdentifier(expr.property));
+ }
+ return parenthesize(result, Precedence.Member, precedence);
+ },
+ UnaryExpression: function (expr, precedence, flags) {
+ var result, fragment, rightCharCode, leftSource, leftCharCode;
+ fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
+ if (space === '') {
+ result = join(expr.operator, fragment);
+ } else {
+ result = [expr.operator];
+ if (expr.operator.length > 2) {
+ result = join(result, fragment);
+ } else {
+ leftSource = toSourceNodeWhenNeeded(result).toString();
+ leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
+ rightCharCode = fragment.toString().charCodeAt(0);
+ if ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPart(leftCharCode) && esutils.code.isIdentifierPart(rightCharCode)) {
+ result.push(noEmptySpace());
+ result.push(fragment);
+ } else {
+ result.push(fragment);
+ }
+ }
+ }
+ return parenthesize(result, Precedence.Unary, precedence);
+ },
+ YieldExpression: function (expr, precedence, flags) {
+ var result;
+ if (expr.delegate) {
+ result = 'yield*';
+ } else {
+ result = 'yield';
+ }
+ if (expr.argument) {
+ result = join(result, this.generateExpression(expr.argument, Precedence.Yield, E_TTT));
+ }
+ return parenthesize(result, Precedence.Yield, precedence);
+ },
+ UpdateExpression: function (expr, precedence, flags) {
+ if (expr.prefix) {
+ return parenthesize([
+ expr.operator,
+ this.generateExpression(expr.argument, Precedence.Unary, E_TTT)
+ ], Precedence.Unary, precedence);
+ }
+ return parenthesize([
+ this.generateExpression(expr.argument, Precedence.Postfix, E_TTT),
+ expr.operator
+ ], Precedence.Postfix, precedence);
+ },
+ FunctionExpression: function (expr, precedence, flags) {
+ var result, isGenerator;
+ isGenerator = expr.generator && !extra.moz.starlessGenerator;
+ result = isGenerator ? 'function*' : 'function';
+ if (expr.id) {
+ return [
+ result,
+ isGenerator ? space : noEmptySpace(),
+ generateIdentifier(expr.id),
+ this.generateFunctionBody(expr)
+ ];
+ }
+ return [
+ result + space,
+ this.generateFunctionBody(expr)
+ ];
+ },
+ ExportBatchSpecifier: function (expr, precedence, flags) {
+ return '*';
+ },
+ ArrayPattern: function (expr, precedence, flags) {
+ return this.ArrayExpression(expr, precedence, flags);
+ },
+ ArrayExpression: function (expr, precedence, flags) {
+ var result, multiline, that = this;
+ if (!expr.elements.length) {
+ return '[]';
+ }
+ multiline = expr.elements.length > 1;
+ result = [
+ '[',
+ multiline ? newline : ''
+ ];
+ withIndent(function (indent) {
+ var i, iz;
+ for (i = 0, iz = expr.elements.length; i < iz; ++i) {
+ if (!expr.elements[i]) {
+ if (multiline) {
+ result.push(indent);
+ }
+ if (i + 1 === iz) {
+ result.push(',');
+ }
+ } else {
+ result.push(multiline ? indent : '');
+ result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT));
+ }
+ if (i + 1 < iz) {
+ result.push(',' + (multiline ? newline : space));
+ }
+ }
+ });
+ if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ result.push(multiline ? base : '');
+ result.push(']');
+ return result;
+ },
+ ClassExpression: function (expr, precedence, flags) {
+ var result, fragment;
+ result = ['class'];
+ if (expr.id) {
+ result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
+ }
+ if (expr.superClass) {
+ fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Assignment, E_TTT));
+ result = join(result, fragment);
+ }
+ result.push(space);
+ result.push(this.generateStatement(expr.body, S_TFFT));
+ return result;
+ },
+ MethodDefinition: function (expr, precedence, flags) {
+ var result, fragment;
+ if (expr['static']) {
+ result = ['static' + space];
+ } else {
+ result = [];
+ }
+ if (expr.kind === 'get' || expr.kind === 'set') {
+ result = join(result, [
+ join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
+ this.generateFunctionBody(expr.value)
+ ]);
+ } else {
+ fragment = [
+ this.generatePropertyKey(expr.key, expr.computed),
+ this.generateFunctionBody(expr.value)
+ ];
+ if (expr.value.generator) {
+ result.push('*');
+ result.push(fragment);
+ } else {
+ result = join(result, fragment);
+ }
+ }
+ return result;
+ },
+ Property: function (expr, precedence, flags) {
+ var result;
+ if (expr.kind === 'get' || expr.kind === 'set') {
+ return [
+ expr.kind,
+ noEmptySpace(),
+ this.generatePropertyKey(expr.key, expr.computed),
+ this.generateFunctionBody(expr.value)
+ ];
+ }
+ if (expr.shorthand) {
+ return this.generatePropertyKey(expr.key, expr.computed);
+ }
+ if (expr.method) {
+ result = [];
+ if (expr.value.generator) {
+ result.push('*');
+ }
+ result.push(this.generatePropertyKey(expr.key, expr.computed));
+ result.push(this.generateFunctionBody(expr.value));
+ return result;
+ }
+ return [
+ this.generatePropertyKey(expr.key, expr.computed),
+ ':' + space,
+ this.generateExpression(expr.value, Precedence.Assignment, E_TTT)
+ ];
+ },
+ ObjectExpression: function (expr, precedence, flags) {
+ var multiline, result, fragment, that = this;
+ if (!expr.properties.length) {
+ return '{}';
+ }
+ multiline = expr.properties.length > 1;
+ withIndent(function () {
+ fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
+ });
+ if (!multiline) {
+ if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
+ return [
+ '{',
+ space,
+ fragment,
+ space,
+ '}'
+ ];
+ }
+ }
+ withIndent(function (indent) {
+ var i, iz;
+ result = [
+ '{',
+ newline,
+ indent,
+ fragment
+ ];
+ if (multiline) {
+ result.push(',' + newline);
+ for (i = 1, iz = expr.properties.length; i < iz; ++i) {
+ result.push(indent);
+ result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
+ if (i + 1 < iz) {
+ result.push(',' + newline);
+ }
+ }
+ }
+ });
+ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ result.push(base);
+ result.push('}');
+ return result;
+ },
+ ObjectPattern: function (expr, precedence, flags) {
+ var result, i, iz, multiline, property, that = this;
+ if (!expr.properties.length) {
+ return '{}';
+ }
+ multiline = false;
+ if (expr.properties.length === 1) {
+ property = expr.properties[0];
+ if (property.value.type !== Syntax.Identifier) {
+ multiline = true;
+ }
+ } else {
+ for (i = 0, iz = expr.properties.length; i < iz; ++i) {
+ property = expr.properties[i];
+ if (!property.shorthand) {
+ multiline = true;
+ break;
+ }
+ }
+ }
+ result = [
+ '{',
+ multiline ? newline : ''
+ ];
+ withIndent(function (indent) {
+ var i, iz;
+ for (i = 0, iz = expr.properties.length; i < iz; ++i) {
+ result.push(multiline ? indent : '');
+ result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
+ if (i + 1 < iz) {
+ result.push(',' + (multiline ? newline : space));
+ }
+ }
+ });
+ if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
+ result.push(newline);
+ }
+ result.push(multiline ? base : '');
+ result.push('}');
+ return result;
+ },
+ ThisExpression: function (expr, precedence, flags) {
+ return 'this';
+ },
+ Identifier: function (expr, precedence, flags) {
+ return generateIdentifier(expr);
+ },
+ ImportDefaultSpecifier: function (expr, precedence, flags) {
+ return generateIdentifier(expr.id);
+ },
+ ImportNamespaceSpecifier: function (expr, precedence, flags) {
+ var result = ['*'];
+ if (expr.id) {
+ result.push(space + 'as' + noEmptySpace() + generateIdentifier(expr.id));
+ }
+ return result;
+ },
+ ImportSpecifier: function (expr, precedence, flags) {
+ return this.ExportSpecifier(expr, precedence, flags);
+ },
+ ExportSpecifier: function (expr, precedence, flags) {
+ var result = [expr.id.name];
+ if (expr.name) {
+ result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(expr.name));
+ }
+ return result;
+ },
+ Literal: function (expr, precedence, flags) {
+ var raw;
+ if (expr.hasOwnProperty('raw') && parse && extra.raw) {
+ try {
+ raw = parse(expr.raw).body[0].expression;
+ if (raw.type === Syntax.Literal) {
+ if (raw.value === expr.value) {
+ return expr.raw;
+ }
+ }
+ } catch (e) {
+ }
+ }
+ if (expr.value === null) {
+ return 'null';
+ }
+ if (typeof expr.value === 'string') {
+ return escapeString(expr.value);
+ }
+ if (typeof expr.value === 'number') {
+ return generateNumber(expr.value);
+ }
+ if (typeof expr.value === 'boolean') {
+ return expr.value ? 'true' : 'false';
+ }
+ return generateRegExp(expr.value);
+ },
+ GeneratorExpression: function (expr, precedence, flags) {
+ return this.ComprehensionExpression(expr, precedence, flags);
+ },
+ ComprehensionExpression: function (expr, precedence, flags) {
+ var result, i, iz, fragment, that = this;
+ result = expr.type === Syntax.GeneratorExpression ? ['('] : ['['];
+ if (extra.moz.comprehensionExpressionStartsWithAssignment) {
+ fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
+ result.push(fragment);
+ }
+ if (expr.blocks) {
+ withIndent(function () {
+ for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
+ fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
+ if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
+ result = join(result, fragment);
+ } else {
+ result.push(fragment);
+ }
+ }
+ });
+ }
+ if (expr.filter) {
+ result = join(result, 'if' + space);
+ fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
+ result = join(result, [
+ '(',
+ fragment,
+ ')'
+ ]);
+ }
+ if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
+ fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
+ result = join(result, fragment);
+ }
+ result.push(expr.type === Syntax.GeneratorExpression ? ')' : ']');
+ return result;
+ },
+ ComprehensionBlock: function (expr, precedence, flags) {
+ var fragment;
+ if (expr.left.type === Syntax.VariableDeclaration) {
+ fragment = [
+ expr.left.kind,
+ noEmptySpace(),
+ this.generateStatement(expr.left.declarations[0], S_FFFF)
+ ];
+ } else {
+ fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
+ }
+ fragment = join(fragment, expr.of ? 'of' : 'in');
+ fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
+ return [
+ 'for' + space + '(',
+ fragment,
+ ')'
+ ];
+ },
+ SpreadElement: function (expr, precedence, flags) {
+ return [
+ '...',
+ this.generateExpression(expr.argument, Precedence.Assignment, E_TTT)
+ ];
+ },
+ TaggedTemplateExpression: function (expr, precedence, flags) {
+ var itemFlags = E_TTF;
+ if (!(flags & F_ALLOW_CALL)) {
+ itemFlags = E_TFF;
+ }
+ var result = [
+ this.generateExpression(expr.tag, Precedence.Call, itemFlags),
+ this.generateExpression(expr.quasi, Precedence.Primary, E_FFT)
+ ];
+ return parenthesize(result, Precedence.TaggedTemplate, precedence);
+ },
+ TemplateElement: function (expr, precedence, flags) {
+ return expr.value.raw;
+ },
+ TemplateLiteral: function (expr, precedence, flags) {
+ var result, i, iz;
+ result = ['`'];
+ for (i = 0, iz = expr.quasis.length; i < iz; ++i) {
+ result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT));
+ if (i + 1 < iz) {
+ result.push('${' + space);
+ result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT));
+ result.push(space + '}');
+ }
+ }
+ result.push('`');
+ return result;
+ },
+ ModuleSpecifier: function (expr, precedence, flags) {
+ return this.Literal(expr, precedence, flags);
+ }
+ };
+ merge(CodeGenerator.prototype, CodeGenerator.Expression);
+ CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) {
+ var result, type;
+ type = expr.type || Syntax.Property;
+ if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) {
+ return generateVerbatim(expr, precedence);
+ }
+ result = this[type](expr, precedence, flags);
+ if (extra.comment) {
+ result = addComments(expr, result);
+ }
+ return toSourceNodeWhenNeeded(result, expr);
+ };
+ CodeGenerator.prototype.generateStatement = function (stmt, flags) {
+ var result, fragment;
+ result = this[stmt.type](stmt, flags);
+ if (extra.comment) {
+ result = addComments(stmt, result);
+ }
+ fragment = toSourceNodeWhenNeeded(result).toString();
+ if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') {
+ result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, '');
+ }
+ return toSourceNodeWhenNeeded(result, stmt);
+ };
+ function generateInternal(node) {
+ var codegen;
+ codegen = new CodeGenerator;
+ if (isStatement(node)) {
+ return codegen.generateStatement(node, S_TFFF);
+ }
+ if (isExpression(node)) {
+ return codegen.generateExpression(node, Precedence.Sequence, E_TTT);
+ }
+ throw new Error('Unknown node type: ' + node.type);
+ }
+ function generate(node, options) {
+ var defaultOptions = getDefaultOptions(), result, pair;
+ if (options != null) {
+ if (typeof options.indent === 'string') {
+ defaultOptions.format.indent.style = options.indent;
+ }
+ if (typeof options.base === 'number') {
+ defaultOptions.format.indent.base = options.base;
+ }
+ options = updateDeeply(defaultOptions, options);
+ indent = options.format.indent.style;
+ if (typeof options.base === 'string') {
+ base = options.base;
+ } else {
+ base = stringRepeat(indent, options.format.indent.base);
+ }
+ } else {
+ options = defaultOptions;
+ indent = options.format.indent.style;
+ base = stringRepeat(indent, options.format.indent.base);
+ }
+ json = options.format.json;
+ renumber = options.format.renumber;
+ hexadecimal = json ? false : options.format.hexadecimal;
+ quotes = json ? 'double' : options.format.quotes;
+ escapeless = options.format.escapeless;
+ newline = options.format.newline;
+ space = options.format.space;
+ if (options.format.compact) {
+ newline = space = indent = base = '';
+ }
+ parentheses = options.format.parentheses;
+ semicolons = options.format.semicolons;
+ safeConcatenation = options.format.safeConcatenation;
+ directive = options.directive;
+ parse = json ? null : options.parse;
+ sourceMap = options.sourceMap;
+ sourceCode = options.sourceCode;
+ preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null;
+ extra = options;
+ if (sourceMap) {
+ if (!exports.browser) {
+ SourceNode = require('/node_modules/source-map/lib/source-map.js', module).SourceNode;
+ } else {
+ SourceNode = global.sourceMap.SourceNode;
+ }
+ }
+ result = generateInternal(node);
+ if (!sourceMap) {
+ pair = {
+ code: result.toString(),
+ map: null
+ };
+ return options.sourceMapWithCode ? pair : pair.code;
+ }
+ pair = result.toStringWithSourceMap({
+ file: options.file,
+ sourceRoot: options.sourceMapRoot
+ });
+ if (options.sourceContent) {
+ pair.map.setSourceContent(options.sourceMap, options.sourceContent);
+ }
+ if (options.sourceMapWithCode) {
+ return pair;
+ }
+ return pair.map.toString();
+ }
+ FORMAT_MINIFY = {
+ indent: {
+ style: '',
+ base: 0
+ },
+ renumber: true,
+ hexadecimal: true,
+ quotes: 'auto',
+ escapeless: true,
+ compact: true,
+ parentheses: false,
+ semicolons: false
+ };
+ FORMAT_DEFAULTS = getDefaultOptions().format;
+ exports.version = require('/package.json', module).version;
+ exports.generate = generate;
+ exports.attachComments = estraverse.attachComments;
+ exports.Precedence = updateDeeply({}, Precedence);
+ exports.browser = false;
+ exports.FORMAT_MINIFY = FORMAT_MINIFY;
+ exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS;
+ }());
+ });
+ require.define('/package.json', function (module, exports, __dirname, __filename) {
+ module.exports = {
+ 'name': 'escodegen',
+ 'description': 'ECMAScript code generator',
+ 'homepage': 'http://github.com/estools/escodegen',
+ 'main': 'escodegen.js',
+ 'bin': {
+ 'esgenerate': './bin/esgenerate.js',
+ 'escodegen': './bin/escodegen.js'
+ },
+ 'files': [
+ 'LICENSE.BSD',
+ 'LICENSE.source-map',
+ 'README.md',
+ 'bin',
+ 'escodegen.js',
+ 'package.json'
+ ],
+ 'version': '1.5.0',
+ 'engines': { 'node': '>=0.10.0' },
+ 'maintainers': [{
+ 'name': 'Yusuke Suzuki',
+ 'email': 'utatane.tea@gmail.com',
+ 'web': 'http://github.com/Constellation'
+ }],
+ 'repository': {
+ 'type': 'git',
+ 'url': 'http://github.com/estools/escodegen.git'
+ },
+ 'dependencies': {
+ 'estraverse': '^1.9.1',
+ 'esutils': '^1.1.6',
+ 'esprima': '^1.2.2',
+ 'optionator': '^0.5.0'
+ },
+ 'optionalDependencies': { 'source-map': '~0.1.40' },
+ 'devDependencies': {
+ 'esprima-moz': '*',
+ 'semver': '^4.1.0',
+ 'bluebird': '^2.3.11',
+ 'chai': '^1.10.0',
+ 'gulp-mocha': '^2.0.0',
+ 'gulp-eslint': '^0.2.0',
+ 'gulp': '^3.8.10',
+ 'bower-registry-client': '^0.2.1',
+ 'commonjs-everywhere': '^0.9.7'
+ },
+ 'licenses': [{
+ 'type': 'BSD',
+ 'url': 'http://github.com/estools/escodegen/raw/master/LICENSE.BSD'
+ }],
+ 'scripts': {
+ 'test': 'gulp travis',
+ 'unit-test': 'gulp test',
+ 'lint': 'gulp lint',
+ 'release': 'node tools/release.js',
+ 'build-min': './node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js',
+ 'build': './node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js'
+ }
+ };
+ });
+ require.define('/node_modules/source-map/lib/source-map.js', function (module, exports, __dirname, __filename) {
+ exports.SourceMapGenerator = require('/node_modules/source-map/lib/source-map/source-map-generator.js', module).SourceMapGenerator;
+ exports.SourceMapConsumer = require('/node_modules/source-map/lib/source-map/source-map-consumer.js', module).SourceMapConsumer;
+ exports.SourceNode = require('/node_modules/source-map/lib/source-map/source-node.js', module).SourceNode;
+ });
+ require.define('/node_modules/source-map/lib/source-map/source-node.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ var SourceMapGenerator = require('/node_modules/source-map/lib/source-map/source-map-generator.js', module).SourceMapGenerator;
+ var util = require('/node_modules/source-map/lib/source-map/util.js', module);
+ var REGEX_NEWLINE = /(\r?\n)/;
+ var REGEX_CHARACTER = /\r\n|[\s\S]/g;
+ var isSourceNode = '$$$isSourceNode$$$';
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null)
+ this.add(aChunks);
+ }
+ SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ var node = new SourceNode;
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var shiftNextLine = function () {
+ var lineContents = remainingLines.shift();
+ var newLine = remainingLines.shift() || '';
+ return lineContents + newLine;
+ };
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+ var lastMapping = null;
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ if (lastGeneratedLine < mapping.generatedLine) {
+ var code = '';
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ } else {
+ var nextLine = remainingLines[0];
+ var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ lastMapping = mapping;
+ return;
+ }
+ }
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[0];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ if (remainingLines.length > 0) {
+ if (lastMapping) {
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ node.add(remainingLines.join(''));
+ }
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+ return node;
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
+ node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
+ }
+ }
+ };
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ } else if (aChunk[isSourceNode] || typeof aChunk === 'string') {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ } else {
+ throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' + aChunk);
+ }
+ return this;
+ };
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length - 1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ } else if (aChunk[isSourceNode] || typeof aChunk === 'string') {
+ this.children.unshift(aChunk);
+ } else {
+ throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' + aChunk);
+ }
+ return this;
+ };
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ } else {
+ if (chunk !== '') {
+ aFn(chunk, {
+ source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name
+ });
+ }
+ }
+ }
+ };
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len - 1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+ };
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ } else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ } else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+ };
+ SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+ SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+ SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = '';
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+ };
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: '',
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null && original.line !== null && original.column !== null) {
+ if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ chunk.match(REGEX_CHARACTER).forEach(function (ch, idx, array) {
+ if (REGEX_NEWLINE.test(ch)) {
+ generated.line++;
+ generated.column = 0;
+ if (idx + 1 === array.length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column += ch.length;
+ }
+ });
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+ return {
+ code: generated.code,
+ map: map
+ };
+ };
+ exports.SourceNode = SourceNode;
+ });
+ });
+ require.define('/node_modules/source-map/lib/source-map/util.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+ }
+ exports.getArg = getArg;
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+ var dataUrlRegexp = /^data:.+\,.+$/;
+ function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+ }
+ exports.urlParse = urlParse;
+ function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ':' + aParsedUrl.port;
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+ }
+ exports.urlGenerate = urlGenerate;
+ function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = path.charAt(0) === '/';
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+ }
+ exports.normalize = normalize;
+ function join(aRoot, aPath) {
+ if (aRoot === '') {
+ aRoot = '.';
+ }
+ if (aPath === '') {
+ aPath = '.';
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+ var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+ }
+ exports.join = join;
+ function relative(aRoot, aPath) {
+ if (aRoot === '') {
+ aRoot = '.';
+ }
+ aRoot = aRoot.replace(/\/$/, '');
+ var url = urlParse(aRoot);
+ if (aPath.charAt(0) == '/' && url && url.path == '/') {
+ return aPath.slice(1);
+ }
+ return aPath.indexOf(aRoot + '/') === 0 ? aPath.substr(aRoot.length + 1) : aPath;
+ }
+ exports.relative = relative;
+ function toSetString(aStr) {
+ return '$' + aStr;
+ }
+ exports.toSetString = toSetString;
+ function fromSetString(aStr) {
+ return aStr.substr(1);
+ }
+ exports.fromSetString = fromSetString;
+ function strcmp(aStr1, aStr2) {
+ var s1 = aStr1 || '';
+ var s2 = aStr2 || '';
+ return (s1 > s2) - (s1 < s2);
+ }
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp;
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp) {
+ return cmp;
+ }
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp) {
+ return cmp;
+ }
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp || onlyCompareOriginal) {
+ return cmp;
+ }
+ cmp = strcmp(mappingA.name, mappingB.name);
+ if (cmp) {
+ return cmp;
+ }
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+ return mappingA.generatedColumn - mappingB.generatedColumn;
+ }
+ ;
+ exports.compareByOriginalPositions = compareByOriginalPositions;
+ function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp;
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp || onlyCompareGenerated) {
+ return cmp;
+ }
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp) {
+ return cmp;
+ }
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp) {
+ return cmp;
+ }
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp) {
+ return cmp;
+ }
+ return strcmp(mappingA.name, mappingB.name);
+ }
+ ;
+ exports.compareByGeneratedPositions = compareByGeneratedPositions;
+ });
+ });
+ require.define('/node_modules/source-map/node_modules/amdefine/amdefine.js', function (module, exports, __dirname, __filename) {
+ 'use strict';
+ function amdefine(module, requireFn) {
+ 'use strict';
+ var defineCache = {}, loaderCache = {}, alreadyCalled = false, path = require('path', module), makeRequire, stringRequire;
+ function trimDots(ary) {
+ var i, part;
+ for (i = 0; ary[i]; i += 1) {
+ part = ary[i];
+ if (part === '.') {
+ ary.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
+ break;
+ } else if (i > 0) {
+ ary.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ }
+ function normalize(name, baseName) {
+ var baseParts;
+ if (name && name.charAt(0) === '.') {
+ if (baseName) {
+ baseParts = baseName.split('/');
+ baseParts = baseParts.slice(0, baseParts.length - 1);
+ baseParts = baseParts.concat(name.split('/'));
+ trimDots(baseParts);
+ name = baseParts.join('/');
+ }
+ }
+ return name;
+ }
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+ function makeLoad(id) {
+ function load(value) {
+ loaderCache[id] = value;
+ }
+ load.fromText = function (id, text) {
+ throw new Error('amdefine does not implement load.fromText');
+ };
+ return load;
+ }
+ makeRequire = function (systemRequire, exports, module, relId) {
+ function amdRequire(deps, callback) {
+ if (typeof deps === 'string') {
+ return stringRequire(systemRequire, exports, module, deps, relId);
+ } else {
+ deps = deps.map(function (depName) {
+ return stringRequire(systemRequire, exports, module, depName, relId);
+ });
+ process.nextTick(function () {
+ callback.apply(null, deps);
+ });
+ }
+ }
+ amdRequire.toUrl = function (filePath) {
+ if (filePath.indexOf('.') === 0) {
+ return normalize(filePath, path.dirname(module.filename));
+ } else {
+ return filePath;
+ }
+ };
+ return amdRequire;
+ };
+ requireFn = requireFn || function req() {
+ return module.require.apply(module, arguments);
+ };
+ function runFactory(id, deps, factory) {
+ var r, e, m, result;
+ if (id) {
+ e = loaderCache[id] = {};
+ m = {
+ id: id,
+ uri: __filename,
+ exports: e
+ };
+ r = makeRequire(requireFn, e, m, id);
+ } else {
+ if (alreadyCalled) {
+ throw new Error('amdefine with no module ID cannot be called more than once per file.');
+ }
+ alreadyCalled = true;
+ e = module.exports;
+ m = module;
+ r = makeRequire(requireFn, e, m, module.id);
+ }
+ if (deps) {
+ deps = deps.map(function (depName) {
+ return r(depName);
+ });
+ }
+ if (typeof factory === 'function') {
+ result = factory.apply(m.exports, deps);
+ } else {
+ result = factory;
+ }
+ if (result !== undefined) {
+ m.exports = result;
+ if (id) {
+ loaderCache[id] = m.exports;
+ }
+ }
+ }
+ stringRequire = function (systemRequire, exports, module, id, relId) {
+ var index = id.indexOf('!'), originalId = id, prefix, plugin;
+ if (index === -1) {
+ id = normalize(id, relId);
+ if (id === 'require') {
+ return makeRequire(systemRequire, exports, module, relId);
+ } else if (id === 'exports') {
+ return exports;
+ } else if (id === 'module') {
+ return module;
+ } else if (loaderCache.hasOwnProperty(id)) {
+ return loaderCache[id];
+ } else if (defineCache[id]) {
+ runFactory.apply(null, defineCache[id]);
+ return loaderCache[id];
+ } else {
+ if (systemRequire) {
+ return systemRequire(originalId);
+ } else {
+ throw new Error('No module with ID: ' + id);
+ }
+ }
+ } else {
+ prefix = id.substring(0, index);
+ id = id.substring(index + 1, id.length);
+ plugin = stringRequire(systemRequire, exports, module, prefix, relId);
+ if (plugin.normalize) {
+ id = plugin.normalize(id, makeNormalize(relId));
+ } else {
+ id = normalize(id, relId);
+ }
+ if (loaderCache[id]) {
+ return loaderCache[id];
+ } else {
+ plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
+ return loaderCache[id];
+ }
+ }
+ };
+ function define(id, deps, factory) {
+ if (Array.isArray(id)) {
+ factory = deps;
+ deps = id;
+ id = undefined;
+ } else if (typeof id !== 'string') {
+ factory = id;
+ id = deps = undefined;
+ }
+ if (deps && !Array.isArray(deps)) {
+ factory = deps;
+ deps = undefined;
+ }
+ if (!deps) {
+ deps = [
+ 'require',
+ 'exports',
+ 'module'
+ ];
+ }
+ if (id) {
+ defineCache[id] = [
+ id,
+ deps,
+ factory
+ ];
+ } else {
+ runFactory(id, deps, factory);
+ }
+ }
+ define.require = function (id) {
+ if (loaderCache[id]) {
+ return loaderCache[id];
+ }
+ if (defineCache[id]) {
+ runFactory.apply(null, defineCache[id]);
+ return loaderCache[id];
+ }
+ };
+ define.amd = {};
+ return define;
+ }
+ module.exports = amdefine;
+ });
+ require.define('/node_modules/source-map/lib/source-map/source-map-generator.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ var base64VLQ = require('/node_modules/source-map/lib/source-map/base64-vlq.js', module);
+ var util = require('/node_modules/source-map/lib/source-map/util.js', module);
+ var ArraySet = require('/node_modules/source-map/lib/source-map/array-set.js', module).ArraySet;
+ function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._sources = new ArraySet;
+ this._names = new ArraySet;
+ this._mappings = [];
+ this._sourcesContents = null;
+ }
+ SourceMapGenerator.prototype._version = 3;
+ SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+ SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+ this._validateMapping(generated, original, source, name);
+ if (source != null && !this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ if (name != null && !this._names.has(name)) {
+ this._names.add(name);
+ }
+ this._mappings.push({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+ SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+ if (aSourceContent != null) {
+ if (!this._sourcesContents) {
+ this._sourcesContents = {};
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+ SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ var newSources = new ArraySet;
+ var newNames = new ArraySet;
+ this._mappings.forEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source);
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+ SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
+ return;
+ } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
+ return;
+ } else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+ SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var mapping;
+ this._mappings.sort(util.compareByGeneratedPositions);
+ for (var i = 0, len = this._mappings.length; i < len; i++) {
+ mapping = this._mappings[i];
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ result += ';';
+ previousGeneratedLine++;
+ }
+ } else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) {
+ continue;
+ }
+ result += ',';
+ }
+ }
+ result += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+ if (mapping.source != null) {
+ result += base64VLQ.encode(this._sources.indexOf(mapping.source) - previousSource);
+ previousSource = this._sources.indexOf(mapping.source);
+ result += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+ result += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+ if (mapping.name != null) {
+ result += base64VLQ.encode(this._names.indexOf(mapping.name) - previousName);
+ previousName = this._names.indexOf(mapping.name);
+ }
+ }
+ }
+ return result;
+ };
+ SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
+ }, this);
+ };
+ SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+ return map;
+ };
+ SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
+ return JSON.stringify(this);
+ };
+ exports.SourceMapGenerator = SourceMapGenerator;
+ });
+ });
+ require.define('/node_modules/source-map/lib/source-map/array-set.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ var util = require('/node_modules/source-map/lib/source-map/util.js', module);
+ function ArraySet() {
+ this._array = [];
+ this._set = {};
+ }
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet;
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+ };
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var isDuplicate = this.has(aStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ this._set[util.toSetString(aStr)] = idx;
+ }
+ };
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
+ return Object.prototype.hasOwnProperty.call(this._set, util.toSetString(aStr));
+ };
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (this.has(aStr)) {
+ return this._set[util.toSetString(aStr)];
+ }
+ throw new Error('"' + aStr + '" is not in the set.');
+ };
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+ };
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+ };
+ exports.ArraySet = ArraySet;
+ });
+ });
+ require.define('/node_modules/source-map/lib/source-map/base64-vlq.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ var base64 = require('/node_modules/source-map/lib/source-map/base64.js', module);
+ var VLQ_BASE_SHIFT = 5;
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
+ function toVLQSigned(aValue) {
+ return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
+ }
+ function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative ? -shifted : shifted;
+ }
+ exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = '';
+ var digit;
+ var vlq = toVLQSigned(aValue);
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+ return encoded;
+ };
+ exports.decode = function base64VLQ_decode(aStr, aOutParam) {
+ var i = 0;
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+ do {
+ if (i >= strLen) {
+ throw new Error('Expected more digits in base 64 VLQ value.');
+ }
+ digit = base64.decode(aStr.charAt(i++));
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aStr.slice(i);
+ };
+ });
+ });
+ require.define('/node_modules/source-map/lib/source-map/base64.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ var charToIntMap = {};
+ var intToCharMap = {};
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('').forEach(function (ch, index) {
+ charToIntMap[ch] = index;
+ intToCharMap[index] = ch;
+ });
+ exports.encode = function base64_encode(aNumber) {
+ if (aNumber in intToCharMap) {
+ return intToCharMap[aNumber];
+ }
+ throw new TypeError('Must be between 0 and 63: ' + aNumber);
+ };
+ exports.decode = function base64_decode(aChar) {
+ if (aChar in charToIntMap) {
+ return charToIntMap[aChar];
+ }
+ throw new TypeError('Not a valid base 64 digit: ' + aChar);
+ };
+ });
+ });
+ require.define('/node_modules/source-map/lib/source-map/source-map-consumer.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ var util = require('/node_modules/source-map/lib/source-map/util.js', module);
+ var binarySearch = require('/node_modules/source-map/lib/source-map/binary-search.js', module);
+ var ArraySet = require('/node_modules/source-map/lib/source-map/array-set.js', module).ArraySet;
+ var base64VLQ = require('/node_modules/source-map/lib/source-map/base64-vlq.js', module);
+ function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+ sources = sources.map(util.normalize);
+ this._names = ArraySet.fromArray(names, true);
+ this._sources = ArraySet.fromArray(sources, true);
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+ }
+ SourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(SourceMapConsumer.prototype);
+ smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
+ smc.file = aSourceMap._file;
+ smc.__generatedMappings = aSourceMap._mappings.slice().sort(util.compareByGeneratedPositions);
+ smc.__originalMappings = aSourceMap._mappings.slice().sort(util.compareByOriginalPositions);
+ return smc;
+ };
+ SourceMapConsumer.prototype._version = 3;
+ Object.defineProperty(SourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+ });
+ SourceMapConsumer.prototype.__generatedMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+ return this.__generatedMappings;
+ }
+ });
+ SourceMapConsumer.prototype.__originalMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+ return this.__originalMappings;
+ }
+ });
+ SourceMapConsumer.prototype._nextCharIsMappingSeparator = function SourceMapConsumer_nextCharIsMappingSeparator(aStr) {
+ var c = aStr.charAt(0);
+ return c === ';' || c === ',';
+ };
+ SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var str = aStr;
+ var temp = {};
+ var mapping;
+ while (str.length > 0) {
+ if (str.charAt(0) === ';') {
+ generatedLine++;
+ str = str.slice(1);
+ previousGeneratedColumn = 0;
+ } else if (str.charAt(0) === ',') {
+ str = str.slice(1);
+ } else {
+ mapping = {};
+ mapping.generatedLine = generatedLine;
+ base64VLQ.decode(str, temp);
+ mapping.generatedColumn = previousGeneratedColumn + temp.value;
+ previousGeneratedColumn = mapping.generatedColumn;
+ str = temp.rest;
+ if (str.length > 0 && !this._nextCharIsMappingSeparator(str)) {
+ base64VLQ.decode(str, temp);
+ mapping.source = this._sources.at(previousSource + temp.value);
+ previousSource += temp.value;
+ str = temp.rest;
+ if (str.length === 0 || this._nextCharIsMappingSeparator(str)) {
+ throw new Error('Found a source, but no line and column');
+ }
+ base64VLQ.decode(str, temp);
+ mapping.originalLine = previousOriginalLine + temp.value;
+ previousOriginalLine = mapping.originalLine;
+ mapping.originalLine += 1;
+ str = temp.rest;
+ if (str.length === 0 || this._nextCharIsMappingSeparator(str)) {
+ throw new Error('Found a source and line, but no column');
+ }
+ base64VLQ.decode(str, temp);
+ mapping.originalColumn = previousOriginalColumn + temp.value;
+ previousOriginalColumn = mapping.originalColumn;
+ str = temp.rest;
+ if (str.length > 0 && !this._nextCharIsMappingSeparator(str)) {
+ base64VLQ.decode(str, temp);
+ mapping.name = this._names.at(previousName + temp.value);
+ previousName += temp.value;
+ str = temp.rest;
+ }
+ }
+ this.__generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ this.__originalMappings.push(mapping);
+ }
+ }
+ }
+ this.__generatedMappings.sort(util.compareByGeneratedPositions);
+ this.__originalMappings.sort(util.compareByOriginalPositions);
+ };
+ SourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator) {
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
+ }
+ return binarySearch.search(aNeedle, aMappings, aComparator);
+ };
+ SourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+ SourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+ var index = this._findMapping(needle, this._generatedMappings, 'generatedLine', 'generatedColumn', util.compareByGeneratedPositions);
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source != null && this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: util.getArg(mapping, 'name', null)
+ };
+ }
+ }
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+ SourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+ var url;
+ if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, '');
+ if (url.scheme == 'file' && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
+ }
+ if ((!url.path || url.path == '/') && this._sources.has('/' + aSource)) {
+ return this.sourcesContent[this._sources.indexOf('/' + aSource)];
+ }
+ }
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ };
+ SourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ var index = this._findMapping(needle, this._originalMappings, 'originalLine', 'originalColumn', util.compareByOriginalPositions);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+ SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: Infinity
+ };
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ var mappings = [];
+ var index = this._findMapping(needle, this._originalMappings, 'originalLine', 'originalColumn', util.compareByOriginalPositions);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+ while (mapping && mapping.originalLine === needle.originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+ mapping = this._originalMappings[--index];
+ }
+ }
+ return mappings.reverse();
+ };
+ SourceMapConsumer.GENERATED_ORDER = 1;
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
+ SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error('Unknown order of iteration.');
+ }
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source;
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name
+ };
+ }).forEach(aCallback, context);
+ };
+ exports.SourceMapConsumer = SourceMapConsumer;
+ });
+ });
+ require.define('/node_modules/source-map/lib/source-map/binary-search.js', function (module, exports, __dirname, __filename) {
+ if (typeof define !== 'function') {
+ var define = require('/node_modules/source-map/node_modules/amdefine/amdefine.js', module)(module, require);
+ }
+ define(function (require, exports, module) {
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ return mid;
+ } else if (cmp > 0) {
+ if (aHigh - mid > 1) {
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare);
+ }
+ return mid;
+ } else {
+ if (mid - aLow > 1) {
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare);
+ }
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+ exports.search = function search(aNeedle, aHaystack, aCompare) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+ return recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare);
+ };
+ });
+ });
+ require.define('/node_modules/esutils/lib/utils.js', function (module, exports, __dirname, __filename) {
+ (function () {
+ 'use strict';
+ exports.ast = require('/node_modules/esutils/lib/ast.js', module);
+ exports.code = require('/node_modules/esutils/lib/code.js', module);
+ exports.keyword = require('/node_modules/esutils/lib/keyword.js', module);
+ }());
+ });
+ require.define('/node_modules/esutils/lib/keyword.js', function (module, exports, __dirname, __filename) {
+ (function () {
+ 'use strict';
+ var code = require('/node_modules/esutils/lib/code.js', module);
+ function isStrictModeReservedWordES6(id) {
+ switch (id) {
+ case 'implements':
+ case 'interface':
+ case 'package':
+ case 'private':
+ case 'protected':
+ case 'public':
+ case 'static':
+ case 'let':
+ return true;
+ default:
+ return false;
+ }
+ }
+ function isKeywordES5(id, strict) {
+ if (!strict && id === 'yield') {
+ return false;
+ }
+ return isKeywordES6(id, strict);
+ }
+ function isKeywordES6(id, strict) {
+ if (strict && isStrictModeReservedWordES6(id)) {
+ return true;
+ }
+ switch (id.length) {
+ case 2:
+ return id === 'if' || id === 'in' || id === 'do';
+ case 3:
+ return id === 'var' || id === 'for' || id === 'new' || id === 'try';
+ case 4:
+ return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
+ case 5:
+ return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
+ case 6:
+ return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
+ case 7:
+ return id === 'default' || id === 'finally' || id === 'extends';
+ case 8:
+ return id === 'function' || id === 'continue' || id === 'debugger';
+ case 10:
+ return id === 'instanceof';
+ default:
+ return false;
+ }
+ }
+ function isReservedWordES5(id, strict) {
+ return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
+ }
+ function isReservedWordES6(id, strict) {
+ return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
+ }
+ function isRestrictedWord(id) {
+ return id === 'eval' || id === 'arguments';
+ }
+ function isIdentifierName(id) {
+ var i, iz, ch;
+ if (id.length === 0) {
+ return false;
+ }
+ ch = id.charCodeAt(0);
+ if (!code.isIdentifierStart(ch) || ch === 92) {
+ return false;
+ }
+ for (i = 1, iz = id.length; i < iz; ++i) {
+ ch = id.charCodeAt(i);
+ if (!code.isIdentifierPart(ch) || ch === 92) {
+ return false;
+ }
+ }
+ return true;
+ }
+ function isIdentifierES5(id, strict) {
+ return isIdentifierName(id) && !isReservedWordES5(id, strict);
+ }
+ function isIdentifierES6(id, strict) {
+ return isIdentifierName(id) && !isReservedWordES6(id, strict);
+ }
+ module.exports = {
+ isKeywordES5: isKeywordES5,
+ isKeywordES6: isKeywordES6,
+ isReservedWordES5: isReservedWordES5,
+ isReservedWordES6: isReservedWordES6,
+ isRestrictedWord: isRestrictedWord,
+ isIdentifierName: isIdentifierName,
+ isIdentifierES5: isIdentifierES5,
+ isIdentifierES6: isIdentifierES6
+ };
+ }());
+ });
+ require.define('/node_modules/esutils/lib/code.js', function (module, exports, __dirname, __filename) {
+ (function () {
+ 'use strict';
+ var Regex, NON_ASCII_WHITESPACES;
+ Regex = {
+ NonAsciiIdentifierStart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'),
+ NonAsciiIdentifierPart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]')
+ };
+ function isDecimalDigit(ch) {
+ return ch >= 48 && ch <= 57;
+ }
+ function isHexDigit(ch) {
+ return isDecimalDigit(ch) || 97 <= ch && ch <= 102 || 65 <= ch && ch <= 70;
+ }
+ function isOctalDigit(ch) {
+ return ch >= 48 && ch <= 55;
+ }
+ NON_ASCII_WHITESPACES = [
+ 5760,
+ 6158,
+ 8192,
+ 8193,
+ 8194,
+ 8195,
+ 8196,
+ 8197,
+ 8198,
+ 8199,
+ 8200,
+ 8201,
+ 8202,
+ 8239,
+ 8287,
+ 12288,
+ 65279
+ ];
+ function isWhiteSpace(ch) {
+ return ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch >= 5760 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
+ }
+ function isLineTerminator(ch) {
+ return ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
+ }
+ function isIdentifierStart(ch) {
+ return ch >= 97 && ch <= 122 || ch >= 65 && ch <= 90 || ch === 36 || ch === 95 || ch === 92 || ch >= 128 && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch));
+ }
+ function isIdentifierPart(ch) {
+ return ch >= 97 && ch <= 122 || ch >= 65 && ch <= 90 || ch >= 48 && ch <= 57 || ch === 36 || ch === 95 || ch === 92 || ch >= 128 && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch));
+ }
+ module.exports = {
+ isDecimalDigit: isDecimalDigit,
+ isHexDigit: isHexDigit,
+ isOctalDigit: isOctalDigit,
+ isWhiteSpace: isWhiteSpace,
+ isLineTerminator: isLineTerminator,
+ isIdentifierStart: isIdentifierStart,
+ isIdentifierPart: isIdentifierPart
+ };
+ }());
+ });
+ require.define('/node_modules/esutils/lib/ast.js', function (module, exports, __dirname, __filename) {
+ (function () {
+ 'use strict';
+ function isExpression(node) {
+ if (node == null) {
+ return false;
+ }
+ switch (node.type) {
+ case 'ArrayExpression':
+ case 'AssignmentExpression':
+ case 'BinaryExpression':
+ case 'CallExpression':
+ case 'ConditionalExpression':
+ case 'FunctionExpression':
+ case 'Identifier':
+ case 'Literal':
+ case 'LogicalExpression':
+ case 'MemberExpression':
+ case 'NewExpression':
+ case 'ObjectExpression':
+ case 'SequenceExpression':
+ case 'ThisExpression':
+ case 'UnaryExpression':
+ case 'UpdateExpression':
+ return true;
+ }
+ return false;
+ }
+ function isIterationStatement(node) {
+ if (node == null) {
+ return false;
+ }
+ switch (node.type) {
+ case 'DoWhileStatement':
+ case 'ForInStatement':
+ case 'ForStatement':
+ case 'WhileStatement':
+ return true;
+ }
+ return false;
+ }
+ function isStatement(node) {
+ if (node == null) {
+ return false;
+ }
+ switch (node.type) {
+ case 'BlockStatement':
+ case 'BreakStatement':
+ case 'ContinueStatement':
+ case 'DebuggerStatement':
+ case 'DoWhileStatement':
+ case 'EmptyStatement':
+ case 'ExpressionStatement':
+ case 'ForInStatement':
+ case 'ForStatement':
+ case 'IfStatement':
+ case 'LabeledStatement':
+ case 'ReturnStatement':
+ case 'SwitchStatement':
+ case 'ThrowStatement':
+ case 'TryStatement':
+ case 'VariableDeclaration':
+ case 'WhileStatement':
+ case 'WithStatement':
+ return true;
+ }
+ return false;
+ }
+ function isSourceElement(node) {
+ return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
+ }
+ function trailingStatement(node) {
+ switch (node.type) {
+ case 'IfStatement':
+ if (node.alternate != null) {
+ return node.alternate;
+ }
+ return node.consequent;
+ case 'LabeledStatement':
+ case 'ForStatement':
+ case 'ForInStatement':
+ case 'WhileStatement':
+ case 'WithStatement':
+ return node.body;
+ }
+ return null;
+ }
+ function isProblematicIfStatement(node) {
+ var current;
+ if (node.type !== 'IfStatement') {
+ return false;
+ }
+ if (node.alternate == null) {
+ return false;
+ }
+ current = node.consequent;
+ do {
+ if (current.type === 'IfStatement') {
+ if (current.alternate == null) {
+ return true;
+ }
+ }
+ current = trailingStatement(current);
+ } while (current);
+ return false;
+ }
+ module.exports = {
+ isExpression: isExpression,
+ isStatement: isStatement,
+ isIterationStatement: isIterationStatement,
+ isSourceElement: isSourceElement,
+ isProblematicIfStatement: isProblematicIfStatement,
+ trailingStatement: trailingStatement
+ };
+ }());
+ });
+ require.define('/node_modules/estraverse/estraverse.js', function (module, exports, __dirname, __filename) {
+ (function (root, factory) {
+ 'use strict';
+ if (typeof define === 'function' && define.amd) {
+ define(['exports'], factory);
+ } else if (typeof exports !== 'undefined') {
+ factory(exports);
+ } else {
+ factory(root.estraverse = {});
+ }
+ }(this, function clone(exports) {
+ 'use strict';
+ var Syntax, isArray, VisitorOption, VisitorKeys, objectCreate, objectKeys, BREAK, SKIP, REMOVE;
+ function ignoreJSHintError() {
+ }
+ isArray = Array.isArray;
+ if (!isArray) {
+ isArray = function isArray(array) {
+ return Object.prototype.toString.call(array) === '[object Array]';
+ };
+ }
+ function deepCopy(obj) {
+ var ret = {}, key, val;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ val = obj[key];
+ if (typeof val === 'object' && val !== null) {
+ ret[key] = deepCopy(val);
+ } else {
+ ret[key] = val;
+ }
+ }
+ }
+ return ret;
+ }
+ function shallowCopy(obj) {
+ var ret = {}, key;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ ignoreJSHintError(shallowCopy);
+ function upperBound(array, func) {
+ var diff, len, i, current;
+ len = array.length;
+ i = 0;
+ while (len) {
+ diff = len >>> 1;
+ current = i + diff;
+ if (func(array[current])) {
+ len = diff;
+ } else {
+ i = current + 1;
+ len -= diff + 1;
+ }
+ }
+ return i;
+ }
+ function lowerBound(array, func) {
+ var diff, len, i, current;
+ len = array.length;
+ i = 0;
+ while (len) {
+ diff = len >>> 1;
+ current = i + diff;
+ if (func(array[current])) {
+ i = current + 1;
+ len -= diff + 1;
+ } else {
+ len = diff;
+ }
+ }
+ return i;
+ }
+ ignoreJSHintError(lowerBound);
+ objectCreate = Object.create || function () {
+ function F() {
+ }
+ return function (o) {
+ F.prototype = o;
+ return new F;
+ };
+ }();
+ objectKeys = Object.keys || function (o) {
+ var keys = [], key;
+ for (key in o) {
+ keys.push(key);
+ }
+ return keys;
+ };
+ function extend(to, from) {
+ objectKeys(from).forEach(function (key) {
+ to[key] = from[key];
+ });
+ return to;
+ }
+ Syntax = {
+ AssignmentExpression: 'AssignmentExpression',
+ ArrayExpression: 'ArrayExpression',
+ ArrayPattern: 'ArrayPattern',
+ ArrowFunctionExpression: 'ArrowFunctionExpression',
+ AwaitExpression: 'AwaitExpression',
+ BlockStatement: 'BlockStatement',
+ BinaryExpression: 'BinaryExpression',
+ BreakStatement: 'BreakStatement',
+ CallExpression: 'CallExpression',
+ CatchClause: 'CatchClause',
+ ClassBody: 'ClassBody',
+ ClassDeclaration: 'ClassDeclaration',
+ ClassExpression: 'ClassExpression',
+ ComprehensionBlock: 'ComprehensionBlock',
+ ComprehensionExpression: 'ComprehensionExpression',
+ ConditionalExpression: 'ConditionalExpression',
+ ContinueStatement: 'ContinueStatement',
+ DebuggerStatement: 'DebuggerStatement',
+ DirectiveStatement: 'DirectiveStatement',
+ DoWhileStatement: 'DoWhileStatement',
+ EmptyStatement: 'EmptyStatement',
+ ExportBatchSpecifier: 'ExportBatchSpecifier',
+ ExportDeclaration: 'ExportDeclaration',
+ ExportSpecifier: 'ExportSpecifier',
+ ExpressionStatement: 'ExpressionStatement',
+ ForStatement: 'ForStatement',
+ ForInStatement: 'ForInStatement',
+ ForOfStatement: 'ForOfStatement',
+ FunctionDeclaration: 'FunctionDeclaration',
+ FunctionExpression: 'FunctionExpression',
+ GeneratorExpression: 'GeneratorExpression',
+ Identifier: 'Identifier',
+ IfStatement: 'IfStatement',
+ ImportDeclaration: 'ImportDeclaration',
+ ImportDefaultSpecifier: 'ImportDefaultSpecifier',
+ ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
+ ImportSpecifier: 'ImportSpecifier',
+ Literal: 'Literal',
+ LabeledStatement: 'LabeledStatement',
+ LogicalExpression: 'LogicalExpression',
+ MemberExpression: 'MemberExpression',
+ MethodDefinition: 'MethodDefinition',
+ ModuleSpecifier: 'ModuleSpecifier',
+ NewExpression: 'NewExpression',
+ ObjectExpression: 'ObjectExpression',
+ ObjectPattern: 'ObjectPattern',
+ Program: 'Program',
+ Property: 'Property',
+ ReturnStatement: 'ReturnStatement',
+ SequenceExpression: 'SequenceExpression',
+ SpreadElement: 'SpreadElement',
+ SwitchStatement: 'SwitchStatement',
+ SwitchCase: 'SwitchCase',
+ TaggedTemplateExpression: 'TaggedTemplateExpression',
+ TemplateElement: 'TemplateElement',
+ TemplateLiteral: 'TemplateLiteral',
+ ThisExpression: 'ThisExpression',
+ ThrowStatement: 'ThrowStatement',
+ TryStatement: 'TryStatement',
+ UnaryExpression: 'UnaryExpression',
+ UpdateExpression: 'UpdateExpression',
+ VariableDeclaration: 'VariableDeclaration',
+ VariableDeclarator: 'VariableDeclarator',
+ WhileStatement: 'WhileStatement',
+ WithStatement: 'WithStatement',
+ YieldExpression: 'YieldExpression'
+ };
+ VisitorKeys = {
+ AssignmentExpression: [
+ 'left',
+ 'right'
+ ],
+ ArrayExpression: ['elements'],
+ ArrayPattern: ['elements'],
+ ArrowFunctionExpression: [
+ 'params',
+ 'defaults',
+ 'rest',
+ 'body'
+ ],
+ AwaitExpression: ['argument'],
+ BlockStatement: ['body'],
+ BinaryExpression: [
+ 'left',
+ 'right'
+ ],
+ BreakStatement: ['label'],
+ CallExpression: [
+ 'callee',
+ 'arguments'
+ ],
+ CatchClause: [
+ 'param',
+ 'body'
+ ],
+ ClassBody: ['body'],
+ ClassDeclaration: [
+ 'id',
+ 'body',
+ 'superClass'
+ ],
+ ClassExpression: [
+ 'id',
+ 'body',
+ 'superClass'
+ ],
+ ComprehensionBlock: [
+ 'left',
+ 'right'
+ ],
+ ComprehensionExpression: [
+ 'blocks',
+ 'filter',
+ 'body'
+ ],
+ ConditionalExpression: [
+ 'test',
+ 'consequent',
+ 'alternate'
+ ],
+ ContinueStatement: ['label'],
+ DebuggerStatement: [],
+ DirectiveStatement: [],
+ DoWhileStatement: [
+ 'body',
+ 'test'
+ ],
+ EmptyStatement: [],
+ ExportBatchSpecifier: [],
+ ExportDeclaration: [
+ 'declaration',
+ 'specifiers',
+ 'source'
+ ],
+ ExportSpecifier: [
+ 'id',
+ 'name'
+ ],
+ ExpressionStatement: ['expression'],
+ ForStatement: [
+ 'init',
+ 'test',
+ 'update',
+ 'body'
+ ],
+ ForInStatement: [
+ 'left',
+ 'right',
+ 'body'
+ ],
+ ForOfStatement: [
+ 'left',
+ 'right',
+ 'body'
+ ],
+ FunctionDeclaration: [
+ 'id',
+ 'params',
+ 'defaults',
+ 'rest',
+ 'body'
+ ],
+ FunctionExpression: [
+ 'id',
+ 'params',
+ 'defaults',
+ 'rest',
+ 'body'
+ ],
+ GeneratorExpression: [
+ 'blocks',
+ 'filter',
+ 'body'
+ ],
+ Identifier: [],
+ IfStatement: [
+ 'test',
+ 'consequent',
+ 'alternate'
+ ],
+ ImportDeclaration: [
+ 'specifiers',
+ 'source'
+ ],
+ ImportDefaultSpecifier: ['id'],
+ ImportNamespaceSpecifier: ['id'],
+ ImportSpecifier: [
+ 'id',
+ 'name'
+ ],
+ Literal: [],
+ LabeledStatement: [
+ 'label',
+ 'body'
+ ],
+ LogicalExpression: [
+ 'left',
+ 'right'
+ ],
+ MemberExpression: [
+ 'object',
+ 'property'
+ ],
+ MethodDefinition: [
+ 'key',
+ 'value'
+ ],
+ ModuleSpecifier: [],
+ NewExpression: [
+ 'callee',
+ 'arguments'
+ ],
+ ObjectExpression: ['properties'],
+ ObjectPattern: ['properties'],
+ Program: ['body'],
+ Property: [
+ 'key',
+ 'value'
+ ],
+ ReturnStatement: ['argument'],
+ SequenceExpression: ['expressions'],
+ SpreadElement: ['argument'],
+ SwitchStatement: [
+ 'discriminant',
+ 'cases'
+ ],
+ SwitchCase: [
+ 'test',
+ 'consequent'
+ ],
+ TaggedTemplateExpression: [
+ 'tag',
+ 'quasi'
+ ],
+ TemplateElement: [],
+ TemplateLiteral: [
+ 'quasis',
+ 'expressions'
+ ],
+ ThisExpression: [],
+ ThrowStatement: ['argument'],
+ TryStatement: [
+ 'block',
+ 'handlers',
+ 'handler',
+ 'guardedHandlers',
+ 'finalizer'
+ ],
+ UnaryExpression: ['argument'],
+ UpdateExpression: ['argument'],
+ VariableDeclaration: ['declarations'],
+ VariableDeclarator: [
+ 'id',
+ 'init'
+ ],
+ WhileStatement: [
+ 'test',
+ 'body'
+ ],
+ WithStatement: [
+ 'object',
+ 'body'
+ ],
+ YieldExpression: ['argument']
+ };
+ BREAK = {};
+ SKIP = {};
+ REMOVE = {};
+ VisitorOption = {
+ Break: BREAK,
+ Skip: SKIP,
+ Remove: REMOVE
+ };
+ function Reference(parent, key) {
+ this.parent = parent;
+ this.key = key;
+ }
+ Reference.prototype.replace = function replace(node) {
+ this.parent[this.key] = node;
+ };
+ Reference.prototype.remove = function remove() {
+ if (isArray(this.parent)) {
+ this.parent.splice(this.key, 1);
+ return true;
+ } else {
+ this.replace(null);
+ return false;
+ }
+ };
+ function Element(node, path, wrap, ref) {
+ this.node = node;
+ this.path = path;
+ this.wrap = wrap;
+ this.ref = ref;
+ }
+ function Controller() {
+ }
+ Controller.prototype.path = function path() {
+ var i, iz, j, jz, result, element;
+ function addToPath(result, path) {
+ if (isArray(path)) {
+ for (j = 0, jz = path.length; j < jz; ++j) {
+ result.push(path[j]);
+ }
+ } else {
+ result.push(path);
+ }
+ }
+ if (!this.__current.path) {
+ return null;
+ }
+ result = [];
+ for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
+ element = this.__leavelist[i];
+ addToPath(result, element.path);
+ }
+ addToPath(result, this.__current.path);
+ return result;
+ };
+ Controller.prototype.type = function () {
+ var node = this.current();
+ return node.type || this.__current.wrap;
+ };
+ Controller.prototype.parents = function parents() {
+ var i, iz, result;
+ result = [];
+ for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
+ result.push(this.__leavelist[i].node);
+ }
+ return result;
+ };
+ Controller.prototype.current = function current() {
+ return this.__current.node;
+ };
+ Controller.prototype.__execute = function __execute(callback, element) {
+ var previous, result;
+ result = undefined;
+ previous = this.__current;
+ this.__current = element;
+ this.__state = null;
+ if (callback) {
+ result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
+ }
+ this.__current = previous;
+ return result;
+ };
+ Controller.prototype.notify = function notify(flag) {
+ this.__state = flag;
+ };
+ Controller.prototype.skip = function () {
+ this.notify(SKIP);
+ };
+ Controller.prototype['break'] = function () {
+ this.notify(BREAK);
+ };
+ Controller.prototype.remove = function () {
+ this.notify(REMOVE);
+ };
+ Controller.prototype.__initialize = function (root, visitor) {
+ this.visitor = visitor;
+ this.root = root;
+ this.__worklist = [];
+ this.__leavelist = [];
+ this.__current = null;
+ this.__state = null;
+ this.__fallback = visitor.fallback === 'iteration';
+ this.__keys = VisitorKeys;
+ if (visitor.keys) {
+ this.__keys = extend(objectCreate(this.__keys), visitor.keys);
+ }
+ };
+ function isNode(node) {
+ if (node == null) {
+ return false;
+ }
+ return typeof node === 'object' && typeof node.type === 'string';
+ }
+ function isProperty(nodeType, key) {
+ return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
+ }
+ Controller.prototype.traverse = function traverse(root, visitor) {
+ var worklist, leavelist, element, node, nodeType, ret, key, current, current2, candidates, candidate, sentinel;
+ this.__initialize(root, visitor);
+ sentinel = {};
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+ worklist.push(new Element(root, null, null, null));
+ leavelist.push(new Element(null, null, null, null));
+ while (worklist.length) {
+ element = worklist.pop();
+ if (element === sentinel) {
+ element = leavelist.pop();
+ ret = this.__execute(visitor.leave, element);
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+ continue;
+ }
+ if (element.node) {
+ ret = this.__execute(visitor.enter, element);
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+ worklist.push(sentinel);
+ leavelist.push(element);
+ if (this.__state === SKIP || ret === SKIP) {
+ continue;
+ }
+ node = element.node;
+ nodeType = element.wrap || node.type;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = objectKeys(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+ if (isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [
+ key,
+ current2
+ ], 'Property', null);
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [
+ key,
+ current2
+ ], null, null);
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, null));
+ }
+ }
+ }
+ }
+ };
+ Controller.prototype.replace = function replace(root, visitor) {
+ function removeElem(element) {
+ var i, key, nextElem, parent;
+ if (element.ref.remove()) {
+ key = element.ref.key;
+ parent = element.ref.parent;
+ i = worklist.length;
+ while (i--) {
+ nextElem = worklist[i];
+ if (nextElem.ref && nextElem.ref.parent === parent) {
+ if (nextElem.ref.key < key) {
+ break;
+ }
+ --nextElem.ref.key;
+ }
+ }
+ }
+ }
+ var worklist, leavelist, node, nodeType, target, element, current, current2, candidates, candidate, sentinel, outer, key;
+ this.__initialize(root, visitor);
+ sentinel = {};
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+ outer = { root: root };
+ element = new Element(root, null, null, new Reference(outer, 'root'));
+ worklist.push(element);
+ leavelist.push(element);
+ while (worklist.length) {
+ element = worklist.pop();
+ if (element === sentinel) {
+ element = leavelist.pop();
+ target = this.__execute(visitor.leave, element);
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ element.ref.replace(target);
+ }
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ }
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+ continue;
+ }
+ target = this.__execute(visitor.enter, element);
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ element.ref.replace(target);
+ element.node = target;
+ }
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ element.node = null;
+ }
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+ node = element.node;
+ if (!node) {
+ continue;
+ }
+ worklist.push(sentinel);
+ leavelist.push(element);
+ if (this.__state === SKIP || target === SKIP) {
+ continue;
+ }
+ nodeType = element.wrap || node.type;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = objectKeys(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+ if (isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [
+ key,
+ current2
+ ], 'Property', new Reference(candidate, current2));
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [
+ key,
+ current2
+ ], null, new Reference(candidate, current2));
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, new Reference(node, key)));
+ }
+ }
+ }
+ return outer.root;
+ };
+ function traverse(root, visitor) {
+ var controller = new Controller;
+ return controller.traverse(root, visitor);
+ }
+ function replace(root, visitor) {
+ var controller = new Controller;
+ return controller.replace(root, visitor);
+ }
+ function extendCommentRange(comment, tokens) {
+ var target;
+ target = upperBound(tokens, function search(token) {
+ return token.range[0] > comment.range[0];
+ });
+ comment.extendedRange = [
+ comment.range[0],
+ comment.range[1]
+ ];
+ if (target !== tokens.length) {
+ comment.extendedRange[1] = tokens[target].range[0];
+ }
+ target -= 1;
+ if (target >= 0) {
+ comment.extendedRange[0] = tokens[target].range[1];
+ }
+ return comment;
+ }
+ function attachComments(tree, providedComments, tokens) {
+ var comments = [], comment, len, i, cursor;
+ if (!tree.range) {
+ throw new Error('attachComments needs range information');
+ }
+ if (!tokens.length) {
+ if (providedComments.length) {
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comment = deepCopy(providedComments[i]);
+ comment.extendedRange = [
+ 0,
+ tree.range[0]
+ ];
+ comments.push(comment);
+ }
+ tree.leadingComments = comments;
+ }
+ return tree;
+ }
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
+ }
+ cursor = 0;
+ traverse(tree, {
+ enter: function (node) {
+ var comment;
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (comment.extendedRange[1] > node.range[0]) {
+ break;
+ }
+ if (comment.extendedRange[1] === node.range[0]) {
+ if (!node.leadingComments) {
+ node.leadingComments = [];
+ }
+ node.leadingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+ cursor = 0;
+ traverse(tree, {
+ leave: function (node) {
+ var comment;
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (node.range[1] < comment.extendedRange[0]) {
+ break;
+ }
+ if (node.range[1] === comment.extendedRange[0]) {
+ if (!node.trailingComments) {
+ node.trailingComments = [];
+ }
+ node.trailingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+ return tree;
+ }
+ exports.version = '1.8.1-dev';
+ exports.Syntax = Syntax;
+ exports.traverse = traverse;
+ exports.replace = replace;
+ exports.attachComments = attachComments;
+ exports.VisitorKeys = VisitorKeys;
+ exports.VisitorOption = VisitorOption;
+ exports.Controller = Controller;
+ exports.cloneEnvironment = function () {
+ return clone({});
+ };
+ return exports;
+ }));
+ });
+ require('/tools/entry-point.js');
+}.call(this, this));
diff --git a/escodegen.browser.min.js b/escodegen.browser.min.js
new file mode 100644
index 0000000..9391764
--- /dev/null
+++ b/escodegen.browser.min.js
@@ -0,0 +1 @@
+(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c};var c=function(a){return a='/',{title:'browser',version:'v0.10.26',browser:!0,env:{},argv:[],nextTick:b.setImmediate||function(a){setTimeout(a,0)},cwd:function(){return a},chdir:function(b){a=b}}}();a.define('/tools/entry-point.js',function(c,d,e,f){!function(){'use strict';b.escodegen=a('/escodegen.js',c),escodegen.browser=!0}()}),a.define('/escodegen.js',function(d,c,e,f){!function(k,e,ac,K,W,t,I,m,F,y,U,a2,R,a4,i,f,Y,Z,M,a7,p,V,C,B,x,aa,a9,u,E,H,S,P,r,X,N,g,O,a6,T,l,A,L,a3,ad){'use strict';function ap(a){return n.Expression.hasOwnProperty(a.type)}function $(a){return n.Statement.hasOwnProperty(a.type)}function _(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:' ',base:0,adjustMultilineComment:!1},newline:'\n',space:' ',json:!1,renumber:!1,hexadecimal:!1,quotes:'single',escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null,sourceCode:null}}function G(b,a){var c='';for(a|=0;a>0;a>>>=1,b+=b)a&1&&(c+=b);return c}function am(a){return/[\r\n]/g.test(a)}function q(b){var a=b.length;return a&&t.code.isLineTerminator(b.charCodeAt(a-1))}function a5(c,b){var a;for(a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);return c}function Q(b,d){function e(a){return typeof a==='object'&&a instanceof Object&&!(a instanceof RegExp)}var a,c;for(a in d)d.hasOwnProperty(a)&&(c=d[a],e(c)?e(b[a])?Q(b[a],c):b[a]=Q({},c):b[a]=c);return b}function ao(c){var b,e,a,f,d;if(c!==c)throw new Error('Numeric literal whose value is NaN');if(c<0||c===0&&1/c<0)throw new Error('Numeric literal whose value is negative');if(c===1/0)return y?'null':U?'1e400':'1e+400';if(b=''+c,!U||b.length<3)return b;e=b.indexOf('.'),!y&&b.charCodeAt(0)===48&&e===1&&(e=0,b=b.slice(1)),a=b,b=b.replace('e+','e'),f=0,(d=a.indexOf('e'))>0&&(f=+a.slice(d+1),a=a.slice(0,d)),e>=0&&(f-=a.length-e-1,a=+(a.slice(0,e)+a.slice(e+1))+''),d=0;while(a.charCodeAt(a.length+d-1)===48)--d;return d!==0&&(f-=d,a=a.slice(0,d)),f!==0&&(a+='e'+f),(a.length<b.length||a2&&c>1e12&&Math.floor(c)===c&&(a='0x'+c.toString(16)).length<b.length)&&+a===c&&(b=a),b}function a0(a,b){return(a&-2)===8232?(b?'u':'\\u')+(a===8232?'2028':'2029'):a===10||a===13?(b?'':'\\')+(a===10?'n':'r'):String.fromCharCode(a)}function ae(d){var g,a,h,e,i,b,f,c;if(a=d.toString(),d.source){if(g=a.match(/\/([^/]*)$/),!g)return a;for(h=g[1],a='',f=!1,c=!1,e=0,i=d.source.length;e<i;++e)b=d.source.charCodeAt(e),c?(a+=a0(b,c),c=!1):(f?b===93&&(f=!1):b===47?a+='\\':b===91&&(f=!0),a+=a0(b,c),c=b===92);return'/'+a+'/'+h}return a}function af(a,c){var b;return a===8?'\\b':a===12?'\\f':a===9?'\\t':(b=a.toString(16).toUpperCase(),y||a>255?'\\u'+'0000'.slice(b.length)+b:a===0&&!t.code.isDecimalDigit(c)?'\\0':a===11?'\\x0B':'\\x'+'00'.slice(b.length)+b)}function ai(a){if(a===92)return'\\\\';if(a===10)return'\\n';if(a===13)return'\\r';if(a===8232)return'\\u2028';if(a===8233)return'\\u2029';throw new Error('Incorrectly classified character')}function aj(d){var a,e,c,b;for(b=R==='double'?'"':"'",a=0,e=d.length;a<e;++a){if(c=d.charCodeAt(a),c===39){b='"';break}if(c===34){b="'";break}c===92&&++a}return b+d+b}function ak(d){var b='',c,g,a,h=0,i=0,e,f;for(c=0,g=d.length;c<g;++c){if(a=d.charCodeAt(c),a===39)++h;else if(a===34)++i;else if(a===47&&y)b+='\\';else if(t.code.isLineTerminator(a)||a===92){b+=ai(a);continue}else if(y&&a<32||!(y||a4||a>=32&&a<=126)){b+=af(a,d.charCodeAt(c+1));continue}b+=String.fromCharCode(a)}if(e=!(R==='double'||R==='auto'&&i<h),f=e?"'":'"',!(e?h:i))return f+b+f;for(d=b,b=f,c=0,g=d.length;c<g;++c)a=d.charCodeAt(c),(a===39&&e||a===34&&!e)&&(b+='\\'),b+=String.fromCharCode(a);return b+f}function a1(d){var a,e,b,c='';for(a=0,e=d.length;a<e;++a)b=d[a],c+=I(b)?a1(b):b;return c}function j(b,a){if(!C)return I(b)?a1(b):b;if(a==null)if(b instanceof K)return b;else a={};return a.loc==null?new K(null,null,C,b,a.name||null):new K(a.loc.start.line,a.loc.start.column,C===!0?a.loc.source||null:C,b,a.name||null)}function w(){return f?f:' '}function h(c,d){var e,g,a,b;return e=j(c).toString(),e.length===0?[d]:(g=j(d).toString(),g.length===0?[c]:(a=e.charCodeAt(e.length-1),b=g.charCodeAt(0),(a===43||a===45)&&a===b||t.code.isIdentifierPart(a)&&t.code.isIdentifierPart(b)||a===47&&b===105?[c,w(),d]:t.code.isWhiteSpace(a)||t.code.isLineTerminator(a)||t.code.isWhiteSpace(b)||t.code.isLineTerminator(b)?[c,d]:[c,f,d]))}function s(a){return[m,a]}function o(b){var a;a=m,m+=F,b(m),m=a}function ag(b){var a;for(a=b.length-1;a>=0;--a)if(t.code.isLineTerminator(b.charCodeAt(a)))break;return b.length-1-a}function ah(k,i){var b,a,e,g,d,c,f,h;for(b=k.split(/\r\n|[\r\n]/),c=Number.MAX_VALUE,a=1,e=b.length;a<e;++a){g=b[a],d=0;while(d<g.length&&t.code.isWhiteSpace(g.charCodeAt(d)))++d;c>d&&(c=d)}for(i!==void 0?(f=m,b[1][c]==='*'&&(i+=' '),m=i):(c&1&&--c,f=m),a=1,e=b.length;a<e;++a)h=j(s(b[a].slice(c))),b[a]=C?h.join(''):h;return m=f,b.join('\n')}function D(a,c){if(a.type==='Line')if(q(a.value))return'//'+a.value;else{var b='//'+a.value;return x||(b+='\n'),b}return p.format.indent.adjustMultilineComment&&/[\n\r]/.test(a.value)?ah('/*'+a.value+'*/',c):'/*'+a.value+'*/'}function a8(d,a){var c,g,b,r,p,n,l,i,f,o,h,t,u,e;if(d.leadingComments&&d.leadingComments.length>0){if(r=a,x){for(b=d.leadingComments[0],a=[],i=b.extendedRange,f=b.range,h=B.substring(i[0],f[0]),e=(h.match(/\n/g)||[]).length,e>0?(a.push(G('\n',e)),a.push(s(D(b)))):(a.push(h),a.push(D(b))),o=f,c=1,g=d.leadingComments.length;c<g;c++)b=d.leadingComments[c],f=b.range,t=B.substring(o[1],f[0]),e=(t.match(/\n/g)||[]).length,a.push(G('\n',e)),a.push(s(D(b))),o=f;u=B.substring(f[1],i[1]),e=(u.match(/\n/g)||[]).length,a.push(G('\n',e))}else for(b=d.leadingComments[0],a=[],M&&d.type===k.Program&&d.body.length===0&&a.push('\n'),a.push(D(b)),q(j(a).toString())||a.push('\n'),c=1,g=d.leadingComments.length;c<g;++c)b=d.leadingComments[c],l=[D(b)],q(j(l).toString())||l.push('\n'),a.push(s(l));a.push(s(r))}if(d.trailingComments)if(x)b=d.trailingComments[0],i=b.extendedRange,f=b.range,h=B.substring(i[0],f[0]),e=(h.match(/\n/g)||[]).length,e>0?(a.push(G('\n',e)),a.push(s(D(b)))):(a.push(h),a.push(D(b)));else for(p=!q(j(a).toString()),n=G(' ',ag(j([m,a,F]).toString())),c=0,g=d.trailingComments.length;c<g;++c)b=d.trailingComments[c],p?(c===0?a=[a,F]:a=[a,n],a.push(D(b,n))):a=[a,s(D(b))],c!==g-1&&!q(j(a).toString())&&(a=[a,'\n']);return a}function J(c,d,e){var a,b=0;for(a=c;a<d;a++)B[a]==='\n'&&b++;for(a=1;a<b;a++)e.push(i)}function v(a,b,c){return b<c?['(',a,')']:a}function ab(d){var a,c,b;for(b=d.split(/\r\n|\n/),a=1,c=b.length;a<c;a++)b[a]=i+m+b[a];return b}function an(c,d){var a,b,f;return a=c[p.verbatim],typeof a==='string'?b=v(ab(a),e.Sequence,d):(b=ab(a.content),f=a.precedence!=null?a.precedence:e.Sequence,b=v(b,f,d)),j(b,c)}function n(){}function z(a){return j(a.name,a)}function aq(a){var b;if(b=new n,$(a))return b.generateStatement(a,l);if(ap(a))return b.generateExpression(a,e.Sequence,g);throw new Error('Unknown node type: '+a.type)}function al(k,e){var h=_(),j,g;return e!=null?(typeof e.indent==='string'&&(h.format.indent.style=e.indent),typeof e.base==='number'&&(h.format.indent.base=e.base),e=Q(h,e),F=e.format.indent.style,typeof e.base==='string'?m=e.base:m=G(F,e.format.indent.base)):(e=h,F=e.format.indent.style,m=G(F,e.format.indent.base)),y=e.format.json,U=e.format.renumber,a2=y?!1:e.format.hexadecimal,R=y?'double':e.format.quotes,a4=e.format.escapeless,i=e.format.newline,f=e.format.space,e.format.compact&&(i=f=F=m=''),Y=e.format.parentheses,Z=e.format.semicolons,M=e.format.safeConcatenation,a7=e.directive,V=y?null:e.parse,C=e.sourceMap,B=e.sourceCode,x=e.format.preserveBlankLines&&B!==null,p=e,C&&(c.browser?K=b.sourceMap.SourceNode:K=a('/node_modules/source-map/lib/source-map.js',d).SourceNode),j=aq(k),C?(g=j.toStringWithSourceMap({file:e.file,sourceRoot:e.sourceMapRoot}),e.sourceContent&&g.map.setSourceContent(e.sourceMap,e.sourceContent),e.sourceMapWithCode?g:g.map.toString()):(g={code:j.toString(),map:null},e.sourceMapWithCode?g:g.code)}W=a('/node_modules/estraverse/estraverse.js',d),t=a('/node_modules/esutils/lib/utils.js',d),k=W.Syntax,e={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Unary:13,Postfix:14,Call:15,New:16,TaggedTemplate:17,Member:18,Primary:19},ac={'||':e.LogicalOR,'&&':e.LogicalAND,'|':e.BitwiseOR,'^':e.BitwiseXOR,'&':e.BitwiseAND,'==':e.Equality,'!=':e.Equality,'===':e.Equality,'!==':e.Equality,is:e.Equality,isnt:e.Equality,'<':e.Relational,'>':e.Relational,'<=':e.Relational,'>=':e.Relational,'in':e.Relational,'instanceof':e.Relational,'<<':e.BitwiseSHIFT,'>>':e.BitwiseSHIFT,'>>>':e.BitwiseSHIFT,'+':e.Additive,'-':e.Additive,'*':e.Multiplicative,'%':e.Multiplicative,'/':e.Multiplicative},u=1,E=2,H=4,S=8,P=16,r=32,X=E|H,N=u|E,g=u|E|H,O=u,a6=H,T=u|H,l=u,A=u|r,L=0,a3=u|P,ad=u|S,I=Array.isArray,I||(I=function a(b){return Object.prototype.toString.call(b)==='[object Array]'}),n.prototype.maybeBlock=function(a,c){var d,b,e=this;return b=!p.comment||!a.leadingComments,a.type===k.BlockStatement&&b?[f,this.generateStatement(a,c)]:a.type===k.EmptyStatement&&b?';':(o(function(){d=[i,s(e.generateStatement(a,c))]}),d)},n.prototype.maybeBlockSuffix=function(c,a){var b=q(j(a).toString());return c.type===k.BlockStatement&&!(p.comment&&c.leadingComments)&&!b?[a,f]:b?[a,m]:[a,i,m]},n.prototype.generatePattern=function(a,b,c){return a.type===k.Identifier?z(a):this.generateExpression(a,b,c)},n.prototype.generateFunctionParams=function(a){var c,d,b,h;if(h=!1,a.type===k.ArrowFunctionExpression&&!a.rest&&(!a.defaults||a.defaults.length===0)&&a.params.length===1&&a.params[0].type===k.Identifier)b=[z(a.params[0])];else{for(b=['('],a.defaults&&(h=!0),c=0,d=a.params.length;c<d;++c)h&&a.defaults[c]?b.push(this.generateAssignment(a.params[c],a.defaults[c],'=',e.Assignment,g)):b.push(this.generatePattern(a.params[c],e.Assignment,g)),c+1<d&&b.push(','+f);a.rest&&(a.params.length&&b.push(','+f),b.push('...'),b.push(z(a.rest))),b.push(')')}return b},n.prototype.generateFunctionBody=function(b){var a,c;return a=this.generateFunctionParams(b),b.type===k.ArrowFunctionExpression&&(a.push(f),a.push('=>')),b.expression?(a.push(f),c=this.generateExpression(b.body,e.Assignment,g),c.toString().charAt(0)==='{'&&(c=['(',c,')']),a.push(c)):a.push(this.maybeBlock(b.body,ad)),a},n.prototype.generateIterationForStatement=function(d,b,i){var a=['for'+f+'('],c=this;return o(function(){b.left.type===k.VariableDeclaration?o(function(){a.push(b.left.kind+w()),a.push(c.generateStatement(b.left.declarations[0],L))}):a.push(c.generateExpression(b.left,e.Call,g)),a=h(a,d),a=[h(a,c.generateExpression(b.right,e.Sequence,g)),')']}),a.push(this.maybeBlock(b.body,i)),a},n.prototype.generatePropertyKey=function(c,b){var a=[];return b&&a.push('['),a.push(this.generateExpression(c,e.Sequence,g)),b&&a.push(']'),a},n.prototype.generateAssignment=function(c,d,g,b,a){return e.Assignment<b&&(a|=u),v([this.generateExpression(c,e.Call,a),f+g+f,this.generateExpression(d,e.Assignment,a)],e.Assignment,b)},n.prototype.semicolon=function(a){return!Z&&a&r?'':';'},n.Statement={BlockStatement:function(a,f){var c,d,b=['{',i],e=this;return o(function(){a.body.length===0&&x&&(c=a.range,c[1]-c[0]>2)&&(d=B.substring(c[0]+1,c[1]-1),d[0]==='\n'&&(b=['{']),b.push(d));var g,h,m,k;for(k=l,f&S&&(k|=P),g=0,h=a.body.length;g<h;++g)x&&(g===0&&(a.body[0].leadingComments&&(c=a.body[0].leadingComments[0].extendedRange,d=B.substring(c[0],c[1]),d[0]==='\n'&&(b=['{'])),a.body[0].leadingComments||J(a.range[0],a.body[0].range[0],b)),g>0&&!(a.body[g-1].trailingComments||a.body[g].leadingComments)&&J(a.body[g-1].range[1],a.body[g].range[0],b)),g===h-1&&(k|=r),a.body[g].leadingComments&&x?m=e.generateStatement(a.body[g],k):m=s(e.generateStatement(a.body[g],k)),b.push(m),q(j(m).toString())||(x&&g<h-1?a.body[g+1].leadingComments||b.push(i):b.push(i)),x&&g===h-1&&(a.body[g].trailingComments||J(a.body[g].range[1],a.range[1],b))}),b.push(s('}')),b},BreakStatement:function(a,b){return a.label?'break '+a.label.name+this.semicolon(b):'break'+this.semicolon(b)},ContinueStatement:function(a,b){return a.label?'continue '+a.label.name+this.semicolon(b):'continue'+this.semicolon(b)},ClassBody:function(b,d){var a=['{',i],c=this;return o(function(h){var d,f;for(d=0,f=b.body.length;d<f;++d)a.push(h),a.push(c.generateExpression(b.body[d],e.Sequence,g)),d+1<f&&a.push(i)}),q(j(a).toString())||a.push(i),a.push(m),a.push('}'),a},ClassDeclaration:function(b,d){var a,c;return a=['class '+b.id.name],b.superClass&&(c=h('extends',this.generateExpression(b.superClass,e.Assignment,g)),a=h(a,c)),a.push(f),a.push(this.generateStatement(b.body,A)),a},DirectiveStatement:function(a,b){return p.raw&&a.raw?a.raw+this.semicolon(b):aj(a.directive)+this.semicolon(b)},DoWhileStatement:function(b,c){var a=h('do',this.maybeBlock(b.body,l));return a=this.maybeBlockSuffix(b.body,a),h(a,['while'+f+'(',this.generateExpression(b.test,e.Sequence,g),')'+this.semicolon(c)])},CatchClause:function(a,d){var b,c=this;return o(function(){var d;b=['catch'+f+'(',c.generateExpression(a.param,e.Sequence,g),')'],a.guard&&(d=c.generateExpression(a.guard,e.Sequence,g),b.splice(2,0,' if ',d))}),b.push(this.maybeBlock(a.body,l)),b},DebuggerStatement:function(b,a){return'debugger'+this.semicolon(a)},EmptyStatement:function(a,b){return';'},ExportDeclaration:function(b,c){var a=['export'],d,n=this;return d=c&r?A:l,b['default']?(a=h(a,'default'),$(b.declaration)?a=h(a,this.generateStatement(b.declaration,d)):a=h(a,this.generateExpression(b.declaration,e.Assignment,g)+this.semicolon(c)),a):b.declaration?h(a,this.generateStatement(b.declaration,d)):(b.specifiers&&(b.specifiers.length===0?a=h(a,'{'+f+'}'):b.specifiers[0].type===k.ExportBatchSpecifier?a=h(a,this.generateExpression(b.specifiers[0],e.Sequence,g)):(a=h(a,'{'),o(function(f){var c,d;for(a.push(i),c=0,d=b.specifiers.length;c<d;++c)a.push(f),a.push(n.generateExpression(b.specifiers[c],e.Sequence,g)),c+1<d&&a.push(','+i)}),q(j(a).toString())||a.push(i),a.push(m+'}')),b.source?a=h(a,['from'+f,this.generateExpression(b.source,e.Sequence,g),this.semicolon(c)]):a.push(this.semicolon(c))),a)},ExpressionStatement:function(c,d){var a,b;return a=[this.generateExpression(c.expression,e.Sequence,g)],b=j(a).toString(),b.charAt(0)==='{'||b.slice(0,5)==='class'&&' {'.indexOf(b.charAt(5))>=0||b.slice(0,8)==='function'&&'* ('.indexOf(b.charAt(8))>=0||a7&&d&P&&c.expression.type===k.Literal&&typeof c.expression.value==='string'?a=['(',a,')'+this.semicolon(d)]:a.push(this.semicolon(d)),a},ImportDeclaration:function(b,d){var a,c,l=this;return b.specifiers.length===0?['import',f,this.generateExpression(b.source,e.Sequence,g),this.semicolon(d)]:(a=['import'],c=0,b.specifiers[c].type===k.ImportDefaultSpecifier&&(a=h(a,[this.generateExpression(b.specifiers[c],e.Sequence,g)]),++c),b.specifiers[c]&&(c!==0&&a.push(','),b.specifiers[c].type===k.ImportNamespaceSpecifier?a=h(a,[f,this.generateExpression(b.specifiers[c],e.Sequence,g)]):(a.push(f+'{'),b.specifiers.length-c===1?(a.push(f),a.push(this.generateExpression(b.specifiers[c],e.Sequence,g)),a.push(f+'}'+f)):(o(function(h){var d,f;for(a.push(i),d=c,f=b.specifiers.length;d<f;++d)a.push(h),a.push(l.generateExpression(b.specifiers[d],e.Sequence,g)),d+1<f&&a.push(','+i)}),q(j(a).toString())||a.push(i),a.push(m+'}'+f)))),a=h(a,['from'+f,this.generateExpression(b.source,e.Sequence,g),this.semicolon(d)]),a)},VariableDeclarator:function(a,c){var b=c&u?g:X;return a.init?[this.generateExpression(a.id,e.Assignment,b),f,'=',f,this.generateExpression(a.init,e.Assignment,b)]:this.generatePattern(a.id,e.Assignment,b)},VariableDeclaration:function(c,h){function j(){for(b=c.declarations[0],p.comment&&b.leadingComments?(a.push('\n'),a.push(s(e.generateStatement(b,d)))):(a.push(w()),a.push(e.generateStatement(b,d))),g=1,k=c.declarations.length;g<k;++g)b=c.declarations[g],p.comment&&b.leadingComments?(a.push(','+i),a.push(s(e.generateStatement(b,d)))):(a.push(','+f),a.push(e.generateStatement(b,d)))}var a,g,k,b,d,e=this;return a=[c.kind],d=h&u?l:L,c.declarations.length>1?o(j):j(),a.push(this.semicolon(h)),a},ThrowStatement:function(a,b){return[h('throw',this.generateExpression(a.argument,e.Sequence,g)),this.semicolon(b)]},TryStatement:function(b,f){var a,c,d,e;if(a=['try',this.maybeBlock(b.block,l)],a=this.maybeBlockSuffix(b.block,a),b.handlers)for(c=0,d=b.handlers.length;c<d;++c)a=h(a,this.generateStatement(b.handlers[c],l)),(b.finalizer||c+1!==d)&&(a=this.maybeBlockSuffix(b.handlers[c].body,a));else{for(e=b.guardedHandlers||[],c=0,d=e.length;c<d;++c)a=h(a,this.generateStatement(e[c],l)),(b.finalizer||c+1!==d)&&(a=this.maybeBlockSuffix(e[c].body,a));if(b.handler)if(I(b.handler))for(c=0,d=b.handler.length;c<d;++c)a=h(a,this.generateStatement(b.handler[c],l)),(b.finalizer||c+1!==d)&&(a=this.maybeBlockSuffix(b.handler[c].body,a));else a=h(a,this.generateStatement(b.handler,l)),b.finalizer&&(a=this.maybeBlockSuffix(b.handler.body,a))}return b.finalizer&&(a=h(a,['finally',this.maybeBlock(b.finalizer,l)])),a},SwitchStatement:function(c,n){var a,d,b,h,k,m=this;if(o(function(){a=['switch'+f+'(',m.generateExpression(c.discriminant,e.Sequence,g),')'+f+'{'+i]}),c.cases)for(k=l,b=0,h=c.cases.length;b<h;++b)b===h-1&&(k|=r),d=s(this.generateStatement(c.cases[b],k)),a.push(d),q(j(d).toString())||a.push(i);return a.push(s('}')),a},SwitchCase:function(c,p){var a,f,b,d,n,m=this;return o(function(){for(c.test?a=[h('case',m.generateExpression(c.test,e.Sequence,g)),':']:a=['default:'],b=0,d=c.consequent.length,d&&c.consequent[0].type===k.BlockStatement&&(f=m.maybeBlock(c.consequent[0],l),a.push(f),b=1),b!==d&&!q(j(a).toString())&&a.push(i),n=l;b<d;++b)b===d-1&&p&r&&(n|=r),f=s(m.generateStatement(c.consequent[b],n)),a.push(f),b+1!==d&&!q(j(f).toString())&&a.push(i)}),a},IfStatement:function(b,j){var a,c,d,i=this;return o(function(){a=['if'+f+'(',i.generateExpression(b.test,e.Sequence,g),')']}),d=j&r,c=l,d&&(c|=r),b.alternate?(a.push(this.maybeBlock(b.consequent,l)),a=this.maybeBlockSuffix(b.consequent,a),b.alternate.type===k.IfStatement?a=h(a,['else ',this.generateStatement(b.alternate,c)]):a=h(a,h('else',this.maybeBlock(b.alternate,c)))):a.push(this.maybeBlock(b.consequent,c)),a},ForStatement:function(b,d){var a,c=this;return o(function(){a=['for'+f+'('],b.init?b.init.type===k.VariableDeclaration?a.push(c.generateStatement(b.init,L)):(a.push(c.generateExpression(b.init,e.Sequence,X)),a.push(';')):a.push(';'),b.test?(a.push(f),a.push(c.generateExpression(b.test,e.Sequence,g)),a.push(';')):a.push(';'),b.update?(a.push(f),a.push(c.generateExpression(b.update,e.Sequence,g)),a.push(')')):a.push(')')}),a.push(this.maybeBlock(b.body,d&r?A:l)),a},ForInStatement:function(a,b){return this.generateIterationForStatement('in',a,b&r?A:l)},ForOfStatement:function(a,b){return this.generateIterationForStatement('of',a,b&r?A:l)},LabeledStatement:function(a,b){return[a.label.name+':',this.maybeBlock(a.body,b&r?A:l)]},Program:function(b,g){var c,e,a,d,f;for(d=b.body.length,c=[M&&d>0?'\n':''],f=a3,a=0;a<d;++a)!M&&a===d-1&&(f|=r),x&&(a===0&&(b.body[0].leadingComments||J(b.range[0],b.body[a].range[0],c)),a>0&&!(b.body[a-1].trailingComments||b.body[a].leadingComments)&&J(b.body[a-1].range[1],b.body[a].range[0],c)),e=s(this.generateStatement(b.body[a],f)),c.push(e),a+1<d&&!q(j(e).toString())&&(x?b.body[a+1].leadingComments||c.push(i):c.push(i)),x&&a===d-1&&(b.body[a].trailingComments||J(b.body[a].range[1],b.range[1],c));return c},FunctionDeclaration:function(a,c){var b=a.generator&&!p.moz.starlessGenerator;return[b?'function*':'function',b?f:w(),z(a.id),this.generateFunctionBody(a)]},ReturnStatement:function(a,b){return a.argument?[h('return',this.generateExpression(a.argument,e.Sequence,g)),this.semicolon(b)]:['return'+this.semicolon(b)]},WhileStatement:function(b,d){var a,c=this;return o(function(){a=['while'+f+'(',c.generateExpression(b.test,e.Sequence,g),')']}),a.push(this.maybeBlock(b.body,d&r?A:l)),a},WithStatement:function(b,d){var a,c=this;return o(function(){a=['with'+f+'(',c.generateExpression(b.object,e.Sequence,g),')']}),a.push(this.maybeBlock(b.body,d&r?A:l)),a}},a5(n.prototype,n.Statement),n.Expression={SequenceExpression:function(d,g,h){var b,a,c;for(e.Sequence<g&&(h|=u),b=[],a=0,c=d.expressions.length;a<c;++a)b.push(this.generateExpression(d.expressions[a],e.Assignment,h)),a+1<c&&b.push(','+f);return v(b,e.Sequence,g)},AssignmentExpression:function(a,b,c){return this.generateAssignment(a.left,a.right,a.operator,b,c)},ArrowFunctionExpression:function(a,b,c){return v(this.generateFunctionBody(a),e.ArrowFunction,b)},ConditionalExpression:function(b,c,a){return e.Conditional<c&&(a|=u),v([this.generateExpression(b.test,e.LogicalOR,a),f+'?'+f,this.generateExpression(b.consequent,e.Assignment,a),f+':'+f,this.generateExpression(b.alternate,e.Assignment,a)],e.Conditional,c)},LogicalExpression:function(a,b,c){return this.BinaryExpression(a,b,c)},BinaryExpression:function(a,g,e){var c,d,b,f;return d=ac[a.operator],d<g&&(e|=u),b=this.generateExpression(a.left,d,e),f=b.toString(),f.charCodeAt(f.length-1)===47&&t.code.isIdentifierPart(a.operator.charCodeAt(0))?c=[b,w(),a.operator]:c=h(b,a.operator),b=this.generateExpression(a.right,d+1,e),a.operator==='/'&&b.toString().charAt(0)==='/'||a.operator.slice(-1)==='<'&&b.toString().slice(0,3)==='!--'?(c.push(w()),c.push(b)):c=h(c,b),a.operator==='in'&&!(e&u)?['(',c,')']:v(c,d,g)},CallExpression:function(c,h,i){var a,b,d;for(a=[this.generateExpression(c.callee,e.Call,N)],a.push('('),b=0,d=c['arguments'].length;b<d;++b)a.push(this.generateExpression(c['arguments'][b],e.Assignment,g)),b+1<d&&a.push(','+f);return a.push(')'),i&E?v(a,e.Call,h):['(',a,')']},NewExpression:function(d,l,j){var a,c,b,i,k;if(c=d['arguments'].length,k=j&H&&!Y&&c===0?T:O,a=h('new',this.generateExpression(d.callee,e.New,k)),!(j&H)||Y||c>0){for(a.push('('),b=0,i=c;b<i;++b)a.push(this.generateExpression(d['arguments'][b],e.Assignment,g)),b+1<i&&a.push(','+f);a.push(')')}return v(a,e.New,l)},MemberExpression:function(c,f,d){var a,b;return a=[this.generateExpression(c.object,e.Call,d&E?N:O)],c.computed?(a.push('['),a.push(this.generateExpression(c.property,e.Sequence,d&E?g:T)),a.push(']')):(c.object.type===k.Literal&&typeof c.object.value==='number'&&(b=j(a).toString(),b.indexOf('.')<0&&!/[eExX]/.test(b)&&t.code.isDecimalDigit(b.charCodeAt(b.length-1))&&!(b.length>=2&&b.charCodeAt(0)===48)&&a.push('.')),a.push('.'),a.push(z(c.property))),v(a,e.Member,f)},UnaryExpression:function(d,l,m){var a,b,i,k,c;return b=this.generateExpression(d.argument,e.Unary,g),f===''?a=h(d.operator,b):(a=[d.operator],d.operator.length>2?a=h(a,b):(k=j(a).toString(),c=k.charCodeAt(k.length-1),i=b.toString().charCodeAt(0),(c===43||c===45)&&c===i||t.code.isIdentifierPart(c)&&t.code.isIdentifierPart(i)?(a.push(w()),a.push(b)):a.push(b))),v(a,e.Unary,l)},YieldExpression:function(b,c,d){var a;return b.delegate?a='yield*':a='yield',b.argument&&(a=h(a,this.generateExpression(b.argument,e.Yield,g))),v(a,e.Yield,c)},UpdateExpression:function(a,b,c){return a.prefix?v([a.operator,this.generateExpression(a.argument,e.Unary,g)],e.Unary,b):v([this.generateExpression(a.argument,e.Postfix,g),a.operator],e.Postfix,b)},FunctionExpression:function(a,d,e){var b,c;return c=a.generator&&!p.moz.starlessGenerator,b=c?'function*':'function',a.id?[b,c?f:w(),z(a.id),this.generateFunctionBody(a)]:[b+f,this.generateFunctionBody(a)]},ExportBatchSpecifier:function(a,b,c){return'*'},ArrayPattern:function(a,b,c){return this.ArrayExpression(a,b,c)},ArrayExpression:function(c,h,k){var a,b,d=this;return c.elements.length?(b=c.elements.length>1,a=['[',b?i:''],o(function(k){var h,j;for(h=0,j=c.elements.length;h<j;++h)c.elements[h]?(a.push(b?k:''),a.push(d.generateExpression(c.elements[h],e.Assignment,g))):(b&&a.push(k),h+1===j&&a.push(',')),h+1<j&&a.push(','+(b?i:f))}),b&&!q(j(a).toString())&&a.push(i),a.push(b?m:''),a.push(']'),a):'[]'},ClassExpression:function(b,d,i){var a,c;return a=['class'],b.id&&(a=h(a,this.generateExpression(b.id,e.Sequence,g))),b.superClass&&(c=h('extends',this.generateExpression(b.superClass,e.Assignment,g)),a=h(a,c)),a.push(f),a.push(this.generateStatement(b.body,A)),a},MethodDefinition:function(a,d,e){var b,c;return a['static']?b=['static'+f]:b=[],a.kind==='get'||a.kind==='set'?b=h(b,[h(a.kind,this.generatePropertyKey(a.key,a.computed)),this.generateFunctionBody(a.value)]):(c=[this.generatePropertyKey(a.key,a.computed),this.generateFunctionBody(a.value)],a.value.generator?(b.push('*'),b.push(c)):b=h(b,c)),b},Property:function(a,c,d){var b;return a.kind==='get'||a.kind==='set'?[a.kind,w(),this.generatePropertyKey(a.key,a.computed),this.generateFunctionBody(a.value)]:a.shorthand?this.generatePropertyKey(a.key,a.computed):a.method?(b=[],a.value.generator&&b.push('*'),b.push(this.generatePropertyKey(a.key,a.computed)),b.push(this.generateFunctionBody(a.value)),b):[this.generatePropertyKey(a.key,a.computed),':'+f,this.generateExpression(a.value,e.Assignment,g)]},ObjectExpression:function(b,k,l){var d,a,c,h=this;return b.properties.length?(d=b.properties.length>1,o(function(){c=h.generateExpression(b.properties[0],e.Sequence,g)}),d||am(j(c).toString())?(o(function(k){var f,j;if(a=['{',i,k,c],d)for(a.push(','+i),f=1,j=b.properties.length;f<j;++f)a.push(k),a.push(h.generateExpression(b.properties[f],e.Sequence,g)),f+1<j&&a.push(','+i)}),q(j(a).toString())||a.push(i),a.push(m),a.push('}'),a):['{',f,c,f,'}']):'{}'},ObjectPattern:function(c,p,r){var a,d,l,b,h,n=this;if(!c.properties.length)return'{}';if(b=!1,c.properties.length===1)h=c.properties[0],h.value.type!==k.Identifier&&(b=!0);else for(d=0,l=c.properties.length;d<l;++d)if(h=c.properties[d],!h.shorthand){b=!0;break}return a=['{',b?i:''],o(function(j){var d,h;for(d=0,h=c.properties.length;d<h;++d)a.push(b?j:''),a.push(n.generateExpression(c.properties[d],e.Sequence,g)),d+1<h&&a.push(','+(b?i:f))}),b&&!q(j(a).toString())&&a.push(i),a.push(b?m:''),a.push('}'),a},ThisExpression:function(a,b,c){return'this'},Identifier:function(a,b,c){return z(a)},ImportDefaultSpecifier:function(a,b,c){return z(a.id)},ImportNamespaceSpecifier:function(b,c,d){var a=['*'];return b.id&&a.push(f+'as'+w()+z(b.id)),a},ImportSpecifier:function(a,b,c){return this.ExportSpecifier(a,b,c)},ExportSpecifier:function(a,c,d){var b=[a.id.name];return a.name&&b.push(w()+'as'+w()+z(a.name)),b},Literal:function(a,c,d){var b;if(a.hasOwnProperty('raw')&&V&&p.raw)try{if(b=V(a.raw).body[0].expression,b.type===k.Literal&&b.value===a.value)return a.raw}catch(a){}return a.value===null?'null':typeof a.value==='string'?ak(a.value):typeof a.value==='number'?ao(a.value):typeof a.value==='boolean'?a.value?'true':'false':ae(a.value)},GeneratorExpression:function(a,b,c){return this.ComprehensionExpression(a,b,c)},ComprehensionExpression:function(b,l,m){var a,d,i,c,j=this;return a=b.type===k.GeneratorExpression?['(']:['['],p.moz.comprehensionExpressionStartsWithAssignment&&(c=this.generateExpression(b.body,e.Assignment,g),a.push(c)),b.blocks&&o(function(){for(d=0,i=b.blocks.length;d<i;++d)c=j.generateExpression(b.blocks[d],e.Sequence,g),d>0||p.moz.comprehensionExpressionStartsWithAssignment?a=h(a,c):a.push(c)}),b.filter&&(a=h(a,'if'+f),c=this.generateExpression(b.filter,e.Sequence,g),a=h(a,['(',c,')'])),p.moz.comprehensionExpressionStartsWithAssignment||(c=this.generateExpression(b.body,e.Assignment,g),a=h(a,c)),a.push(b.type===k.GeneratorExpression?')':']'),a},ComprehensionBlock:function(b,c,d){var a;return b.left.type===k.VariableDeclaration?a=[b.left.kind,w(),this.generateStatement(b.left.declarations[0],L)]:a=this.generateExpression(b.left,e.Call,g),a=h(a,b.of?'of':'in'),a=h(a,this.generateExpression(b.right,e.Sequence,g)),['for'+f+'(',a,')']},SpreadElement:function(a,b,c){return['...',this.generateExpression(a.argument,e.Assignment,g)]},TaggedTemplateExpression:function(b,d,f){var a=N;f&E||(a=O);var c=[this.generateExpression(b.tag,e.Call,a),this.generateExpression(b.quasi,e.Primary,a6)];return v(c,e.TaggedTemplate,d)},TemplateElement:function(a,b,c){return a.value.raw},TemplateLiteral:function(c,h,i){var a,b,d;for(a=['`'],b=0,d=c.quasis.length;b<d;++b)a.push(this.generateExpression(c.quasis[b],e.Primary,g)),b+1<d&&(a.push('${'+f),a.push(this.generateExpression(c.expressions[b],e.Sequence,g)),a.push(f+'}'));return a.push('`'),a},ModuleSpecifier:function(a,b,c){return this.Literal(a,b,c)}},a5(n.prototype,n.Expression),n.prototype.generateExpression=function(a,c,e){var b,d;return d=a.type||k.Property,p.verbatim&&a.hasOwnProperty(p.verbatim)?an(a,c):(b=this[d](a,c,e),p.comment&&(b=a8(a,b)),j(b,a))},n.prototype.generateStatement=function(b,d){var a,c;return a=this[b.type](b,d),p.comment&&(a=a8(b,a)),c=j(a).toString(),b.type===k.Program&&!M&&i===''&&c.charAt(c.length-1)==='\n'&&(a=C?j(a).replaceRight(/\s+$/,''):c.replace(/\s+$/,'')),j(a,b)},aa={indent:{style:'',base:0},renumber:!0,hexadecimal:!0,quotes:'auto',escapeless:!0,compact:!0,parentheses:!1,semicolons:!1},a9=_().format,c.version=a('/package.json',d).version,c.generate=al,c.attachComments=W.attachComments,c.Precedence=Q({},e),c.browser=!1,c.FORMAT_MINIFY=aa,c.FORMAT_DEFAULTS=a9}()}),a.define('/package.json',function(a,b,c,d){a.exports={name:'escodegen',description:'ECMAScript code generator',homepage:'http://github.com/estools/escodegen',main:'escodegen.js',bin:{esgenerate:'./bin/esgenerate.js',escodegen:'./bin/escodegen.js'},files:['LICENSE.BSD','LICENSE.source-map','README.md','bin','escodegen.js','package.json'],version:'1.5.0',engines:{node:'>=0.10.0'},maintainers:[{name:'Yusuke Suzuki',email:'utatane.tea@gmail.com',web:'http://github.com/Constellation'}],repository:{type:'git',url:'http://github.com/estools/escodegen.git'},dependencies:{estraverse:'^1.9.1',esutils:'^1.1.6',esprima:'^1.2.2',optionator:'^0.5.0'},optionalDependencies:{'source-map':'~0.1.40'},devDependencies:{'esprima-moz':'*',semver:'^4.1.0',bluebird:'^2.3.11',chai:'^1.10.0','gulp-mocha':'^2.0.0','gulp-eslint':'^0.2.0',gulp:'^3.8.10','bower-registry-client':'^0.2.1','commonjs-everywhere':'^0.9.7'},licenses:[{type:'BSD',url:'http://github.com/estools/escodegen/raw/master/LICENSE.BSD'}],scripts:{test:'gulp travis','unit-test':'gulp test',lint:'gulp lint',release:'node tools/release.js','build-min':'./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js',build:'./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js'}}}),a.define('/node_modules/source-map/lib/source-map.js',function(b,c,d,e){c.SourceMapGenerator=a('/node_modules/source-map/lib/source-map/source-map-generator.js',b).SourceMapGenerator,c.SourceMapConsumer=a('/node_modules/source-map/lib/source-map/source-map-consumer.js',b).SourceMapConsumer,c.SourceNode=a('/node_modules/source-map/lib/source-map/source-node.js',b).SourceNode}),a.define('/node_modules/source-map/lib/source-map/source-node.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(e,i,f){function a(a,c,d,e,f){this.children=[],this.sourceContents={},this.line=a==null?null:a,this.column=c==null?null:c,this.source=d==null?null:d,this.name=f==null?null:f,this[b]=!0,e!=null&&this.add(e)}var g=e('/node_modules/source-map/lib/source-map/source-map-generator.js',f).SourceMapGenerator,c=e('/node_modules/source-map/lib/source-map/util.js',f),d=/(\r?\n)/,h=/\r\n|[\s\S]/g,b='$$$isSourceNode$$$';a.fromStringWithSourceMap=function b(n,m,j){function l(b,d){if(b===null||b.source===undefined)f.add(d);else{var e=j?c.join(j,b.source):b.source;f.add(new a(b.originalLine,b.originalColumn,e,d,b.name))}}var f=new a,e=n.split(d),k=function(){var a=e.shift(),b=e.shift()||'';return a+b},i=1,h=0,g=null;return m.eachMapping(function(a){if(g!==null)if(i<a.generatedLine){var c='';l(g,k()),i++,h=0}else{var b=e[0],c=b.substr(0,a.generatedColumn-h);e[0]=b.substr(a.generatedColumn-h),h=a.generatedColumn,l(g,c),g=a;return}while(i<a.generatedLine)f.add(k()),i++;if(h<a.generatedColumn){var b=e[0];f.add(b.substr(0,a.generatedColumn)),e[0]=b.substr(a.generatedColumn),h=a.generatedColumn}g=a},this),e.length>0&&(g&&l(g,k()),f.add(e.join(''))),m.sources.forEach(function(a){var b=m.sourceContentFor(a);b!=null&&(j!=null&&(a=c.join(j,a)),f.setSourceContent(a,b))}),f},a.prototype.add=function a(c){if(Array.isArray(c))c.forEach(function(a){this.add(a)},this);else if(c[b]||typeof c==='string')c&&this.children.push(c);else throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got '+c);return this},a.prototype.prepend=function a(c){if(Array.isArray(c))for(var d=c.length-1;d>=0;d--)this.prepend(c[d]);else if(c[b]||typeof c==='string')this.children.unshift(c);else throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got '+c);return this},a.prototype.walk=function a(e){var c;for(var d=0,f=this.children.length;d<f;d++)c=this.children[d],c[b]?c.walk(e):c!==''&&e(c,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function a(e){var b,c,d=this.children.length;if(d>0){for(b=[],c=0;c<d-1;c++)b.push(this.children[c]),b.push(e);b.push(this.children[c]),this.children=b}return this},a.prototype.replaceRight=function a(d,e){var c=this.children[this.children.length-1];return c[b]?c.replaceRight(d,e):typeof c==='string'?this.children[this.children.length-1]=c.replace(d,e):this.children.push(''.replace(d,e)),this},a.prototype.setSourceContent=function a(b,d){this.sourceContents[c.toSetString(b)]=d},a.prototype.walkSourceContents=function a(g){for(var d=0,e=this.children.length;d<e;d++)this.children[d][b]&&this.children[d].walkSourceContents(g);var f=Object.keys(this.sourceContents);for(var d=0,e=f.length;d<e;d++)g(c.fromSetString(f[d]),this.sourceContents[f[d]])},a.prototype.toString=function a(){var b='';return this.walk(function(a){b+=a}),b},a.prototype.toStringWithSourceMap=function a(l){var b={code:'',line:1,column:0},c=new g(l),e=!1,f=null,i=null,j=null,k=null;return this.walk(function(g,a){b.code+=g,a.source!==null&&a.line!==null&&a.column!==null?((f!==a.source||i!==a.line||j!==a.column||k!==a.name)&&c.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:b.line,column:b.column},name:a.name}),f=a.source,i=a.line,j=a.column,k=a.name,e=!0):e&&(c.addMapping({generated:{line:b.line,column:b.column}}),f=null,e=!1),g.match(h).forEach(function(g,h,i){d.test(g)?(b.line++,b.column=0,h+1===i.length?(f=null,e=!1):e&&c.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:b.line,column:b.column},name:a.name})):b.column+=g.length})}),this.walkSourceContents(function(a,b){c.setSourceContent(a,b)}),{code:b.code,map:c}},i.SourceNode=a})}),a.define('/node_modules/source-map/lib/source-map/util.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(o,a,p){function m(b,a,c){if(a in b)return b[a];else if(arguments.length===3)return c;else throw new Error('"'+a+'" is a required argument.')}function b(b){var a=b.match(f);return a?{scheme:a[1],auth:a[2],host:a[3],port:a[4],path:a[5]}:null}function c(a){var b='';return 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),b}function g(i){var a=i,d=b(i);if(d){if(!d.path)return i;a=d.path}var j=a.charAt(0)==='/',e=a.split(/\/+/);for(var h,g=0,f=e.length-1;f>=0;f--)h=e[f],h==='.'?e.splice(f,1):h==='..'?g++:g>0&&(h===''?(e.splice(f+1,g),g=0):(e.splice(f,2),g--));return a=e.join('/'),a===''&&(a=j?'/':'.'),d?(d.path=a,c(d)):a}function h(h,d){h===''&&(h='.'),d===''&&(d='.');var f=b(d),a=b(h);if(a&&(h=a.path||'/'),f&&!f.scheme)return a&&(f.scheme=a.scheme),c(f);if(f||d.match(e))return d;if(a&&!a.host&&!a.path)return a.host=d,c(a);var i=d.charAt(0)==='/'?d:g(h.replace(/\/+$/,'')+'/'+d);return a?(a.path=i,c(a)):i}function j(a,c){a===''&&(a='.'),a=a.replace(/\/$/,'');var d=b(a);return c.charAt(0)=='/'&&d&&d.path=='/'?c.slice(1):c.indexOf(a+'/')===0?c.substr(a.length+1):c}function k(a){return'$'+a}function l(a){return a.substr(1)}function d(c,d){var a=c||'',b=d||'';return(a>b)-(a<b)}function n(b,c,e){var a;return a=d(b.source,c.source),a?a:(a=b.originalLine-c.originalLine,a?a:(a=b.originalColumn-c.originalColumn,a||e?a:(a=d(b.name,c.name),a?a:(a=b.generatedLine-c.generatedLine,a?a:b.generatedColumn-c.generatedColumn))))}function i(b,c,e){var a;return a=b.generatedLine-c.generatedLine,a?a:(a=b.generatedColumn-c.generatedColumn,a||e?a:(a=d(b.source,c.source),a?a:(a=b.originalLine-c.originalLine,a?a:(a=b.originalColumn-c.originalColumn,a?a:d(b.name,c.name)))))}a.getArg=m;var f=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,e=/^data:.+\,.+$/;a.urlParse=b,a.urlGenerate=c,a.normalize=g,a.join=h,a.relative=j,a.toSetString=k,a.fromSetString=l,a.compareByOriginalPositions=n,a.compareByGeneratedPositions=i})}),a.define('/node_modules/source-map/node_modules/amdefine/amdefine.js',function(b,f,g,d){'use strict';function e(e,i){'use strict';function q(b){var a,c;for(a=0;b[a];a+=1)if(c=b[a],c==='.')b.splice(a,1),a-=1;else if(c==='..')if(a===1&&(b[2]==='..'||b[0]==='..'))break;else a>0&&(b.splice(a-1,2),a-=2)}function j(b,c){var a;return b&&b.charAt(0)==='.'&&c&&(a=c.split('/'),a=a.slice(0,a.length-1),a=a.concat(b.split('/')),q(a),b=a.join('/')),b}function p(a){return function(b){return j(b,a)}}function o(c){function a(a){b[c]=a}return a.fromText=function(a,b){throw new Error('amdefine does not implement load.fromText')},a}function m(c,h,l){var m,f,a,j;if(c)f=b[c]={},a={id:c,uri:d,exports:f},m=g(i,f,a,c);else{if(k)throw new Error('amdefine with no module ID cannot be called more than once per file.');k=!0,f=e.exports,a=e,m=g(i,f,a,e.id)}h&&(h=h.map(function(a){return m(a)})),typeof l==='function'?j=l.apply(a.exports,h):j=l,j!==undefined&&(a.exports=j,c&&(b[c]=a.exports))}function l(b,a,c){Array.isArray(b)?(c=a,a=b,b=undefined):typeof b!=='string'&&(c=b,b=a=undefined),a&&!Array.isArray(a)&&(c=a,a=undefined),a||(a=['require','exports','module']),b?f[b]=[b,a,c]:m(b,a,c)}var f={},b={},k=!1,n=a('path',e),g,h;return g=function(b,d,a,e){function f(f,g){if(typeof f==='string')return h(b,d,a,f,e);f=f.map(function(c){return h(b,d,a,c,e)}),c.nextTick(function(){g.apply(null,f)})}return f.toUrl=function(b){return b.indexOf('.')===0?j(b,n.dirname(a.filename)):b},f},i=i||function a(){return e.require.apply(e,arguments)},h=function(d,e,i,a,c){var k=a.indexOf('!'),n=a,q,l;if(k===-1)if(a=j(a,c),a==='require')return g(d,e,i,c);else if(a==='exports')return e;else if(a==='module')return i;else if(b.hasOwnProperty(a))return b[a];else if(f[a])return m.apply(null,f[a]),b[a];else if(d)return d(n);else throw new Error('No module with ID: '+a);else return q=a.substring(0,k),a=a.substring(k+1,a.length),l=h(d,e,i,q,c),l.normalize?a=l.normalize(a,p(c)):a=j(a,c),b[a]?b[a]:(l.load(a,g(d,e,i,c),o(a),{}),b[a])},l.require=function(a){return b[a]?b[a]:f[a]?(m.apply(null,f[a]),b[a]):void 0},l.amd={},l}b.exports=e}),a.define('/node_modules/source-map/lib/source-map/source-map-generator.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(e,g,f){function b(b){b||(b={}),this._file=a.getArg(b,'file',null),this._sourceRoot=a.getArg(b,'sourceRoot',null),this._sources=new d,this._names=new d,this._mappings=[],this._sourcesContents=null}var c=e('/node_modules/source-map/lib/source-map/base64-vlq.js',f),a=e('/node_modules/source-map/lib/source-map/util.js',f),d=e('/node_modules/source-map/lib/source-map/array-set.js',f).ArraySet;b.prototype._version=3,b.fromSourceMap=function c(d){var e=d.sourceRoot,f=new b({file:d.file,sourceRoot:e});return d.eachMapping(function(b){var c={generated:{line:b.generatedLine,column:b.generatedColumn}};b.source!=null&&(c.source=b.source,e!=null&&(c.source=a.relative(e,c.source)),c.original={line:b.originalLine,column:b.originalColumn},b.name!=null&&(c.name=b.name)),f.addMapping(c)}),d.sources.forEach(function(b){var a=d.sourceContentFor(b);a!=null&&f.setSourceContent(b,a)}),f},b.prototype.addMapping=function b(f){var g=a.getArg(f,'generated'),c=a.getArg(f,'original',null),d=a.getArg(f,'source',null),e=a.getArg(f,'name',null);this._validateMapping(g,c,d,e),d!=null&&!this._sources.has(d)&&this._sources.add(d),e!=null&&!this._names.has(e)&&this._names.add(e),this._mappings.push({generatedLine:g.line,generatedColumn:g.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:d,name:e})},b.prototype.setSourceContent=function b(e,d){var c=e;this._sourceRoot!=null&&(c=a.relative(this._sourceRoot,c)),d!=null?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[a.toSetString(c)]=d):this._sourcesContents&&(delete this._sourcesContents[a.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},b.prototype.applySourceMap=function b(e,j,g){var f=j;if(j==null){if(e.file==null)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');f=e.file}var c=this._sourceRoot;c!=null&&(f=a.relative(c,f));var h=new d,i=new d;this._mappings.forEach(function(b){if(b.source===f&&b.originalLine!=null){var d=e.originalPositionFor({line:b.originalLine,column:b.originalColumn});d.source!=null&&(b.source=d.source,g!=null&&(b.source=a.join(g,b.source)),c!=null&&(b.source=a.relative(c,b.source)),b.originalLine=d.line,b.originalColumn=d.column,d.name!=null&&(b.name=d.name))}var j=b.source;j!=null&&!h.has(j)&&h.add(j);var k=b.name;k!=null&&!i.has(k)&&i.add(k)},this),this._sources=h,this._names=i,e.sources.forEach(function(b){var d=e.sourceContentFor(b);d!=null&&(g!=null&&(b=a.join(g,b)),c!=null&&(b=a.relative(c,b)),this.setSourceContent(b,d))},this)},b.prototype._validateMapping=function a(b,c,d,e){if(b&&'line'in b&&'column'in b&&b.line>0&&b.column>=0&&!c&&!d&&!e)return;else if(b&&'line'in b&&'column'in b&&c&&'line'in c&&'column'in c&&b.line>0&&b.column>=0&&c.line>0&&c.column>=0&&d)return;else throw new Error('Invalid mapping: '+JSON.stringify({generated:b,source:d,original:c,name:e}))},b.prototype._serializeMappings=function b(){var h=0,g=1,j=0,k=0,i=0,l=0,e='',d;this._mappings.sort(a.compareByGeneratedPositions);for(var f=0,m=this._mappings.length;f<m;f++){if(d=this._mappings[f],d.generatedLine!==g){h=0;while(d.generatedLine!==g)e+=';',g++}else if(f>0){if(!a.compareByGeneratedPositions(d,this._mappings[f-1]))continue;e+=','}e+=c.encode(d.generatedColumn-h),h=d.generatedColumn,d.source!=null&&(e+=c.encode(this._sources.indexOf(d.source)-l),l=this._sources.indexOf(d.source),e+=c.encode(d.originalLine-1-k),k=d.originalLine-1,e+=c.encode(d.originalColumn-j),j=d.originalColumn,d.name!=null&&(e+=c.encode(this._names.indexOf(d.name)-i),i=this._names.indexOf(d.name)))}return e},b.prototype._generateSourcesContent=function b(d,c){return d.map(function(b){if(!this._sourcesContents)return null;c!=null&&(b=a.relative(c,b));var d=a.toSetString(b);return Object.prototype.hasOwnProperty.call(this._sourcesContents,d)?this._sourcesContents[d]:null},this)},b.prototype.toJSON=function a(){var b={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(b.file=this._file),this._sourceRoot!=null&&(b.sourceRoot=this._sourceRoot),this._sourcesContents&&(b.sourcesContent=this._generateSourcesContent(b.sources,b.sourceRoot)),b},b.prototype.toString=function a(){return JSON.stringify(this)},g.SourceMapGenerator=b})}),a.define('/node_modules/source-map/lib/source-map/array-set.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(c,d,e){function a(){this._array=[],this._set={}}var b=c('/node_modules/source-map/lib/source-map/util.js',e);a.fromArray=function b(e,g){var d=new a;for(var c=0,f=e.length;c<f;c++)d.add(e[c],g);return d},a.prototype.add=function a(c,f){var d=this.has(c),e=this._array.length;(!d||f)&&this._array.push(c),d||(this._set[b.toSetString(c)]=e)},a.prototype.has=function a(c){return Object.prototype.hasOwnProperty.call(this._set,b.toSetString(c))},a.prototype.indexOf=function a(c){if(this.has(c))return this._set[b.toSetString(c)];throw new Error('"'+c+'" is not in the set.')},a.prototype.at=function a(b){if(b>=0&&b<this._array.length)return this._array[b];throw new Error('No element indexed by '+b)},a.prototype.toArray=function a(){return this._array.slice()},d.ArraySet=a})}),a.define('/node_modules/source-map/lib/source-map/base64-vlq.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(j,f,h){function i(a){return a<0?(-a<<1)+1:(a<<1)+0}function g(b){var c=(b&1)===1,a=b>>1;return c?-a:a}var c=j('/node_modules/source-map/lib/source-map/base64.js',h),a=5,d=1<<a,e=d-1,b=d;f.encode=function d(j){var g='',h,f=i(j);do h=f&e,f>>>=a,f>0&&(h|=b),g+=c.encode(h);while(f>0);return g},f.decode=function d(i,l){var f=0,m=i.length,j=0,k=0,n,h;do{if(f>=m)throw new Error('Expected more digits in base 64 VLQ value.');h=c.decode(i.charAt(f++)),n=!!(h&b),h&=e,j+=h<<k,k+=a}while(n);l.value=g(j),l.rest=i.slice(f)}})}),a.define('/node_modules/source-map/lib/source-map/base64.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(d,c,e){var a={},b={};'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('').forEach(function(c,d){a[c]=d,b[d]=c}),c.encode=function a(c){if(c in b)return b[c];throw new TypeError('Must be between 0 and 63: '+c)},c.decode=function b(c){if(c in a)return a[c];throw new TypeError('Not a valid base 64 digit: '+c)}})}),a.define('/node_modules/source-map/lib/source-map/source-map-consumer.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(e,h,f){function b(e){var b=e;typeof e==='string'&&(b=JSON.parse(e.replace(/^\)\]\}'/,'')));var f=a.getArg(b,'version'),c=a.getArg(b,'sources'),g=a.getArg(b,'names',[]),h=a.getArg(b,'sourceRoot',null),i=a.getArg(b,'sourcesContent',null),j=a.getArg(b,'mappings'),k=a.getArg(b,'file',null);if(f!=this._version)throw new Error('Unsupported version: '+f);c=c.map(a.normalize),this._names=d.fromArray(g,!0),this._sources=d.fromArray(c,!0),this.sourceRoot=h,this.sourcesContent=i,this._mappings=j,this.file=k}var a=e('/node_modules/source-map/lib/source-map/util.js',f),g=e('/node_modules/source-map/lib/source-map/binary-search.js',f),d=e('/node_modules/source-map/lib/source-map/array-set.js',f).ArraySet,c=e('/node_modules/source-map/lib/source-map/base64-vlq.js',f);b.fromSourceMap=function c(f){var e=Object.create(b.prototype);return e._names=d.fromArray(f._names.toArray(),!0),e._sources=d.fromArray(f._sources.toArray(),!0),e.sourceRoot=f._sourceRoot,e.sourcesContent=f._generateSourcesContent(e._sources.toArray(),e.sourceRoot),e.file=f._file,e.__generatedMappings=f._mappings.slice().sort(a.compareByGeneratedPositions),e.__originalMappings=f._mappings.slice().sort(a.compareByOriginalPositions),e},b.prototype._version=3,Object.defineProperty(b.prototype,'sources',{get:function(){return this._sources.toArray().map(function(b){return this.sourceRoot!=null?a.join(this.sourceRoot,b):b},this)}}),b.prototype.__generatedMappings=null,Object.defineProperty(b.prototype,'_generatedMappings',{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),b.prototype.__originalMappings=null,Object.defineProperty(b.prototype,'_originalMappings',{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),b.prototype._nextCharIsMappingSeparator=function a(c){var b=c.charAt(0);return b===';'||b===','},b.prototype._parseMappings=function b(m,n){var j=1,g=0,i=0,h=0,k=0,l=0,d=m,e={},f;while(d.length>0)if(d.charAt(0)===';')j++,d=d.slice(1),g=0;else if(d.charAt(0)===',')d=d.slice(1);else{if(f={},f.generatedLine=j,c.decode(d,e),f.generatedColumn=g+e.value,g=f.generatedColumn,d=e.rest,d.length>0&&!this._nextCharIsMappingSeparator(d)){if(c.decode(d,e),f.source=this._sources.at(k+e.value),k+=e.value,d=e.rest,d.length===0||this._nextCharIsMappingSeparator(d))throw new Error('Found a source, but no line and column');if(c.decode(d,e),f.originalLine=i+e.value,i=f.originalLine,f.originalLine+=1,d=e.rest,d.length===0||this._nextCharIsMappingSeparator(d))throw new Error('Found a source and line, but no column');c.decode(d,e),f.originalColumn=h+e.value,h=f.originalColumn,d=e.rest,d.length>0&&!this._nextCharIsMappingSeparator(d)&&(c.decode(d,e),f.name=this._names.at(l+e.value),l+=e.value,d=e.rest)}this.__generatedMappings.push(f),typeof f.originalLine==='number'&&this.__originalMappings.push(f)}this.__generatedMappings.sort(a.compareByGeneratedPositions),this.__originalMappings.sort(a.compareByOriginalPositions)},b.prototype._findMapping=function a(b,e,c,d,f){if(b[c]<=0)throw new TypeError('Line must be greater than or equal to 1, got '+b[c]);if(b[d]<0)throw new TypeError('Column must be greater than or equal to 0, got '+b[d]);return g.search(b,e,f)},b.prototype.computeColumnSpans=function a(){for(var b=0;b<this._generatedMappings.length;++b){var c=this._generatedMappings[b];if(b+1<this._generatedMappings.length){var d=this._generatedMappings[b+1];if(c.generatedLine===d.generatedLine){c.lastGeneratedColumn=d.generatedColumn-1;continue}}c.lastGeneratedColumn=Infinity}},b.prototype.originalPositionFor=function b(g){var e={generatedLine:a.getArg(g,'line'),generatedColumn:a.getArg(g,'column')},f=this._findMapping(e,this._generatedMappings,'generatedLine','generatedColumn',a.compareByGeneratedPositions);if(f>=0){var c=this._generatedMappings[f];if(c.generatedLine===e.generatedLine){var d=a.getArg(c,'source',null);return d!=null&&this.sourceRoot!=null&&(d=a.join(this.sourceRoot,d)),{source:d,line:a.getArg(c,'originalLine',null),column:a.getArg(c,'originalColumn',null),name:a.getArg(c,'name',null)}}}return{source:null,line:null,column:null,name:null}},b.prototype.sourceContentFor=function b(c){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(c=a.relative(this.sourceRoot,c)),this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];var d;if(this.sourceRoot!=null&&(d=a.urlParse(this.sourceRoot))){var e=c.replace(/^file:\/\//,'');if(d.scheme=='file'&&this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];if((!d.path||d.path=='/')&&this._sources.has('/'+c))return this.sourcesContent[this._sources.indexOf('/'+c)]}throw new Error('"'+c+'" is not in the SourceMap.')},b.prototype.generatedPositionFor=function b(e){var c={source:a.getArg(e,'source'),originalLine:a.getArg(e,'line'),originalColumn:a.getArg(e,'column')};this.sourceRoot!=null&&(c.source=a.relative(this.sourceRoot,c.source));var f=this._findMapping(c,this._originalMappings,'originalLine','originalColumn',a.compareByOriginalPositions);if(f>=0){var d=this._originalMappings[f];return{line:a.getArg(d,'generatedLine',null),column:a.getArg(d,'generatedColumn',null),lastColumn:a.getArg(d,'lastGeneratedColumn',null)}}return{line:null,column:null,lastColumn:null}},b.prototype.allGeneratedPositionsFor=function b(g){var d={source:a.getArg(g,'source'),originalLine:a.getArg(g,'line'),originalColumn:Infinity};this.sourceRoot!=null&&(d.source=a.relative(this.sourceRoot,d.source));var f=[],e=this._findMapping(d,this._originalMappings,'originalLine','originalColumn',a.compareByOriginalPositions);if(e>=0){var c=this._originalMappings[e];while(c&&c.originalLine===d.originalLine)f.push({line:a.getArg(c,'generatedLine',null),column:a.getArg(c,'generatedColumn',null),lastColumn:a.getArg(c,'lastGeneratedColumn',null)}),c=this._originalMappings[--e]}return f.reverse()},b.GENERATED_ORDER=1,b.ORIGINAL_ORDER=2,b.prototype.eachMapping=function c(h,i,j){var f=i||null,g=j||b.GENERATED_ORDER,d;switch(g){case b.GENERATED_ORDER:d=this._generatedMappings;break;case b.ORIGINAL_ORDER:d=this._originalMappings;break;default:throw new Error('Unknown order of iteration.')}var e=this.sourceRoot;d.map(function(b){var c=b.source;return c!=null&&e!=null&&(c=a.join(e,c)),{source:c,generatedLine:b.generatedLine,generatedColumn:b.generatedColumn,originalLine:b.originalLine,originalColumn:b.originalColumn,name:b.name}}).forEach(h,f)},h.SourceMapConsumer=b})}),a.define('/node_modules/source-map/lib/source-map/binary-search.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(c,b,d){function a(c,d,e,f,g){var b=Math.floor((d-c)/2)+c,h=g(e,f[b],!0);return h===0?b:h>0?d-b>1?a(b,d,e,f,g):b:b-c>1?a(c,b,e,f,g):c<0?-1:c}b.search=function b(d,c,e){return c.length===0?-1:a(-1,c.length,d,c,e)}})}),a.define('/node_modules/esutils/lib/utils.js',function(b,c,d,e){!function(){'use strict';c.ast=a('/node_modules/esutils/lib/ast.js',b),c.code=a('/node_modules/esutils/lib/code.js',b),c.keyword=a('/node_modules/esutils/lib/keyword.js',b)}()}),a.define('/node_modules/esutils/lib/keyword.js',function(b,c,d,e){!function(d){'use strict';function i(a){switch(a){case'implements':case'interface':case'package':case'private':case'protected':case'public':case'static':case'let':return!0;default:return!1}}function g(a,b){return!b&&a==='yield'?!1:c(a,b)}function c(a,b){if(b&&i(a))return!0;switch(a.length){case 2:return a==='if'||a==='in'||a==='do';case 3:return a==='var'||a==='for'||a==='new'||a==='try';case 4:return a==='this'||a==='else'||a==='case'||a==='void'||a==='with'||a==='enum';case 5:return a==='while'||a==='break'||a==='catch'||a==='throw'||a==='const'||a==='yield'||a==='class'||a==='super';case 6:return a==='return'||a==='typeof'||a==='delete'||a==='switch'||a==='export'||a==='import';case 7:return a==='default'||a==='finally'||a==='extends';case 8:return a==='function'||a==='continue'||a==='debugger';case 10:return a==='instanceof';default:return!1}}function f(a,b){return a==='null'||a==='true'||a==='false'||g(a,b)}function h(a,b){return a==='null'||a==='true'||a==='false'||c(a,b)}function j(a){return a==='eval'||a==='arguments'}function e(b){var c,e,a;if(b.length===0)return!1;if(a=b.charCodeAt(0),!d.isIdentifierStart(a)||a===92)return!1;for(c=1,e=b.length;c<e;++c)if(a=b.charCodeAt(c),!d.isIdentifierPart(a)||a===92)return!1;return!0}function l(a,b){return e(a)&&!f(a,b)}function k(a,b){return e(a)&&!h(a,b)}d=a('/node_modules/esutils/lib/code.js',b),b.exports={isKeywordES5:g,isKeywordES6:c,isReservedWordES5:f,isReservedWordES6:h,isRestrictedWord:j,isIdentifierName:e,isIdentifierES5:l,isIdentifierES6:k}}()}),a.define('/node_modules/esutils/lib/code.js',function(a,b,c,d){!function(b,c){'use strict';function d(a){return a>=48&&a<=57}function e(a){return d(a)||97<=a&&a<=102||65<=a&&a<=70}function f(a){return a>=48&&a<=55}function g(a){return a===32||a===9||a===11||a===12||a===160||a>=5760&&c.indexOf(a)>=0}function h(a){return a===10||a===13||a===8232||a===8233}function i(a){return a>=97&&a<=122||a>=65&&a<=90||a===36||a===95||a===92||a>=128&&b.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function j(a){return a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===36||a===95||a===92||a>=128&&b.NonAsciiIdentifierPart.test(String.fromCharCode(a))}b={NonAsciiIdentifierStart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]'),NonAsciiIdentifierPart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]')},c=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],a.exports={isDecimalDigit:d,isHexDigit:e,isOctalDigit:f,isWhiteSpace:g,isLineTerminator:h,isIdentifierStart:i,isIdentifierPart:j}}()}),a.define('/node_modules/esutils/lib/ast.js',function(a,b,c,d){!function(){'use strict';function d(a){if(a==null)return!1;switch(a.type){case'ArrayExpression':case'AssignmentExpression':case'BinaryExpression':case'CallExpression':case'ConditionalExpression':case'FunctionExpression':case'Identifier':case'Literal':case'LogicalExpression':case'MemberExpression':case'NewExpression':case'ObjectExpression':case'SequenceExpression':case'ThisExpression':case'UnaryExpression':case'UpdateExpression':return!0}return!1}function e(a){if(a==null)return!1;switch(a.type){case'DoWhileStatement':case'ForInStatement':case'ForStatement':case'WhileStatement':return!0}return!1}function b(a){if(a==null)return!1;switch(a.type){case'BlockStatement':case'BreakStatement':case'ContinueStatement':case'DebuggerStatement':case'DoWhileStatement':case'EmptyStatement':case'ExpressionStatement':case'ForInStatement':case'ForStatement':case'IfStatement':case'LabeledStatement':case'ReturnStatement':case'SwitchStatement':case'ThrowStatement':case'TryStatement':case'VariableDeclaration':case'WhileStatement':case'WithStatement':return!0}return!1}function f(a){return b(a)||a!=null&&a.type==='FunctionDeclaration'}function c(a){switch(a.type){case'IfStatement':return a.alternate!=null?a.alternate:a.consequent;case'LabeledStatement':case'ForStatement':case'ForInStatement':case'WhileStatement':case'WithStatement':return a.body}return null}function g(b){var a;if(b.type!=='IfStatement')return!1;if(b.alternate==null)return!1;a=b.consequent;do{if(a.type==='IfStatement'&&a.alternate==null)return!0;a=c(a)}while(a);return!1}a.exports={isExpression:d,isStatement:b,isIterationStatement:e,isSourceElement:f,isProblematicIfStatement:g,trailingStatement:c}}()}),a.define('/node_modules/estraverse/estraverse.js',function(b,a,c,d){!function(c,b){'use strict';typeof define==='function'&&define.amd?define(['exports'],b):a!==void 0?b(a):b(c.estraverse={})}(this,function a(d){'use strict';function s(){}function p(d){var c={},a,b;for(a in d)d.hasOwnProperty(a)&&(b=d[a],typeof b==='object'&&b!==null?c[a]=p(b):c[a]=b);return c}function y(b){var c={},a;for(a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);return c}function x(e,f){var b,a,c,d;a=e.length,c=0;while(a)b=a>>>1,d=c+b,f(e[d])?a=b:(c=d+1,a-=b+1);return c}function t(e,f){var b,a,c,d;a=e.length,c=0;while(a)b=a>>>1,d=c+b,f(e[d])?(c=d+1,a-=b+1):a=b;return c}function u(a,b){return l(b).forEach(function(c){a[c]=b[c]}),a}function i(a,b){this.parent=a,this.key=b}function e(a,b,c,d){this.node=a,this.path=b,this.wrap=c,this.ref=d}function b(){}function k(a){return a==null?!1:typeof a==='object'&&typeof a.type==='string'}function q(a,b){return(a===m.ObjectExpression||a===m.ObjectPattern)&&'properties'===b}function o(c,d){var a=new b;return a.traverse(c,d)}function w(c,d){var a=new b;return a.replace(c,d)}function z(a,c){var b;return b=x(c,function b(c){return c.range[0]>a.range[0]}),a.extendedRange=[a.range[0],a.range[1]],b!==c.length&&(a.extendedRange[1]=c[b].range[0]),b-=1,b>=0&&(a.extendedRange[0]=c[b].range[1]),a}function v(d,e,h){var a=[],g,f,c,b;if(!d.range)throw new Error('attachComments needs range information');if(!h.length){if(e.length){for(c=0,f=e.length;c<f;c+=1)g=p(e[c]),g.extendedRange=[0,d.range[0]],a.push(g);d.leadingComments=a}return d}for(c=0,f=e.length;c<f;c+=1)a.push(z(p(e[c]),h));return b=0,o(d,{enter:function(c){var d;while(b<a.length){if(d=a[b],d.extendedRange[1]>c.range[0])break;d.extendedRange[1]===c.range[0]?(c.leadingComments||(c.leadingComments=[]),c.leadingComments.push(d),a.splice(b,1)):b+=1}return b===a.length?j.Break:a[b].extendedRange[0]>c.range[1]?j.Skip:void 0}}),b=0,o(d,{leave:function(c){var d;while(b<a.length){if(d=a[b],c.range[1]<d.extendedRange[0])break;c.range[1]===d.extendedRange[0]?(c.trailingComments||(c.trailingComments=[]),c.trailingComments.push(d),a.splice(b,1)):b+=1}return b===a.length?j.Break:a[b].extendedRange[0]>c.range[1]?j.Skip:void 0}}),d}var m,h,j,n,r,l,c,g,f;return h=Array.isArray,h||(h=function a(b){return Object.prototype.toString.call(b)==='[object Array]'}),s(y),s(t),r=Object.create||function(){function a(){}return function(b){return a.prototype=b,new a}}(),l=Object.keys||function(c){var a=[],b;for(b in c)a.push(b);return a},m={AssignmentExpression:'AssignmentExpression',ArrayExpression:'ArrayExpression',ArrayPattern:'ArrayPattern',ArrowFunctionExpression:'ArrowFunctionExpression',AwaitExpression:'AwaitExpression',BlockStatement:'BlockStatement',BinaryExpression:'BinaryExpression',BreakStatement:'BreakStatement',CallExpression:'CallExpression',CatchClause:'CatchClause',ClassBody:'ClassBody',ClassDeclaration:'ClassDeclaration',ClassExpression:'ClassExpression',ComprehensionBlock:'ComprehensionBlock',ComprehensionExpression:'ComprehensionExpression',ConditionalExpression:'ConditionalExpression',ContinueStatement:'ContinueStatement',DebuggerStatement:'DebuggerStatement',DirectiveStatement:'DirectiveStatement',DoWhileStatement:'DoWhileStatement',EmptyStatement:'EmptyStatement',ExportBatchSpecifier:'ExportBatchSpecifier',ExportDeclaration:'ExportDeclaration',ExportSpecifier:'ExportSpecifier',ExpressionStatement:'ExpressionStatement',ForStatement:'ForStatement',ForInStatement:'ForInStatement',ForOfStatement:'ForOfStatement',FunctionDeclaration:'FunctionDeclaration',FunctionExpression:'FunctionExpression',GeneratorExpression:'GeneratorExpression',Identifier:'Identifier',IfStatement:'IfStatement',ImportDeclaration:'ImportDeclaration',ImportDefaultSpecifier:'ImportDefaultSpecifier',ImportNamespaceSpecifier:'ImportNamespaceSpecifier',ImportSpecifier:'ImportSpecifier',Literal:'Literal',LabeledStatement:'LabeledStatement',LogicalExpression:'LogicalExpression',MemberExpression:'MemberExpression',MethodDefinition:'MethodDefinition',ModuleSpecifier:'ModuleSpecifier',NewExpression:'NewExpression',ObjectExpression:'ObjectExpression',ObjectPattern:'ObjectPattern',Program:'Program',Property:'Property',ReturnStatement:'ReturnStatement',SequenceExpression:'SequenceExpression',SpreadElement:'SpreadElement',SwitchStatement:'SwitchStatement',SwitchCase:'SwitchCase',TaggedTemplateExpression:'TaggedTemplateExpression',TemplateElement:'TemplateElement',TemplateLiteral:'TemplateLiteral',ThisExpression:'ThisExpression',ThrowStatement:'ThrowStatement',TryStatement:'TryStatement',UnaryExpression:'UnaryExpression',UpdateExpression:'UpdateExpression',VariableDeclaration:'VariableDeclaration',VariableDeclarator:'VariableDeclarator',WhileStatement:'WhileStatement',WithStatement:'WithStatement',YieldExpression:'YieldExpression'},n={AssignmentExpression:['left','right'],ArrayExpression:['elements'],ArrayPattern:['elements'],ArrowFunctionExpression:['params','defaults','rest','body'],AwaitExpression:['argument'],BlockStatement:['body'],BinaryExpression:['left','right'],BreakStatement:['label'],CallExpression:['callee','arguments'],CatchClause:['param','body'],ClassBody:['body'],ClassDeclaration:['id','body','superClass'],ClassExpression:['id','body','superClass'],ComprehensionBlock:['left','right'],ComprehensionExpression:['blocks','filter','body'],ConditionalExpression:['test','consequent','alternate'],ContinueStatement:['label'],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:['body','test'],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:['declaration','specifiers','source'],ExportSpecifier:['id','name'],ExpressionStatement:['expression'],ForStatement:['init','test','update','body'],ForInStatement:['left','right','body'],ForOfStatement:['left','right','body'],FunctionDeclaration:['id','params','defaults','rest','body'],FunctionExpression:['id','params','defaults','rest','body'],GeneratorExpression:['blocks','filter','body'],Identifier:[],IfStatement:['test','consequent','alternate'],ImportDeclaration:['specifiers','source'],ImportDefaultSpecifier:['id'],ImportNamespaceSpecifier:['id'],ImportSpecifier:['id','name'],Literal:[],LabeledStatement:['label','body'],LogicalExpression:['left','right'],MemberExpression:['object','property'],MethodDefinition:['key','value'],ModuleSpecifier:[],NewExpression:['callee','arguments'],ObjectExpression:['properties'],ObjectPattern:['properties'],Program:['body'],Property:['key','value'],ReturnStatement:['argument'],SequenceExpression:['expressions'],SpreadElement:['argument'],SwitchStatement:['discriminant','cases'],SwitchCase:['test','consequent'],TaggedTemplateExpression:['tag','quasi'],TemplateElement:[],TemplateLiteral:['quasis','expressions'],ThisExpression:[],ThrowStatement:['argument'],TryStatement:['block','handlers','handler','guardedHandlers','finalizer'],UnaryExpression:['argument'],UpdateExpression:['argument'],VariableDeclaration:['declarations'],VariableDeclarator:['id','init'],WhileStatement:['test','body'],WithStatement:['object','body'],YieldExpression:['argument']},c={},g={},f={},j={Break:c,Skip:g,Remove:f},i.prototype.replace=function a(b){this.parent[this.key]=b},i.prototype.remove=function a(){return h(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},b.prototype.path=function a(){function e(b,a){if(h(a))for(c=0,g=a.length;c<g;++c)b.push(a[c]);else b.push(a)}var b,f,c,g,d,i;if(!this.__current.path)return null;for(d=[],b=2,f=this.__leavelist.length;b<f;++b)i=this.__leavelist[b],e(d,i.path);return e(d,this.__current.path),d},b.prototype.type=function(){var a=this.current();return a.type||this.__current.wrap},b.prototype.parents=function a(){var b,d,c;for(c=[],b=1,d=this.__leavelist.length;b<d;++b)c.push(this.__leavelist[b].node);return c},b.prototype.current=function a(){return this.__current.node},b.prototype.__execute=function a(c,d){var e,b;return b=undefined,e=this.__current,this.__current=d,this.__state=null,c&&(b=c.call(this,d.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=e,b},b.prototype.notify=function a(b){this.__state=b},b.prototype.skip=function(){this.notify(g)},b.prototype['break']=function(){this.notify(c)},b.prototype.remove=function(){this.notify(f)},b.prototype.__initialize=function(b,a){this.visitor=a,this.root=b,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=a.fallback==='iteration',this.__keys=n,a.keys&&(this.__keys=u(r(this.__keys),a.keys))},b.prototype.traverse=function a(v,u){var i,r,b,o,s,m,n,p,f,j,d,t;this.__initialize(v,u),t={},i=this.__worklist,r=this.__leavelist,i.push(new e(v,null,null,null)),r.push(new e(null,null,null,null));while(i.length){if(b=i.pop(),b===t){if(b=r.pop(),m=this.__execute(u.leave,b),this.__state===c||m===c)return;continue}if(b.node){if(m=this.__execute(u.enter,b),this.__state===c||m===c)return;if(i.push(t),r.push(b),this.__state===g||m===g)continue;if(o=b.node,s=b.wrap||o.type,j=this.__keys[s],!j)if(this.__fallback)j=l(o);else throw new Error('Unknown node type '+s+'.');p=j.length;while((p-=1)>=0){if(n=j[p],d=o[n],!d)continue;if(h(d)){f=d.length;while((f-=1)>=0){if(!d[f])continue;if(q(s,j[p]))b=new e(d[f],[n,f],'Property',null);else if(k(d[f]))b=new e(d[f],[n,f],null,null);else continue;i.push(b)}}else k(d)&&i.push(new e(d,n,null,null))}}}},b.prototype.replace=function a(w,x){function z(b){var c,d,a,e;if(b.ref.remove()){d=b.ref.key,e=b.ref.parent,c=n.length;while(c--)if(a=n[c],a.ref&&a.ref.parent===e){if(a.ref.key<d)break;--a.ref.key}}}var n,v,p,t,d,b,u,m,o,j,y,s,r;this.__initialize(w,x),y={},n=this.__worklist,v=this.__leavelist,s={root:w},b=new e(w,null,null,new i(s,'root')),n.push(b),v.push(b);while(n.length){if(b=n.pop(),b===y){if(b=v.pop(),d=this.__execute(x.leave,b),d!==undefined&&d!==c&&d!==g&&d!==f&&b.ref.replace(d),(this.__state===f||d===f)&&z(b),this.__state===c||d===c)return s.root;continue}if(d=this.__execute(x.enter,b),d!==undefined&&d!==c&&d!==g&&d!==f&&(b.ref.replace(d),b.node=d),(this.__state===f||d===f)&&(z(b),b.node=null),this.__state===c||d===c)return s.root;if(p=b.node,!p)continue;if(n.push(y),v.push(b),this.__state===g||d===g)continue;if(t=b.wrap||p.type,o=this.__keys[t],!o)if(this.__fallback)o=l(p);else throw new Error('Unknown node type '+t+'.');u=o.length;while((u-=1)>=0){if(r=o[u],j=p[r],!j)continue;if(h(j)){m=j.length;while((m-=1)>=0){if(!j[m])continue;if(q(t,o[u]))b=new e(j[m],[r,m],'Property',new i(j,m));else if(k(j[m]))b=new e(j[m],[r,m],null,new i(j,m));else continue;n.push(b)}}else k(j)&&n.push(new e(j,r,null,new i(p,r)))}}return s.root},d.version='1.8.1-dev',d.Syntax=m,d.traverse=o,d.replace=w,d.attachComments=v,d.VisitorKeys=n,d.VisitorOption=j,d.Controller=b,d.cloneEnvironment=function(){return a({})},d})}),a('/tools/entry-point.js')}.call(this,this))
diff --git a/package.json b/package.json
index 4ad416e..688b538 100644
--- a/package.json
+++ b/package.json
@@ -1,67 +1,67 @@
{
- "name": "escodegen",
- "description": "ECMAScript code generator",
- "homepage": "http://github.com/estools/escodegen",
- "main": "escodegen.js",
- "bin": {
- "esgenerate": "./bin/esgenerate.js",
- "escodegen": "./bin/escodegen.js"
- },
- "files": [
- "LICENSE.BSD",
- "LICENSE.source-map",
- "README.md",
- "bin",
- "escodegen.js",
- "package.json"
- ],
- "version": "1.5.0-dev",
- "engines": {
- "node": ">=0.10.0"
- },
- "maintainers": [
- {
- "name": "Yusuke Suzuki",
- "email": "utatane.tea@gmail.com",
- "web": "http://github.com/Constellation"
+ "name": "escodegen",
+ "description": "ECMAScript code generator",
+ "homepage": "http://github.com/estools/escodegen",
+ "main": "escodegen.js",
+ "bin": {
+ "esgenerate": "./bin/esgenerate.js",
+ "escodegen": "./bin/escodegen.js"
+ },
+ "files": [
+ "LICENSE.BSD",
+ "LICENSE.source-map",
+ "README.md",
+ "bin",
+ "escodegen.js",
+ "package.json"
+ ],
+ "version": "1.5.0",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "web": "http://github.com/Constellation"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/estools/escodegen.git"
+ },
+ "dependencies": {
+ "estraverse": "^1.9.1",
+ "esutils": "^1.1.6",
+ "esprima": "^1.2.2",
+ "optionator": "^0.5.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.1.40"
+ },
+ "devDependencies": {
+ "esprima-moz": "*",
+ "semver": "^4.1.0",
+ "bluebird": "^2.3.11",
+ "chai": "^1.10.0",
+ "gulp-mocha": "^2.0.0",
+ "gulp-eslint": "^0.2.0",
+ "gulp": "^3.8.10",
+ "bower-registry-client": "^0.2.1",
+ "commonjs-everywhere": "^0.9.7"
+ },
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "http://github.com/estools/escodegen/raw/master/LICENSE.BSD"
+ }
+ ],
+ "scripts": {
+ "test": "gulp travis",
+ "unit-test": "gulp test",
+ "lint": "gulp lint",
+ "release": "node tools/release.js",
+ "build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",
+ "build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"
}
- ],
- "repository": {
- "type": "git",
- "url": "http://github.com/estools/escodegen.git"
- },
- "dependencies": {
- "estraverse": "^1.9.1",
- "esutils": "^1.1.6",
- "esprima": "^1.2.2",
- "optionator": "^0.5.0"
- },
- "optionalDependencies": {
- "source-map": "~0.1.40"
- },
- "devDependencies": {
- "esprima-moz": "*",
- "semver": "^4.1.0",
- "bluebird": "^2.3.11",
- "chai": "^1.10.0",
- "gulp-mocha": "^2.0.0",
- "gulp-eslint": "^0.2.0",
- "gulp": "^3.8.10",
- "bower-registry-client": "^0.2.1",
- "commonjs-everywhere": "^0.9.7"
- },
- "licenses": [
- {
- "type": "BSD",
- "url": "http://github.com/estools/escodegen/raw/master/LICENSE.BSD"
- }
- ],
- "scripts": {
- "test": "gulp travis",
- "unit-test": "gulp test",
- "lint": "gulp lint",
- "release": "node tools/release.js",
- "build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",
- "build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"
- }
-}
+}
\ No newline at end of file