Skip to content

Instantly share code, notes, and snippets.

@0x80
Forked from royriojas/index.js
Last active August 29, 2015 14:25
Show Gist options
  • Save 0x80/a8d74c612f35f3af3615 to your computer and use it in GitHub Desktop.
Save 0x80/a8d74c612f35f3af3615 to your computer and use it in GitHub Desktop.
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Rebuild to run it on the right
var esformatter = require( 'esformatter' );
var esformatterJSX = require( 'esformatter-jsx' );
var collapser = require('esformatter-collapse-objects')
var throttle = require('lodash.throttle');
var testCode =
'/*\nHere are three es6 related issues with standard-format.\nOne can be solved by a setting I suppose. The others probably require a \nfix in esformatter\n*/\n' +
'class Foo extends React.Component {\n' +
' classFun (a, b, c) {}' +
'}\n\n//this can be fixed with whitespace.before.ObjectPatternComma -1 / 0\nconst {foo, bar} = baz\n\n' +
'function regularFun(a,b,c){}\n';
var esformatterConfig = {
"collapseObjects": {
"ObjectExpression": {
"maxLineLength": 80,
"maxKeys": 4,
"maxDepth": 1,
"forbidden": [
"FunctionExpression"
]
},
"ArrayExpression": {
"maxLineLength": 80,
"maxKeys": 4,
"maxDepth": 1,
"forbidden": [
"FunctionExpression"
]
}
},
"jsx": {
"attrsOnSameLineAsTag": false,
"maxAttrsOnTag": 2
},
"indent": {
"value": " ",
"ArrayExpression": 1,
"AssignmentExpression": 1,
"BinaryExpression": 1,
"ConditionalExpression": 1,
"CallExpression": 1,
"CatchClause": 1,
"DoWhileStatement": 1,
"ForInStatement": 1,
"ForStatement": 1,
"FunctionDeclaration": 1,
"FunctionExpression": 1,
"IfStatement": 1,
"MemberExpression": 1,
"MultipleVariableDeclaration": 1,
"ObjectExpression": 1,
"ReturnStatement": ">=1",
"SwitchCase": 1,
"SwitchStatement": 1,
"TopLevelFunctionBlock": 1,
"TryStatement": 1,
"VariableDeclaration.LogicalExpression": 1,
"WhileStatement": 1
},
"lineBreak": {
"before": {
"AssignmentExpression": ">=0",
"AssignmentOperator": 0,
"BlockStatement": 1,
"CallExpression": -1,
"ConditionalExpression": ">=1",
"CatchOpeningBrace": 0,
"CatchClosingBrace": ">=1",
"CatchKeyword": 0,
"DeleteOperator": ">=1",
"DoWhileStatement": ">=1",
"DoWhileStatementOpeningBrace": 0,
"DoWhileStatementClosingBrace": ">=1",
"EndOfFile": 1,
"EmptyStatement": -1,
"FinallyKeyword": -1,
"FinallyOpeningBrace": 0,
"FinallyClosingBrace": ">=1",
"ForInStatement": ">=1",
"ForInStatementExpressionOpening": 0,
"ForInStatementExpressionClosing": 0,
"ForInStatementOpeningBrace": 0,
"ForInStatementClosingBrace": ">=1",
"ForStatement": ">=1",
"ForStatementExpressionOpening": 0,
"ForStatementExpressionClosing": "<2",
"ForStatementOpeningBrace": 0,
"ForStatementClosingBrace": ">=1",
"FunctionExpression": 0,
"FunctionExpressionOpeningBrace": 0,
"FunctionExpressionClosingBrace": ">=1",
"FunctionDeclaration": ">=1",
"FunctionDeclarationOpeningBrace": 0,
"FunctionDeclarationClosingBrace": ">=1",
"IfStatement": ">=1",
"IfStatementOpeningBrace": 0,
"IfStatementClosingBrace": ">=1",
"ElseIfStatement": 0,
"ElseIfStatementOpeningBrace": 0,
"ElseIfStatementClosingBrace": ">=1",
"ElseStatement": 0,
"ElseStatementOpeningBrace": 0,
"ElseStatementClosingBrace": ">=1",
"LogicalExpression": -1,
"ObjectExpressionOpeningBrace": 0,
"ObjectExpressionClosingBrace": 1,
"Property": 1,
"ReturnStatement": ">=1",
"SwitchOpeningBrace": 0,
"SwitchClosingBrace": ">=1",
"ThisExpression": -1,
"ThrowStatement": ">=1",
"TryKeyword": -1,
"TryOpeningBrace": 0,
"TryClosingBrace": ">=1",
"VariableName": ">=1",
"VariableValue": 0,
"VariableDeclaration": ">=1",
"VariableDeclarationWithoutInit": ">=1",
"WhileStatement": ">=1",
"WhileStatementOpeningBrace": 0,
"WhileStatementClosingBrace": ">=1",
"ArrayExpressionClosing": 1
},
"after": {
"AssignmentExpression": ">=1",
"AssignmentOperator": 0,
"BlockStatement": 0,
"CallExpression": -1,
"CatchOpeningBrace": ">=1",
"CatchClosingBrace": ">=0",
"CatchKeyword": 0,
"ConditionalExpression": ">=1",
"DeleteOperator": ">=1",
"DoWhileStatement": ">=1",
"DoWhileStatementOpeningBrace": ">=1",
"DoWhileStatementClosingBrace": 0,
"EmptyStatement": -1,
"FinallyKeyword": -1,
"FinallyOpeningBrace": ">=1",
"FinallyClosingBrace": ">=1",
"ForInStatement": ">=1",
"ForInStatementExpressionOpening": "<2",
"ForInStatementExpressionClosing": -1,
"ForInStatementOpeningBrace": ">=1",
"ForInStatementClosingBrace": ">=1",
"ForStatement": ">=1",
"ForStatementExpressionOpening": "<2",
"ForStatementExpressionClosing": -1,
"ForStatementOpeningBrace": ">=1",
"ForStatementClosingBrace": ">=1",
"FunctionExpression": ">=1",
"FunctionExpressionOpeningBrace": ">=1",
"FunctionExpressionClosingBrace": -1,
"FunctionDeclaration": ">=1",
"FunctionDeclarationOpeningBrace": ">=1",
"FunctionDeclarationClosingBrace": ">=1",
"IfStatement": ">=1",
"IfStatementOpeningBrace": ">=1",
"IfStatementClosingBrace": ">=1",
"ElseIfStatement": ">=1",
"ElseIfStatementOpeningBrace": ">=1",
"ElseIfStatementClosingBrace": ">=1",
"ElseStatement": ">=1",
"ElseStatementOpeningBrace": ">=1",
"ElseStatementClosingBrace": ">=1",
"LogicalExpression": -1,
"ObjectExpressionClosingBrace": 0,
"ObjectExpressionOpeningBrace": 1,
"PropertyValue": 0,
"Property": 0,
"ReturnStatement": 1,
"SwitchOpeningBrace": ">=1",
"SwitchClosingBrace": ">=1",
"ThisExpression": 0,
"ThrowStatement": ">=1",
"TryKeyword": -1,
"TryOpeningBrace": ">=1",
"TryClosingBrace": 0,
"VariableDeclaration": ">=1",
"WhileStatement": ">=1",
"WhileStatementOpeningBrace": ">=1",
"WhileStatementClosingBrace": ">=1",
"ArrayExpressionOpening": 1,
"ArrayExpressionComma": 1
}
},
"whiteSpace": {
"value": " ",
"removeTrailing": 1,
"before" : {
"ArrayExpressionOpening" : -1,
"ArrayExpressionClosing" : -1,
"ArrayExpressionComma" : -1,
"ArgumentComma" : -1,
"ArgumentList" : 0,
"AssignmentOperator" : 1,
"BinaryExpression": -1,
"ForStatementClosingBrace" : -1,
"ForStatementSemicolon" : 0,
"FunctionDeclarationOpeningBrace" : 1,
"FunctionDeclarationClosingBrace" : -1,
"FunctionExpressionOpeningBrace" : 1,
"FunctionExpressionClosingBrace" : -1,
"IfStatementConditionalOpening" : 1,
"IfStatementConditionalClosing" : -1,
"IfStatementOpeningBrace" : 1,
"IfStatementClosingBrace" : -1,
"ElseStatementOpeningBrace" : 1,
"ElseStatementClosingBrace" : -1,
"ElseIfStatementOpeningBrace" : 1,
"ElseIfStatementClosingBrace" : -1,
"MemberExpressionClosing" : -1,
"ObjectExpressionOpeningBrace": -1,
"ObjectExpressionClosingBrace": -1,
"ObjectPatternOpeningBrace": -1,
"ObjectPatternClosingBrace": -1,
"ObjectPatternComma": 1,
"LineComment" : -1,
"LogicalExpressionOperator" : 1,
"Property" : -1,
"PropertyValue" : 1,
"ParameterComma" : -1,
"ParameterList" : -1,
"SwitchDiscriminantOpening" : 1,
"SwitchDiscriminantClosing" : -1,
"ThrowKeyword": -1,
"TryKeyword": -1,
"TryOpeningBrace" : 1,
"TryClosingBrace" : -1,
"UnaryExpressionOperator": -1,
"VariableName" : -1,
"VariableValue" : 1,
"WhileStatementConditionalOpening" : -1,
"WhileStatementConditionalClosing" : -1,
"WhileStatementOpeningBrace" : -1,
"WhileStatementClosingBrace" : -1
},
"after" : {
"ArrayExpressionOpening" : -1,
"ArrayExpressionClosing" : -1,
"ArrayExpressionComma" : 1,
"ArgumentComma" : 1,
"ArgumentList" : 0,
"AssignmentOperator" : 1,
"BinaryExpression": -1,
"BinaryExpressionOperator" : 1,
"BlockComment" : -1,
"CallExpression" : -1,
"CatchParameterList" : -1,
"CatchOpeningBrace" : -1,
"CatchClosingBrace" : -1,
"CatchKeyword" : -1,
"CommaOperator" : 1,
"ConditionalExpressionConsequent" : -1,
"ConditionalExpressionTest" : -1,
"DoWhileStatementOpeningBrace" : -1,
"DoWhileStatementClosingBrace" : -1,
"DoWhileStatementBody" : -1,
"EmptyStatement" : -1,
"ExpressionOpeningParentheses" : -1,
"FinallyKeyword" : -1,
"FinallyOpeningBrace" : -1,
"FinallyClosingBrace" : -1,
"ForInStatement" : -1,
"ForInStatementExpressionOpening" : -1,
"ForInStatementExpressionClosing" : -1,
"ForInStatementOpeningBrace" : -1,
"ForInStatementClosingBrace" : -1,
"ForStatement" : -1,
"ForStatementExpressionOpening" : -1,
"ForStatementExpressionClosing" : -1,
"ForStatementClosingBrace" : -1,
"ForStatementOpeningBrace" : -1,
"ForStatementSemicolon" : -1,
"FunctionReservedWord": 1,
"FunctionName" : 1,
"FunctionExpressionOpeningBrace" : -1,
"FunctionExpressionClosingBrace" : -1,
"FunctionDeclarationOpeningBrace" : -1,
"FunctionDeclarationClosingBrace" : -1,
"IfStatementConditionalOpening" : -1,
"IfStatementConditionalClosing" : -1,
"IfStatementOpeningBrace" : -1,
"IfStatementClosingBrace" : -1,
"ElseStatementOpeningBrace" : -1,
"ElseStatementClosingBrace" : -1,
"ElseIfStatementOpeningBrace" : -1,
"ElseIfStatementClosingBrace" : -1,
"MemberExpressionOpening" : -1,
"LogicalExpressionOperator" : 1,
"ObjectExpressionOpeningBrace": -1,
"ObjectExpressionClosingBrace": -1,
"ObjectPatternOpeningBrace": -1,
"ObjectPatternClosingBrace": -1,
"ObjectPatternComma": 1,
"PropertyName" : 0,
"PropertyValue" : -1,
"ParameterComma" : 1,
"ParameterList" : -1,
"SwitchDiscriminantOpening" : -1,
"SwitchDiscriminantClosing" : 1,
"ThrowKeyword": -1,
"TryKeyword": -1,
"TryOpeningBrace" : -1,
"TryClosingBrace" : -1,
"UnaryExpressionOperator": -1,
"VariableName" : 1,
"WhileStatementConditionalOpening" : -1,
"WhileStatementConditionalClosing" : -1,
"WhileStatementOpeningBrace" : -1,
"WhileStatementClosingBrace" : -1
}
}
};
var supportStorage = true;
try {
testCode = window.localStorage.__code__ || testCode;
} catch (ex) {
supportStorage = false;
}
esformatter.register( esformatterJSX );
esformatter.register( collapser );
function fnStart() {
var source = document.getElementById( 'source-area' );
var pre = document.getElementById( 'result-area' );
source.value = testCode;
var cdmIn = CodeMirror.fromTextArea( source, {
lineNumbers: true,
mode: 'javascript'
} );
var cdmOut = CodeMirror.fromTextArea( pre, {
lineNumbers: true,
mode: 'javascript'
} );
var formatCode = function () {
try {
var code = cdmIn.getValue();
if (supportStorage) {
window.localStorage.__code__ = code;
}
cdmOut.setValue( esformatter.format( code, esformatterConfig ) );
} catch (ex) {
cdmOut.setValue( '//==> Error: ' + ex.message );
if (supportStorage) {
window.localStorage.__code__ = testCode;
}
// pre.textContent = ;
//window.localStorage.__code__ = testCode;
}
};
var fCode = throttle( formatCode, 500 );
fCode();
cdmIn.on( 'change', function () {
fCode();
} );
}
var $ = require('jquery');
$.getScript('https://cdn.jsdelivr.net/codemirror/4.5.0/codemirror.js').then(function () {
$.getScript("https://cdn.jsdelivr.net/codemirror/4.5.0/mode/javascript/javascript.js").then(function () {
$(fnStart);
});
});
require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){},{}],2:[function(require,module,exports){exports.endianness=function(){return"LE"};exports.hostname=function(){if(typeof location!=="undefined"){return location.hostname}else return""};exports.loadavg=function(){return[]};exports.uptime=function(){return 0};exports.freemem=function(){return Number.MAX_VALUE};exports.totalmem=function(){return Number.MAX_VALUE};exports.cpus=function(){return[]};exports.type=function(){return"Browser"};exports.release=function(){if(typeof navigator!=="undefined"){return navigator.appVersion}return""};exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}};exports.arch=function(){return"javascript"};exports.platform=function(){return"browser"};exports.tmpdir=exports.tmpDir=function(){return"/tmp"};exports.EOL="\n"},{}],3:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:4}],4:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canMutationObserver=typeof window!=="undefined"&&window.MutationObserver;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}var queue=[];if(canMutationObserver){var hiddenDiv=document.createElement("div");var observer=new MutationObserver(function(){var queueList=queue.slice();queue.length=0;queueList.forEach(function(fn){fn()})});observer.observe(hiddenDiv,{attributes:true});return function nextTick(fn){if(!queue.length){hiddenDiv.setAttribute("yes","no")}queue.push(fn)}}if(canPost){window.addEventListener("message",function(ev){var source=ev.source;if((source===window||source===null)&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],5:[function(require,module,exports){"use strict";var format=require("./format");var disparity=require("disparity");var hr="=================================================================="+"==============";disparity.added="expected";disparity.removed="actual";exports.chars=chars;function chars(str,opts,fileName){var result=disparity.chars(str,format(str,opts));if(!result){return""}return getHeader(fileName)+result+"\n"}function getHeader(fileName){return fileName?cyan(fileName)+"\n"+cyan(hr)+"\n":""}function cyan(str){return""+str+""}exports.unified=unified;function unified(str,opts,fileName){return disparity.unified(str,format(str,opts),{paths:[fileName]})}exports.unifiedNoColor=unifiedNoColor;function unifiedNoColor(str,opts,fileName){return disparity.unifiedNoColor(str,format(str,opts),{paths:[fileName]})}},{"./format":6,disparity:55}],6:[function(require,module,exports){"use strict";var _options=require("./options");var espree=require("espree");var npmRun=require("npm-run");var plugins=require("./plugins");var rocambole=require("rocambole");var transform=require("./transform");exports=module.exports=format;function format(str,opts){_options.set(opts);var prefix="";if(_options.get("esformatter.allowShebang")){prefix=getShebang(str);if(prefix){str=str.replace(prefix,"")}}var pipeCommands=_options.get("pipe");if(pipeCommands){str=pipe(pipeCommands.before,str).toString()}str=doFormat(str,opts);if(pipeCommands){str=pipe(pipeCommands.after,str).toString()}return prefix+str}exports.parseFn=espree.parse;exports.parseContext=espree;exports.parseOptions={ecmaFeatures:{arrowFunctions:true,blockBindings:true,destructuring:true,regexYFlag:true,regexUFlag:true,templateStrings:true,binaryLiterals:true,octalLiterals:true,unicodeCodePointEscapes:true,defaultParams:true,restParams:true,forOf:true,objectLiteralComputedProperties:true,objectLiteralShorthandMethods:true,objectLiteralShorthandProperties:true,objectLiteralDuplicateProperties:true,generators:true,spread:true,classes:true,modules:true,jsx:true,globalReturn:true}};function getShebang(str){var result=/^#!.+\n/.exec(str);return result?result[0]:""}function doFormat(str){str=plugins.stringBefore(str);rocambole.parseFn=exports.parseFn;rocambole.parseContext=exports.parseContext;var ast=rocambole.parse(str,exports.parseOptions);transform(ast,transform.BYPASS_OPTIONS);str=ast.toString();str=plugins.stringAfter(str);return str}function pipe(commands,input){if(!commands){return input}return commands.reduce(function(input,cmd){return npmRun.sync(cmd,{input:input})},input)}},{"./options":49,"./plugins":50,"./transform":53,espree:58,"npm-run":91,rocambole:118}],7:[function(require,module,exports){"use strict";exports.ArrayExpression=require("./hooks/ArrayExpression");exports.ArrayPattern=require("./hooks/ArrayPattern");exports.ArrowFunctionExpression=require("./hooks/ArrowFunctionExpression");exports.AssignmentExpression=require("./hooks/AssignmentExpression");exports.BinaryExpression=require("./hooks/BinaryExpression");exports.CallExpression=exports.NewExpression=require("./hooks/CallExpression");exports.CatchClause=require("./hooks/CatchClause");exports.ClassDeclaration=require("./hooks/ClassDeclaration");exports.ConditionalExpression=require("./hooks/ConditionalExpression");exports.DoWhileStatement=require("./hooks/DoWhileStatement");exports.ExportAllDeclaration=require("./hooks/ExportAllDeclaration");exports.ExportDefaultDeclaration=require("./hooks/ExportDefaultDeclaration");exports.ExportNamedDeclaration=require("./hooks/ExportNamedDeclaration");exports.ExportSpecifier=require("./hooks/ExportSpecifier");exports.ForInStatement=require("./hooks/ForInStatement");exports.ForStatement=require("./hooks/ForStatement");exports.FunctionDeclaration=require("./hooks/FunctionDeclaration");exports.FunctionExpression=require("./hooks/FunctionExpression");exports.IfStatement=require("./hooks/IfStatement");exports.ImportDeclaration=require("./hooks/ImportDeclaration");exports.ImportSpecifier=require("./hooks/ImportSpecifier");exports.LogicalExpression=require("./hooks/LogicalExpression");exports.MemberExpression=require("./hooks/MemberExpression");exports.MethodDefinition=require("./hooks/MethodDefinition");exports.ObjectExpression=require("./hooks/ObjectExpression");exports.ObjectPattern=require("./hooks/ObjectPattern");exports.ReturnStatement=require("./hooks/ReturnStatement");exports.SequenceExpression=require("./hooks/SequenceExpression");exports.SwitchStatement=require("./hooks/SwitchStatement");exports.SwitchCase=require("./hooks/SwitchCase");exports.ThrowStatement=require("./hooks/ThrowStatement");exports.TryStatement=require("./hooks/TryStatement");exports.UnaryExpression=require("./hooks/UnaryExpression");exports.UpdateExpression=require("./hooks/UpdateExpression");exports.VariableDeclaration=require("./hooks/VariableDeclaration");exports.WhileStatement=require("./hooks/WhileStatement")},{"./hooks/ArrayExpression":8,"./hooks/ArrayPattern":9,"./hooks/ArrowFunctionExpression":10,"./hooks/AssignmentExpression":11,"./hooks/BinaryExpression":12,"./hooks/CallExpression":13,"./hooks/CatchClause":14,"./hooks/ClassDeclaration":15,"./hooks/ConditionalExpression":16,"./hooks/DoWhileStatement":17,"./hooks/ExportAllDeclaration":18,"./hooks/ExportDefaultDeclaration":19,"./hooks/ExportNamedDeclaration":20,"./hooks/ExportSpecifier":21,"./hooks/ForInStatement":22,"./hooks/ForStatement":23,"./hooks/FunctionDeclaration":24,"./hooks/FunctionExpression":25,"./hooks/IfStatement":26,"./hooks/ImportDeclaration":27,"./hooks/ImportSpecifier":28,"./hooks/LogicalExpression":29,"./hooks/MemberExpression":30,"./hooks/MethodDefinition":31,"./hooks/ObjectExpression":32,"./hooks/ObjectPattern":33,"./hooks/ReturnStatement":35,"./hooks/SequenceExpression":36,"./hooks/SwitchCase":37,"./hooks/SwitchStatement":38,"./hooks/ThrowStatement":39,"./hooks/TryStatement":40,"./hooks/UnaryExpression":41,"./hooks/UpdateExpression":42,"./hooks/VariableDeclaration":43,"./hooks/WhileStatement":44}],8:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function ArrayExpression(node){if(node.elements.length){_limit.around(node.startToken,"ArrayExpressionOpening");_limit.around(node.endToken,"ArrayExpressionClosing");node.elements.forEach(function(el){if(!el)return;var prev=_tk.findPrevNonEmpty(el.startToken);if(prev.value===","){_limit.around(prev,"ArrayExpressionComma")}})}else{_limit.after(node.startToken,0)}};exports.getIndentEdges=function(node){var start;var prev=node.startToken;node.elements.some(function(el,i,els){if(i){var prevEl=els[i-1];prev=prevEl?prevEl.endToken:_tk.findNextNonEmpty(prev)}var next=el?el.startToken:_tk.findNextNonEmpty(prev);if(_tk.findInBetween(prev,next,_tk.isBr)){start=prev;return true}});var end=node.endToken.prev;var sibling=_tk.findPrevNonEmpty(node.endToken);if(!_tk.findInBetween(sibling,node.endToken,_tk.isBr)){end=node.endToken}return start?{startToken:start,endToken:end}:false}},{"../limit":47,"rocambole-token":107}],9:[function(require,module,exports){"use strict";var limit=require("../limit");var tk=require("rocambole-token");exports.format=function ArrayPattern(node){limit.around(node.startToken,"ArrayPatternOpening");limit.around(node.endToken,"ArrayPatternClosing");node.elements.forEach(function(el){var comma=tk.findNext(el.endToken,[",","]"]);if(comma.value===","){limit.around(comma,"ArrayPatternComma")}})}},{"../limit":47,"rocambole-token":107}],10:[function(require,module,exports){"use strict";var tk=require("rocambole-token");var limit=require("../limit");var _params=require("./Params");exports.format=function ArrowFunctionExpression(node){var body=node.body;if(body.type==="BlockStatement"){limit.around(body.startToken,"ArrowFunctionExpressionOpeningBrace");limit.around(body.endToken,"ArrowFunctionExpressionClosingBrace")}var arrow=tk.findPrev(body.startToken,"=>");limit.around(arrow,"ArrowFunctionExpressionArrow");if(shouldHandleParams(node)){_params.format(node)}};exports.getIndentEdges=function(node,opts){var edges=[node.body];if(shouldHandleParams(node)){edges.push(_params.getIndentEdges(node,opts))}return edges};function shouldHandleParams(node){var arrow=tk.findPrev(node.body.startToken,"=>");return tk.findPrevNonEmpty(arrow).value===")"}},{"../limit":47,"./Params":34,"rocambole-token":107}],11:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _br=require("rocambole-linebreak");exports.format=function AssignmentExpression(node){var operator=_tk.findNext(node.left.endToken,node.operator);_br.limit(operator,"AssignmentOperator");_ws.limit(operator,"AssignmentOperator")};exports.getIndentEdges=function(node,opts){var operator=_tk.findNext(node.left.endToken,node.operator);if(_tk.findInBetween(operator,node.right.startToken,_tk.isBr)||opts["AssignmentExpression."+node.right.type]&&_tk.findInBetween(operator,node.right.endToken,_tk.isBr)){return{startToken:operator,endToken:node.endToken.type!=="Punctuator"?node.endToken.next:node.endToken}}}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],12:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function BinaryExpression(node){var operator=_tk.findNext(node.left.endToken,node.operator);_ws.limit(operator,"BinaryExpressionOperator")};exports.getIndentEdges=function(node){if(node.parent.type==="BinaryExpression"){return}return{startToken:node.startToken.next,endToken:node.endToken.next||node.endToken}}},{"rocambole-token":107,"rocambole-whitespace":116}],13:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _br=require("rocambole-linebreak");var _ws=require("rocambole-whitespace");var _limit=require("../limit");var _parens=require("./expressionParentheses");exports.format=function CallExpression(node){var openingParentheses=_tk.findNext(node.callee.endToken,_tk.isCode);var closingParentheses=node.endToken;var hasParentheses=closingParentheses.value===")";if(node.type==="NewExpression"){_br.limitAfter(node.startToken,0);_ws.limitAfter(node.startToken,1)}if(hasParentheses){_limit.around(openingParentheses,"CallExpressionOpeningParentheses");_limit.around(closingParentheses,"CallExpressionClosingParentheses")}var args=node["arguments"];if(args.length){_limit.before(_tk.findNextNonEmpty(openingParentheses),"ArgumentList");args.forEach(function(arg){var next=_tk.findInBetween(arg.endToken,closingParentheses,",");if(next&&next.value===","){_limit.around(next,"ArgumentComma")}});_limit.after(_tk.findPrevNonEmpty(closingParentheses),"ArgumentList")}else if(hasParentheses){_limit.after(openingParentheses,0);_limit.before(closingParentheses,0)}if(node.callee.type!=="FunctionExpression"){return}var parens=_parens.getParentheses({type:"Special",startToken:node.startToken,endToken:node.endToken});if(parens){_limit.after(parens.opening,"IIFEOpeningParentheses");_limit.before(parens.closing,"IIFEClosingParentheses")}};exports.getIndentEdges=function(node,opts){var openingParentheses=_tk.findNext(node.callee.endToken,_tk.isCode);if(openingParentheses.value!=="(")return;if(!node.arguments.length){return{startToken:openingParentheses,endToken:_tk.findNext(openingParentheses,")")}}var start;function hasBr(start,end){return _tk.findInBetween(start,end,_tk.isBr)}node.arguments.some(function(arg,i,args){var prev=i?args[i-1].endToken.next:openingParentheses;if(hasBr(prev,arg.startToken)){start=prev;return true}});if(!start){node.arguments.some(function(arg){if(opts["CallExpression."+arg.type]&&hasBr(arg.startToken,arg.endToken)){start=arg.startToken.next;return true}})}return start?{startToken:start,endToken:node.endToken}:false}},{"../limit":47,"./expressionParentheses":45,"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],14:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function CatchClause(node){_limit.around(node.startToken,"CatchKeyword");_limit.before(node.param.startToken,"CatchParameterList");_limit.after(node.param.endToken,"CatchParameterList");_limit.around(node.body.startToken,"CatchOpeningBrace");_limit.around(node.body.endToken,"CatchClosingBrace");if(!node.body.body.length&&!containsCommentsInside(node.body)){_tk.removeEmptyInBetween(node.body.startToken,node.body.endToken)}};function containsCommentsInside(node){return!!_tk.findInBetween(node.startToken,node.endToken,_tk.isComment)}exports.getIndentEdges=function(node){return node.body}},{"../limit":47,"rocambole-token":107}],15:[function(require,module,exports){"use strict";var tk=require("rocambole-token");var ws=require("rocambole-whitespace");var br=require("rocambole-linebreak");var limit=require("../limit");exports.format=function ClassDeclaration(node){var opening=tk.findNext(node.startToken,"{");var closing=node.endToken;limitInBetweenKeywords(node.startToken,opening);limit.around(opening,"ClassDeclarationOpeningBrace");limit.around(closing,"ClassDeclarationClosingBrace")};function limitInBetweenKeywords(start,end){var token=start;while(token&&token!==end){if(!tk.isEmpty(token)){br.limitAfter(token,0);ws.limitAfter(token,1)}token=token.next}}exports.getIndentEdges=function(node){return node}},{"../limit":47,"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],16:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ConditionalExpression(node){var questionMark=_tk.findNext(node.test.endToken,"?");var colon=_tk.findNext(node.consequent.endToken,":");_ws.limitBefore(questionMark,_ws.expectedAfter("ConditionalExpressionTest"));_ws.limitAfter(questionMark,_ws.expectedBefore("ConditionalExpressionConsequent"));_ws.limitBefore(colon,_ws.expectedAfter("ConditionalExpressionConsequent"));_ws.limitAfter(colon,_ws.expectedBefore("ConditionalExpressionAlternate"))};exports.getIndentEdges=function(node){if(_tk.findInBetween(node.test.endToken,node.consequent.startToken,_tk.isBr)){return{startToken:node.test.endToken.next,endToken:node.endToken.next}}if(_tk.findInBetween(node.consequent.endToken,node.alternate.startToken,_tk.isBr)){return{startToken:node.consequent.endToken.next,endToken:node.endToken.next}}}},{"rocambole-token":107,"rocambole-whitespace":116}],17:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");var _ws=require("rocambole-whitespace");exports.format=function DoWhileStatement(node){if(node.body.type==="BlockStatement"){_limit.around(node.body.startToken,"DoWhileStatementOpeningBrace");_limit.around(node.body.endToken,"DoWhileStatementClosingBrace")}else{_ws.limitAfter(node.startToken,1)}var whileKeyword=_tk.findPrev(node.test.startToken,"while");_ws.limit(whileKeyword,1)};exports.getIndentEdges=function(node){return[{startToken:node.startToken.next,endToken:node.body.endToken},{startToken:_tk.findNext(node.body.endToken,"("),endToken:_tk.findPrev(node.endToken,")")}]}},{"../limit":47,"rocambole-token":107,"rocambole-whitespace":116}],18:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ExportAllDeclaration(node){var star=_tk.findNext(node.startToken,"*");_br.limit(star,0);_ws.limit(star,1);var fromKeyword=_tk.findNext(node.startToken,"from");_br.limit(fromKeyword,0);_ws.limit(fromKeyword,1)}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],19:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ExportDefaultDeclaration(node){var def=_tk.findNext(node.startToken,"default");_br.limit(def,0);_ws.limit(def,1)}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],20:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ExportNamedDeclaration(node){_br.limitAfter(node.startToken,0);_ws.limitAfter(node.startToken,1);if(!node.specifiers.length)return;var fromKeyword=_tk.findPrev(node.endToken,"from");if(fromKeyword){_br.limit(fromKeyword,0);_ws.limit(fromKeyword,1)}}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],21:[function(require,module,exports){"use strict";module.exports=require("./ImportSpecifier")},{"./ImportSpecifier":28}],22:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ForInStatement(node){var expressionStart=_tk.findNext(node.startToken,"(");var expressionEnd=_tk.findPrev(node.body.startToken,")");_br.limit(expressionStart,"ForInStatementExpressionOpening");_ws.limit(expressionStart,"ForInStatementExpressionOpening");_br.limit(expressionEnd,"ForInStatementExpressionClosing");_ws.limit(expressionEnd,"ForInStatementExpressionClosing");if(node.body.type==="BlockStatement"&&node.body.body.length){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_br.limit(bodyStart,"ForInStatementOpeningBrace");_ws.limit(bodyStart,"ForInStatementOpeningBrace");_br.limit(bodyEnd,"ForInStatementClosingBrace");_ws.limit(bodyEnd,"ForInStatementClosingBrace");_ws.limitAfter(expressionEnd,"ForInStatementExpression")}_ws.limitAfter(node.left.endToken,1);_ws.limitBefore(node.right.startToken,1)};exports.getIndentEdges=function(node){var edges=[];edges.push({startToken:node.left.startToken,endToken:node.right.endToken});if(node.body.type==="BlockStatement"){edges.push(node.body)}else{edges.push({startToken:_tk.findNext(node.right.endToken,")").next,endToken:node.endToken})}return edges}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],23:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");exports.format=function ForStatement(node){var semi_1=_tk.findNext(node.startToken,";");var semi_2=_tk.findPrev(node.body.startToken,";");_ws.limit(semi_1,"ForStatementSemicolon");_ws.limit(semi_2,"ForStatementSemicolon");var expressionStart=_tk.findNext(node.startToken,"(");var expressionEnd=_tk.findPrev(node.body.startToken,")");_limit.around(expressionStart,"ForStatementExpressionOpening");_limit.around(expressionEnd,"ForStatementExpressionClosing");if(node.body.type==="BlockStatement"){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_limit.around(bodyStart,"ForStatementOpeningBrace");_limit.around(bodyEnd,"ForStatementClosingBrace")}};exports.getIndentEdges=function(node){var edges=[];var args={startToken:_tk.findNext(node.startToken,"("),endToken:_tk.findPrev(node.body.startToken,")")};edges.push(args);if(node.body.type==="BlockStatement"){edges.push(node.body)}else{edges.push({startToken:args.endToken,endToken:node.endToken})}return edges}},{"../limit":47,"rocambole-token":107,"rocambole-whitespace":116}],24:[function(require,module,exports){"use strict";var _limit=require("../limit");var _params=require("./Params");exports.format=function FunctionDeclaration(node){if(node.id){_limit.around(node.id.startToken,"FunctionName")}_params.format(node);_limit.around(node.body.startToken,"FunctionDeclarationOpeningBrace");_limit.around(node.body.endToken,"FunctionDeclarationClosingBrace")};exports.getIndentEdges=function(node,opts){return[_params.getIndentEdges(node,opts),node.body]}},{"../limit":47,"./Params":34}],25:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _params=require("./Params");var _limit=require("../limit");exports.format=function FunctionExpression(node){_limit.around(node.body.startToken,"FunctionExpressionOpeningBrace");_limit.around(node.endToken,"FunctionExpressionClosingBrace");if(node.id){_ws.limit(node.id.startToken,"FunctionName")}else{_ws.limit(node.startToken,"FunctionReservedWord")}if(_tk.isWs(node.endToken.next)&&_tk.isSemiColon(node.endToken.next.next)){_tk.remove(node.endToken.next)}if(node.parent.type==="CallExpression"){_ws.limitAfter(node.endToken,0)}var bodyFirstNonEmpty=_tk.findNextNonEmpty(node.body.startToken);if(bodyFirstNonEmpty.value==="}"){_limit.after(node.body.startToken,0)}_params.format(node)};exports.getIndentEdges=function(node,opts){var params=_params.getIndentEdges(node,opts);if(!opts.TopLevelFunctionBlock&&isTopLevelFunctionBlock(node)){return params}return[params,{startToken:node.body.startToken,endToken:_tk.findPrevNonEmpty(node.body.endToken).next}]};function isTopLevelFunctionBlock(node){return!(node.params.length===1&&node.params[0].name==="factory")&&(isOfType(node.parent,"CallExpression")||isOfType(node.parent,"AssignmentExpression"))&&!isOfType(node.parent.callee,"MemberExpression")&&isOfType(node.parent.parent,"ExpressionStatement")&&isOfType(node.parent.parent.parent,"Program")}function isOfType(node,type){return node&&node.type===type}},{"../limit":47,"./Params":34,"rocambole-token":107,"rocambole-whitespace":116}],26:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");exports.format=function IfStatement(node){var startBody=node.consequent.startToken;var endBody=node.consequent.endToken;var conditionalStart=_tk.findPrev(node.test.startToken,"(");var conditionalEnd=_tk.findNext(node.test.endToken,")");_ws.limit(conditionalStart,"IfStatementConditionalOpening");_ws.limit(conditionalEnd,"IfStatementConditionalClosing");var alt=node.alternate;if(alt){var elseKeyword=_tk.findPrev(alt.startToken,"else");if(alt.type==="IfStatement"){_br.limitBefore(alt.startToken,0);_ws.limitBefore(alt.startToken,1);if(alt.consequent.type==="BlockStatement"){_br.limitBefore(alt.consequent.startToken,"ElseIfStatementOpeningBrace");_br.limitBefore(alt.consequent.endToken,"ElseIfStatementClosingBrace")}_br.limitBefore(elseKeyword,"ElseIfStatement");if(!alt.alternate){_br.limitAfter(alt.consequent.endToken,"ElseIfStatement")}}else if(alt.type==="BlockStatement"){_limit.around(alt.startToken,"ElseStatementOpeningBrace");_br.limitBefore(elseKeyword,"ElseStatement");_br.limitAfter(alt.endToken,"ElseStatement");_ws.limitBefore(elseKeyword,1);_limit.around(alt.endToken,"ElseStatementClosingBrace")}else{_ws.limitAfter(elseKeyword,1)}}if(node.consequent.type==="BlockStatement"){_limit.around(startBody,"IfStatementOpeningBrace");if(!alt){_br.limit(endBody,"IfStatementClosingBrace")}else{_br.limitBefore(endBody,"IfStatementClosingBrace")}_ws.limit(endBody,"IfStatementClosingBrace")}};exports.getIndentEdges=function(node,opts){var edges=[];var test=node.test;var consequent=node.consequent;var alt=node.alternate;edges.push({level:opts.IfStatementConditional,startToken:_tk.findNext(node.startToken,"("),endToken:_tk.findPrev(consequent.startToken,")")});function isExecutable(token){return _tk.isNotEmpty(token)&&!_tk.isComment(token)}edges.push({startToken:consequent.type==="BlockStatement"?consequent.startToken:test.endToken.next,endToken:alt&&_tk.isComment(_tk.findPrevNonEmpty(consequent.endToken))?_tk.findPrev(consequent.endToken,isExecutable).next:consequent.endToken});if(alt&&alt.type!=="IfStatement"){edges.push({startToken:alt.type==="BlockStatement"?alt.startToken:_tk.findPrevNonEmpty(alt.startToken).next,endToken:alt.endToken})}return edges}},{"../limit":47,"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],27:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function ImportDeclaration(node){_br.limitAfter(node.startToken,0);_ws.limitAfter(node.startToken,1);if(!node.specifiers.length)return;var fromKeyword=_tk.findPrev(node.endToken,"from");_br.limit(fromKeyword,0);_ws.limit(fromKeyword,1)}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],28:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function(node){var braceStart=_tk.findPrev(node.startToken,_tk.isCode);var braceEnd=_tk.findNext(node.endToken,_tk.isCode);if(braceStart.value==="{"||braceStart.value===","){_br.limit(braceStart,0);_ws.limitBefore(braceStart,braceStart.value==="{"?1:0);_ws.limitAfter(braceStart,1)}if(braceEnd.value==="}"||braceEnd.value===","){_br.limit(braceEnd,0);var next=_tk.findNextNonEmpty(braceEnd);_ws.limitAfter(braceEnd,next.value===";"?0:1);_ws.limitBefore(braceEnd,braceEnd.value==="}"?1:0)}_br.limit(node.startToken,0);_br.limit(node.endToken,0);if(node.startToken!==node.endToken){_ws.limitAfter(node.startToken,1);_ws.limitBefore(node.endToken,1)}}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],29:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function LogicalExpression(node){var operator=_tk.findNext(node.left.endToken,node.operator);_ws.limit(operator,"LogicalExpressionOperator");if(node.parent.type==="ExpressionStatement"){var prev=_tk.findPrevNonEmpty(node.left.startToken);if(prev&&prev.value==="("){_br.limit(prev,"ExpressionOpeningParentheses");_ws.limit(prev,"ExpressionOpeningParentheses");node.startToken=prev}var next=_tk.findNextNonEmpty(node.right.endToken);if(next&&next.value===")"){_br.limit(next,"ExpressionClosingParentheses");_ws.limit(next,"ExpressionClosingParentheses");node.endToken=next}}}},{"rocambole-linebreak":105,
"rocambole-token":107,"rocambole-whitespace":116}],30:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function MemberExpression(node){var opening=_tk.findPrevNonEmpty(node.property.startToken),closing=_tk.findNextNonEmpty(node.property.endToken);if(opening&&closing&&opening.value==="["&&closing.value==="]"){_ws.limitAfter(opening,"MemberExpressionOpening");_ws.limitBefore(closing,"MemberExpressionClosing")}};exports.getIndentEdges=function(node){var edge={};edge.startToken=node.object.endToken;if(node.object.type!=="CallExpression"){edge.startToken=edge.startToken.next}edge.endToken=node.endToken;if(node.parent.type==="CallExpression"&&node.parent.callee.type==="MemberExpression"){edge.endToken=node.parent.endToken}if(!_tk.findInBetween(edge.startToken,node.property.startToken,_tk.isBr)){return false}return edge}},{"rocambole-token":107,"rocambole-whitespace":116}],31:[function(require,module,exports){"use strict";var ws=require("rocambole-whitespace");var br=require("rocambole-linebreak");exports.format=function MethodDefinition(node){br.limitAfter(node.startToken,0);if(node.startToken!==node.key){ws.limitAfter(node.startToken,1)}ws.limitAfter(node.key.endToken,0)}},{"rocambole-linebreak":105,"rocambole-whitespace":116}],32:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var _limit=require("../limit");exports.format=function ObjectExpression(node){if(!node.properties.length)return;var shouldBeSingleLine=node.parent.type==="ForInStatement";if(!shouldBeSingleLine){_limit.around(node.startToken,"ObjectExpressionOpeningBrace")}else{_tk.removeEmptyInBetween(node.startToken,node.endToken)}node.properties.forEach(function(prop){var valueStart=getValueStart(prop);var valueEnd=getValueEnd(prop);var keyStart=getKeyStart(prop);var keyEnd=getKeyEnd(prop);var comma=_tk.findNext(valueEnd,[",","}"]);if(_tk.isComma(comma)){_tk.removeInBetween(valueEnd,comma,_tk.isBr);_tk.remove(comma);_tk.after(valueEnd,comma)}if(!shouldBeSingleLine){_br.limitBefore(keyStart,"PropertyName");_br.limitAfter(keyEnd,"PropertyName");if(valueStart){_br.limitBefore(valueStart,"PropertyValue");_br.limitAfter(valueEnd,"PropertyValue")}}else if(keyStart.prev.value!=="{"){_ws.limitBefore(keyStart,"Property")}if(prop.kind==="get"||prop.kind==="set"){_ws.limitBefore(keyStart,1);_ws.limitAfter(keyEnd,0);return}_ws.limitBefore(keyStart,"PropertyName");_ws.limitAfter(keyEnd,"PropertyName");if(valueStart){_ws.limitBefore(valueStart,"PropertyValue");_ws.limitAfter(valueEnd,"PropertyValue")}});if(!shouldBeSingleLine){_limit.around(node.endToken,"ObjectExpressionClosingBrace")}};function getKeyStart(prop){var start=prop.key.startToken;start=_tk.findPrev(start,["{",","]);return _tk.findNext(start,_tk.isCode)}function getKeyEnd(prop){var end=prop.key.endToken;end=_tk.findNext(end,[":","(",",","}"]);return _tk.findPrev(end,_tk.isCode)}function getValueStart(prop){if(prop.key.startToken===prop.value.startToken){return null}var start=prop.value.startToken;return prop.kind==="get"||prop.kind==="set"?start:_tk.findNext(_tk.findPrev(start,":"),_tk.isCode)}function getValueEnd(prop){if(prop.key.startToken===prop.value.startToken){return null}var end=_tk.findNext(prop.value.endToken,[",","}"]);return _tk.findPrev(end,_tk.isCode)}exports.getIndentEdges=function(node,opts){var edges=[{startToken:node.startToken,endToken:_tk.findInBetweenFromEnd(node.startToken,node.endToken,_tk.isBr)}];node.properties.forEach(function(property){if(!opts["ObjectExpression."+property.value.type])return;edges.push({startToken:getValueStart(property),endToken:getValueEnd(property)})});return edges}},{"../limit":47,"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],33:[function(require,module,exports){"use strict";var limit=require("../limit");var tk=require("rocambole-token");exports.format=function ObjectPattern(node){limit.around(node.startToken,"ObjectPatternOpeningBrace");limit.around(node.endToken,"ObjectPatternClosingBrace");node.properties.forEach(function(prop){var comma=tk.findNext(prop.endToken,[",","}"]);if(comma.value===","){limit.around(comma,"ObjectPatternComma")}})}},{"../limit":47,"rocambole-token":107}],34:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function Params(node){var params=node.params;var defaults=node.defaults;var opening=node.startToken.value==="("?node.startToken:_tk.findNext(node.startToken,"(");var closing=_tk.findPrev(node.body.startToken,")");if(params.length){_ws.limitBefore(_tk.findNextNonEmpty(opening),"ParameterList");params.forEach(function(param,i){if(i===params.length-1)return;_ws.limit(_tk.findNext(param.startToken,","),"ParameterComma")});defaults.forEach(function(init){if(init){_limit.around(_tk.findPrev(init.startToken,"="),"ParameterDefault")}});_ws.limitAfter(_tk.findPrevNonEmpty(closing),"ParameterList")}else{_limit.after(opening,0)}};exports.getIndentEdges=function(node,opts){var params=node.params;if(params.length&&opts.ParameterList){var start=node.parent.type==="Property"?node.parent.startToken:node.startToken;return{startToken:start.value==="("?start:_tk.findNext(start,"("),endToken:_tk.findPrev(node.body.startToken,")"),level:opts.ParameterList}}return null}},{"../limit":47,"rocambole-token":107,"rocambole-whitespace":116}],35:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var expressionParentheses=require("./expressionParentheses");exports.format=function ReturnStatement(node){var nonEmpty=_tk.findInBetween(node.startToken.next,node.endToken,_tk.isNotEmpty);if(nonEmpty)_tk.removeEmptyInBetween(node.startToken,nonEmpty);_ws.limitAfter(node.startToken,1);if(_tk.isSemiColon(node.endToken)){_tk.removeEmptyInBetween(_tk.findPrevNonEmpty(node.endToken),node.endToken)}if(node.argument){expressionParentheses.addSpaceInside(node.argument)}};var _specialArguments={BinaryExpression:true};exports.getIndentEdges=function(node,opts){if(!node.argument||opts[node.argument.type]&&!_specialArguments[node.argument.type]){return false}var parentheses=expressionParentheses.getParentheses(node.argument);return parentheses?{startToken:parentheses.opening,endToken:parentheses.closing}:{startToken:node.startToken.next,endToken:node.endToken}}},{"./expressionParentheses":45,"rocambole-token":107,"rocambole-whitespace":116}],36:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");exports.format=function SequenceExpression(node){node.expressions.forEach(function(expr,i){if(i){var operator=expr.startToken.prev;while(operator.value!==","){operator=operator.prev}_ws.limit(operator,"CommaOperator")}})}},{"rocambole-whitespace":116}],37:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var limit=require("../limit");exports.format=function SwitchCase(node){if(node.test){_br.limitBefore(node.test.startToken,0);_ws.limitBefore(node.test.startToken,1)}var endToken=node.endToken;if(endToken.value!==":"){var breakKeyword=_tk.findPrev(endToken.next,"break");if(breakKeyword){limit.before(breakKeyword,"BreakKeyword");limit.after(endToken,"BreakKeyword")}}};exports.getIndentEdges=function(node){return{startToken:node.startToken,endToken:_tk.findNext(node.endToken,["}","case","break","default"]).prev}}},{"../limit":47,"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],38:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function SwitchStatement(node){var opening=_tk.findPrev(node.discriminant.startToken,"(");var closing=_tk.findNext(node.discriminant.endToken,")");var openingBrace=_tk.findNext(closing,"{");var closingBrace=node.endToken;_limit.around(openingBrace,"SwitchOpeningBrace");_limit.around(closingBrace,"SwitchClosingBrace");_limit.around(opening,"SwitchDiscriminantOpening");_limit.around(closing,"SwitchDiscriminantClosing")};exports.getIndentEdges=function(node){return{startToken:_tk.findNext(node.discriminant.endToken,"{"),endToken:node.endToken}}},{"../limit":47,"rocambole-token":107}],39:[function(require,module,exports){"use strict";var _ws=require("rocambole-whitespace");exports.format=function ThrowStatement(node){_ws.limit(node.startToken,"ThrowKeyword")}},{"rocambole-whitespace":116}],40:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function TryStatement(node){var finalizer=node.finalizer;if(finalizer){var finallyKeyword=_tk.findPrev(finalizer.startToken,"finally");_limit.around(finallyKeyword,"FinallyKeyword");_limit.around(finalizer.startToken,"FinallyOpeningBrace");_limit.around(finalizer.endToken,"FinallyClosingBrace");if(!finalizer.body.length&&!containsCommentsInside(finalizer)){_tk.removeEmptyInBetween(finalizer.startToken,finalizer.endToken)}}_limit.around(node.startToken,"TryKeyword");_limit.around(node.block.startToken,"TryOpeningBrace");_limit.around(node.block.endToken,"TryClosingBrace")};function containsCommentsInside(node){return!!_tk.findInBetween(node.startToken,node.endToken,_tk.isComment)}exports.getIndentEdges=function(node){var edges=[node.block];if(node.finalizer){edges.push(node.finalizer)}return edges}},{"../limit":47,"rocambole-token":107}],41:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function UnaryExpression(node){if(node.operator==="delete"){_ws.limitAfter(node.startToken,1);_br.limitBefore(node.startToken,"DeleteOperator");var endToken=node.endToken;if(_tk.isSemiColon(endToken.next)){endToken=endToken.next}_br.limitAfter(endToken,"DeleteOperator")}else if(node.operator==="typeof"||node.operator==="void"){_ws.limitAfter(node.startToken,1)}else{_ws.limit(node.startToken,"UnaryExpressionOperator")}}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],42:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");exports.format=function UpdateExpression(node){_tk.removeEmptyInBetween(node.startToken,node.endToken)}},{"rocambole-token":107}],43:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");exports.format=function VariableDeclaration(node){var insideFor=node.parent.type==="ForStatement";node.declarations.forEach(function(declarator,i){var idStartToken=declarator.id.startToken;var prevNonEmpty=_tk.findPrevNonEmpty(idStartToken);if(i&&prevNonEmpty.value===","){if(_tk.isBr(prevNonEmpty.prev)||_tk.isBr(prevNonEmpty.prev.prev)){var beforeComma=_tk.findPrev(prevNonEmpty,function(t){return!_tk.isEmpty(t)&&!_tk.isComment(t)});_ws.limit(prevNonEmpty,0);_tk.remove(prevNonEmpty);_tk.after(beforeComma,prevNonEmpty)}}if(!i&&!_tk.isComment(_tk.findPrevNonEmpty(idStartToken))){_tk.removeEmptyAdjacentBefore(idStartToken)}else if(!insideFor&&declarator.init){_br.limit(idStartToken,"VariableName")}_ws.limitBefore(idStartToken,"VariableName");if(declarator.init){_ws.limitAfter(declarator.id.endToken,"VariableName");var equalSign=_tk.findNext(declarator.id.endToken,"=");var valueStart=_tk.findNextNonEmpty(equalSign);_br.limitBefore(valueStart,"VariableValue");_ws.limitBefore(valueStart,"VariableValue");_br.limitAfter(declarator.endToken,"VariableValue");_ws.limitAfter(declarator.endToken,"VariableValue")}});_ws.limitAfter(node.startToken,1)};exports.getIndentEdges=function(node,opts){var edges=[];if(opts.MultipleVariableDeclaration&&node.declarations.length>1){edges.push(node)}node.declarations.forEach(function(declaration){var init=declaration.init;if(init&&opts["VariableDeclaration."+init.type]){var end=init.endToken.value===")"?_tk.findPrevNonEmpty(init.endToken):init.endToken.next;edges.push({startToken:init.startToken,endToken:end})}});return edges}},{"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],44:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _limit=require("../limit");exports.format=function WhileStatement(node){var conditionalStart=_tk.findNext(node.startToken,"(");var conditionalEnd=_tk.findPrev(node.body.startToken,")");_limit.around(conditionalStart,"WhileStatementConditionalOpening");if(node.body.type==="BlockStatement"){var bodyStart=node.body.startToken;var bodyEnd=node.body.endToken;_limit.around(bodyStart,"WhileStatementOpeningBrace");_limit.around(bodyEnd,"WhileStatementClosingBrace");_limit.around(conditionalEnd,"WhileStatementConditionalClosing")}else{var next=_tk.findNextNonEmpty(conditionalEnd);_limit.before(conditionalEnd,"WhileStatementConditionalClosing");if(_tk.isSemiColon(next)){_limit.after(conditionalEnd,0)}else{_limit.after(conditionalEnd,"WhileStatementConditionalClosing")}}};exports.getIndentEdges=function(node){var edges=[{startToken:_tk.findNext(node.startToken,"("),endToken:_tk.findPrev(node.body.startToken,")")}];if(node.body.type!=="EmptyStatement"){edges.push(node.body)}return edges}},{"../limit":47,"rocambole-token":107}],45:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var debug=require("debug")("esformatter:parentheses");exports.addSpaceInside=addSpaceInsideExpressionParentheses;function addSpaceInsideExpressionParentheses(node){var parentheses=getParentheses(node);if(parentheses){_ws.limitAfter(parentheses.opening,"ExpressionOpeningParentheses");_ws.limitBefore(parentheses.closing,"ExpressionClosingParentheses")}}exports.getParentheses=getParentheses;function getParentheses(node){if(!isValidExpression(node)){debug("not valid expression: %s",node.type);return}var opening=node.startToken;if(/^(?:Binary|Logical)Expression$/.test(node.type)||opening.value!=="("){opening=_tk.findPrevNonEmpty(opening)}if(!opening||opening.value!=="("){debug('opening is not a parentheses; type: %s, opening: "%s"',node.type,opening&&opening.value);return}var token=opening;var count=0;var closing;while(token){if(token.value==="("){count+=1}else if(token.value===")"){count-=1}if(count===0){closing=token;break}token=token.next}if(!closing){debug("not inside parentheses",count);return}debug('found parentheses; type: %s, opening: "%s", closing: "%s"',node.type,opening&&opening.value,closing&&closing.value);return{opening:opening,closing:closing}}var needExpressionParenthesesSpaces={Literal:true,CallExpression:false,FunctionExpression:false,ArrayExpression:false,ObjectExpression:false,Special:true};function isValidExpression(node){var needSpaces=needExpressionParenthesesSpaces[node.type];if(needSpaces){return true}if(needSpaces==null&&node.type.indexOf("Expression")!==-1){if(node.type==="ExpressionStatement"&&(node.expression.callee&&node.expression.callee.type==="FunctionExpression")){return false}return true}return false}},{debug:54,"rocambole-token":107,"rocambole-whitespace":116}],46:[function(require,module,exports){"use strict";var rocambole=require("rocambole");var indent=require("rocambole-indent");var debug=require("debug")("esformatter:indent");var hooks=require("./hooks");var _opts;var _specialTypes={VariableDeclaration:"MultipleVariableDeclaration"};exports.setOptions=setOptions;function setOptions(opts){_opts=opts;indent.setOptions(opts)}exports.transform=transform;function transform(ast){rocambole.walk(ast,transformNode);indent.sanitize(ast);if(_opts.alignComments){indent.alignComments(ast)}return ast}function transformNode(node){var indentLevel=getIndentLevel(node);if(indentLevel){var type=node.type;var edges;if(type in hooks&&hooks[type].getIndentEdges){edges=hooks[type].getIndentEdges(node,_opts);if(!edges){debug("[transformNode]: hook returned no edges");return}}else{edges=node}debug('[transformNode] type: %s, edges: "%s", "%s"',node.type,edges&&edges.startToken&&edges.startToken.value,edges&&edges.endToken&&edges.endToken.value);if(Array.isArray(edges)){edges.forEach(function(edge){if(!edge){return}indentEdge(edge,indentLevel)})}else{indentEdge(edges,indentLevel)}}}function indentEdge(edge,level){indent.inBetween(edge.startToken,edge.endToken,edge.level||level)}function getIndentLevel(node){var value=_opts[node.type];debug("[getIndentLevel] type: %s, value: %s",node.type,value);if(node.type in _specialTypes){value=value||_opts[_specialTypes[node.type]];debug("[specialNodeType] indent: %s",value)}return value}},{"./hooks":7,debug:54,rocambole:118,"rocambole-indent":100}],47:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _ws=require("rocambole-whitespace");exports.before=limitBefore;function limitBefore(token,typeOrValue){_br.limitBefore(token,typeOrValue);_ws.limitBefore(token,typeOrValue)}exports.after=limitAfter;function limitAfter(token,typeOrValue){_br.limitAfter(token,typeOrValue);_ws.limitAfter(token,typeOrValue)}exports.around=limitAround;function limitAround(token,typeOrValue){_br.limit(token,typeOrValue);_ws.limit(token,typeOrValue)}},{"rocambole-linebreak":105,"rocambole-whitespace":116}],48:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var _br=require("rocambole-linebreak");var debugAround=require("debug")("esformatter:br:around");module.exports=aroundNodeIfNeeded;function aroundNodeIfNeeded(node){var shouldLimit=shouldLimitLineBreakAroundNode(node);debugAround("[aroundNodeIfNeeded] type: %s, shouldLimit: %s, ",node.type,shouldLimit);if(!shouldLimit)return;var type=node.type;_br.limitBefore(node.startToken,type);if(_tk.isSemiColon(node.endToken)){_br.limitAfter(node.endToken,type)}}var CONTEXTUAL_LINE_BREAK={AssignmentExpression:1,ConditionalExpression:1,CallExpression:1,ExpressionStatement:1,SequenceExpression:1,LogicalExpression:1,VariableDeclaration:1};var BYPASS_CHILD_LINE_BREAK={CallExpression:1,DoWhileStatement:1,IfStatement:1,WhileStatement:1,ForStatement:1,ForInStatement:1,ReturnStatement:1,ThrowStatement:1};var CONTEXTUAL_LINE_BREAK_GREAT_PARENTS={Program:1,BlockStatement:1,IfStatement:1,FunctionExpression:1};function shouldLimitLineBreakAroundNode(node){if(node.parent){if(node.parent.prev&&node.parent.prev.type==="EmptyStatement"){return false}if(node.parent.type==="Program"){return true}if(isInsideIfTest(node)){return false}}if(!(node.type in CONTEXTUAL_LINE_BREAK)){return true}if(node.parent.type in BYPASS_CHILD_LINE_BREAK){return false}if(node.type==="CallExpression"&&node.callee.type==="FunctionExpression"){return false}var gp=node.parent.parent;if(gp&&gp.type in CONTEXTUAL_LINE_BREAK_GREAT_PARENTS){return true}return false}function isInsideIfTest(node){if(node.parent&&node.parent.type==="IfStatement"){return node===node.parent.test}var greatParent=node.parent&&node.parent.parent;return greatParent&&greatParent.type==="IfStatement"&&node.parent===greatParent.test}},{debug:54,"rocambole-linebreak":105,"rocambole-token":107}],49:[function(require,module,exports){(function(process){"use strict";var stripJsonComments=require("strip-json-comments");var fs=require("fs");var path=require("path");var _ws=require("rocambole-whitespace");var _br=require("rocambole-linebreak");var indent=require("./indent");var plugins=require("./plugins");var deepMixIn=require("mout/object/deepMixIn");var merge=require("mout/object/merge");var get=require("mout/object/get");var isObject=require("mout/lang/isObject");var userHome=require("user-home");var _curOpts;exports.presets={"default":require("./preset/default.json"),jquery:require("./preset/jquery.json")};exports.set=function(opts){var preset=opts&&opts.preset?opts.preset:"default";_curOpts=mergeOptions(preset,opts);if(_curOpts.indent&&"AlignComments"in _curOpts.indent){_curOpts.indent.alignComments=_curOpts.indent.AlignComments}_ws.setOptions(_curOpts.whiteSpace);_br.setOptions(_curOpts.lineBreak);indent.setOptions(_curOpts.indent);plugins.setOptions(_curOpts);if(opts){_curOpts=deepMixIn(_curOpts,opts)}};function mergeOptions(preset,opts){if(!(preset in exports.presets)){throw new Error('Invalid preset file "'+preset+'".')}var baseOpts=exports.presets[preset];if(baseOpts.preset){baseOpts=mergeOptions(baseOpts.preset,baseOpts)}return merge({},baseOpts,opts)}exports.get=function(prop){return prop?get(_curOpts,prop):_curOpts};exports.getRc=getRc;function getRc(filePath,customOptions){if(isTopLevel(customOptions)){return customOptions}if(isObject(filePath)){customOptions=filePath;filePath=null}var basedir=filePath?path.dirname(filePath):process.cwd();var cwd=process.cwd();var rc=findAndMergeConfigs(basedir);if(!rc&&basedir!==cwd){rc=findAndMergeConfigs(cwd)}return merge(rc||getGlobalConfig(),customOptions)}function findAndMergeConfigs(basedir){if(!basedir||!basedir.length)return;var configFiles=[".esformatter","package.json"];var config;configFiles.some(function(name){var filePath=path.join(basedir,name);if(!fs.existsSync(filePath))return;var cur=loadAndParseConfig(filePath);if(name==="package.json"){cur=cur.esformatter}if(!cur)return;config=config?merge(cur,config):cur;if(isTopLevel(config))return true});if(isTopLevel(config)){return config}var parentDir=path.resolve(basedir,"..");var parentConfig=parentDir&&parentDir!==basedir?findAndMergeConfigs(parentDir):{};return merge(parentConfig,config)}function isTopLevel(config){return config&&(config.root||config.preset)}function getGlobalConfig(){var file=path.join(userHome,".esformatter");return fs.existsSync(file)?loadAndParseConfig(file):{}}exports.loadAndParseConfig=loadAndParseConfig;function loadAndParseConfig(file){try{return JSON.parse(stripJsonComments(fs.readFileSync(file).toString()))}catch(e){throw new Error("Can't parse configuration file '"+file+"'. Exception: "+e.message)}}}).call(this,require("_process"))},{"./indent":46,"./plugins":50,"./preset/default.json":51,"./preset/jquery.json":52,_process:4,fs:1,"mout/lang/isObject":76,"mout/object/deepMixIn":82,"mout/object/get":85,"mout/object/merge":87,path:3,"rocambole-linebreak":105,"rocambole-whitespace":116,"strip-json-comments":119,"user-home":120}],50:[function(require,module,exports){"use strict";var partial=require("mout/function/partial");var remove=require("mout/array/remove");var _plugins=[];exports.register=register;function register(plugin){if(_plugins.indexOf(plugin)===-1){_plugins.push(plugin)}}exports.unregister=partial(remove,_plugins);exports.unregisterAll=unregisterAll;function unregisterAll(){_plugins=[]}exports.setOptions=function(opts){loadAndRegister(opts&&opts.plugins);exec("setOptions",opts)};exports.loadAndRegister=loadAndRegister;function loadAndRegister(ids){ids=ids||[];ids.forEach(function(id){var module;try{module=require(id)}catch(e){throw new Error("Error: Cannot find plugin '"+id+"'."+" Make sure "+"you used the correct name on the config file or run `npm install "+"--save-dev "+id+"` to add it as a project dependency.")}register(module)})}exportMethods(["tokenBefore","tokenAfter","nodeBefore","nodeAfter","transform","transformAfter","transformBefore"],exec);exportMethods(["stringBefore","stringAfter"],pipe);function exportMethods(arr,fn){arr.forEach(function(methodName){exports[methodName]=partial(fn,methodName)})}function exec(methodName){var args=Array.prototype.slice.call(arguments,1);_plugins.forEach(function(plugin){if(methodName in plugin){plugin[methodName].apply(plugin,args)}})}function pipe(methodName,input){return _plugins.reduce(function(output,plugin){return methodName in plugin?plugin[methodName](output):output},input)}},{"mout/array/remove":70,"mout/function/partial":72}],51:[function(require,module,exports){module.exports={esformatter:{allowShebang:true},indent:{value:" ",alignComments:true,ArrayExpression:1,ArrayPattern:1,ArrowFunctionExpression:1,AssignmentExpression:1,"AssignmentExpression.BinaryExpression":1,"AssignmentExpression.LogicalExpression":1,"AssignmentExpression.UnaryExpression":1,CallExpression:1,"CallExpression.BinaryExpression":1,"CallExpression.LogicalExpression":1,"CallExpression.UnaryExpression":1,CatchClause:1,ConditionalExpression:1,CommentInsideEmptyBlock:1,ClassDeclaration:1,DoWhileStatement:1,ForInStatement:1,ForStatement:1,FunctionDeclaration:1,FunctionExpression:1,IfStatement:1,MemberExpression:1,MultipleVariableDeclaration:1,NewExpression:1,ObjectExpression:1,"ObjectExpression.BinaryExpression":1,"ObjectExpression.LogicalExpression":1,"ObjectExpression.UnaryExpression":1,ObjectPattern:1,ParameterList:1,ReturnStatement:1,SwitchCase:1,SwitchStatement:1,TopLevelFunctionBlock:1,TryStatement:1,"VariableDeclaration.BinaryExpression":1,"VariableDeclaration.LogicalExpression":1,"VariableDeclaration.UnaryExpression":1,WhileStatement:1},lineBreak:{value:"\n",before:{AssignmentExpression:">=1",AssignmentOperator:0,ArrayPatternOpening:0,ArrayPatternClosing:0,ArrayPatternComma:0,ArrowFunctionExpressionArrow:0,ArrowFunctionExpressionOpeningBrace:0,ArrowFunctionExpressionClosingBrace:">=1",BlockStatement:0,BreakKeyword:">=1",CallExpression:-1,CallExpressionOpeningParentheses:0,CallExpressionClosingParentheses:-1,ClassDeclaration:">=1",ClassDeclarationOpeningBrace:0,ClassDeclarationClosingBrace:">=1",ConditionalExpression:">=1",CatchOpeningBrace:0,CatchClosingBrace:">=1",CatchKeyword:0,DeleteOperator:">=1",DoWhileStatement:">=1",DoWhileStatementOpeningBrace:0,DoWhileStatementClosingBrace:">=1",EndOfFile:-1,EmptyStatement:-1,FinallyKeyword:-1,FinallyOpeningBrace:0,FinallyClosingBrace:">=1",ForInStatement:">=1",ForInStatementExpressionOpening:0,ForInStatementExpressionClosing:0,ForInStatementOpeningBrace:0,ForInStatementClosingBrace:">=1",ForStatement:">=1",ForStatementExpressionOpening:0,ForStatementExpressionClosing:"<2",ForStatementOpeningBrace:0,ForStatementClosingBrace:">=1",FunctionExpression:-1,FunctionExpressionOpeningBrace:0,FunctionExpressionClosingBrace:">=1",FunctionDeclaration:">=1",FunctionDeclarationOpeningBrace:0,FunctionDeclarationClosingBrace:">=1",IIFEClosingParentheses:0,IfStatement:">=1",IfStatementOpeningBrace:0,IfStatementClosingBrace:">=1",ElseIfStatement:0,ElseIfStatementOpeningBrace:0,ElseIfStatementClosingBrace:">=1",ElseStatement:0,ElseStatementOpeningBrace:0,ElseStatementClosingBrace:">=1",LogicalExpression:-1,MethodDefinition:">=1",ObjectExpressionClosingBrace:">=1",ObjectPatternOpeningBrace:0,ObjectPatternClosingBrace:0,ObjectPatternComma:0,ParameterDefault:0,Property:">=1",PropertyValue:0,ReturnStatement:-1,SwitchOpeningBrace:0,SwitchClosingBrace:">=1",ThisExpression:-1,ThrowStatement:">=1",TryKeyword:-1,TryOpeningBrace:0,TryClosingBrace:">=1",VariableName:">=1",VariableValue:0,VariableDeclaration:">=1",VariableDeclarationWithoutInit:">=1",WhileStatement:">=1",WhileStatementOpeningBrace:0,WhileStatementClosingBrace:">=1"},after:{AssignmentExpression:">=1",AssignmentOperator:0,ArrayPatternOpening:0,ArrayPatternClosing:0,ArrayPatternComma:0,ArrowFunctionExpressionArrow:0,ArrowFunctionExpressionOpeningBrace:">=1",ArrowFunctionExpressionClosingBrace:-1,BlockStatement:0,BreakKeyword:-1,CallExpression:-1,CallExpressionOpeningParentheses:-1,CallExpressionClosingParentheses:-1,ClassDeclaration:">=1",ClassDeclarationOpeningBrace:">=1",ClassDeclarationClosingBrace:">=1",CatchOpeningBrace:">=1",CatchClosingBrace:">=0",CatchKeyword:0,ConditionalExpression:">=1",DeleteOperator:">=1",DoWhileStatement:">=1",DoWhileStatementOpeningBrace:">=1",DoWhileStatementClosingBrace:0,EmptyStatement:-1,FinallyKeyword:-1,FinallyOpeningBrace:">=1",FinallyClosingBrace:">=1",ForInStatement:">=1",ForInStatementExpressionOpening:"<2",ForInStatementExpressionClosing:-1,ForInStatementOpeningBrace:">=1",ForInStatementClosingBrace:">=1",ForStatement:">=1",ForStatementExpressionOpening:"<2",ForStatementExpressionClosing:-1,ForStatementOpeningBrace:">=1",ForStatementClosingBrace:">=1",FunctionExpression:">=1",FunctionExpressionOpeningBrace:">=1",FunctionExpressionClosingBrace:-1,FunctionDeclaration:">=1",FunctionDeclarationOpeningBrace:">=1",FunctionDeclarationClosingBrace:">=1",IIFEOpeningParentheses:0,IfStatement:">=1",IfStatementOpeningBrace:">=1",IfStatementClosingBrace:">=1",ElseIfStatement:">=1",ElseIfStatementOpeningBrace:">=1",ElseIfStatementClosingBrace:">=1",ElseStatement:">=1",ElseStatementOpeningBrace:">=1",ElseStatementClosingBrace:">=1",LogicalExpression:-1,MethodDefinition:">=1",ObjectExpressionOpeningBrace:">=1",ObjectPatternOpeningBrace:0,ObjectPatternClosingBrace:0,ObjectPatternComma:0,ParameterDefault:0,Property:0,PropertyName:0,ReturnStatement:-1,SwitchOpeningBrace:">=1",SwitchClosingBrace:">=1",ThisExpression:0,ThrowStatement:">=1",TryKeyword:-1,TryOpeningBrace:">=1",TryClosingBrace:0,VariableDeclaration:">=1",WhileStatement:">=1",WhileStatementOpeningBrace:">=1",WhileStatementClosingBrace:">=1"}},whiteSpace:{value:" ",removeTrailing:1,before:{ArrayExpressionOpening:0,ArrayExpressionClosing:0,ArrayExpressionComma:0,ArrayPatternOpening:1,ArrayPatternClosing:0,ArrayPatternComma:0,ArrowFunctionExpressionArrow:1,ArrowFunctionExpressionOpeningBrace:1,ArrowFunctionExpressionClosingBrace:0,ArgumentComma:0,ArgumentList:0,AssignmentOperator:1,BinaryExpression:0,BinaryExpressionOperator:1,BlockComment:1,CallExpression:-1,CallExpressionOpeningParentheses:0,CallExpressionClosingParentheses:-1,CatchParameterList:0,CatchOpeningBrace:1,CatchClosingBrace:1,CatchKeyword:1,CommaOperator:0,ClassDeclarationOpeningBrace:1,ClassDeclarationClosingBrace:1,ConditionalExpressionConsequent:1,ConditionalExpressionAlternate:1,DoWhileStatementOpeningBrace:1,DoWhileStatementClosingBrace:1,DoWhileStatementConditional:1,EmptyStatement:0,ExpressionClosingParentheses:0,FinallyKeyword:-1,FinallyOpeningBrace:1,FinallyClosingBrace:1,ForInStatement:1,ForInStatementExpressionOpening:1,ForInStatementExpressionClosing:0,ForInStatementOpeningBrace:1,ForInStatementClosingBrace:1,ForStatement:1,ForStatementExpressionOpening:1,ForStatementExpressionClosing:0,ForStatementOpeningBrace:1,ForStatementClosingBrace:1,ForStatementSemicolon:0,FunctionDeclarationOpeningBrace:1,FunctionDeclarationClosingBrace:1,FunctionExpressionOpeningBrace:1,FunctionExpressionClosingBrace:1,FunctionName:1,IIFEClosingParentheses:0,IfStatementConditionalOpening:1,IfStatementConditionalClosing:0,IfStatementOpeningBrace:1,IfStatementClosingBrace:1,ElseStatementOpeningBrace:1,ElseStatementClosingBrace:1,ElseIfStatementOpeningBrace:1,ElseIfStatementClosingBrace:1,LineComment:1,LogicalExpressionOperator:1,MemberExpressionClosing:0,ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:0,ObjectPatternOpeningBrace:1,ObjectPatternClosingBrace:0,ObjectPatternComma:0,Property:1,PropertyValue:1,ParameterComma:0,ParameterDefault:1,ParameterList:0,SwitchDiscriminantOpening:1,SwitchDiscriminantClosing:0,ThrowKeyword:1,TryKeyword:-1,TryOpeningBrace:1,TryClosingBrace:1,UnaryExpressionOperator:0,VariableName:1,VariableValue:1,WhileStatementConditionalOpening:1,WhileStatementConditionalClosing:0,WhileStatementOpeningBrace:1,WhileStatementClosingBrace:1},after:{ArrayExpressionOpening:0,ArrayExpressionClosing:0,ArrayExpressionComma:1,ArrayPatternOpening:0,ArrayPatternClosing:1,ArrayPatternComma:1,ArrowFunctionExpressionArrow:1,ArrowFunctionExpressionOpeningBrace:0,ArrowFunctionExpressionClosingBrace:0,ArgumentComma:1,ArgumentList:0,AssignmentOperator:1,BinaryExpression:0,BinaryExpressionOperator:1,BlockComment:1,CallExpression:-1,CallExpressionOpeningParentheses:-1,CallExpressionClosingParentheses:-1,CatchParameterList:0,CatchOpeningBrace:1,CatchClosingBrace:1,CatchKeyword:1,ClassDeclarationOpeningBrace:1,ClassDeclarationClosingBrace:1,CommaOperator:1,ConditionalExpressionConsequent:1,ConditionalExpressionTest:1,DoWhileStatementOpeningBrace:1,DoWhileStatementClosingBrace:1,DoWhileStatementBody:1,EmptyStatement:0,
ExpressionOpeningParentheses:0,FinallyKeyword:-1,FinallyOpeningBrace:1,FinallyClosingBrace:1,ForInStatement:1,ForInStatementExpressionOpening:0,ForInStatementExpressionClosing:1,ForInStatementOpeningBrace:1,ForInStatementClosingBrace:1,ForStatement:1,ForStatementExpressionOpening:0,ForStatementExpressionClosing:1,ForStatementClosingBrace:1,ForStatementOpeningBrace:1,ForStatementSemicolon:1,FunctionReservedWord:0,FunctionName:0,FunctionExpressionOpeningBrace:1,FunctionExpressionClosingBrace:0,FunctionDeclarationOpeningBrace:1,FunctionDeclarationClosingBrace:1,IIFEOpeningParentheses:0,IfStatementConditionalOpening:0,IfStatementConditionalClosing:1,IfStatementOpeningBrace:1,IfStatementClosingBrace:1,ElseStatementOpeningBrace:1,ElseStatementClosingBrace:1,ElseIfStatementOpeningBrace:1,ElseIfStatementClosingBrace:1,MemberExpressionOpening:0,LogicalExpressionOperator:1,ObjectExpressionOpeningBrace:0,ObjectExpressionClosingBrace:0,ObjectPatternOpeningBrace:0,ObjectPatternClosingBrace:1,ObjectPatternComma:1,PropertyName:0,PropertyValue:0,ParameterComma:1,ParameterDefault:1,ParameterList:0,SwitchDiscriminantOpening:0,SwitchDiscriminantClosing:1,ThrowKeyword:1,TryKeyword:-1,TryOpeningBrace:1,TryClosingBrace:1,UnaryExpressionOperator:0,VariableName:1,WhileStatementConditionalOpening:0,WhileStatementConditionalClosing:1,WhileStatementOpeningBrace:1,WhileStatementClosingBrace:1}}}},{}],52:[function(require,module,exports){module.exports={preset:"default",indent:{value:" ",IfStatementConditional:2,SwitchStatement:0,TopLevelFunctionBlock:0},lineBreak:{before:{ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:-1,Property:-1,VariableDeclarationWithoutInit:0},after:{AssignmentOperator:-1,ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:-1,Property:-1}},whiteSpace:{before:{ArgumentList:1,ArrayExpressionClosing:1,CatchParameterList:1,ExpressionClosingParentheses:1,ForInStatementExpressionClosing:1,ForStatementExpressionClosing:1,IfStatementConditionalClosing:1,IIFEClosingParentheses:1,MemberExpressionClosing:1,ObjectExpressionClosingBrace:1,ParameterList:1,SwitchDiscriminantClosing:1,WhileStatementConditionalClosing:1},after:{ArgumentList:1,ArrayExpressionOpening:1,CatchParameterList:1,ExpressionOpeningParentheses:1,ForInStatementExpressionOpening:1,ForStatementExpressionOpening:1,IfStatementConditionalOpening:1,IIFEOpeningParentheses:1,MemberExpressionOpening:1,ObjectExpressionOpeningBrace:1,ParameterList:1,PropertyValue:-1,SwitchDiscriminantOpening:1,WhileStatementConditionalOpening:1}}}},{}],53:[function(require,module,exports){"use strict";var _br=require("rocambole-linebreak");var _options=require("./options");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var addBrAroundNode=require("./lineBreakAroundNode");var expressionParentheses=require("./hooks/expressionParentheses");var hooks=require("./hooks");var indent=require("./indent");var plugins=require("./plugins");var rocambole=require("rocambole");var _shouldRemoveTrailingWs;exports=module.exports=transform;exports.BYPASS_OPTIONS={};function transform(ast,opts){if(opts!==exports.BYPASS_OPTIONS){_options.set(opts)}_shouldRemoveTrailingWs=Boolean(_options.get("whiteSpace.removeTrailing"));plugins.transformBefore(ast);_tk.eachInBetween(ast.startToken,ast.endToken,preprocessToken);rocambole.moonwalk(ast,transformNode);_tk.eachInBetween(ast.startToken,ast.endToken,postprocessToken);_br.limitBeforeEndOfFile(ast);indent.transform(ast);plugins.transform(ast);plugins.transformAfter(ast);return ast}function transformNode(node){plugins.nodeBefore(node);addBrAroundNode(node);var hook=hooks[node.type];if(hook&&"format"in hook){hook.format(node)}if(node.startToken){_ws.limitBefore(node.startToken,node.type);_ws.limitAfter(node.endToken,node.type)}expressionParentheses.addSpaceInside(node);plugins.nodeAfter(node)}function preprocessToken(token){if(_tk.isComment(token)){_br.limit(token,token.type)}plugins.tokenBefore(token)}function postprocessToken(token){if(_tk.isComment(token)){processComment(token)}else if(_shouldRemoveTrailingWs&&_tk.isWs(token)){removeTrailingWs(token)}plugins.tokenAfter(token)}function processComment(token){_ws.limitBefore(token,token.type);if(token.type==="BlockComment"){_ws.limitAfter(token,token.type);return}var prev=_tk.findPrevNonEmpty(token);var next=_tk.findNextNonEmpty(token);if(!_tk.isComment(prev)){_br.limitBefore(token,"CommentGroup")}if(!_tk.isComment(next)){_br.limitAfter(token,"CommentGroup")}}function removeTrailingWs(token){if(_tk.isBr(token.next)||!token.next){_tk.remove(token)}}},{"./hooks":7,"./hooks/expressionParentheses":45,"./indent":46,"./lineBreakAroundNode":48,"./options":49,"./plugins":50,rocambole:118,"rocambole-linebreak":105,"rocambole-token":107,"rocambole-whitespace":116}],54:[function(require,module,exports){module.exports=debug;function debug(name){if(!debug.enabled(name))return function(){};return function(fmt){fmt=coerce(fmt);var curr=new Date;var ms=curr-(debug[name]||curr);debug[name]=curr;fmt=name+" "+fmt+" +"+debug.humanize(ms);window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}}debug.names=[];debug.skips=[];debug.enable=function(name){try{localStorage.debug=name}catch(e){}var split=(name||"").split(/[\s,]+/),len=split.length;for(var i=0;i<len;i++){name=split[i].replace("*",".*?");if(name[0]==="-"){debug.skips.push(new RegExp("^"+name.substr(1)+"$"))}else{debug.names.push(new RegExp("^"+name+"$"))}}};debug.disable=function(){debug.enable("")};debug.humanize=function(ms){var sec=1e3,min=60*1e3,hour=60*min;if(ms>=hour)return(ms/hour).toFixed(1)+"h";if(ms>=min)return(ms/min).toFixed(1)+"m";if(ms>=sec)return(ms/sec|0)+"s";return ms+"ms"};debug.enabled=function(name){for(var i=0,len=debug.skips.length;i<len;i++){if(debug.skips[i].test(name)){return false}}for(var i=0,len=debug.names.length;i<len;i++){if(debug.names[i].test(name)){return true}}return false};function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}try{if(window.localStorage)debug.enable(localStorage.debug)}catch(e){}},{}],55:[function(require,module,exports){"use strict";var stringDiff=require("diff");var ansi=require("ansi-styles");exports.unified=unified;exports.unifiedNoColor=unifiedNoColor;exports.chars=chars;exports.removed="removed";exports.added="added";exports.colors={charsRemoved:ansi.bgRed,charsAdded:ansi.bgGreen,removed:ansi.red,added:ansi.green,header:ansi.yellow,section:ansi.magenta};function chars(str1,str2,opts){if(str1===str2){return""}opts=opts||{};var context=opts.context!=null?opts.context:3;var path1=opts.paths&&opts.paths[0]||exports.removed;var path2=opts.paths&&opts.paths[1]||exports.added;var header=colorize(path1,"charsRemoved")+" "+colorize(path2,"charsAdded")+"\n\n";var changes=stringDiff.diffChars(str1,str2);var diff=changes.map(function(c){var val=replaceInvisibleChars(c.value);if(c.removed)return colorize(val,"charsRemoved");if(c.added)return colorize(val,"charsAdded");return val}).join("");var lines=diff.split(/^/m);lines=addLineNumbers(lines);lines=removeLinesOutOfContext(lines,context);return header+lines.join("")}function addLineNumbers(lines){var nChars=lines.length.toString().length;return lines.map(function(line,i){return alignRight(i+1,nChars)+" | "+line})}function colorize(str,colorId){var color=exports.colors[colorId];return str.replace(/[^\n\r]+/g,color.open+"$&"+color.close)}function replaceInvisibleChars(str){return str.replace(/\t/g,"<tab>").replace(/\r/g,"<CR>").replace(/\n/g,"<LF>\n")}function alignRight(val,nChars){val=val.toString();var diff=nChars-val.length;return diff?new Array(diff+1).join(" ")+val:val}function removeLinesOutOfContext(lines,context){var diffMap={};var lastDiff=-Infinity;function hasDiff(line,i){if(!(i in diffMap)){diffMap[i]=hasCharDiff(line)}return diffMap[i]}function hasDiffBefore(i){return lastDiff+context>=i}function hasDiffAfter(i){var max=Math.min(i+context,lines.length-1);var n=i;while(++n<=max){if(hasDiff(lines[n],n))return true}return false}return lines.filter(function(line,i,arr){var has=hasDiff(line,i);if(has){lastDiff=i}return has||hasDiffBefore(i)||hasDiffAfter(i)})}function hasCharDiff(line){return line.indexOf(exports.colors.charsAdded.open)!==-1||line.indexOf(exports.colors.charsRemoved.open)!==-1}function unified(str1,str2,opts){if(str2===str1){return""}var changes=unifiedNoColor(str1,str2,opts);var lines=changes.split(/^/m);var start=colorize(lines.slice(0,2).join(""),"header");var end=lines.slice(2).join("").replace(/^\-.*/gm,colorize("$&","removed")).replace(/^\+.*/gm,colorize("$&","added")).replace(/^@@.+@@/gm,colorize("$&","section"));return start+end}function unifiedNoColor(str1,str2,opts){if(str2===str1){return""}opts=opts||{};var path1=opts.paths&&opts.paths[0]||"";var path2=opts.paths&&opts.paths[1]||path1;var changes=stringDiff.createPatch("",str1,str2,"","");changes=changes.replace(/^([^\n]+)\n([^\n]+)\n/m,"");function appendPath(str,filePath,state){var result=str;if(filePath){result+=" "+filePath}if(state){result+=filePath?" ":" ";result+=state}return result}changes=changes.replace(/^---.*/gm,appendPath("---",path1,exports.removed)).replace(/^\+\+\+.*/gm,appendPath("+++",path2,exports.added));return changes}},{"ansi-styles":56,diff:57}],56:[function(require,module,exports){"use strict";function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:"["+style[0]+"m",close:"["+style[1]+"m"}});Object.defineProperty(styles,groupName,{value:group,enumerable:false})});return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})},{}],57:[function(require,module,exports){(function(global,undefined){var objectPrototypeToString=Object.prototype.toString;function map(arr,mapper,that){if(Array.prototype.map){return Array.prototype.map.call(arr,mapper,that)}var other=new Array(arr.length);for(var i=0,n=arr.length;i<n;i++){other[i]=mapper.call(that,arr[i],i,arr)}return other}function clonePath(path){return{newPos:path.newPos,components:path.components.slice(0)}}function removeEmpty(array){var ret=[];for(var i=0;i<array.length;i++){if(array[i]){ret.push(array[i])}}return ret}function escapeHTML(s){var n=s;n=n.replace(/&/g,"&amp;");n=n.replace(/</g,"&lt;");n=n.replace(/>/g,"&gt;");n=n.replace(/"/g,"&quot;");return n}function canonicalize(obj,stack,replacementStack){stack=stack||[];replacementStack=replacementStack||[];var i;for(i=0;i<stack.length;i+=1){if(stack[i]===obj){return replacementStack[i]}}var canonicalizedObj;if("[object Array]"===objectPrototypeToString.call(obj)){stack.push(obj);canonicalizedObj=new Array(obj.length);replacementStack.push(canonicalizedObj);for(i=0;i<obj.length;i+=1){canonicalizedObj[i]=canonicalize(obj[i],stack,replacementStack)}stack.pop();replacementStack.pop()}else if(typeof obj==="object"&&obj!==null){stack.push(obj);canonicalizedObj={};replacementStack.push(canonicalizedObj);var sortedKeys=[],key;for(key in obj){sortedKeys.push(key)}sortedKeys.sort();for(i=0;i<sortedKeys.length;i+=1){key=sortedKeys[i];canonicalizedObj[key]=canonicalize(obj[key],stack,replacementStack)}stack.pop();replacementStack.pop()}else{canonicalizedObj=obj}return canonicalizedObj}function buildValues(components,newString,oldString,useLongestToken){var componentPos=0,componentLen=components.length,newPos=0,oldPos=0;for(;componentPos<componentLen;componentPos++){var component=components[componentPos];if(!component.removed){if(!component.added&&useLongestToken){var value=newString.slice(newPos,newPos+component.count);value=map(value,function(value,i){var oldValue=oldString[oldPos+i];return oldValue.length>value.length?oldValue:value});component.value=value.join("")}else{component.value=newString.slice(newPos,newPos+component.count).join("")}newPos+=component.count;if(!component.added){oldPos+=component.count}}else{component.value=oldString.slice(oldPos,oldPos+component.count).join("");oldPos+=component.count;if(componentPos&&components[componentPos-1].added){var tmp=components[componentPos-1];components[componentPos-1]=components[componentPos];components[componentPos]=tmp}}}return components}function Diff(ignoreWhitespace){this.ignoreWhitespace=ignoreWhitespace}Diff.prototype={diff:function(oldString,newString,callback){var self=this;function done(value){if(callback){setTimeout(function(){callback(undefined,value)},0);return true}else{return value}}if(newString===oldString){return done([{value:newString}])}if(!newString){return done([{value:oldString,removed:true}])}if(!oldString){return done([{value:newString,added:true}])}newString=this.tokenize(newString);oldString=this.tokenize(oldString);var newLen=newString.length,oldLen=oldString.length;var editLength=1;var maxEditLength=newLen+oldLen;var bestPath=[{newPos:-1,components:[]}];var oldPos=this.extractCommon(bestPath[0],newString,oldString,0);if(bestPath[0].newPos+1>=newLen&&oldPos+1>=oldLen){return done([{value:newString.join("")}])}function execEditLength(){for(var diagonalPath=-1*editLength;diagonalPath<=editLength;diagonalPath+=2){var basePath;var addPath=bestPath[diagonalPath-1],removePath=bestPath[diagonalPath+1],oldPos=(removePath?removePath.newPos:0)-diagonalPath;if(addPath){bestPath[diagonalPath-1]=undefined}var canAdd=addPath&&addPath.newPos+1<newLen,canRemove=removePath&&0<=oldPos&&oldPos<oldLen;if(!canAdd&&!canRemove){bestPath[diagonalPath]=undefined;continue}if(!canAdd||canRemove&&addPath.newPos<removePath.newPos){basePath=clonePath(removePath);self.pushComponent(basePath.components,undefined,true)}else{basePath=addPath;basePath.newPos++;self.pushComponent(basePath.components,true,undefined)}oldPos=self.extractCommon(basePath,newString,oldString,diagonalPath);if(basePath.newPos+1>=newLen&&oldPos+1>=oldLen){return done(buildValues(basePath.components,newString,oldString,self.useLongestToken))}else{bestPath[diagonalPath]=basePath}}editLength++}if(callback){(function exec(){setTimeout(function(){if(editLength>maxEditLength){return callback()}if(!execEditLength()){exec()}},0)})()}else{while(editLength<=maxEditLength){var ret=execEditLength();if(ret){return ret}}}},pushComponent:function(components,added,removed){var last=components[components.length-1];if(last&&last.added===added&&last.removed===removed){components[components.length-1]={count:last.count+1,added:added,removed:removed}}else{components.push({count:1,added:added,removed:removed})}},extractCommon:function(basePath,newString,oldString,diagonalPath){var newLen=newString.length,oldLen=oldString.length,newPos=basePath.newPos,oldPos=newPos-diagonalPath,commonCount=0;while(newPos+1<newLen&&oldPos+1<oldLen&&this.equals(newString[newPos+1],oldString[oldPos+1])){newPos++;oldPos++;commonCount++}if(commonCount){basePath.components.push({count:commonCount})}basePath.newPos=newPos;return oldPos},equals:function(left,right){var reWhitespace=/\S/;return left===right||this.ignoreWhitespace&&!reWhitespace.test(left)&&!reWhitespace.test(right)},tokenize:function(value){return value.split("")}};var CharDiff=new Diff;var WordDiff=new Diff(true);var WordWithSpaceDiff=new Diff;WordDiff.tokenize=WordWithSpaceDiff.tokenize=function(value){return removeEmpty(value.split(/(\s+|\b)/))};var CssDiff=new Diff(true);CssDiff.tokenize=function(value){return removeEmpty(value.split(/([{}:;,]|\s+)/))};var LineDiff=new Diff;var TrimmedLineDiff=new Diff;TrimmedLineDiff.ignoreTrim=true;LineDiff.tokenize=TrimmedLineDiff.tokenize=function(value){var retLines=[],lines=value.split(/^/m);for(var i=0;i<lines.length;i++){var line=lines[i],lastLine=lines[i-1],lastLineLastChar=lastLine&&lastLine[lastLine.length-1];if(line==="\n"&&lastLineLastChar==="\r"){retLines[retLines.length-1]=retLines[retLines.length-1].slice(0,-1)+"\r\n"}else{if(this.ignoreTrim){line=line.trim();if(i<lines.length-1){line+="\n"}}retLines.push(line)}}return retLines};var PatchDiff=new Diff;PatchDiff.tokenize=function(value){var ret=[],linesAndNewlines=value.split(/(\n|\r\n)/);if(!linesAndNewlines[linesAndNewlines.length-1]){linesAndNewlines.pop()}for(var i=0;i<linesAndNewlines.length;i++){var line=linesAndNewlines[i];if(i%2){ret[ret.length-1]+=line}else{ret.push(line)}}return ret};var SentenceDiff=new Diff;SentenceDiff.tokenize=function(value){return removeEmpty(value.split(/(\S.+?[.!?])(?=\s+|$)/))};var JsonDiff=new Diff;JsonDiff.useLongestToken=true;JsonDiff.tokenize=LineDiff.tokenize;JsonDiff.equals=function(left,right){return LineDiff.equals(left.replace(/,([\r\n])/g,"$1"),right.replace(/,([\r\n])/g,"$1"))};var JsDiff={Diff:Diff,diffChars:function(oldStr,newStr,callback){return CharDiff.diff(oldStr,newStr,callback)},diffWords:function(oldStr,newStr,callback){return WordDiff.diff(oldStr,newStr,callback)},diffWordsWithSpace:function(oldStr,newStr,callback){return WordWithSpaceDiff.diff(oldStr,newStr,callback)},diffLines:function(oldStr,newStr,callback){return LineDiff.diff(oldStr,newStr,callback)},diffTrimmedLines:function(oldStr,newStr,callback){return TrimmedLineDiff.diff(oldStr,newStr,callback)},diffSentences:function(oldStr,newStr,callback){return SentenceDiff.diff(oldStr,newStr,callback)},diffCss:function(oldStr,newStr,callback){return CssDiff.diff(oldStr,newStr,callback)},diffJson:function(oldObj,newObj,callback){return JsonDiff.diff(typeof oldObj==="string"?oldObj:JSON.stringify(canonicalize(oldObj),undefined," "),typeof newObj==="string"?newObj:JSON.stringify(canonicalize(newObj),undefined," "),callback)},createTwoFilesPatch:function(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader){var ret=[];if(oldFileName==newFileName){ret.push("Index: "+oldFileName)}ret.push("===================================================================");ret.push("--- "+oldFileName+(typeof oldHeader==="undefined"?"":" "+oldHeader));ret.push("+++ "+newFileName+(typeof newHeader==="undefined"?"":" "+newHeader));var diff=PatchDiff.diff(oldStr,newStr);diff.push({value:"",lines:[]});function contextLines(lines){return map(lines,function(entry){return" "+entry})}function eofNL(curRange,i,current){var last=diff[diff.length-2],isLast=i===diff.length-2,isLastOfType=i===diff.length-3&&current.added!==last.added;if(!/\n$/.test(current.value)&&(isLast||isLastOfType)){curRange.push("\\ No newline at end of file")}}var oldRangeStart=0,newRangeStart=0,curRange=[],oldLine=1,newLine=1;for(var i=0;i<diff.length;i++){var current=diff[i],lines=current.lines||current.value.replace(/\n$/,"").split("\n");current.lines=lines;if(current.added||current.removed){if(!oldRangeStart){var prev=diff[i-1];oldRangeStart=oldLine;newRangeStart=newLine;if(prev){curRange=contextLines(prev.lines.slice(-4));oldRangeStart-=curRange.length;newRangeStart-=curRange.length}}curRange.push.apply(curRange,map(lines,function(entry){return(current.added?"+":"-")+entry}));eofNL(curRange,i,current);if(current.added){newLine+=lines.length}else{oldLine+=lines.length}}else{if(oldRangeStart){if(lines.length<=8&&i<diff.length-2){curRange.push.apply(curRange,contextLines(lines))}else{var contextSize=Math.min(lines.length,4);ret.push("@@ -"+oldRangeStart+","+(oldLine-oldRangeStart+contextSize)+" +"+newRangeStart+","+(newLine-newRangeStart+contextSize)+" @@");ret.push.apply(ret,curRange);ret.push.apply(ret,contextLines(lines.slice(0,contextSize)));if(lines.length<=4){eofNL(ret,i,current)}oldRangeStart=0;newRangeStart=0;curRange=[]}}oldLine+=lines.length;newLine+=lines.length}}return ret.join("\n")+"\n"},createPatch:function(fileName,oldStr,newStr,oldHeader,newHeader){return JsDiff.createTwoFilesPatch(fileName,fileName,oldStr,newStr,oldHeader,newHeader)},applyPatch:function(oldStr,uniDiff){var diffstr=uniDiff.split("\n"),hunks=[],i=0,remEOFNL=false,addEOFNL=false;while(i<diffstr.length&&!/^@@/.test(diffstr[i])){i++}for(;i<diffstr.length;i++){if(diffstr[i][0]==="@"){var chnukHeader=diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);hunks.unshift({start:chnukHeader[3],oldlength:+chnukHeader[2],removed:[],newlength:chnukHeader[4],added:[]})}else if(diffstr[i][0]==="+"){hunks[0].added.push(diffstr[i].substr(1))}else if(diffstr[i][0]==="-"){hunks[0].removed.push(diffstr[i].substr(1))}else if(diffstr[i][0]===" "){hunks[0].added.push(diffstr[i].substr(1));hunks[0].removed.push(diffstr[i].substr(1))}else if(diffstr[i][0]==="\\"){if(diffstr[i-1][0]==="+"){remEOFNL=true}else if(diffstr[i-1][0]==="-"){addEOFNL=true}}}var lines=oldStr.split("\n");for(i=hunks.length-1;i>=0;i--){var hunk=hunks[i];for(var j=0;j<hunk.oldlength;j++){if(lines[hunk.start-1+j]!==hunk.removed[j]){return false}}Array.prototype.splice.apply(lines,[hunk.start-1,hunk.oldlength].concat(hunk.added))}if(remEOFNL){while(!lines[lines.length-1]){lines.pop()}}else if(addEOFNL){lines.push("")}return lines.join("\n")},convertChangesToXML:function(changes){var ret=[];for(var i=0;i<changes.length;i++){var change=changes[i];if(change.added){ret.push("<ins>")}else if(change.removed){ret.push("<del>")}ret.push(escapeHTML(change.value));if(change.added){ret.push("</ins>")}else if(change.removed){ret.push("</del>")}}return ret.join("")},convertChangesToDMP:function(changes){var ret=[],change,operation;for(var i=0;i<changes.length;i++){change=changes[i];if(change.added){operation=1}else if(change.removed){operation=-1}else{operation=0}ret.push([operation,change.value])}return ret},canonicalize:canonicalize};if(typeof module!=="undefined"&&module.exports){module.exports=JsDiff}else if(typeof define==="function"&&define.amd){define([],function(){return JsDiff})}else if(typeof global.JsDiff==="undefined"){global.JsDiff=JsDiff}})(this)},{}],58:[function(require,module,exports){"use strict";var syntax=require("./lib/syntax"),tokenInfo=require("./lib/token-info"),astNodeTypes=require("./lib/ast-node-types"),astNodeFactory=require("./lib/ast-node-factory"),defaultFeatures=require("./lib/features"),Messages=require("./lib/messages"),XHTMLEntities=require("./lib/xhtml-entities"),StringMap=require("./lib/string-map"),commentAttachment=require("./lib/comment-attachment");var Token=tokenInfo.Token,TokenName=tokenInfo.TokenName,FnExprTokens=tokenInfo.FnExprTokens,Regex=syntax.Regex,PropertyKind,source,strict,index,lineNumber,lineStart,length,lookahead,state,extra;PropertyKind={Data:1,Get:2,Set:4};function assert(condition,message){if(!condition){throw new Error("ASSERT: "+message)}}function addComment(type,value,start,end,loc){var comment;assert(typeof start==="number","Comment must have valid position");if(state.lastCommentStart>=start){return}state.lastCommentStart=start;comment={type:type,value:value};if(extra.range){comment.range=[start,end]}if(extra.loc){comment.loc=loc}extra.comments.push(comment);if(extra.attachComment){commentAttachment.addComment(comment)}}function skipSingleLineComment(offset){var start,loc,ch,comment;start=index-offset;loc={start:{line:lineNumber,column:index-lineStart-offset}};while(index<length){ch=source.charCodeAt(index);++index;if(syntax.isLineTerminator(ch)){if(extra.comments){comment=source.slice(start+offset,index-1);loc.end={line:lineNumber,column:index-lineStart-1};addComment("Line",comment,start,index-1,loc)}if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;return}}if(extra.comments){comment=source.slice(start+offset,index);loc.end={line:lineNumber,column:index-lineStart};addComment("Line",comment,start,index,loc)}}function skipMultiLineComment(){var start,loc,ch,comment;if(extra.comments){start=index-2;loc={start:{line:lineNumber,column:index-lineStart-2}}}while(index<length){ch=source.charCodeAt(index);if(syntax.isLineTerminator(ch)){if(ch===13&&source.charCodeAt(index+1)===10){++index}++lineNumber;++index;lineStart=index;if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else if(ch===42){if(source.charCodeAt(index+1)===47){++index;++index;if(extra.comments){comment=source.slice(start+2,index-2);loc.end={line:lineNumber,column:index-lineStart};addComment("Block",comment,start,index,loc)}return}++index}else{++index}}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function skipComment(){var ch,start;start=index===0;while(index<length){ch=source.charCodeAt(index);if(syntax.isWhiteSpace(ch)){++index}else if(syntax.isLineTerminator(ch)){++index;if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;start=true}else if(ch===47){ch=source.charCodeAt(index+1);if(ch===47){++index;++index;skipSingleLineComment(2);start=true}else if(ch===42){++index;++index;skipMultiLineComment()}else{break}}else if(start&&ch===45){if(source.charCodeAt(index+1)===45&&source.charCodeAt(index+2)===62){index+=3;skipSingleLineComment(3)}else{break}}else if(ch===60){if(source.slice(index+1,index+4)==="!--"){++index;++index;++index;++index;skipSingleLineComment(4)}else{break}}else{break}}}function scanHexEscape(prefix){var i,len,ch,code=0;len=prefix==="u"?4:2;for(i=0;i<len;++i){if(index<length&&syntax.isHexDigit(source[index])){ch=source[index++];code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}else{return""}}return String.fromCharCode(code)}function scanUnicodeCodePointEscape(){var ch,code,cu1,cu2;ch=source[index];code=0;if(ch==="}"){throwError({},Messages.UnexpectedToken,"ILLEGAL")}while(index<length){ch=source[index++];if(!syntax.isHexDigit(ch)){break}code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}if(code>1114111||ch!=="}"){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(code<=65535){return String.fromCharCode(code)}cu1=(code-65536>>10)+55296;cu2=(code-65536&1023)+56320;return String.fromCharCode(cu1,cu2)}function getEscapedIdentifier(){var ch,id;ch=source.charCodeAt(index++);id=String.fromCharCode(ch);if(ch===92){if(source.charCodeAt(index)!==117){throwError({},Messages.UnexpectedToken,"ILLEGAL")}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!syntax.isIdentifierStart(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}id=ch}while(index<length){ch=source.charCodeAt(index);if(!syntax.isIdentifierPart(ch)){break}++index;id+=String.fromCharCode(ch);if(ch===92){id=id.substr(0,id.length-1);if(source.charCodeAt(index)!==117){throwError({},Messages.UnexpectedToken,"ILLEGAL")}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!syntax.isIdentifierPart(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}id+=ch}}return id}function getIdentifier(){var start,ch;start=index++;while(index<length){ch=source.charCodeAt(index);if(ch===92){index=start;return getEscapedIdentifier()}if(syntax.isIdentifierPart(ch)){++index}else{break}}return source.slice(start,index)}function scanIdentifier(){var start,id,type;start=index;id=source.charCodeAt(index)===92?getEscapedIdentifier():getIdentifier();if(id.length===1){type=Token.Identifier}else if(syntax.isKeyword(id,strict,extra.ecmaFeatures)){type=Token.Keyword}else if(id==="null"){type=Token.NullLiteral}else if(id==="true"||id==="false"){type=Token.BooleanLiteral}else{type=Token.Identifier}return{type:type,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanPunctuator(){var start=index,code=source.charCodeAt(index),code2,ch1=source[index],ch2,ch3,ch4;switch(code){case 40:case 41:case 59:case 44:case 91:case 93:case 58:case 63:case 126:++index;if(extra.tokenize&&code===40){extra.openParenToken=extra.tokens.length}return{type:Token.Punctuator,value:String.fromCharCode(code),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};case 123:case 125:++index;if(extra.tokenize&&code===123){extra.openCurlyToken=extra.tokens.length}if(index>state.curlyLastIndex){state.curlyLastIndex=index;if(code===123){state.curlyStack.push("{")}else{state.curlyStack.pop()}}return{type:Token.Punctuator,value:String.fromCharCode(code),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};default:code2=source.charCodeAt(index+1);if(code2===61){switch(code){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:index+=2;return{type:Token.Punctuator,value:String.fromCharCode(code)+String.fromCharCode(code2),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};case 33:case 61:index+=2;if(source.charCodeAt(index)===61){++index}return{type:Token.Punctuator,value:source.slice(start,index),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};default:break}}break}ch2=source[index+1];ch3=source[index+2];ch4=source[index+3];if(ch1===">"&&ch2===">"&&ch3===">"){if(ch4==="="){index+=4;return{type:Token.Punctuator,value:">>>=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if(ch1===">"&&ch2===">"&&ch3===">"){index+=3;return{type:Token.Punctuator,value:">>>",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1==="<"&&ch2==="<"&&ch3==="="){index+=3;return{type:Token.Punctuator,value:"<<=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1===">"&&ch2===">"&&ch3==="="){index+=3;return{type:Token.Punctuator,value:">>=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(extra.ecmaFeatures.spread||extra.ecmaFeatures.restParams||extra.ecmaFeatures.jsx&&state.inJSXSpreadAttribute){if(ch1==="."&&ch2==="."&&ch3==="."){index+=3;return{type:Token.Punctuator,value:"...",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if(ch1===ch2&&"+-<>&|".indexOf(ch1)>=0){index+=2;return{type:Token.Punctuator,value:ch1+ch2,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(extra.ecmaFeatures.arrowFunctions){if(ch1==="="&&ch2===">"){index+=2;return{type:Token.Punctuator,value:"=>",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if("<>=!+-*%&|^/".indexOf(ch1)>=0){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1==="."){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function scanHexLiteral(start){var number="";while(index<length){if(!syntax.isHexDigit(source[index])){break}number+=source[index++]}if(number.length===0){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(syntax.isIdentifierStart(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseInt("0x"+number,16),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanBinaryLiteral(start){var ch,number="";while(index<length){ch=source[index];if(ch!=="0"&&ch!=="1"){break}number+=source[index++]}if(number.length===0){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(index<length){ch=source.charCodeAt(index);if(syntax.isIdentifierStart(ch)||syntax.isDecimalDigit(ch)){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}return{type:Token.NumericLiteral,value:parseInt(number,2),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanOctalLiteral(prefix,start){var number,octal;if(syntax.isOctalDigit(prefix)){octal=true;number="0"+source[index++]}else{octal=false;++index;number=""}while(index<length){if(!syntax.isOctalDigit(source[index])){break}number+=source[index++]}if(!octal&&number.length===0){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(syntax.isIdentifierStart(source.charCodeAt(index))||syntax.isDecimalDigit(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseInt(number,8),octal:octal,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanNumericLiteral(){var number,start,ch;ch=source[index];assert(syntax.isDecimalDigit(ch.charCodeAt(0))||ch===".","Numeric literal must start with a decimal digit or a decimal point");
start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch==="x"||ch==="X"){++index;return scanHexLiteral(start)}if(extra.ecmaFeatures.binaryLiterals){if(ch==="b"||ch==="B"){++index;return scanBinaryLiteral(start)}}if(extra.ecmaFeatures.octalLiterals&&(ch==="o"||ch==="O")||syntax.isOctalDigit(ch)){return scanOctalLiteral(ch,start)}if(ch&&syntax.isDecimalDigit(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}while(syntax.isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="."){number+=source[index++];while(syntax.isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-"){number+=source[index++]}if(syntax.isDecimalDigit(source.charCodeAt(index))){while(syntax.isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}}else{throwError({},Messages.UnexpectedToken,"ILLEGAL")}}if(syntax.isIdentifierStart(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanEscapeSequence(ch){var code,unescaped,restore,escapedCh,octal=false;if(!ch){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(syntax.isLineTerminator(ch.charCodeAt(0))){++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index;escapedCh=""}else if(ch==="u"&&source[index]==="{"){if(extra.ecmaFeatures.unicodeCodePointEscapes){++index;escapedCh=scanUnicodeCodePointEscape()}else{throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else if(ch==="u"||ch==="x"){restore=index;unescaped=scanHexEscape(ch);if(unescaped){escapedCh=unescaped}else{index=restore;escapedCh=ch}}else if(ch==="n"){escapedCh="\n"}else if(ch==="r"){escapedCh="\r"}else if(ch==="t"){escapedCh=" "}else if(ch==="b"){escapedCh="\b"}else if(ch==="f"){escapedCh="\f"}else if(ch==="v"){escapedCh=" "}else if(syntax.isOctalDigit(ch)){code="01234567".indexOf(ch);if(code!==0){octal=true}if(index<length&&syntax.isOctalDigit(source[index])){octal=true;code=code*8+"01234567".indexOf(source[index++]);if("0123".indexOf(ch)>=0&&index<length&&syntax.isOctalDigit(source[index])){code=code*8+"01234567".indexOf(source[index++])}}escapedCh=String.fromCharCode(code)}else{escapedCh=ch}return{ch:escapedCh,octal:octal}}function scanStringLiteral(){var str="",ch,escapedSequence,octal=false,start=index,startLineNumber=lineNumber,startLineStart=lineStart,quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");++index;while(index<length){ch=source[index++];if(syntax.isLineTerminator(ch.charCodeAt(0))){break}else if(ch===quote){quote="";break}else if(ch==="\\"){ch=source[index++];escapedSequence=scanEscapeSequence(ch);str+=escapedSequence.ch;octal=escapedSequence.octal||octal}else{str+=ch}}if(quote!==""){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.StringLiteral,value:str,octal:octal,startLineNumber:startLineNumber,startLineStart:startLineStart,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanTemplate(){var cooked="",ch,escapedSequence,start=index,terminated=false,tail=false,head=source[index]==="`";++index;while(index<length){ch=source[index++];if(ch==="`"){tail=true;terminated=true;break}else if(ch==="$"){if(source[index]==="{"){++index;terminated=true;break}cooked+=ch}else if(ch==="\\"){ch=source[index++];escapedSequence=scanEscapeSequence(ch);if(escapedSequence.octal){throwError({},Messages.TemplateOctalLiteral)}cooked+=escapedSequence.ch}else if(syntax.isLineTerminator(ch.charCodeAt(0))){++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index;cooked+="\n"}else{cooked+=ch}}if(!terminated){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(index>state.curlyLastIndex){state.curlyLastIndex=index;if(!tail){state.curlyStack.push("template")}if(!head){state.curlyStack.pop()}}return{type:Token.Template,value:{cooked:cooked,raw:source.slice(start+1,index-(tail?1:2))},head:head,tail:tail,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function testRegExp(pattern,flags){var tmp=pattern,validFlags="gmsi";if(extra.ecmaFeatures.regexYFlag){validFlags+="y"}if(extra.ecmaFeatures.regexUFlag){validFlags+="u"}if(!RegExp("^["+validFlags+"]*$").test(flags)){throwError({},Messages.InvalidRegExpFlag)}if(flags.indexOf("u")>=0){tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g,function($0,$1){if(parseInt($1,16)<=1114111){return"x"}throwError({},Messages.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}try{RegExp(tmp)}catch(e){throwError({},Messages.InvalidRegExp)}try{return new RegExp(pattern,flags)}catch(exception){return null}}function scanRegExpBody(){var ch,str,classMarker,terminated,body;ch=source[index];assert(ch==="/","Regular expression literal must start with a slash");str=source[index++];classMarker=false;terminated=false;while(index<length){ch=source[index++];str+=ch;if(ch==="\\"){ch=source[index++];if(syntax.isLineTerminator(ch.charCodeAt(0))){throwError({},Messages.UnterminatedRegExp)}str+=ch}else if(syntax.isLineTerminator(ch.charCodeAt(0))){throwError({},Messages.UnterminatedRegExp)}else if(classMarker){if(ch==="]"){classMarker=false}}else{if(ch==="/"){terminated=true;break}else if(ch==="["){classMarker=true}}}if(!terminated){throwError({},Messages.UnterminatedRegExp)}body=str.substr(1,str.length-2);return{value:body,literal:str}}function scanRegExpFlags(){var ch,str,flags,restore;str="";flags="";while(index<length){ch=source[index];if(!syntax.isIdentifierPart(ch.charCodeAt(0))){break}++index;if(ch==="\\"&&index<length){ch=source[index];if(ch==="u"){++index;restore=index;ch=scanHexEscape("u");if(ch){flags+=ch;for(str+="\\u";restore<index;++restore){str+=source[restore]}}else{index=restore;flags+="u";str+="\\u"}throwErrorTolerant({},Messages.UnexpectedToken,"ILLEGAL")}else{str+="\\";throwErrorTolerant({},Messages.UnexpectedToken,"ILLEGAL")}}else{flags+=ch;str+=ch}}return{value:flags,literal:str}}function scanRegExp(){var start,body,flags,value;lookahead=null;skipComment();start=index;body=scanRegExpBody();flags=scanRegExpFlags();value=testRegExp(body.value,flags.value);if(extra.tokenize){return{type:Token.RegularExpression,value:value,regex:{pattern:body.value,flags:flags.value},lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}return{literal:body.literal+flags.literal,value:value,regex:{pattern:body.value,flags:flags.value},range:[start,index]}}function collectRegex(){var pos,loc,regex,token;skipComment();pos=index;loc={start:{line:lineNumber,column:index-lineStart}};regex=scanRegExp();loc.end={line:lineNumber,column:index-lineStart};if(!extra.tokenize){if(extra.tokens.length>0){token=extra.tokens[extra.tokens.length-1];if(token.range[0]===pos&&token.type==="Punctuator"){if(token.value==="/"||token.value==="/="){extra.tokens.pop()}}}extra.tokens.push({type:"RegularExpression",value:regex.literal,regex:regex.regex,range:[pos,index],loc:loc})}return regex}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advanceSlash(){var prevToken,checkToken;prevToken=extra.tokens[extra.tokens.length-1];if(!prevToken){return collectRegex()}if(prevToken.type==="Punctuator"){if(prevToken.value==="]"){return scanPunctuator()}if(prevToken.value===")"){checkToken=extra.tokens[extra.openParenToken-1];if(checkToken&&checkToken.type==="Keyword"&&(checkToken.value==="if"||checkToken.value==="while"||checkToken.value==="for"||checkToken.value==="with")){return collectRegex()}return scanPunctuator()}if(prevToken.value==="}"){if(extra.tokens[extra.openCurlyToken-3]&&extra.tokens[extra.openCurlyToken-3].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-4];if(!checkToken){return scanPunctuator()}}else if(extra.tokens[extra.openCurlyToken-4]&&extra.tokens[extra.openCurlyToken-4].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-5];if(!checkToken){return collectRegex()}}else{return scanPunctuator()}if(FnExprTokens.indexOf(checkToken.value)>=0){return scanPunctuator()}return collectRegex()}return collectRegex()}if(prevToken.type==="Keyword"){return collectRegex()}return scanPunctuator()}function advance(){var ch,allowJSX=extra.ecmaFeatures.jsx,allowTemplateStrings=extra.ecmaFeatures.templateStrings;if(!allowJSX||!state.inJSXChild){skipComment()}if(index>=length){return{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,range:[index,index]}}if(allowJSX&&state.inJSXChild){return advanceJSXChild()}ch=source.charCodeAt(index);if(ch===40||ch===41||ch===59){return scanPunctuator()}if(ch===39||ch===34){if(allowJSX&&state.inJSXTag){return scanJSXStringLiteral()}return scanStringLiteral()}if(allowJSX&&state.inJSXTag&&syntax.isJSXIdentifierStart(ch)){return scanJSXIdentifier()}if(allowTemplateStrings){if(ch===96||ch===125&&state.curlyStack[state.curlyStack.length-1]==="template"){return scanTemplate()}}if(syntax.isIdentifierStart(ch)){return scanIdentifier()}if(ch===46){if(syntax.isDecimalDigit(source.charCodeAt(index+1))){return scanNumericLiteral()}return scanPunctuator()}if(syntax.isDecimalDigit(ch)){return scanNumericLiteral()}if(extra.tokenize&&ch===47){return advanceSlash()}return scanPunctuator()}function collectToken(){var loc,token,range,value,entry,allowJSX=extra.ecmaFeatures.jsx;if(!allowJSX||!state.inJSXChild){skipComment()}loc={start:{line:lineNumber,column:index-lineStart}};token=advance();loc.end={line:lineNumber,column:index-lineStart};if(token.type!==Token.EOF){range=[token.range[0],token.range[1]];value=source.slice(token.range[0],token.range[1]);entry={type:TokenName[token.type],value:value,range:range,loc:loc};if(token.regex){entry.regex={pattern:token.regex.pattern,flags:token.regex.flags}}extra.tokens.push(entry)}return token}function lex(){var token;token=lookahead;index=token.range[1];lineNumber=token.lineNumber;lineStart=token.lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();index=token.range[1];lineNumber=token.lineNumber;lineStart=token.lineStart;return token}function peek(){var pos,line,start;pos=index;line=lineNumber;start=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();index=pos;lineNumber=line;lineStart=start}function lookahead2(){var adv,pos,line,start,result;adv=typeof extra.advance==="function"?extra.advance:advance;pos=index;line=lineNumber;start=lineStart;if(lookahead===null){lookahead=adv()}index=lookahead.range[1];lineNumber=lookahead.lineNumber;lineStart=lookahead.lineStart;result=adv();index=pos;lineNumber=line;lineStart=start;return result}function getQualifiedJSXName(object){if(object.type===astNodeTypes.JSXIdentifier){return object.name}if(object.type===astNodeTypes.JSXNamespacedName){return object.namespace.name+":"+object.name.name}if(object.type===astNodeTypes.JSXMemberExpression){return getQualifiedJSXName(object.object)+"."+getQualifiedJSXName(object.property)}throwUnexpected(object)}function scanJSXIdentifier(){var ch,start,value="";start=index;while(index<length){ch=source.charCodeAt(index);if(!syntax.isJSXIdentifierPart(ch)){break}value+=source[index++]}return{type:Token.JSXIdentifier,value:value,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanJSXEntity(){var ch,str="",start=index,count=0,code;ch=source[index];assert(ch==="&","Entity must start with an ampersand");index++;while(index<length&&count++<10){ch=source[index++];if(ch===";"){break}str+=ch}if(ch===";"){if(str[0]==="#"){if(str[1]==="x"){code=+("0"+str.substr(1))}else{code=+str.substr(1).replace(Regex.LeadingZeros,"")}if(!isNaN(code)){return String.fromCharCode(code)}}else if(XHTMLEntities[str]){return XHTMLEntities[str]}}index=start+1;return"&"}function scanJSXText(stopChars){var ch,str="",start;start=index;while(index<length){ch=source[index];if(stopChars.indexOf(ch)!==-1){break}if(ch==="&"){str+=scanJSXEntity()}else{index++;if(ch==="\r"&&source[index]==="\n"){str+=ch;ch=source[index];index++}if(syntax.isLineTerminator(ch.charCodeAt(0))){++lineNumber;lineStart=index}str+=ch}}return{type:Token.JSXText,value:str,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanJSXStringLiteral(){var innerToken,quote,start;quote=source[index];assert(quote==='"'||quote==="'","String literal must starts with a quote");start=index;++index;innerToken=scanJSXText([quote]);if(quote!==source[index]){throwError({},Messages.UnexpectedToken,"ILLEGAL")}++index;innerToken.range=[start,index];return innerToken}function advanceJSXChild(){var ch=source.charCodeAt(index);if(ch!==123&&ch!==60){return scanJSXText(["<","{"])}return scanPunctuator()}function parseJSXIdentifier(){var token,marker=markerCreate();if(lookahead.type!==Token.JSXIdentifier){throwUnexpected(lookahead)}token=lex();return markerApply(marker,astNodeFactory.createJSXIdentifier(token.value))}function parseJSXNamespacedName(){var namespace,name,marker=markerCreate();namespace=parseJSXIdentifier();expect(":");name=parseJSXIdentifier();return markerApply(marker,astNodeFactory.createJSXNamespacedName(namespace,name))}function parseJSXMemberExpression(){var marker=markerCreate(),expr=parseJSXIdentifier();while(match(".")){lex();expr=markerApply(marker,astNodeFactory.createJSXMemberExpression(expr,parseJSXIdentifier()))}return expr}function parseJSXElementName(){if(lookahead2().value===":"){return parseJSXNamespacedName()}if(lookahead2().value==="."){return parseJSXMemberExpression()}return parseJSXIdentifier()}function parseJSXAttributeName(){if(lookahead2().value===":"){return parseJSXNamespacedName()}return parseJSXIdentifier()}function parseJSXAttributeValue(){var value,marker;if(match("{")){value=parseJSXExpressionContainer();if(value.expression.type===astNodeTypes.JSXEmptyExpression){throwError(value,"JSX attributes must only be assigned a non-empty "+"expression")}}else if(match("<")){value=parseJSXElement()}else if(lookahead.type===Token.JSXText){marker=markerCreate();value=markerApply(marker,astNodeFactory.createLiteralFromSource(lex(),source))}else{throwError({},Messages.InvalidJSXAttributeValue)}return value}function parseJSXEmptyExpression(){var marker=markerCreatePreserveWhitespace();while(source.charAt(index)!=="}"){index++}return markerApply(marker,astNodeFactory.createJSXEmptyExpression())}function parseJSXExpressionContainer(){var expression,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=false;expect("{");if(match("}")){expression=parseJSXEmptyExpression()}else{expression=parseExpression()}state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;expect("}");return markerApply(marker,astNodeFactory.createJSXExpressionContainer(expression))}function parseJSXSpreadAttribute(){var expression,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=false;state.inJSXSpreadAttribute=true;expect("{");expect("...");state.inJSXSpreadAttribute=false;expression=parseAssignmentExpression();state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;expect("}");return markerApply(marker,astNodeFactory.createJSXSpreadAttribute(expression))}function parseJSXAttribute(){var name,marker;if(match("{")){return parseJSXSpreadAttribute()}marker=markerCreate();name=parseJSXAttributeName();if(match("=")){lex();return markerApply(marker,astNodeFactory.createJSXAttribute(name,parseJSXAttributeValue()))}return markerApply(marker,astNodeFactory.createJSXAttribute(name))}function parseJSXChild(){var token,marker;if(match("{")){token=parseJSXExpressionContainer()}else if(lookahead.type===Token.JSXText){marker=markerCreatePreserveWhitespace();token=markerApply(marker,astNodeFactory.createLiteralFromSource(lex(),source))}else{token=parseJSXElement()}return token}function parseJSXClosingElement(){var name,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=true;expect("<");expect("/");name=parseJSXElementName();state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;expect(">");return markerApply(marker,astNodeFactory.createJSXClosingElement(name))}function parseJSXOpeningElement(){var name,attributes=[],selfClosing=false,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=true;expect("<");name=parseJSXElementName();while(index<length&&lookahead.value!=="/"&&lookahead.value!==">"){attributes.push(parseJSXAttribute())}state.inJSXTag=origInJSXTag;if(lookahead.value==="/"){expect("/");state.inJSXChild=origInJSXChild;expect(">");selfClosing=true}else{state.inJSXChild=true;expect(">")}return markerApply(marker,astNodeFactory.createJSXOpeningElement(name,attributes,selfClosing))}function parseJSXElement(){var openingElement,closingElement=null,children=[],origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;openingElement=parseJSXOpeningElement();if(!openingElement.selfClosing){while(index<length){state.inJSXChild=false;if(lookahead.value==="<"&&lookahead2().value==="/"){break}state.inJSXChild=true;children.push(parseJSXChild())}state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;closingElement=parseJSXClosingElement();if(getQualifiedJSXName(closingElement.name)!==getQualifiedJSXName(openingElement.name)){throwError({},Messages.ExpectedJSXClosingTag,getQualifiedJSXName(openingElement.name))}}if(!origInJSXChild&&match("<")){throwError(lookahead,Messages.AdjacentJSXElements)}return markerApply(marker,astNodeFactory.createJSXElement(openingElement,closingElement,children))}function markerApply(marker,node){if(extra.range){node.range=[marker.offset,index]}if(extra.loc){node.loc={start:{line:marker.line,column:marker.col},end:{line:lineNumber,column:index-lineStart}};if(extra.source){node.loc.source=extra.source}}if(extra.attachComment){commentAttachment.processComment(node)}return node}function markerCreate(){if(!extra.loc&&!extra.range){return undefined}skipComment();return{offset:index,line:lineNumber,col:index-lineStart}}function markerCreatePreserveWhitespace(){if(!extra.loc&&!extra.range){return undefined}return{offset:index,line:lineNumber,col:index-lineStart}}function peekLineTerminator(){var pos,line,start,found;pos=index;line=lineNumber;start=lineStart;skipComment();found=lineNumber!==line;index=pos;lineNumber=line;lineStart=start;return found}function throwError(token,messageFormat){var error,args=Array.prototype.slice.call(arguments,2),msg=messageFormat.replace(/%(\d)/g,function(whole,index){assert(index<args.length,"Message reference must be in range");return args[index]});if(typeof token.lineNumber==="number"){error=new Error("Line "+token.lineNumber+": "+msg);error.index=token.range[0];error.lineNumber=token.lineNumber;error.column=token.range[0]-lineStart+1}else{error=new Error("Line "+lineNumber+": "+msg);error.index=index;error.lineNumber=lineNumber;error.column=index-lineStart+1}error.description=msg;throw error}function throwErrorTolerant(){try{throwError.apply(null,arguments)}catch(e){if(extra.errors){extra.errors.push(e)}else{throw e}}}function throwUnexpected(token){if(token.type===Token.EOF){throwError(token,Messages.UnexpectedEOS)}if(token.type===Token.NumericLiteral){throwError(token,Messages.UnexpectedNumber)}if(token.type===Token.StringLiteral||token.type===Token.JSXText){throwError(token,Messages.UnexpectedString)}if(token.type===Token.Identifier){throwError(token,Messages.UnexpectedIdentifier)}if(token.type===Token.Keyword){if(syntax.isFutureReservedWord(token.value)){throwError(token,Messages.UnexpectedReserved)}else if(strict&&syntax.isStrictModeReservedWord(token.value)){throwErrorTolerant(token,Messages.StrictReservedWord);return}throwError(token,Messages.UnexpectedToken,token.value)}if(token.type===Token.Template){throwError(token,Messages.UnexpectedTemplate,token.value.raw)}throwError(token,Messages.UnexpectedToken,token.value)}function expect(value){var token=lex();if(token.type!==Token.Punctuator||token.value!==value){throwUnexpected(token)}}function expectKeyword(keyword){var token=lex();if(token.type!==Token.Keyword||token.value!==keyword){throwUnexpected(token)}}function match(value){return lookahead.type===Token.Punctuator&&lookahead.value===value}function matchKeyword(keyword){return lookahead.type===Token.Keyword&&lookahead.value===keyword}function matchContextualKeyword(keyword){return lookahead.type===Token.Identifier&&lookahead.value===keyword}function matchAssign(){var op;if(lookahead.type!==Token.Punctuator){return false}op=lookahead.value;return op==="="||op==="*="||op==="/="||op==="%="||op==="+="||op==="-="||op==="<<="||op===">>="||op===">>>="||op==="&="||op==="^="||op==="|="}function consumeSemicolon(){var line;if(source.charCodeAt(index)===59||match(";")){lex();return}line=lineNumber;skipComment();if(lineNumber!==line){return}if(lookahead.type!==Token.EOF&&!match("}")){throwUnexpected(lookahead)}}function isLeftHandSide(expr){return expr.type===astNodeTypes.Identifier||expr.type===astNodeTypes.MemberExpression}function parseArrayInitialiser(){var elements=[],marker=markerCreate(),tmp;expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else{tmp=parseSpreadOrAssignmentExpression();elements.push(tmp);if(!match("]")){expect(",")}}}expect("]");return markerApply(marker,astNodeFactory.createArrayExpression(elements))}function parsePropertyFunction(paramInfo,options){var previousStrict=strict,previousYieldAllowed=state.yieldAllowed,generator=options?options.generator:false,body;state.yieldAllowed=generator;body=parseFunctionSourceElements();if(strict&&paramInfo.firstRestricted){throwErrorTolerant(paramInfo.firstRestricted,Messages.StrictParamName)}if(strict&&paramInfo.stricted){throwErrorTolerant(paramInfo.stricted,paramInfo.message)}strict=previousStrict;state.yieldAllowed=previousYieldAllowed;return markerApply(options.marker,astNodeFactory.createFunctionExpression(null,paramInfo.params,paramInfo.defaults,body,paramInfo.rest,generator,body.type!==astNodeTypes.BlockStatement))}function parsePropertyMethodFunction(options){var previousStrict=strict,marker=markerCreate(),params,method;strict=true;params=parseParams();if(params.stricted){throwErrorTolerant(params.stricted,params.message)}method=parsePropertyFunction(params,{generator:options?options.generator:false,marker:marker});strict=previousStrict;return method}function parseObjectPropertyKey(){var marker=markerCreate(),token=lex(),allowObjectLiteralComputed=extra.ecmaFeatures.objectLiteralComputedProperties,expr,result;switch(token.type){case Token.StringLiteral:case Token.NumericLiteral:if(strict&&token.octal){throwErrorTolerant(token,Messages.StrictOctalLiteral)}return markerApply(marker,astNodeFactory.createLiteralFromSource(token,source));case Token.Identifier:case Token.BooleanLiteral:case Token.NullLiteral:case Token.Keyword:return markerApply(marker,astNodeFactory.createIdentifier(token.value));case Token.Punctuator:if((!state.inObjectLiteral||allowObjectLiteralComputed)&&token.value==="["){marker=markerCreate();expr=parseAssignmentExpression();result=markerApply(marker,expr);expect("]");return result}}throwUnexpected(token)}function lookaheadPropertyName(){switch(lookahead.type){case Token.Identifier:case Token.StringLiteral:case Token.BooleanLiteral:case Token.NullLiteral:case Token.NumericLiteral:case Token.Keyword:return true;case Token.Punctuator:return lookahead.value==="["}return false}function tryParseMethodDefinition(token,key,computed,marker){var value,options,methodMarker;if(token.type===Token.Identifier){if(token.value==="get"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");expect(")");value=parsePropertyFunction({params:[],defaults:[],stricted:null,firstRestricted:null,message:null,rest:null},{marker:methodMarker});return markerApply(marker,astNodeFactory.createProperty("get",key,value,false,false,computed))}else if(token.value==="set"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");options={params:[],defaultCount:0,defaults:[],stricted:null,firstRestricted:null,paramSet:new StringMap,rest:null};if(match(")")){throwErrorTolerant(lookahead,Messages.UnexpectedToken,lookahead.value)}else{parseParam(options);if(options.defaultCount===0){options.defaults=[]}}expect(")");value=parsePropertyFunction(options,{marker:methodMarker});return markerApply(marker,astNodeFactory.createProperty("set",key,value,false,false,computed))}}if(match("(")){value=parsePropertyMethodFunction();return markerApply(marker,astNodeFactory.createProperty("init",key,value,true,false,computed))}return null}function parseGeneratorProperty(key,marker){var computed=lookahead.type===Token.Punctuator&&lookahead.value==="[";if(!match("(")){throwUnexpected(lex())}return markerApply(marker,astNodeFactory.createProperty("init",key,parsePropertyMethodFunction({generator:true}),true,false,computed))}function parseObjectProperty(){var token,key,id,computed,methodMarker,options;var allowComputed=extra.ecmaFeatures.objectLiteralComputedProperties,allowMethod=extra.ecmaFeatures.objectLiteralShorthandMethods,allowShorthand=extra.ecmaFeatures.objectLiteralShorthandProperties,allowGenerators=extra.ecmaFeatures.generators,allowDestructuring=extra.ecmaFeatures.destructuring,marker=markerCreate();token=lookahead;computed=token.value==="["&&token.type===Token.Punctuator;if(token.type===Token.Identifier||allowComputed&&computed){id=parseObjectPropertyKey();if(token.value==="get"&&!(match(":")||match("(")||match(",")||match("}"))){computed=lookahead.value==="[";key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");expect(")");return markerApply(marker,astNodeFactory.createProperty("get",key,parsePropertyFunction({generator:false},{marker:methodMarker}),false,false,computed))}if(token.value==="set"&&!(match(":")||match("(")||match(",")||match("}"))){computed=lookahead.value==="[";key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");options={params:[],defaultCount:0,defaults:[],stricted:null,firstRestricted:null,paramSet:new StringMap,rest:null};if(match(")")){throwErrorTolerant(lookahead,Messages.UnexpectedToken,lookahead.value)}else{parseParam(options);if(options.defaultCount===0){options.defaults=[]}}expect(")");return markerApply(marker,astNodeFactory.createProperty("set",key,parsePropertyFunction(options,{marker:methodMarker}),false,false,computed))}if(match(":")){lex();return markerApply(marker,astNodeFactory.createProperty("init",id,parseAssignmentExpression(),false,false,computed))}if(allowMethod&&match("(")){return markerApply(marker,astNodeFactory.createProperty("init",id,parsePropertyMethodFunction({generator:false}),true,false,computed))}if(allowDestructuring&&match("=")){lex();var value=parseAssignmentExpression();var prop=markerApply(marker,astNodeFactory.createAssignmentExpression("=",id,value));prop.type=astNodeTypes.AssignmentPattern;var fullProperty=astNodeFactory.createProperty("init",id,prop,false,true,computed);return markerApply(marker,fullProperty)}if(computed||!allowShorthand&&!allowDestructuring){throwUnexpected(lookahead)}return markerApply(marker,astNodeFactory.createProperty("init",id,id,false,true,false))}if(token.type===Token.EOF||token.type===Token.Punctuator){if(!allowGenerators||!match("*")||!allowMethod){throwUnexpected(token)}lex();id=parseObjectPropertyKey();return parseGeneratorProperty(id,marker)}key=parseObjectPropertyKey();if(match(":")){lex();return markerApply(marker,astNodeFactory.createProperty("init",key,parseAssignmentExpression(),false,false,false))}if(allowMethod&&match("(")){return markerApply(marker,astNodeFactory.createProperty("init",key,parsePropertyMethodFunction(),true,false,false))}throwUnexpected(lex())}function getFieldName(key){var toString=String;if(key.type===astNodeTypes.Identifier){return key.name}return toString(key.value)}function parseObjectInitialiser(){var marker=markerCreate(),allowDuplicates=extra.ecmaFeatures.objectLiteralDuplicateProperties,properties=[],property,name,propertyFn,kind,storedKind,previousInObjectLiteral=state.inObjectLiteral,kindMap=new StringMap;state.inObjectLiteral=true;expect("{");while(!match("}")){property=parseObjectProperty();if(!property.computed){name=getFieldName(property.key);propertyFn=property.kind==="get"?PropertyKind.Get:PropertyKind.Set;kind=property.kind==="init"?PropertyKind.Data:propertyFn;if(kindMap.has(name)){storedKind=kindMap.get(name);if(storedKind===PropertyKind.Data){if(kind===PropertyKind.Data&&name==="__proto__"&&allowDuplicates){throwErrorTolerant({},Messages.DuplicatePrototypeProperty)}else if(strict&&kind===PropertyKind.Data&&!allowDuplicates){throwErrorTolerant({},Messages.StrictDuplicateProperty)}else if(kind!==PropertyKind.Data){throwErrorTolerant({},Messages.AccessorDataProperty)}}else{if(kind===PropertyKind.Data){throwErrorTolerant({},Messages.AccessorDataProperty)}else if(storedKind&kind){throwErrorTolerant({},Messages.AccessorGetSet)}}kindMap.set(name,storedKind|kind)}else{kindMap.set(name,kind)}}properties.push(property);if(!match("}")){expect(",")}}expect("}");state.inObjectLiteral=previousInObjectLiteral;return markerApply(marker,astNodeFactory.createObjectExpression(properties))}function parseTemplateElement(option){var marker,token;if(lookahead.type!==Token.Template||option.head&&!lookahead.head){throwError({},Messages.UnexpectedToken,"ILLEGAL")}marker=markerCreate();token=lex();return markerApply(marker,astNodeFactory.createTemplateElement({raw:token.value.raw,cooked:token.value.cooked},token.tail))}function parseTemplateLiteral(){var quasi,quasis,expressions,marker=markerCreate();quasi=parseTemplateElement({head:true});quasis=[quasi];expressions=[];while(!quasi.tail){expressions.push(parseExpression());quasi=parseTemplateElement({head:false});quasis.push(quasi)}return markerApply(marker,astNodeFactory.createTemplateLiteral(quasis,expressions))}function parseGroupExpression(){var expr;expect("(");++state.parenthesisCount;expr=parseExpression();expect(")");return expr}function parsePrimaryExpression(){var type,token,expr,marker,allowJSX=extra.ecmaFeatures.jsx,allowClasses=extra.ecmaFeatures.classes,allowSuper=allowClasses||extra.ecmaFeatures.superInFunctions;if(match("(")){return parseGroupExpression()}if(match("[")){return parseArrayInitialiser()}if(match("{")){return parseObjectInitialiser()}if(allowJSX&&match("<")){return parseJSXElement()}type=lookahead.type;marker=markerCreate();if(type===Token.Identifier){expr=astNodeFactory.createIdentifier(lex().value)}else if(type===Token.StringLiteral||type===Token.NumericLiteral){if(strict&&lookahead.octal){throwErrorTolerant(lookahead,Messages.StrictOctalLiteral)}expr=astNodeFactory.createLiteralFromSource(lex(),source)}else if(type===Token.Keyword){if(matchKeyword("function")){return parseFunctionExpression()}if(allowSuper&&matchKeyword("super")&&state.inFunctionBody){marker=markerCreate();lex();return markerApply(marker,astNodeFactory.createIdentifier("super"))}if(matchKeyword("this")){marker=markerCreate();lex();return markerApply(marker,astNodeFactory.createThisExpression())}if(allowClasses&&matchKeyword("class")){return parseClassExpression()}throwUnexpected(lex())}else if(type===Token.BooleanLiteral){token=lex();token.value=token.value==="true";expr=astNodeFactory.createLiteralFromSource(token,source)}else if(type===Token.NullLiteral){token=lex();token.value=null;expr=astNodeFactory.createLiteralFromSource(token,source)}else if(match("/")||match("/=")){if(typeof extra.tokens!=="undefined"){expr=astNodeFactory.createLiteralFromSource(collectRegex(),source)}else{expr=astNodeFactory.createLiteralFromSource(scanRegExp(),source);
}peek()}else if(type===Token.Template){return parseTemplateLiteral()}else{throwUnexpected(lex())}return markerApply(marker,expr)}function parseArguments(){var args=[],arg;expect("(");if(!match(")")){while(index<length){arg=parseSpreadOrAssignmentExpression();args.push(arg);if(match(")")){break}expect(",")}}expect(")");return args}function parseSpreadOrAssignmentExpression(){if(match("...")){var marker=markerCreate();lex();return markerApply(marker,astNodeFactory.createSpreadElement(parseAssignmentExpression()))}return parseAssignmentExpression()}function parseNonComputedProperty(){var token,marker=markerCreate();token=lex();if(!isIdentifierName(token)){throwUnexpected(token)}return markerApply(marker,astNodeFactory.createIdentifier(token.value))}function parseNonComputedMember(){expect(".");return parseNonComputedProperty()}function parseComputedMember(){var expr;expect("[");expr=parseExpression();expect("]");return expr}function parseNewExpression(){var callee,args,marker=markerCreate();expectKeyword("new");callee=parseLeftHandSideExpression();args=match("(")?parseArguments():[];return markerApply(marker,astNodeFactory.createNewExpression(callee,args))}function parseLeftHandSideExpressionAllowCall(){var expr,args,previousAllowIn=state.allowIn,marker=markerCreate();state.allowIn=true;expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();state.allowIn=previousAllowIn;while(match(".")||match("[")||match("(")||lookahead.type===Token.Template&&lookahead.head){if(match("(")){args=parseArguments();expr=markerApply(marker,astNodeFactory.createCallExpression(expr,args))}else if(match("[")){expr=markerApply(marker,astNodeFactory.createMemberExpression("[",expr,parseComputedMember()))}else if(match(".")){expr=markerApply(marker,astNodeFactory.createMemberExpression(".",expr,parseNonComputedMember()))}else{expr=markerApply(marker,astNodeFactory.createTaggedTemplateExpression(expr,parseTemplateLiteral()))}}return expr}function parseLeftHandSideExpression(){var expr,previousAllowIn=state.allowIn,marker=markerCreate();expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();state.allowIn=previousAllowIn;while(match(".")||match("[")||lookahead.type===Token.Template&&lookahead.head){if(match("[")){expr=markerApply(marker,astNodeFactory.createMemberExpression("[",expr,parseComputedMember()))}else if(match(".")){expr=markerApply(marker,astNodeFactory.createMemberExpression(".",expr,parseNonComputedMember()))}else{expr=markerApply(marker,astNodeFactory.createTaggedTemplateExpression(expr,parseTemplateLiteral()))}}return expr}function parsePostfixExpression(){var expr,token,marker=markerCreate();expr=parseLeftHandSideExpressionAllowCall();if(lookahead.type===Token.Punctuator){if((match("++")||match("--"))&&!peekLineTerminator()){if(strict&&expr.type===astNodeTypes.Identifier&&syntax.isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.StrictLHSPostfix)}if(!isLeftHandSide(expr)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}token=lex();expr=markerApply(marker,astNodeFactory.createPostfixExpression(token.value,expr))}}return expr}function parseUnaryExpression(){var token,expr,marker;if(lookahead.type!==Token.Punctuator&&lookahead.type!==Token.Keyword){expr=parsePostfixExpression()}else if(match("++")||match("--")){marker=markerCreate();token=lex();expr=parseUnaryExpression();if(strict&&expr.type===astNodeTypes.Identifier&&syntax.isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.StrictLHSPrefix)}if(!isLeftHandSide(expr)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}expr=astNodeFactory.createUnaryExpression(token.value,expr);expr=markerApply(marker,expr)}else if(match("+")||match("-")||match("~")||match("!")){marker=markerCreate();token=lex();expr=parseUnaryExpression();expr=astNodeFactory.createUnaryExpression(token.value,expr);expr=markerApply(marker,expr)}else if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof")){marker=markerCreate();token=lex();expr=parseUnaryExpression();expr=astNodeFactory.createUnaryExpression(token.value,expr);expr=markerApply(marker,expr);if(strict&&expr.operator==="delete"&&expr.argument.type===astNodeTypes.Identifier){throwErrorTolerant({},Messages.StrictDelete)}}else{expr=parsePostfixExpression()}return expr}function binaryPrecedence(token,allowIn){var prec=0;if(token.type!==Token.Punctuator&&token.type!==Token.Keyword){return 0}switch(token.value){case"||":prec=1;break;case"&&":prec=2;break;case"|":prec=3;break;case"^":prec=4;break;case"&":prec=5;break;case"==":case"!=":case"===":case"!==":prec=6;break;case"<":case">":case"<=":case">=":case"instanceof":prec=7;break;case"in":prec=allowIn?7:0;break;case"<<":case">>":case">>>":prec=8;break;case"+":case"-":prec=9;break;case"*":case"/":case"%":prec=11;break;default:break}return prec}function parseBinaryExpression(){var expr,token,prec,previousAllowIn,stack,right,operator,left,i,marker,markers;previousAllowIn=state.allowIn;state.allowIn=true;marker=markerCreate();left=parseUnaryExpression();token=lookahead;prec=binaryPrecedence(token,previousAllowIn);if(prec===0){return left}token.prec=prec;lex();markers=[marker,markerCreate()];right=parseUnaryExpression();stack=[left,token,right];while((prec=binaryPrecedence(lookahead,previousAllowIn))>0){while(stack.length>2&&prec<=stack[stack.length-2].prec){right=stack.pop();operator=stack.pop().value;left=stack.pop();expr=astNodeFactory.createBinaryExpression(operator,left,right);markers.pop();marker=markers.pop();markerApply(marker,expr);stack.push(expr);markers.push(marker)}token=lex();token.prec=prec;stack.push(token);markers.push(markerCreate());expr=parseUnaryExpression();stack.push(expr)}state.allowIn=previousAllowIn;i=stack.length-1;expr=stack[i];markers.pop();while(i>1){expr=astNodeFactory.createBinaryExpression(stack[i-1].value,stack[i-2],expr);i-=2;marker=markers.pop();markerApply(marker,expr)}return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent,alternate,marker=markerCreate();expr=parseBinaryExpression();if(match("?")){lex();previousAllowIn=state.allowIn;state.allowIn=true;consequent=parseAssignmentExpression();state.allowIn=previousAllowIn;expect(":");alternate=parseAssignmentExpression();expr=astNodeFactory.createConditionalExpression(expr,consequent,alternate);markerApply(marker,expr)}return expr}function parseConciseBody(){if(match("{")){return parseFunctionSourceElements()}return parseAssignmentExpression()}function reinterpretAsCoverFormalsList(expressions){var i,len,param,params,defaults,defaultCount,options,rest;params=[];defaults=[];defaultCount=0;rest=null;options={paramSet:new StringMap};for(i=0,len=expressions.length;i<len;i+=1){param=expressions[i];if(param.type===astNodeTypes.Identifier){params.push(param);defaults.push(null);validateParam(options,param,param.name)}else if(param.type===astNodeTypes.ObjectExpression||param.type===astNodeTypes.ArrayExpression){reinterpretAsDestructuredParameter(options,param);params.push(param);defaults.push(null)}else if(param.type===astNodeTypes.SpreadElement){assert(i===len-1,"It is guaranteed that SpreadElement is last element by parseExpression");if(param.argument.type!==astNodeTypes.Identifier){throwError({},Messages.InvalidLHSInFormalsList)}reinterpretAsDestructuredParameter(options,param.argument);rest=param.argument}else if(param.type===astNodeTypes.AssignmentExpression){params.push(param.left);defaults.push(param.right);++defaultCount;validateParam(options,param.left,param.left.name)}else{return null}}if(options.message===Messages.StrictParamDupe){throwError(strict?options.stricted:options.firstRestricted,options.message)}if(defaultCount===0){defaults=[]}return{params:params,defaults:defaults,rest:rest,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseArrowFunctionExpression(options,marker){var previousStrict,body;expect("=>");previousStrict=strict;body=parseConciseBody();if(strict&&options.firstRestricted){throwError(options.firstRestricted,options.message)}if(strict&&options.stricted){throwErrorTolerant(options.stricted,options.message)}strict=previousStrict;return markerApply(marker,astNodeFactory.createArrowFunctionExpression(options.params,options.defaults,body,options.rest,body.type!==astNodeTypes.BlockStatement))}function reinterpretAsAssignmentBindingPattern(expr){var i,len,property,element,allowDestructuring=extra.ecmaFeatures.destructuring;if(!allowDestructuring){throwUnexpected(lex())}if(expr.type===astNodeTypes.ObjectExpression){expr.type=astNodeTypes.ObjectPattern;for(i=0,len=expr.properties.length;i<len;i+=1){property=expr.properties[i];if(property.kind!=="init"){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}reinterpretAsAssignmentBindingPattern(property.value)}}else if(expr.type===astNodeTypes.ArrayExpression){expr.type=astNodeTypes.ArrayPattern;for(i=0,len=expr.elements.length;i<len;i+=1){element=expr.elements[i];if(element){reinterpretAsAssignmentBindingPattern(element)}}}else if(expr.type===astNodeTypes.Identifier){if(syntax.isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}}else if(expr.type===astNodeTypes.SpreadElement){reinterpretAsAssignmentBindingPattern(expr.argument);if(expr.argument.type===astNodeTypes.ObjectPattern){throwErrorTolerant({},Messages.ObjectPatternAsSpread)}}else if(expr.type==="AssignmentExpression"&&expr.operator==="="){expr.type=astNodeTypes.AssignmentPattern}else{if(expr.type!==astNodeTypes.MemberExpression&&expr.type!==astNodeTypes.CallExpression&&expr.type!==astNodeTypes.NewExpression&&expr.type!==astNodeTypes.AssignmentPattern){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}}}function reinterpretAsDestructuredParameter(options,expr){var i,len,property,element,allowDestructuring=extra.ecmaFeatures.destructuring;if(!allowDestructuring){throwUnexpected(lex())}if(expr.type===astNodeTypes.ObjectExpression){expr.type=astNodeTypes.ObjectPattern;for(i=0,len=expr.properties.length;i<len;i+=1){property=expr.properties[i];if(property.kind!=="init"){throwErrorTolerant({},Messages.InvalidLHSInFormalsList)}reinterpretAsDestructuredParameter(options,property.value)}}else if(expr.type===astNodeTypes.ArrayExpression){expr.type=astNodeTypes.ArrayPattern;for(i=0,len=expr.elements.length;i<len;i+=1){element=expr.elements[i];if(element){reinterpretAsDestructuredParameter(options,element)}}}else if(expr.type===astNodeTypes.Identifier){validateParam(options,expr,expr.name)}else if(expr.type===astNodeTypes.SpreadElement){if(expr.argument.type!==astNodeTypes.Identifier){throwErrorTolerant({},Messages.InvalidLHSInFormalsList)}validateParam(options,expr.argument,expr.argument.name)}else if(expr.type===astNodeTypes.AssignmentExpression&&expr.operator==="="){expr.type=astNodeTypes.AssignmentPattern}else if(expr.type!==astNodeTypes.AssignmentPattern){throwError({},Messages.InvalidLHSInFormalsList)}}function parseAssignmentExpression(){var token,left,right,node,params,marker,startsWithParen=false,oldParenthesisCount=state.parenthesisCount,allowGenerators=extra.ecmaFeatures.generators;if(allowGenerators&&(state.yieldAllowed&&matchContextualKeyword("yield")||strict&&matchKeyword("yield"))){return parseYieldExpression()}marker=markerCreate();if(match("(")){token=lookahead2();if(token.value===")"&&token.type===Token.Punctuator||token.value==="..."){params=parseParams();if(!match("=>")){throwUnexpected(lex())}return parseArrowFunctionExpression(params,marker)}startsWithParen=true}token=lookahead;node=left=parseConditionalExpression();if(match("=>")&&(state.parenthesisCount===oldParenthesisCount||state.parenthesisCount===oldParenthesisCount+1)){if(node.type===astNodeTypes.Identifier){params=reinterpretAsCoverFormalsList([node])}else if(node.type===astNodeTypes.AssignmentExpression||node.type===astNodeTypes.ArrayExpression||node.type===astNodeTypes.ObjectExpression){if(!startsWithParen){throwUnexpected(lex())}params=reinterpretAsCoverFormalsList([node])}else if(node.type===astNodeTypes.SequenceExpression){params=reinterpretAsCoverFormalsList(node.expressions)}if(params){return parseArrowFunctionExpression(params,marker)}}if(matchAssign()){if(strict&&left.type===astNodeTypes.Identifier&&syntax.isRestrictedWord(left.name)){throwErrorTolerant(token,Messages.StrictLHSAssignment)}if(match("=")&&(node.type===astNodeTypes.ObjectExpression||node.type===astNodeTypes.ArrayExpression)){reinterpretAsAssignmentBindingPattern(node)}else if(!isLeftHandSide(node)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}token=lex();right=parseAssignmentExpression();node=markerApply(marker,astNodeFactory.createAssignmentExpression(token.value,left,right))}return node}function parseExpression(){var marker=markerCreate(),expr=parseAssignmentExpression(),expressions=[expr],sequence,spreadFound;if(match(",")){while(index<length){if(!match(",")){break}lex();expr=parseSpreadOrAssignmentExpression();expressions.push(expr);if(expr.type===astNodeTypes.SpreadElement){spreadFound=true;if(!match(")")){throwError({},Messages.ElementAfterSpreadElement)}break}}sequence=markerApply(marker,astNodeFactory.createSequenceExpression(expressions))}if(spreadFound&&lookahead2().value!=="=>"){throwError({},Messages.IllegalSpread)}return sequence||expr}function parseStatementList(){var list=[],statement;while(index<length){if(match("}")){break}statement=parseSourceElement();if(typeof statement==="undefined"){break}list.push(statement)}return list}function parseBlock(){var block,marker=markerCreate();expect("{");block=parseStatementList();expect("}");return markerApply(marker,astNodeFactory.createBlockStatement(block))}function parseVariableIdentifier(){var token,marker=markerCreate();token=lex();if(token.type!==Token.Identifier){if(strict&&token.type===Token.Keyword&&syntax.isStrictModeReservedWord(token.value)){throwErrorTolerant(token,Messages.StrictReservedWord)}else{throwUnexpected(token)}}return markerApply(marker,astNodeFactory.createIdentifier(token.value))}function parseVariableDeclaration(kind){var id,marker=markerCreate(),init=null;if(match("{")){id=parseObjectInitialiser();reinterpretAsAssignmentBindingPattern(id)}else if(match("[")){id=parseArrayInitialiser();reinterpretAsAssignmentBindingPattern(id)}else{id=state.allowKeyword?parseNonComputedProperty():parseVariableIdentifier();if(strict&&syntax.isRestrictedWord(id.name)){throwErrorTolerant({},Messages.StrictVarName)}}if(kind==="const"){if(!match("=")){throwError({},Messages.NoUnintializedConst)}expect("=");init=parseAssignmentExpression()}else if(match("=")){lex();init=parseAssignmentExpression()}return markerApply(marker,astNodeFactory.createVariableDeclarator(id,init))}function parseVariableDeclarationList(kind){var list=[];do{list.push(parseVariableDeclaration(kind));if(!match(",")){break}lex()}while(index<length);return list}function parseVariableStatement(){var declarations;expectKeyword("var");declarations=parseVariableDeclarationList();consumeSemicolon();return astNodeFactory.createVariableDeclaration(declarations,"var")}function parseConstLetDeclaration(kind){var declarations,marker=markerCreate();expectKeyword(kind);declarations=parseVariableDeclarationList(kind);consumeSemicolon();return markerApply(marker,astNodeFactory.createVariableDeclaration(declarations,kind))}function parseEmptyStatement(){expect(";");return astNodeFactory.createEmptyStatement()}function parseExpressionStatement(){var expr=parseExpression();consumeSemicolon();return astNodeFactory.createExpressionStatement(expr)}function parseIfStatement(){var test,consequent,alternate;expectKeyword("if");expect("(");test=parseExpression();expect(")");consequent=parseStatement();if(matchKeyword("else")){lex();alternate=parseStatement()}else{alternate=null}return astNodeFactory.createIfStatement(test,consequent,alternate)}function parseDoWhileStatement(){var body,test,oldInIteration;expectKeyword("do");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");if(match(";")){lex()}return astNodeFactory.createDoWhileStatement(test,body)}function parseWhileStatement(){var test,body,oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;return astNodeFactory.createWhileStatement(test,body)}function parseForVariableDeclaration(){var token,declarations,marker=markerCreate();token=lex();declarations=parseVariableDeclarationList();return markerApply(marker,astNodeFactory.createVariableDeclaration(declarations,token.value))}function parseForStatement(opts){var init,test,update,left,right,body,operator,oldInIteration;var allowForOf=extra.ecmaFeatures.forOf,allowBlockBindings=extra.ecmaFeatures.blockBindings;init=test=update=null;expectKeyword("for");expect("(");if(match(";")){lex()}else{if(matchKeyword("var")||allowBlockBindings&&(matchKeyword("let")||matchKeyword("const"))){state.allowIn=false;init=parseForVariableDeclaration();state.allowIn=true;if(init.declarations.length===1){if(matchKeyword("in")||allowForOf&&matchContextualKeyword("of")){operator=lookahead;if(!((operator.value==="in"||init.kind!=="var")&&init.declarations[0].init)){lex();left=init;right=parseExpression();init=null}}}}else{state.allowIn=false;init=parseExpression();state.allowIn=true;if(allowForOf&&matchContextualKeyword("of")){operator=lex();left=init;right=parseExpression();init=null}else if(matchKeyword("in")){if(!isLeftHandSide(init)){throwErrorTolerant({},Messages.InvalidLHSInForIn)}operator=lex();left=init;right=parseExpression();init=null}}if(typeof left==="undefined"){expect(";")}}if(typeof left==="undefined"){if(!match(";")){test=parseExpression()}expect(";");if(!match(")")){update=parseExpression()}}expect(")");oldInIteration=state.inIteration;state.inIteration=true;if(!(opts!==undefined&&opts.ignoreBody)){body=parseStatement()}state.inIteration=oldInIteration;if(typeof left==="undefined"){return astNodeFactory.createForStatement(init,test,update,body)}if(extra.ecmaFeatures.forOf&&operator.value==="of"){return astNodeFactory.createForOfStatement(left,right,body)}return astNodeFactory.createForInStatement(left,right,body)}function parseContinueStatement(){var label=null;expectKeyword("continue");if(source.charCodeAt(index)===59){lex();if(!state.inIteration){throwError({},Messages.IllegalContinue)}return astNodeFactory.createContinueStatement(null)}if(peekLineTerminator()){if(!state.inIteration){throwError({},Messages.IllegalContinue)}return astNodeFactory.createContinueStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();if(!state.labelSet.has(label.name)){throwError({},Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!state.inIteration){throwError({},Messages.IllegalContinue)}return astNodeFactory.createContinueStatement(label)}function parseBreakStatement(){var label=null;expectKeyword("break");if(source.charCodeAt(index)===59){lex();if(!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return astNodeFactory.createBreakStatement(null)}if(peekLineTerminator()){if(!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return astNodeFactory.createBreakStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();if(!state.labelSet.has(label.name)){throwError({},Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return astNodeFactory.createBreakStatement(label)}function parseReturnStatement(){var argument=null;expectKeyword("return");if(!state.inFunctionBody&&!extra.ecmaFeatures.globalReturn){throwErrorTolerant({},Messages.IllegalReturn)}if(source.charCodeAt(index)===32){if(syntax.isIdentifierStart(source.charCodeAt(index+1))){argument=parseExpression();consumeSemicolon();return astNodeFactory.createReturnStatement(argument)}}if(peekLineTerminator()){return astNodeFactory.createReturnStatement(null)}if(!match(";")){if(!match("}")&&lookahead.type!==Token.EOF){argument=parseExpression()}}consumeSemicolon();return astNodeFactory.createReturnStatement(argument)}function parseWithStatement(){var object,body;if(strict){skipComment();throwErrorTolerant({},Messages.StrictModeWith)}expectKeyword("with");expect("(");object=parseExpression();expect(")");body=parseStatement();return astNodeFactory.createWithStatement(object,body)}function parseSwitchCase(){var test,consequent=[],statement,marker=markerCreate();if(matchKeyword("default")){lex();test=null}else{expectKeyword("case");test=parseExpression()}expect(":");while(index<length){if(match("}")||matchKeyword("default")||matchKeyword("case")){break}statement=parseSourceElement();consequent.push(statement)}return markerApply(marker,astNodeFactory.createSwitchCase(test,consequent))}function parseSwitchStatement(){var discriminant,cases,clause,oldInSwitch,defaultFound;expectKeyword("switch");expect("(");discriminant=parseExpression();expect(")");expect("{");cases=[];if(match("}")){lex();return astNodeFactory.createSwitchStatement(discriminant,cases)}oldInSwitch=state.inSwitch;state.inSwitch=true;defaultFound=false;while(index<length){if(match("}")){break}clause=parseSwitchCase();if(clause.test===null){if(defaultFound){throwError({},Messages.MultipleDefaultsInSwitch)}defaultFound=true}cases.push(clause)}state.inSwitch=oldInSwitch;expect("}");return astNodeFactory.createSwitchStatement(discriminant,cases)}function parseThrowStatement(){var argument;expectKeyword("throw");if(peekLineTerminator()){throwError({},Messages.NewlineAfterThrow)}argument=parseExpression();consumeSemicolon();return astNodeFactory.createThrowStatement(argument)}function parseCatchClause(){var param,body,marker=markerCreate(),allowDestructuring=extra.ecmaFeatures.destructuring,options={paramSet:new StringMap};expectKeyword("catch");expect("(");if(match(")")){throwUnexpected(lookahead)}if(match("[")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseArrayInitialiser();reinterpretAsDestructuredParameter(options,param)}else if(match("{")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseObjectInitialiser();reinterpretAsDestructuredParameter(options,param)}else{param=parseVariableIdentifier()}if(strict&&param.name&&syntax.isRestrictedWord(param.name)){throwErrorTolerant({},Messages.StrictCatchVariable)}expect(")");body=parseBlock();return markerApply(marker,astNodeFactory.createCatchClause(param,body))}function parseTryStatement(){var block,handler=null,finalizer=null;expectKeyword("try");block=parseBlock();if(matchKeyword("catch")){handler=parseCatchClause()}if(matchKeyword("finally")){lex();finalizer=parseBlock()}if(!handler&&!finalizer){throwError({},Messages.NoCatchOrFinally)}return astNodeFactory.createTryStatement(block,handler,finalizer)}function parseDebuggerStatement(){expectKeyword("debugger");consumeSemicolon();return astNodeFactory.createDebuggerStatement()}function parseStatement(){var type=lookahead.type,expr,labeledBody,marker;if(type===Token.EOF){throwUnexpected(lookahead)}if(type===Token.Punctuator&&lookahead.value==="{"){return parseBlock()}marker=markerCreate();if(type===Token.Punctuator){switch(lookahead.value){case";":return markerApply(marker,parseEmptyStatement());case"{":return parseBlock();case"(":return markerApply(marker,parseExpressionStatement());default:break}}marker=markerCreate();if(type===Token.Keyword){switch(lookahead.value){case"break":return markerApply(marker,parseBreakStatement());case"continue":return markerApply(marker,parseContinueStatement());case"debugger":return markerApply(marker,parseDebuggerStatement());case"do":return markerApply(marker,parseDoWhileStatement());case"for":return markerApply(marker,parseForStatement());case"function":return markerApply(marker,parseFunctionDeclaration());case"if":return markerApply(marker,parseIfStatement());case"return":return markerApply(marker,parseReturnStatement());case"switch":return markerApply(marker,parseSwitchStatement());case"throw":return markerApply(marker,parseThrowStatement());case"try":return markerApply(marker,parseTryStatement());case"var":return markerApply(marker,parseVariableStatement());case"while":return markerApply(marker,parseWhileStatement());case"with":return markerApply(marker,parseWithStatement());default:break}}marker=markerCreate();expr=parseExpression();if(expr.type===astNodeTypes.Identifier&&match(":")){lex();if(state.labelSet.has(expr.name)){throwError({},Messages.Redeclaration,"Label",expr.name)}state.labelSet.set(expr.name,true);labeledBody=parseStatement();state.labelSet.delete(expr.name);return markerApply(marker,astNodeFactory.createLabeledStatement(expr,labeledBody))}consumeSemicolon();return markerApply(marker,astNodeFactory.createExpressionStatement(expr))}function parseFunctionSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody,oldParenthesisCount,marker=markerCreate();expect("{");while(index<length){if(lookahead.type!==Token.StringLiteral){break}token=lookahead;sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==astNodeTypes.Literal){break}directive=source.slice(token.range[0]+1,token.range[1]-1);if(directive==="use strict"){strict=true;if(firstRestricted){throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}oldLabelSet=state.labelSet;oldInIteration=state.inIteration;oldInSwitch=state.inSwitch;oldInFunctionBody=state.inFunctionBody;oldParenthesisCount=state.parenthesizedCount;state.labelSet=new StringMap;state.inIteration=false;state.inSwitch=false;state.inFunctionBody=true;while(index<length){if(match("}")){break}sourceElement=parseSourceElement();if(typeof sourceElement==="undefined"){break}sourceElements.push(sourceElement)}expect("}");state.labelSet=oldLabelSet;state.inIteration=oldInIteration;state.inSwitch=oldInSwitch;state.inFunctionBody=oldInFunctionBody;state.parenthesizedCount=oldParenthesisCount;return markerApply(marker,astNodeFactory.createBlockStatement(sourceElements))}function validateParam(options,param,name){if(strict){if(syntax.isRestrictedWord(name)){options.stricted=param;options.message=Messages.StrictParamName}if(options.paramSet.has(name)){options.stricted=param;options.message=Messages.StrictParamDupe}}else if(!options.firstRestricted){if(syntax.isRestrictedWord(name)){options.firstRestricted=param;options.message=Messages.StrictParamName}else if(syntax.isStrictModeReservedWord(name)){options.firstRestricted=param;options.message=Messages.StrictReservedWord}else if(options.paramSet.has(name)){options.firstRestricted=param;options.message=Messages.StrictParamDupe}}options.paramSet.set(name,true)}function parseParam(options){var token,rest,param,def,allowRestParams=extra.ecmaFeatures.restParams,allowDestructuring=extra.ecmaFeatures.destructuring,allowDefaultParams=extra.ecmaFeatures.defaultParams;token=lookahead;if(token.value==="..."){if(!allowRestParams){throwUnexpected(lookahead)}token=lex();rest=true}if(match("[")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseArrayInitialiser();reinterpretAsDestructuredParameter(options,param)}else if(match("{")){if(rest){throwError({},Messages.ObjectPatternAsRestParameter)}if(!allowDestructuring){throwUnexpected(lookahead)}param=parseObjectInitialiser();reinterpretAsDestructuredParameter(options,param)}else{param=parseVariableIdentifier();validateParam(options,token,token.value)}if(match("=")){if(rest){throwErrorTolerant(lookahead,Messages.DefaultRestParameter)}if(allowDefaultParams||allowDestructuring){lex();def=parseAssignmentExpression();++options.defaultCount}else{throwUnexpected(lookahead)}}if(rest){if(!match(")")){throwError({},Messages.ParameterAfterRestParameter)}options.rest=param;return false}options.params.push(param);options.defaults.push(def?def:null);return!match(")")}function parseParams(firstRestricted){var options;options={params:[],defaultCount:0,defaults:[],rest:null,firstRestricted:firstRestricted};expect("(");if(!match(")")){options.paramSet=new StringMap;while(index<length){if(!parseParam(options)){break}expect(",")}}expect(")");if(options.defaultCount===0){options.defaults=[]}return{params:options.params,defaults:options.defaults,rest:options.rest,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseFunctionDeclaration(identifierIsOptional){var id=null,body,token,tmp,firstRestricted,message,previousStrict,previousYieldAllowed,generator,marker=markerCreate(),allowGenerators=extra.ecmaFeatures.generators;expectKeyword("function");generator=false;if(allowGenerators&&match("*")){lex();generator=true}if(!identifierIsOptional||!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(syntax.isRestrictedWord(token.value)){throwErrorTolerant(token,Messages.StrictFunctionName)}}else{if(syntax.isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(syntax.isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}tmp=parseParams(firstRestricted);firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousStrict=strict;previousYieldAllowed=state.yieldAllowed;state.yieldAllowed=generator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwError(firstRestricted,message)}if(strict&&tmp.stricted){throwErrorTolerant(tmp.stricted,message)}strict=previousStrict;state.yieldAllowed=previousYieldAllowed;return markerApply(marker,astNodeFactory.createFunctionDeclaration(id,tmp.params,tmp.defaults,body,tmp.rest,generator,false))}function parseFunctionExpression(){var token,id=null,firstRestricted,message,tmp,body,previousStrict,previousYieldAllowed,generator,marker=markerCreate(),allowGenerators=extra.ecmaFeatures.generators;expectKeyword("function");generator=false;if(allowGenerators&&match("*")){lex();generator=true}if(!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(syntax.isRestrictedWord(token.value)){throwErrorTolerant(token,Messages.StrictFunctionName)}}else{if(syntax.isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(syntax.isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}tmp=parseParams(firstRestricted);firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousStrict=strict;previousYieldAllowed=state.yieldAllowed;state.yieldAllowed=generator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwError(firstRestricted,message)}if(strict&&tmp.stricted){throwErrorTolerant(tmp.stricted,message)}strict=previousStrict;state.yieldAllowed=previousYieldAllowed;return markerApply(marker,astNodeFactory.createFunctionExpression(id,tmp.params,tmp.defaults,body,tmp.rest,generator,false))}function parseYieldExpression(){var yieldToken,delegateFlag,expr,marker=markerCreate();yieldToken=lex();assert(yieldToken.value==="yield","Called parseYieldExpression with non-yield lookahead.");if(!state.yieldAllowed){throwErrorTolerant({},Messages.IllegalYield)}delegateFlag=false;if(match("*")){lex();delegateFlag=true}expr=parseAssignmentExpression();return markerApply(marker,astNodeFactory.createYieldExpression(expr,delegateFlag))}function parseModuleSpecifier(){var marker=markerCreate(),specifier;if(lookahead.type!==Token.StringLiteral){throwError({},Messages.InvalidModuleSpecifier)}specifier=astNodeFactory.createLiteralFromSource(lex(),source);return markerApply(marker,specifier)}function parseExportSpecifier(){var exported,local,marker=markerCreate();if(matchKeyword("default")){lex();local=markerApply(marker,astNodeFactory.createIdentifier("default"))}else{local=parseVariableIdentifier()}if(matchContextualKeyword("as")){
lex();exported=parseNonComputedProperty()}return markerApply(marker,astNodeFactory.createExportSpecifier(local,exported))}function parseExportNamedDeclaration(){var declaration=null,isExportFromIdentifier,src=null,specifiers=[],marker=markerCreate();expectKeyword("export");if(lookahead.type===Token.Keyword){switch(lookahead.value){case"let":case"const":case"var":case"class":case"function":declaration=parseSourceElement();return markerApply(marker,astNodeFactory.createExportNamedDeclaration(declaration,specifiers,null));default:break}}expect("{");if(!match("}")){do{isExportFromIdentifier=isExportFromIdentifier||matchKeyword("default");specifiers.push(parseExportSpecifier())}while(match(",")&&lex())}expect("}");if(matchContextualKeyword("from")){lex();src=parseModuleSpecifier();consumeSemicolon()}else if(isExportFromIdentifier){throwError({},lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}else{consumeSemicolon()}return markerApply(marker,astNodeFactory.createExportNamedDeclaration(declaration,specifiers,src))}function parseExportDefaultDeclaration(){var declaration=null,expression=null,possibleIdentifierToken,allowClasses=extra.ecmaFeatures.classes,marker=markerCreate();expectKeyword("export");expectKeyword("default");if(matchKeyword("function")||matchKeyword("class")){possibleIdentifierToken=lookahead2();if(possibleIdentifierToken.type===Token.Identifier){declaration=parseSourceElement();return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(declaration))}if(lookahead.value==="function"){declaration=parseFunctionDeclaration(true);return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(declaration))}else if(allowClasses&&lookahead.value==="class"){declaration=parseClassDeclaration(true);return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(declaration))}}if(matchContextualKeyword("from")){throwError({},Messages.UnexpectedToken,lookahead.value)}if(match("{")){expression=parseObjectInitialiser()}else if(match("[")){expression=parseArrayInitialiser()}else{expression=parseAssignmentExpression()}consumeSemicolon();return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(expression))}function parseExportAllDeclaration(){var src,marker=markerCreate();expectKeyword("export");expect("*");if(!matchContextualKeyword("from")){throwError({},lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return markerApply(marker,astNodeFactory.createExportAllDeclaration(src))}function parseExportDeclaration(){if(state.inFunctionBody){throwError({},Messages.IllegalExportDeclaration)}var declarationType=lookahead2().value;if(declarationType==="default"){return parseExportDefaultDeclaration()}else if(declarationType==="*"){return parseExportAllDeclaration()}else{return parseExportNamedDeclaration()}}function parseImportSpecifier(){var local,imported,marker=markerCreate();imported=parseNonComputedProperty();if(matchContextualKeyword("as")){lex();local=parseVariableIdentifier()}return markerApply(marker,astNodeFactory.createImportSpecifier(local,imported))}function parseNamedImports(){var specifiers=[];expect("{");if(!match("}")){do{specifiers.push(parseImportSpecifier())}while(match(",")&&lex())}expect("}");return specifiers}function parseImportDefaultSpecifier(){var local,marker=markerCreate();local=parseNonComputedProperty();return markerApply(marker,astNodeFactory.createImportDefaultSpecifier(local))}function parseImportNamespaceSpecifier(){var local,marker=markerCreate();expect("*");if(!matchContextualKeyword("as")){throwError({},Messages.NoAsAfterImportNamespace)}lex();local=parseNonComputedProperty();return markerApply(marker,astNodeFactory.createImportNamespaceSpecifier(local))}function parseImportDeclaration(){var specifiers,src,marker=markerCreate();if(state.inFunctionBody){throwError({},Messages.IllegalImportDeclaration)}expectKeyword("import");specifiers=[];if(lookahead.type===Token.StringLiteral){src=parseModuleSpecifier();consumeSemicolon();return markerApply(marker,astNodeFactory.createImportDeclaration(specifiers,src))}if(!matchKeyword("default")&&isIdentifierName(lookahead)){specifiers.push(parseImportDefaultSpecifier());if(match(",")){lex()}}if(match("*")){specifiers.push(parseImportNamespaceSpecifier())}else if(match("{")){specifiers=specifiers.concat(parseNamedImports())}if(!matchContextualKeyword("from")){throwError({},lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return markerApply(marker,astNodeFactory.createImportDeclaration(specifiers,src))}function parseClassBody(){var hasConstructor=false,generator=false,allowGenerators=extra.ecmaFeatures.generators,token,isStatic,body=[],method,computed,key;var existingProps={},topMarker=markerCreate(),marker;existingProps.static=new StringMap;existingProps.prototype=new StringMap;expect("{");while(!match("}")){if(match(";")){lex();continue}token=lookahead;isStatic=false;generator=match("*");computed=match("[");marker=markerCreate();if(generator){if(!allowGenerators){throwUnexpected(lookahead)}lex()}key=parseObjectPropertyKey();if(key.name==="static"&&match("*")){if(!allowGenerators){throwUnexpected(lookahead)}generator=true;lex()}if(key.name==="static"&&lookaheadPropertyName()){token=lookahead;isStatic=true;computed=match("[");key=parseObjectPropertyKey()}if(generator){method=parseGeneratorProperty(key,marker)}else{method=tryParseMethodDefinition(token,key,computed,marker,generator)}if(method){method.static=isStatic;if(method.kind==="init"){method.kind="method"}if(!isStatic){if(!method.computed&&(method.key.name||method.key.value.toString())==="constructor"){if(method.kind!=="method"||!method.method||method.value.generator){throwUnexpected(token,Messages.ConstructorSpecialMethod)}if(hasConstructor){throwUnexpected(token,Messages.DuplicateConstructor)}else{hasConstructor=true}method.kind="constructor"}}else{if(!method.computed&&(method.key.name||method.key.value.toString())==="prototype"){throwUnexpected(token,Messages.StaticPrototype)}}method.type=astNodeTypes.MethodDefinition;delete method.method;delete method.shorthand;body.push(method)}else{throwUnexpected(lookahead)}}lex();return markerApply(topMarker,astNodeFactory.createClassBody(body))}function parseClassExpression(){var id=null,superClass=null,marker=markerCreate(),previousStrict=strict,classBody;strict=true;expectKeyword("class");if(lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=parseLeftHandSideExpressionAllowCall()}classBody=parseClassBody();strict=previousStrict;return markerApply(marker,astNodeFactory.createClassExpression(id,superClass,classBody))}function parseClassDeclaration(identifierIsOptional){var id=null,superClass=null,marker=markerCreate(),previousStrict=strict,classBody;strict=true;expectKeyword("class");if(!identifierIsOptional||lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=parseLeftHandSideExpressionAllowCall()}classBody=parseClassBody();strict=previousStrict;return markerApply(marker,astNodeFactory.createClassDeclaration(id,superClass,classBody))}function parseSourceElement(){var allowClasses=extra.ecmaFeatures.classes,allowModules=extra.ecmaFeatures.modules,allowBlockBindings=extra.ecmaFeatures.blockBindings;if(lookahead.type===Token.Keyword){switch(lookahead.value){case"export":if(!allowModules){throwErrorTolerant({},Messages.IllegalExportDeclaration)}return parseExportDeclaration();case"import":if(!allowModules){throwErrorTolerant({},Messages.IllegalImportDeclaration)}return parseImportDeclaration();case"function":return parseFunctionDeclaration();case"class":if(allowClasses){return parseClassDeclaration()}break;case"const":case"let":if(allowBlockBindings){return parseConstLetDeclaration(lookahead.value)}default:return parseStatement()}}if(lookahead.type!==Token.EOF){return parseStatement()}}function parseSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted;while(index<length){token=lookahead;if(token.type!==Token.StringLiteral){break}sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==astNodeTypes.Literal){break}directive=source.slice(token.range[0]+1,token.range[1]-1);if(directive==="use strict"){strict=true;if(firstRestricted){throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}while(index<length){sourceElement=parseSourceElement();if(typeof sourceElement==="undefined"){break}sourceElements.push(sourceElement)}return sourceElements}function parseProgram(){var body,marker,isModule=!!extra.ecmaFeatures.modules;skipComment();peek();marker=markerCreate();strict=isModule;body=parseSourceElements();return markerApply(marker,astNodeFactory.createProgram(body,isModule?"module":"script"))}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=0;i<extra.tokens.length;++i){entry=extra.tokens[i];token={type:entry.type,value:entry.value};if(entry.regex){token.regex={pattern:entry.regex.pattern,flags:entry.regex.flags}}if(extra.range){token.range=entry.range}if(extra.loc){token.loc=entry.loc}tokens.push(token)}extra.tokens=tokens}function tokenize(code,options){var toString,tokens;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;lookahead=null;state={allowIn:true,labelSet:{},parenthesisCount:0,inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,yieldAllowed:false,curlyStack:[],curlyLastIndex:0,inJSXSpreadAttribute:false,inJSXChild:false,inJSXTag:false};extra={ecmaFeatures:defaultFeatures};options=options||{};options.tokens=true;extra.tokens=[];extra.tokenize=true;extra.openParenToken=-1;extra.openCurlyToken=-1;extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}if(options.ecmaFeatures&&typeof options.ecmaFeatures==="object"){extra.ecmaFeatures=options.ecmaFeatures}try{peek();if(lookahead.type===Token.EOF){return extra.tokens}lex();while(lookahead.type!==Token.EOF){try{lex()}catch(lexError){if(extra.errors){extra.errors.push(lexError);break}else{throw lexError}}}filterTokenLocation();tokens=extra.tokens;if(typeof extra.comments!=="undefined"){tokens.comments=extra.comments}if(typeof extra.errors!=="undefined"){tokens.errors=extra.errors}}catch(e){throw e}finally{extra={}}return tokens}function parse(code,options){var program,toString;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;lookahead=null;state={allowIn:true,labelSet:new StringMap,parenthesisCount:0,inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,yieldAllowed:false,curlyStack:[],curlyLastIndex:0,inJSXSpreadAttribute:false,inJSXChild:false,inJSXTag:false};extra={ecmaFeatures:Object.create(defaultFeatures)};state.curlyStack=[];if(typeof options!=="undefined"){extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;extra.attachComment=typeof options.attachComment==="boolean"&&options.attachComment;if(extra.loc&&options.source!==null&&options.source!==undefined){extra.source=toString(options.source)}if(typeof options.tokens==="boolean"&&options.tokens){extra.tokens=[]}if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}if(extra.attachComment){extra.range=true;extra.comments=[];commentAttachment.reset()}if(options.sourceType==="module"){extra.ecmaFeatures={arrowFunctions:true,blockBindings:true,regexUFlag:true,regexYFlag:true,templateStrings:true,binaryLiterals:true,octalLiterals:true,unicodeCodePointEscapes:true,superInFunctions:true,defaultParams:true,restParams:true,forOf:true,objectLiteralComputedProperties:true,objectLiteralShorthandMethods:true,objectLiteralShorthandProperties:true,objectLiteralDuplicateProperties:true,generators:true,destructuring:true,classes:true,modules:true}}if(options.ecmaFeatures&&typeof options.ecmaFeatures==="object"){if(options.sourceType==="module"){Object.keys(options.ecmaFeatures).forEach(function(key){extra.ecmaFeatures[key]=options.ecmaFeatures[key]})}else{extra.ecmaFeatures=options.ecmaFeatures}}}try{program=parseProgram();if(typeof extra.comments!=="undefined"){program.comments=extra.comments}if(typeof extra.tokens!=="undefined"){filterTokenLocation();program.tokens=extra.tokens}if(typeof extra.errors!=="undefined"){program.errors=extra.errors}}catch(e){throw e}finally{extra={}}return program}exports.version=require("./package.json").version;exports.tokenize=tokenize;exports.parse=parse;exports.Syntax=function(){var name,types={};if(typeof Object.create==="function"){types=Object.create(null)}for(name in astNodeTypes){if(astNodeTypes.hasOwnProperty(name)){types[name]=astNodeTypes[name]}}if(typeof Object.freeze==="function"){Object.freeze(types)}return types}()},{"./lib/ast-node-factory":59,"./lib/ast-node-types":60,"./lib/comment-attachment":61,"./lib/features":62,"./lib/messages":63,"./lib/string-map":64,"./lib/syntax":65,"./lib/token-info":66,"./lib/xhtml-entities":67,"./package.json":68}],59:[function(require,module,exports){"use strict";var astNodeTypes=require("./ast-node-types");module.exports={createArrayExpression:function(elements){return{type:astNodeTypes.ArrayExpression,elements:elements}},createArrowFunctionExpression:function(params,defaults,body,rest,expression){return{type:astNodeTypes.ArrowFunctionExpression,id:null,params:params,defaults:defaults,body:body,rest:rest,generator:false,expression:expression}},createAssignmentExpression:function(operator,left,right){return{type:astNodeTypes.AssignmentExpression,operator:operator,left:left,right:right}},createBinaryExpression:function(operator,left,right){var type=operator==="||"||operator==="&&"?astNodeTypes.LogicalExpression:astNodeTypes.BinaryExpression;return{type:type,operator:operator,left:left,right:right}},createBlockStatement:function(body){return{type:astNodeTypes.BlockStatement,body:body}},createBreakStatement:function(label){return{type:astNodeTypes.BreakStatement,label:label}},createCallExpression:function(callee,args){return{type:astNodeTypes.CallExpression,callee:callee,arguments:args}},createCatchClause:function(param,body){return{type:astNodeTypes.CatchClause,param:param,body:body}},createClassBody:function(body){return{type:astNodeTypes.ClassBody,body:body}},createClassExpression:function(id,superClass,body){return{type:astNodeTypes.ClassExpression,id:id,superClass:superClass,body:body}},createClassDeclaration:function(id,superClass,body){return{type:astNodeTypes.ClassDeclaration,id:id,superClass:superClass,body:body}},createMethodDefinition:function(propertyType,kind,key,value,computed){return{type:astNodeTypes.MethodDefinition,key:key,value:value,kind:kind,"static":propertyType==="static",computed:computed}},createConditionalExpression:function(test,consequent,alternate){return{type:astNodeTypes.ConditionalExpression,test:test,consequent:consequent,alternate:alternate}},createContinueStatement:function(label){return{type:astNodeTypes.ContinueStatement,label:label}},createDebuggerStatement:function(){return{type:astNodeTypes.DebuggerStatement}},createEmptyStatement:function(){return{type:astNodeTypes.EmptyStatement}},createExpressionStatement:function(expression){return{type:astNodeTypes.ExpressionStatement,expression:expression}},createWhileStatement:function(test,body){return{type:astNodeTypes.WhileStatement,test:test,body:body}},createDoWhileStatement:function(test,body){return{type:astNodeTypes.DoWhileStatement,body:body,test:test}},createForStatement:function(init,test,update,body){return{type:astNodeTypes.ForStatement,init:init,test:test,update:update,body:body}},createForInStatement:function(left,right,body){return{type:astNodeTypes.ForInStatement,left:left,right:right,body:body,each:false}},createForOfStatement:function(left,right,body){return{type:astNodeTypes.ForOfStatement,left:left,right:right,body:body}},createFunctionDeclaration:function(id,params,defaults,body,rest,generator,expression){return{type:astNodeTypes.FunctionDeclaration,id:id,params:params||[],defaults:defaults||[],body:body,rest:rest||null,generator:!!generator,expression:!!expression}},createFunctionExpression:function(id,params,defaults,body,rest,generator,expression){return{type:astNodeTypes.FunctionExpression,id:id,params:params||[],defaults:defaults||[],body:body,rest:rest||null,generator:!!generator,expression:!!expression}},createIdentifier:function(name){return{type:astNodeTypes.Identifier,name:name}},createIfStatement:function(test,consequent,alternate){return{type:astNodeTypes.IfStatement,test:test,consequent:consequent,alternate:alternate}},createLabeledStatement:function(label,body){return{type:astNodeTypes.LabeledStatement,label:label,body:body}},createLiteralFromSource:function(token,source){var node={type:astNodeTypes.Literal,value:token.value,raw:source.slice(token.range[0],token.range[1])};if(token.regex){node.regex=token.regex}return node},createTemplateElement:function(value,tail){return{type:astNodeTypes.TemplateElement,value:value,tail:tail}},createTemplateLiteral:function(quasis,expressions){return{type:astNodeTypes.TemplateLiteral,quasis:quasis,expressions:expressions}},createSpreadElement:function(argument){return{type:astNodeTypes.SpreadElement,argument:argument}},createTaggedTemplateExpression:function(tag,quasi){return{type:astNodeTypes.TaggedTemplateExpression,tag:tag,quasi:quasi}},createMemberExpression:function(accessor,object,property){return{type:astNodeTypes.MemberExpression,computed:accessor==="[",object:object,property:property}},createNewExpression:function(callee,args){return{type:astNodeTypes.NewExpression,callee:callee,arguments:args}},createObjectExpression:function(properties){return{type:astNodeTypes.ObjectExpression,properties:properties}},createPostfixExpression:function(operator,argument){return{type:astNodeTypes.UpdateExpression,operator:operator,argument:argument,prefix:false}},createProgram:function(body,sourceType){return{type:astNodeTypes.Program,body:body,sourceType:sourceType}},createProperty:function(kind,key,value,method,shorthand,computed){return{type:astNodeTypes.Property,key:key,value:value,kind:kind,method:method,shorthand:shorthand,computed:computed}},createReturnStatement:function(argument){return{type:astNodeTypes.ReturnStatement,argument:argument}},createSequenceExpression:function(expressions){return{type:astNodeTypes.SequenceExpression,expressions:expressions}},createSwitchCase:function(test,consequent){return{type:astNodeTypes.SwitchCase,test:test,consequent:consequent}},createSwitchStatement:function(discriminant,cases){return{type:astNodeTypes.SwitchStatement,discriminant:discriminant,cases:cases}},createThisExpression:function(){return{type:astNodeTypes.ThisExpression}},createThrowStatement:function(argument){return{type:astNodeTypes.ThrowStatement,argument:argument}},createTryStatement:function(block,handler,finalizer){return{type:astNodeTypes.TryStatement,block:block,guardedHandlers:[],handlers:handler?[handler]:[],handler:handler,finalizer:finalizer}},createUnaryExpression:function(operator,argument){if(operator==="++"||operator==="--"){return{type:astNodeTypes.UpdateExpression,operator:operator,argument:argument,prefix:true}}return{type:astNodeTypes.UnaryExpression,operator:operator,argument:argument,prefix:true}},createVariableDeclaration:function(declarations,kind){return{type:astNodeTypes.VariableDeclaration,declarations:declarations,kind:kind}},createVariableDeclarator:function(id,init){return{type:astNodeTypes.VariableDeclarator,id:id,init:init}},createWithStatement:function(object,body){return{type:astNodeTypes.WithStatement,object:object,body:body}},createYieldExpression:function(argument,delegate){return{type:astNodeTypes.YieldExpression,argument:argument,delegate:delegate}},createJSXAttribute:function(name,value){return{type:astNodeTypes.JSXAttribute,name:name,value:value||null}},createJSXSpreadAttribute:function(argument){return{type:astNodeTypes.JSXSpreadAttribute,argument:argument}},createJSXIdentifier:function(name){return{type:astNodeTypes.JSXIdentifier,name:name}},createJSXNamespacedName:function(namespace,name){return{type:astNodeTypes.JSXNamespacedName,namespace:namespace,name:name}},createJSXMemberExpression:function(object,property){return{type:astNodeTypes.JSXMemberExpression,object:object,property:property}},createJSXElement:function(openingElement,closingElement,children){return{type:astNodeTypes.JSXElement,openingElement:openingElement,closingElement:closingElement,children:children}},createJSXEmptyExpression:function(){return{type:astNodeTypes.JSXEmptyExpression}},createJSXExpressionContainer:function(expression){return{type:astNodeTypes.JSXExpressionContainer,expression:expression}},createJSXOpeningElement:function(name,attributes,selfClosing){return{type:astNodeTypes.JSXOpeningElement,name:name,selfClosing:selfClosing,attributes:attributes}},createJSXClosingElement:function(name){return{type:astNodeTypes.JSXClosingElement,name:name}},createExportSpecifier:function(local,exported){return{type:astNodeTypes.ExportSpecifier,exported:exported||local,local:local}},createImportDefaultSpecifier:function(local){return{type:astNodeTypes.ImportDefaultSpecifier,local:local}},createImportNamespaceSpecifier:function(local){return{type:astNodeTypes.ImportNamespaceSpecifier,local:local}},createExportNamedDeclaration:function(declaration,specifiers,source){return{type:astNodeTypes.ExportNamedDeclaration,declaration:declaration,specifiers:specifiers,source:source}},createExportDefaultDeclaration:function(declaration){return{type:astNodeTypes.ExportDefaultDeclaration,declaration:declaration}},createExportAllDeclaration:function(source){return{type:astNodeTypes.ExportAllDeclaration,source:source}},createImportSpecifier:function(local,imported){return{type:astNodeTypes.ImportSpecifier,local:local||imported,imported:imported}},createImportDeclaration:function(specifiers,source){return{type:astNodeTypes.ImportDeclaration,specifiers:specifiers,source:source}}}},{"./ast-node-types":60}],60:[function(require,module,exports){"use strict";module.exports={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression",JSXIdentifier:"JSXIdentifier",JSXNamespacedName:"JSXNamespacedName",JSXMemberExpression:"JSXMemberExpression",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXElement:"JSXElement",JSXClosingElement:"JSXClosingElement",JSXOpeningElement:"JSXOpeningElement",JSXAttribute:"JSXAttribute",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportAllDeclaration:"ExportAllDeclaration",ExportSpecifier:"ExportSpecifier",ImportDeclaration:"ImportDeclaration",ImportSpecifier:"ImportSpecifier",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier"}},{}],61:[function(require,module,exports){"use strict";var astNodeTypes=require("./ast-node-types");var extra={trailingComments:[],leadingComments:[],bottomRightStack:[]};module.exports={reset:function(){extra.trailingComments=[];extra.leadingComments=[];extra.bottomRightStack=[]},addComment:function(comment){extra.trailingComments.push(comment);extra.leadingComments.push(comment)},processComment:function(node){var lastChild,trailingComments,i;if(node.type===astNodeTypes.Program){if(node.body.length>0){return}}if(extra.trailingComments.length>0){if(extra.trailingComments[0].range[0]>=node.range[1]){trailingComments=extra.trailingComments;extra.trailingComments=[]}else{extra.trailingComments.length=0}}else{if(extra.bottomRightStack.length>0&&extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments&&extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments[0].range[0]>=node.range[1]){trailingComments=extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments;delete extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments}}while(extra.bottomRightStack.length>0&&extra.bottomRightStack[extra.bottomRightStack.length-1].range[0]>=node.range[0]){lastChild=extra.bottomRightStack.pop()}if(lastChild){if(lastChild.leadingComments&&lastChild.leadingComments[lastChild.leadingComments.length-1].range[1]<=node.range[0]){node.leadingComments=lastChild.leadingComments;delete lastChild.leadingComments}}else if(extra.leadingComments.length>0){if(extra.leadingComments[extra.leadingComments.length-1].range[1]<=node.range[0]){node.leadingComments=extra.leadingComments;extra.leadingComments=[]}else{for(i=0;i<extra.leadingComments.length;i++){if(extra.leadingComments[i].range[1]>node.range[0]){break}}node.leadingComments=extra.leadingComments.slice(0,i);if(node.leadingComments.length===0){delete node.leadingComments}trailingComments=extra.leadingComments.slice(i);if(trailingComments.length===0){trailingComments=null}}}if(trailingComments){node.trailingComments=trailingComments}extra.bottomRightStack.push(node)}}},{"./ast-node-types":60}],62:[function(require,module,exports){"use strict";module.exports={arrowFunctions:false,blockBindings:true,destructuring:false,regexUFlag:false,regexYFlag:false,templateStrings:false,binaryLiterals:false,octalLiterals:false,unicodeCodePointEscapes:true,defaultParams:false,restParams:false,forOf:false,objectLiteralComputedProperties:false,objectLiteralShorthandMethods:false,objectLiteralShorthandProperties:false,objectLiteralDuplicateProperties:false,generators:false,spread:false,superInFunctions:false,classes:false,modules:false,jsx:false,globalReturn:false}},{}],63:[function(require,module,exports){"use strict";module.exports={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",InvalidRegExpFlag:"Invalid regular expression flag",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInFormalsList:"Invalid left-hand side in formals list",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",NoUnintializedConst:"Const must be initialized",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",IllegalYield:"Illegal yield expression",IllegalSpread:"Illegal spread element",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be final parameter of an argument list",DefaultRestParameter:"Rest parameter can not have a default value",ElementAfterSpreadElement:"Spread must be the final element of an element list",ObjectPatternAsRestParameter:"Invalid rest parameter",ObjectPatternAsSpread:"Invalid spread argument",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",DuplicatePrototypeProperty:"Duplicate '__proto__' property in object literal are not allowed",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",InvalidJSXAttributeValue:"JSX value should be either an expression or a quoted JSX text",ExpectedJSXClosingTag:"Expected corresponding JSX closing tag for %0",AdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag",MissingFromClause:"Missing from clause",NoAsAfterImportNamespace:"Missing as after import *",InvalidModuleSpecifier:"Invalid module specifier",IllegalImportDeclaration:"Illegal import declaration",IllegalExportDeclaration:"Illegal export declaration"}},{}],64:[function(require,module,exports){"use strict";function StringMap(){this.$data={}}StringMap.prototype.get=function(key){key="$"+key;return this.$data[key]};StringMap.prototype.set=function(key,value){key="$"+key;this.$data[key]=value;return this};StringMap.prototype.has=function(key){key="$"+key;return Object.prototype.hasOwnProperty.call(this.$data,key)};StringMap.prototype.delete=function(key){key="$"+key;return delete this.$data[key];
};module.exports=StringMap},{}],65:[function(require,module,exports){"use strict";var Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),LeadingZeros:new RegExp("^0+(?!$)")};module.exports={Regex:Regex,isDecimalDigit:function(ch){return ch>=48&&ch<=57},isHexDigit:function(ch){return"0123456789abcdefABCDEF".indexOf(ch)>=0},isOctalDigit:function(ch){return"01234567".indexOf(ch)>=0},isWhiteSpace:function(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(ch)>=0},isLineTerminator:function(ch){return ch===10||ch===13||ch===8232||ch===8233},isIdentifierStart:function(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))},isIdentifierPart:function(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))},isFutureReservedWord:function(id){switch(id){case"class":case"enum":case"export":case"extends":case"import":case"super":return true;default:return false}},isStrictModeReservedWord:function(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}},isRestrictedWord:function(id){return id==="eval"||id==="arguments"},isKeyword:function(id,strict,ecmaFeatures){if(strict&&this.isStrictModeReservedWord(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"||id==="let";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||!ecmaFeatures.generators&&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}},isJSXIdentifierStart:function(ch){return ch!==92&&this.isIdentifierStart(ch)},isJSXIdentifierPart:function(ch){return ch!==92&&(ch===45||this.isIdentifierPart(ch))}}},{}],66:[function(require,module,exports){"use strict";var Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10,JSXIdentifier:11,JSXText:12};var TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="<end>";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";TokenName[Token.RegularExpression]="RegularExpression";TokenName[Token.Template]="Template";TokenName[Token.JSXIdentifier]="JSXIdentifier";TokenName[Token.JSXText]="JSXText";var FnExprTokens=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];module.exports={Token:Token,TokenName:TokenName,FnExprTokens:FnExprTokens}},{}],67:[function(require,module,exports){"use strict";module.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],68:[function(require,module,exports){module.exports={name:"espree",description:"An actively-maintained fork of Esprima, the ECMAScript parsing infrastructure for multipurpose analysis",author:{name:"Nicholas C. Zakas",email:"[email protected]"},homepage:"https://github.com/eslint/espree",main:"espree.js",bin:{esparse:"./bin/esparse.js",esvalidate:"./bin/esvalidate.js"},version:"1.12.3",files:["bin","lib","test/run.js","test/runner.js","test/test.js","test/compat.js","test/reflect.js","espree.js"],engines:{node:">=0.10.0"},repository:{type:"git",url:"http://github.com/eslint/espree.git"},bugs:{url:"http://github.com/eslint/espree.git"},licenses:[{type:"BSD",url:"http://github.com/nzakas/espree/raw/master/LICENSE"}],devDependencies:{browserify:"^7.0.0",chai:"^1.10.0","complexity-report":"~0.6.1",dateformat:"^1.0.11",eslint:"^0.9.2",esprima:"git://github.com/ariya/esprima#harmony","esprima-fb":"^8001.2001.0-dev-harmony-fb",istanbul:"~0.2.6","json-diff":"~0.3.1",leche:"^1.0.1",mocha:"^2.0.1","npm-license":"^0.2.3",optimist:"~0.6.0",regenerate:"~0.5.4",semver:"^4.1.1",shelljs:"^0.3.0","shelljs-nodecli":"^0.1.1","unicode-6.3.0":"~0.1.0"},keywords:["ast","ecmascript","javascript","parser","syntax"],scripts:{"generate-regex":"node tools/generate-identifier-regex.js",test:"npm run-script lint && node Makefile.js test && node test/run.js",lint:"node Makefile.js lint",patch:"node Makefile.js patch",minor:"node Makefile.js minor",major:"node Makefile.js major",browserify:"node Makefile.js browserify",coverage:"npm run-script analyze-coverage && npm run-script check-coverage","analyze-coverage":"node node_modules/istanbul/lib/cli.js cover test/runner.js","check-coverage":"node node_modules/istanbul/lib/cli.js check-coverage --statement 99 --branch 99 --function 99",complexity:"npm run-script analyze-complexity && npm run-script check-complexity","analyze-complexity":"node tools/list-complexity.js","check-complexity":"node node_modules/complexity-report/src/cli.js --maxcc 14 --silent -l -w espree.js",benchmark:"node test/benchmarks.js","benchmark-quick":"node test/benchmarks.js quick"},dependencies:{},readme:"# Espree\n\nEspree is an actively-maintained fork Esprima, a high performance,\nstandard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nparser written in ECMAScript (also popularly known as\n[JavaScript](http://en.wikipedia.org/wiki/JavaScript)).\n\n## Features\n\n- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm))\n- Sensible syntax tree format compatible with Mozilla\n[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API)\n- Optional tracking of syntax node location (index-based and line-column)\n- Heavily tested (> 650 unit tests) with full code coverage\n\n## Usage\n\nInstall:\n\n```\nnpm i espree --save\n```\n\nAnd in your Node.js code:\n\n```javascript\nvar espree = require(\"espree\");\n\nvar ast = espree.parse(code);\n```\n\nThere is a second argument to `parse()` that allows you to specify various options:\n\n```javascript\nvar espree = require(\"espree\");\n\nvar ast = espree.parse(code, {\n\n // attach range information to each node\n range: true,\n\n // attach line/column location information to each node\n loc: true,\n\n // create a top-level comments array containing all comments\n comments: true,\n\n // attach comments to the closest relevant node as leadingComments and\n // trailingComments\n attachComment: true,\n\n // create a top-level tokens array containing all tokens\n tokens: true,\n\n // try to continue parsing if an error is encountered, store errors in a\n // top-level errors array\n tolerant: true,\n\n // specify parsing features (default only has blockBindings: true)\n ecmaFeatures: {\n\n // enable parsing of arrow functions\n arrowFunctions: true,\n\n // enable parsing of let/const\n blockBindings: true,\n\n // enable parsing of destructured arrays and objects\n destructuring: true,\n\n // enable parsing of regular expression y flag\n regexYFlag: true,\n\n // enable parsing of regular expression u flag\n regexUFlag: true,\n\n // enable parsing of template strings\n templateStrings: true,\n\n // enable parsing of binary literals\n binaryLiterals: true,\n\n // enable parsing of ES6 octal literals\n octalLiterals: true,\n\n // enable parsing unicode code point escape sequences\n unicodeCodePointEscapes: true,\n\n // enable parsing of default parameters\n defaultParams: true,\n\n // enable parsing of rest parameters\n restParams: true,\n\n // enable parsing of for-of statement\n forOf: true,\n\n // enable parsing computed object literal properties\n objectLiteralComputedProperties: true,\n\n // enable parsing of shorthand object literal methods\n objectLiteralShorthandMethods: true,\n\n // enable parsing of shorthand object literal properties\n objectLiteralShorthandProperties: true,\n\n // Allow duplicate object literal properties (except '__proto__')\n objectLiteralDuplicateProperties: true,\n\n // enable parsing of generators/yield\n generators: true,\n\n // enable parsing spread operator\n spread: true,\n\n // enable parsing classes\n classes: true,\n\n // enable parsing of modules\n modules: true,\n\n // enable React JSX parsing\n jsx: true,\n\n // enable return in global scope\n globalReturn: true\n }\n});\n```\n\n## Plans\n\nEspree starts as a fork of Esprima v1.2.2, the last stable published released of Esprima before work on ECMAScript 6 began. Espree's first version is therefore v1.2.2 and is 100% compatible with Esprima v1.2.2 as a drop-in replacement. The version number will be incremented based on [semantic versioning](http://semver.org/) as features and bug fixes are added.\n\nThe immediate plans are:\n\n1. Move away from giant files and move towards small, modular files that are easier to manage.\n1. Move towards CommonJS for all files and use browserify to create browser bundles.\n1. Support ECMAScript version filtering, allowing users to specify which version the parser should work in (similar to Acorn's `ecmaVersion` property).\n1. Add tests to track comment attachment.\n1. Add well-thought-out features that are useful for tools developers.\n1. Add full support for ECMAScript 6.\n1. Add optional parsing of JSX.\n\n## Esprima Compatibility Going Forward\n\nThe primary goal is to produce the exact same AST structure as Esprima and Acorn, and that takes precedence over anything else. (The AST structure being the SpiderMonkey Parser API with JSX extensions.) Separate from that, Espree may deviate from what Esprima outputs in terms of where and how comments are attached, as well as what additional information is available on AST nodes. That is to say, Espree may add more things to the AST nodes than Esprima does but the overall AST structure produced will be the same.\n\nEspree may also deviate from Esprima in the interface it exposes.\n\n## Frequent and Incremental Releases\n\nEspree will not do giant releases. Releases will happen periodically as changes are made and incremental releases will be made towards larger goals. For instance, we will not have one big release for ECMAScript 6 support. Instead, we will implement ECMAScript 6, piece-by-piece, hiding those pieces behind an `ecmaFeatures` property that allows you to opt-in to use those features.\n\n## Contributing\n\nIssues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing.html), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/espree/issues).\n\nEspree is licensed under a permissive BSD 3-clause license.\n\n## Build Commands\n\n* `npm test` - run all linting and tests\n* `npm run lint` - run all linting\n* `npm run browserify` - creates a version of Espree that is usable in a browser\n\n## Known Incompatibilities\n\nIn an effort to help those wanting to transition from other parsers to Espree, the following is a list of noteworthy incompatibilities with other parsers. These are known differences that we do not intend to change.\n\n### Esprima 1.2.2\n\n* None.\n\n### Esprima/Harmony Branch\n\n* Esprima/Harmony uses a different comment attachment algorithm that results in some comments being added in different places than Espree. The algorithm Espree uses is the same one used in Esprima 1.2.2.\n* Template tokens have a `head` property in addition to `tail`. Esprima has only `tail`.\n\n### Esprima-FB\n\n* All Esprima/Harmony incompatibilities.\n\n## Frequently Asked Questions\n\n### Why are you forking Esprima?\n\n[ESLint](http://eslint.org) has been relying on Esprima as its parser from the beginning. While that was fine when the JavaScript language was evolving slowly, the pace of development has increased dramatically and Esprima has fallen behind. ESLint, like many other tools reliant on Esprima, has been stuck in using new JavaScript language features until Esprima updates, and that has caused our users frustration.\n\nWe decided the only way for us to move forward was to create our own parser, bringing us inline with JSHint and JSLint, and allowing us to keep implementing new features as we need them. We chose to fork Esprima instead of starting from scratch in order to move as quickly as possible with a compatible API.\n\n### Have you tried working with Esprima?\n\nYes. Since the start of ESLint, we've regularly filed bugs and feature requests with Esprima. Unfortunately, we've been unable to make much progress towards getting our needs addressed.\n\n### Why don't you just use Facebook's Esprima fork?\n\n`esprima-fb` is Facebook's Esprima fork that features JSX and Flow type annotations. We tried working with `esprima-fb` in our evaluation of how to support ECMAScript 6 and JSX in ESLint. Unfortunately, we were hampered by bugs that were part of Esprima (not necessarily Facebook's code). Since `esprima-fb` tracks the Esprima Harmony branch, that means we still were unable to get fixes or features we needed in a timely manner.\n\n### Why don't you just use Acorn?\n\nAcorn is a great JavaScript parser that produces an AST that is compatible with Esprima. Unfortunately, ESLint relies on more than just the AST to do its job. It relies on Esprima's tokens and comment attachment features to get a complete picture of the source code. We investigated switching to Acorn, but the inconsistencies between Esprima and Acorn created too much work for a project like ESLint.\n\nWe expect there are other tools like ESLint that rely on more than just the AST produced by Esprima, and so a drop-in replacement will help those projects as well as ESLint.\n\n### What ECMAScript 6 features do you support?\n\nPlease see the [tracking issue](https://github.com/eslint/espree/issues/10) for the most up-to-date information.\n\n### Why use Espree instead of Esprima?\n\n* Faster turnaround time on bug fixes\n* More frequent releases\n* Better communication and responsiveness to issues\n* Ongoing development\n\n### Why use Espree instead of Esprima-FB?\n\n* Opt-in to just the ECMAScript 6 features you want\n* JSX support is off by default, so you're not forced to use it to use ECMAScript 6\n* Stricter ECMAScript 6 support\n",readmeFilename:"README.md",_id:"[email protected]",dist:{shasum:"9715c2e54e4a095b4becdfe8e3bef4db4801aa83"},_from:"espree@^1.12.3",_resolved:"https://registry.npmjs.org/espree/-/espree-1.12.3.tgz"}},{}],69:[function(require,module,exports){function indexOf(arr,item,fromIndex){fromIndex=fromIndex||0;if(arr==null){return-1}var len=arr.length,i=fromIndex<0?len+fromIndex:fromIndex;while(i<len){if(arr[i]===item){return i}i++}return-1}module.exports=indexOf},{}],70:[function(require,module,exports){var indexOf=require("./indexOf");function remove(arr,item){var idx=indexOf(arr,item);if(idx!==-1)arr.splice(idx,1)}module.exports=remove},{"./indexOf":69}],71:[function(require,module,exports){function slice(arr,start,end){var len=arr.length;if(start==null){start=0}else if(start<0){start=Math.max(len+start,0)}else{start=Math.min(start,len)}if(end==null){end=len}else if(end<0){end=Math.max(len+end,0)}else{end=Math.min(end,len)}var result=[];while(start<end){result.push(arr[start++])}return result}module.exports=slice},{}],72:[function(require,module,exports){var slice=require("../array/slice");function partial(f){var as=slice(arguments,1);return function(){var args=as.concat(slice(arguments));for(var i=args.length;i--;){if(args[i]===partial._){args[i]=args.splice(-1)[0]}}return f.apply(this,args)}}partial._={};module.exports=partial},{"../array/slice":71}],73:[function(require,module,exports){var kindOf=require("./kindOf");var isPlainObject=require("./isPlainObject");var mixIn=require("../object/mixIn");function clone(val){switch(kindOf(val)){case"Object":return cloneObject(val);case"Array":return cloneArray(val);case"RegExp":return cloneRegExp(val);case"Date":return cloneDate(val);default:return val}}function cloneObject(source){if(isPlainObject(source)){return mixIn({},source)}else{return source}}function cloneRegExp(r){var flags="";flags+=r.multiline?"m":"";flags+=r.global?"g":"";flags+=r.ignoreCase?"i":"";return new RegExp(r.source,flags)}function cloneDate(date){return new Date(+date)}function cloneArray(arr){return arr.slice()}module.exports=clone},{"../object/mixIn":88,"./isPlainObject":77,"./kindOf":79}],74:[function(require,module,exports){var clone=require("./clone");var forOwn=require("../object/forOwn");var kindOf=require("./kindOf");var isPlainObject=require("./isPlainObject");function deepClone(val,instanceClone){switch(kindOf(val)){case"Object":return cloneObject(val,instanceClone);case"Array":return cloneArray(val,instanceClone);default:return clone(val)}}function cloneObject(source,instanceClone){if(isPlainObject(source)){var out={};forOwn(source,function(val,key){this[key]=deepClone(val,instanceClone)},out);return out}else if(instanceClone){return instanceClone(source)}else{return source}}function cloneArray(arr,instanceClone){var out=[],i=-1,n=arr.length,val;while(++i<n){out[i]=deepClone(arr[i],instanceClone)}return out}module.exports=deepClone},{"../object/forOwn":84,"./clone":73,"./isPlainObject":77,"./kindOf":79}],75:[function(require,module,exports){var kindOf=require("./kindOf");function isKind(val,kind){return kindOf(val)===kind}module.exports=isKind},{"./kindOf":79}],76:[function(require,module,exports){var isKind=require("./isKind");function isObject(val){return isKind(val,"Object")}module.exports=isObject},{"./isKind":75}],77:[function(require,module,exports){function isPlainObject(value){return!!value&&typeof value==="object"&&value.constructor===Object}module.exports=isPlainObject},{}],78:[function(require,module,exports){function isPrimitive(value){switch(typeof value){case"string":case"number":case"boolean":return true}return value==null}module.exports=isPrimitive},{}],79:[function(require,module,exports){var _rKind=/^\[object (.*)\]$/,_toString=Object.prototype.toString,UNDEF;function kindOf(val){if(val===null){return"Null"}else if(val===UNDEF){return"Undefined"}else{return _rKind.exec(_toString.call(val))[1]}}module.exports=kindOf},{}],80:[function(require,module,exports){function toString(val){return val==null?"":val.toString()}module.exports=toString},{}],81:[function(require,module,exports){function toInt(val){return~~val}module.exports=toInt},{}],82:[function(require,module,exports){var forOwn=require("./forOwn");var isPlainObject=require("../lang/isPlainObject");function deepMixIn(target,objects){var i=0,n=arguments.length,obj;while(++i<n){obj=arguments[i];if(obj){forOwn(obj,copyProp,target)}}return target}function copyProp(val,key){var existing=this[key];if(isPlainObject(val)&&isPlainObject(existing)){deepMixIn(existing,val)}else{this[key]=val}}module.exports=deepMixIn},{"../lang/isPlainObject":77,"./forOwn":84}],83:[function(require,module,exports){var hasOwn=require("./hasOwn");var _hasDontEnumBug,_dontEnums;function checkDontEnum(){_dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];_hasDontEnumBug=true;for(var key in{toString:null}){_hasDontEnumBug=false}}function forIn(obj,fn,thisObj){var key,i=0;if(_hasDontEnumBug==null)checkDontEnum();for(key in obj){if(exec(fn,obj,key,thisObj)===false){break}}if(_hasDontEnumBug){var ctor=obj.constructor,isProto=!!ctor&&obj===ctor.prototype;while(key=_dontEnums[i++]){if((key!=="constructor"||!isProto&&hasOwn(obj,key))&&obj[key]!==Object.prototype[key]){if(exec(fn,obj,key,thisObj)===false){break}}}}}function exec(fn,obj,key,thisObj){return fn.call(thisObj,obj[key],key,obj)}module.exports=forIn},{"./hasOwn":86}],84:[function(require,module,exports){var hasOwn=require("./hasOwn");var forIn=require("./forIn");function forOwn(obj,fn,thisObj){forIn(obj,function(val,key){if(hasOwn(obj,key)){return fn.call(thisObj,obj[key],key,obj)}})}module.exports=forOwn},{"./forIn":83,"./hasOwn":86}],85:[function(require,module,exports){var isPrimitive=require("../lang/isPrimitive");function get(obj,prop){var parts=prop.split("."),last=parts.pop();while(prop=parts.shift()){obj=obj[prop];if(obj==null)return}return obj[last]}module.exports=get},{"../lang/isPrimitive":78}],86:[function(require,module,exports){function hasOwn(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=hasOwn},{}],87:[function(require,module,exports){var hasOwn=require("./hasOwn");var deepClone=require("../lang/deepClone");var isObject=require("../lang/isObject");function merge(){var i=1,key,val,obj,target;target=deepClone(arguments[0]);while(obj=arguments[i++]){for(key in obj){if(!hasOwn(obj,key)){continue}val=obj[key];if(isObject(val)&&isObject(target[key])){target[key]=merge(target[key],val)}else{target[key]=deepClone(val)}}}return target}module.exports=merge},{"../lang/deepClone":74,"../lang/isObject":76,"./hasOwn":86}],88:[function(require,module,exports){var forOwn=require("./forOwn");function mixIn(target,objects){var i=0,n=arguments.length,obj;while(++i<n){obj=arguments[i];if(obj!=null){forOwn(obj,copyProp,target)}}return target}function copyProp(val,key){this[key]=val}module.exports=mixIn},{"./forOwn":84}],89:[function(require,module,exports){var toString=require("../lang/toString");function escapeRegExp(str){return toString(str).replace(/\W/g,"\\$&")}module.exports=escapeRegExp},{"../lang/toString":80}],90:[function(require,module,exports){var toString=require("../lang/toString");var toInt=require("../number/toInt");function repeat(str,n){var result="";str=toString(str);n=toInt(n);if(n<1){return""}while(n>0){if(n%2){result+=str}n=Math.floor(n/2);str+=str}return result}module.exports=repeat},{"../lang/toString":80,"../number/toInt":81}],91:[function(require,module,exports){(function(process,__dirname){"use strict";var npmPath=require("npm-path");var child_process=require("child_process");var syncExec=require("sync-exec");var exec=child_process.exec;var execSync=child_process.execSync||function(args,path){return syncExec(args,path).stdout};var execFile=child_process.execFile;var spawn=child_process.spawn;var fork=child_process.fork;npmExec.spawn=npmSpawn;npmExec.sync=npmExecSync;module.exports=npmExec;function npmExec(args,options,fn){var opts=setOptions(options,fn);options=opts[0];fn=opts[1];getPath(options,function(err,options){if(err)return fn(err);exec(args,options,fn)})}function npmExecSync(args,options){var opts=setOptions(options);var path=getPath.sync(opts[0]);return execSync(args,path).toString()}function npmSpawn(){var options={};var args=[].slice.apply(arguments);args=args.map(function(arg){if(Array.isArray(arg))return JSON.stringify(arg);if(arg.toString()==="[object Object]"){options=arg;return JSON.stringify(arg)}return arg});if(options.stdio==="inherit")options.silent=false;else options.silent=true;var child=fork(__dirname+"/spawn.js",args,options);child.on("message",function(jsonErr){var err=new Error;Object.keys(jsonErr).forEach(function(key){err[key]=jsonErr[key]});this.emit("error",err)});return child}function getPath(options,fn){npmPath.get(options,function(err,newPath){var env=Object.create(options.env);env[npmPath.PATH]=newPath;options.env=env;fn(null,options)})}getPath.sync=function getPathSync(options){var newPath=npmPath.getSync(options);var env=Object.create(options.env);env[npmPath.PATH]=newPath;options.env=env;return options};function setOptions(options,fn){if(typeof options=="function")fn=options,options=null;options=Object.create(options||{});options.env=options.env||process.env;options.cwd=options.cwd||process.cwd();return[options,fn]}}).call(this,require("_process"),"/node_modules/npm-run")},{_process:4,child_process:1,"npm-path":92,"sync-exec":96}],92:[function(require,module,exports){(function(process){"use strict";var fs=require("fs");var path=require("path");var which=require("which");var PATH=getPATHKey();var SEPARATOR=getPATHSeparator();function getPath(options,fn){var wd=options.cwd=options.cwd||process.cwd();var env=options.env=options.env||process.env;var pathArr=getPathArr(options);whichNpm(options,function(err,npmPath){if(err)return fn(err);pathArr.unshift(path.join(path.dirname(npmPath),"node-gyp-bin"));if(env[PATH])pathArr.push(env[PATH]);fn(null,pathArr.join(SEPARATOR))})}function getPathAsync(options,fn){if(options instanceof Function)fn=options,options={};if(!(fn instanceof Function))return getPathSync(options);options=options||{};options.isSync=false;return getPath(options,fn)}function getPathSync(options){options=options||{};options.isSync=true;var thePath=undefined;getPath(options,function(err,foundPath){if(err)throw err;thePath=foundPath});return thePath}function setPathAsync(options,fn){if(options instanceof Function)fn=options,options={};if(!(fn instanceof Function))return setPathSync(options);getPathAsync(options,function(err,newPath){if(err)return fn(err);fn(null,options.env[PATH]=newPath)})}function setPathSync(options){options=options||{};var newPath=getPathSync(options);return options.env[PATH]=newPath}function getPathArr(options){var wd=options.cwd;var pathArr=[];var p=wd.split("node_modules");var acc=path.resolve(p.shift());pathArr.unshift(path.dirname(process.execPath));p.forEach(function(pp){pathArr.unshift(path.join(acc,"node_modules",".bin"));acc=path.join(acc,"node_modules",pp)});pathArr.unshift(path.join(acc,"node_modules",".bin"));return pathArr}function whichNpm(options,fn){var npmCli=options.npm&&path.join(options.npm,"bin","npm-cli.js");if(options.isSync){fn(null,fs.realpathSync(npmCli||which.sync("npm")));return}if(options.npm){process.nextTick(function(){fn(null,npmCli)});return}which("npm",function(err,npmPath){if(err)return fn(err);fs.realpath(npmPath,fn)})}function getPATHKey(){var PATH="PATH";if(process.platform==="win32"){PATH="Path";Object.keys(process.env).forEach(function(e){if(e.match(/^PATH$/i)){PATH=e}})}return PATH}function getPATHSeparator(){return process.platform==="win32"?";":":"}module.exports=setPathAsync;module.exports.get=getPathAsync;module.exports.get.sync=getPathSync;module.exports.getSync=getPathSync;module.exports.set=setPathAsync;module.exports.set.sync=setPathSync;module.exports.setSync=setPathSync;module.exports.PATH=PATH;module.exports.SEPARATOR=SEPARATOR}).call(this,require("_process"))},{_process:4,fs:1,path:3,which:95}],93:[function(require,module,exports){"use strict";var isRelative=require("is-relative");module.exports=function isAbsolute(filepath){if("/"===filepath[0]){return true}if(":"===filepath[1]&&"\\"===filepath[2]){
return true}if("\\\\"==filepath.substring(0,2)){return true}if(!isRelative(filepath)){return true}}},{"is-relative":94}],94:[function(require,module,exports){"use strict";module.exports=function isRelative(filepath){if(typeof filepath!=="string"){throw new Error("isRelative expects a string.")}return!/^([a-z]+:)?[\\\/]/i.test(filepath)}},{}],95:[function(require,module,exports){(function(process){module.exports=which;which.sync=whichSync;var isWindows=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var path=require("path");var COLON=isWindows?";":":";var isExe;var fs=require("fs");var isAbsolute=require("is-absolute");if(isWindows){isExe=function isExe(){return true}}else{isExe=function isExe(mod,uid,gid){var ret=mod&1||mod&8&&process.getgid&&gid===process.getgid()||mod&64&&process.getuid&&uid===process.getuid()||mod&72&&process.getuid&&0===process.getuid();if(process.getgroups&&mod&8){var groups=process.getgroups();for(var g=0;g<groups.length;g++){if(groups[g]===gid)return true}}return ret}}function which(cmd,opt,cb){if(typeof opt==="function"){cb=opt;opt={}}var colon=opt.colon||COLON;var pathEnv=opt.path||process.env.PATH||"";var pathExt=[""];if(isWindows&&!pathEnv){var k=Object.keys(process.env);for(var p=0;p<k.length;p++){if(p.toLowerCase()==="path"){pathEnv=process.env[p];break}}}pathEnv=pathEnv.split(colon);if(isWindows){pathEnv.unshift(process.cwd());pathExt=(opt.pathExt||process.env.PATHEXT||".EXE").split(colon);if(cmd.indexOf(".")!==-1&&pathExt[0]!=="")pathExt.unshift("")}if(isAbsolute(cmd))pathEnv=[""];(function F(i,l){if(i===l)return cb(new Error("not found: "+cmd));var p=path.resolve(pathEnv[i],cmd);(function E(ii,ll){if(ii===ll)return F(i+1,l);var ext=pathExt[ii];fs.stat(p+ext,function(er,stat){if(!er&&stat.isFile()&&isExe(stat.mode,stat.uid,stat.gid)){return cb(null,p+ext)}return E(ii+1,ll)})})(0,pathExt.length)})(0,pathEnv.length)}function whichSync(cmd,opt){if(!opt)opt={};var colon=opt.colon||COLON;var pathEnv=opt.path||process.env.PATH||"";var pathExt=[""];if(isWindows&&!pathEnv){var k=Object.keys(process.env);for(var p=0;p<k.length;p++){if(p.toLowerCase()==="path"){pathEnv=process.env[p];break}}}pathEnv=pathEnv.split(colon);if(isWindows){pathEnv.unshift(process.cwd());pathExt=(opt.pathExt||process.env.PATHEXT||".EXE").split(colon);if(cmd.indexOf(".")!==-1&&pathExt[0]!=="")pathExt.unshift("")}if(isAbsolute(cmd))pathEnv=[""];for(var i=0,l=pathEnv.length;i<l;i++){var p=path.join(pathEnv[i],cmd);for(var j=0,ll=pathExt.length;j<ll;j++){var cur=p+pathExt[j];var stat;try{stat=fs.statSync(cur);if(stat.isFile()&&isExe(stat.mode,stat.uid,stat.gid))return cur}catch(ex){}}}throw new Error("not found: "+cmd)}}).call(this,require("_process"))},{_process:4,fs:1,"is-absolute":93,path:3}],96:[function(require,module,exports){(function(process){(function(){var child_process,create_pipes,dir,fs,i,len,name,proxy,read_pipes,ref,timeout,tmp_dir;child_process=require("child_process");fs=require("fs");tmp_dir="/tmp";ref=["TMPDIR","TMP","TEMP"];for(i=0,len=ref.length;i<len;i++){name=ref[i];if((dir=process.env[name])!=null){tmp_dir=dir.replace(/\/$/,"")}}timeout=function(limit,msg){if((new Date).getTime()>limit){throw new Error(msg)}};create_pipes=function(){var created,t_limit;t_limit=(new Date).getTime()+1e3;while(!created){try{dir=tmp_dir+"/sync-exec-"+Math.floor(Math.random()*1e9);fs.mkdir(dir);created=true}catch(_error){}timeout(t_limit,"Can not create sync-exec directory")}return dir};read_pipes=function(dir,max_wait){var deleted,j,len1,pipe,read,ref1,result,t_limit;t_limit=(new Date).getTime()+max_wait;while(!read){try{if(fs.readFileSync(dir+"/done").length){read=true}}catch(_error){}timeout(t_limit,"Process execution timeout or exit flag read failure")}while(!deleted){try{fs.unlinkSync(dir+"/done");deleted=true}catch(_error){}timeout(t_limit,"Can not delete exit code file")}result={};ref1=["stdout","stderr","status"];for(j=0,len1=ref1.length;j<len1;j++){pipe=ref1[j];result[pipe]=fs.readFileSync(dir+"/"+pipe,{encoding:"utf-8"});read=true;fs.unlinkSync(dir+"/"+pipe)}try{fs.rmdirSync(dir)}catch(_error){}result.status=Number(result.status);return result};proxy=function(cmd,max_wait,options){var err,orig_write,status,stderr,stdout,t0;options.timeout=max_wait;stdout=stderr="";status=0;t0=(new Date).getTime();orig_write=process.stderr.write;process.stderr.write=function(){};try{stdout=child_process.execSync(cmd,options);process.stderr.write=orig_write}catch(_error){err=_error;process.stderr.write=orig_write;if(err.signal==="SIGTERM"&&t0<=(new Date).getTime()-max_wait){throw new Error("Timeout")}stdout=err.stdout,stderr=err.stderr,status=err.status}return{stdout:stdout,stderr:stderr,status:status}};module.exports=function(cmd,max_wait,options){var ref1;if(max_wait&&typeof max_wait==="object"){ref1=[max_wait,null],options=ref1[0],max_wait=ref1[1]}if(options==null){options={}}if(!options.hasOwnProperty("encoding")){options.encoding="utf8"}if(!(typeof options==="object"&&options)){throw new Error("options must be an object")}if(max_wait==null){max_wait=options.timeout||options.max_wait||36e5}if(!(max_wait==null||max_wait>=1)){throw new Error("`options.timeout` must be >=1 millisecond")}delete options.max_wait;if(child_process.execSync){return proxy(cmd,max_wait,options)}delete options.timeout;dir=create_pipes();cmd="(((("+cmd+" > "+dir+"/stdout 2> "+dir+"/stderr ) "+"&& echo 0 > "+dir+"/status) || echo 1 > "+dir+"/status) &&"+" echo 1 > "+dir+"/done) || echo 1 > "+dir+"/done";child_process.exec(cmd,options,function(){});return read_pipes(dir,max_wait)}}).call(this)}).call(this,require("_process"))},{_process:4,child_process:1,fs:1}],97:[function(require,module,exports){exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}exports.formatters.j=function(v){return JSON.stringify(v)};function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return args;var c="color: "+this.color;args=[args[0],c,"color: inherit"].concat(Array.prototype.slice.call(args,1));var index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c);return args}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}},{"./debug":98}],98:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs){args=exports.formatArgs.apply(self,args)}var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{exports.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++){if(exports.skips[i].test(name)){return false}}for(i=0,len=exports.names.length;i<len;i++){if(exports.names[i].test(name)){return true}}return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{ms:99}],99:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){str=""+str;if(str.length>1e4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],100:[function(require,module,exports){"use strict";var debug=require("debug")("rocambole:indent");var tk=require("rocambole-token");var escapeRegExp=require("mout/string/escapeRegExp");var repeat=require("mout/string/repeat");var _opts={value:" ",CommentInsideEmptyBlock:1};exports.setOptions=function(opts){_opts=opts};exports.inBetween=indentInBetween;function indentInBetween(startToken,endToken,level){level=level!=null?level:1;if(!level||(!startToken||!endToken)||startToken===endToken){debug("[inBetween] not going to indent. start: %s, end: %s, level: %s",startToken&&startToken.value,endToken&&endToken.value,level);return}var token=startToken&&startToken.next;var endsWithBraces=isClosingBrace(endToken);while(token&&token!==endToken){if(tk.isBr(token.prev)){if(token.next!==endToken||!endsWithBraces||!tk.isEmpty(token)){addLevel(token,level)}}token=token.next}}function isClosingBrace(token){var val=token.value;return val===")"||val==="}"||val==="]"}exports.addLevel=addLevel;function addLevel(token,level){if(!level){return}token=findStartOfLine(token);if(!token){debug("[indent.addLevel] can't find start of line");return}var value=repeat(_opts.value,Math.abs(level));if(tk.isIndent(token)){if(level>0){token.value+=value;token.level+=level}else{if(token.level+level<=0){tk.remove(token)}else{token.value=token.value.replace(value,"");token.level+=level}}if(token.next&&token.next.type==="BlockComment"){updateBlockComment(token.next)}return}if(level<1){debug("[addLevel] we can't decrement if line doesn't start with Indent. token: %s, level: %s",token&&token.value,level);return}if(tk.isWs(token)){token.type="Indent";token.value=value;token.level=level;return}tk.before(token,{type:"Indent",value:value,level:level});if(token.type==="BlockComment"){updateBlockComment(token)}}function findStartOfLine(token){if(tk.isBr(token)&&tk.isBr(token.prev)){return null}var prev=token.prev;while(true){if(!prev||tk.isBr(prev)){return token}token=prev;prev=token.prev}}exports.sanitize=sanitize;function sanitize(astOrNode){var token=astOrNode.startToken;var end=astOrNode.endToken&&astOrNode.endToken.next;while(token&&token!==end){var next=token.next;if(isOriginalIndent(token)){tk.remove(token)}token=next}}function isOriginalIndent(token){return token.type==="WhiteSpace"&&(!token.prev||tk.isBr(token.prev))&&!tk.isBr(token.next)||token.type==="Indent"&&(token.level==null||!tk.isBr(token.prev))}exports.updateBlockComment=updateBlockComment;function updateBlockComment(comment){var orig=new RegExp("([\\n\\r]+)"+escapeRegExp(comment.originalIndent||""),"gm");var update=comment.prev&&comment.prev.type==="Indent"?comment.prev.value:"";comment.raw=comment.raw.replace(orig,"$1"+update);comment.originalIndent=update}exports.alignComments=alignComments;function alignComments(nodeOrAst){var first=nodeOrAst.startToken&&nodeOrAst.startToken.prev;var token=nodeOrAst.endToken;while(token&&token!==first){if(tk.isComment(token)&&isFirstNonEmptyTokenOfLine(token)){var base=findReferenceIndent(token);matchBaseIndent(token,base);var change=_opts.CommentInsideEmptyBlock!=null?_opts.CommentInsideEmptyBlock:1;if(change&&isInsideEmptyBlock(token)){addLevel(token,change)}if(token.type==="BlockComment"){updateBlockComment(token)}}token=token.prev}}function matchBaseIndent(token,base){if(!base){if(isIndentOrWs(token.prev)){tk.remove(token.prev)}return}if(isIndentOrWs(token.prev)){token.prev.type="Indent";token.prev.value=base.value;token.prev.level=inferLevel(base,_opts.value);return}tk.before(token,{type:"Indent",value:base.value,level:inferLevel(base,_opts.value)})}function isFirstNonEmptyTokenOfLine(token){if(!token.prev||tk.isBr(token.prev))return true;var prev=tk.findPrevNonEmpty(token);return!prev?true:tk.findInBetween(prev,token,tk.isBr)}function findReferenceIndent(start){var prevLine=findPrevReference(start);var nextLine=findNextReference(start);if(isAtBeginingOfBlock(start)||isDetached(start,nextLine)){while(nextLine&&tk.isBr(nextLine)){nextLine=findNextReference(nextLine.prev)}}if(tk.isBr(nextLine)||!nextLine){return isIndentOrWs(prevLine)?prevLine:null}return isIndentOrWs(nextLine)?nextLine:null}function findPrevReference(start){var token=start.prev;while(token){if(tk.isBr(token)&&!tk.isBr(token.next)&&nextInLineNotComment(token)){return token.next}token=token.prev}}function findNextReference(start){var token=start.next;while(token){if(tk.isBr(token)&&nextInLineNotComment(token)){return token.next}token=token.next}}function isDetached(start,nextLine){return hasEmptyLineBefore(start)&&tk.isBr(nextLine)&&!isAtEndOfBlock(nextLine)}function hasEmptyLineBefore(token){token=token.prev;var count=0;while(token&&tk.isEmpty(token)){if(tk.isBr(token)){count+=1}if(count>1){return true}token=token.prev}return false}function isIndentOrWs(token){return tk.isIndent(token)||tk.isWs(token)}function nextInLineNotComment(token){token=token.next;while(token){if(tk.isBr(token)){return true}if(!tk.isEmpty(token)){return!tk.isComment(token)}token=token.next}return true}function isAtBeginingOfBlock(token){var open=tk.findPrev(token,tk.isCode);if(!open)return false;var a=open.value;return a==="("||a==="["||a==="{"}function isAtEndOfBlock(token){var close=tk.findNext(token,tk.isCode);if(!close)return false;var z=close.value;return z===")"||z==="]"||z==="}"}function isInsideEmptyBlock(token){return isAtEndOfBlock(token)&&isAtBeginingOfBlock(token)}exports.whiteSpaceToIndent=whiteSpaceToIndent;function whiteSpaceToIndent(token,indentValue){if(tk.isWs(token)&&(tk.isBr(token.prev)||!token.prev)){token.type="Indent";indentValue=indentValue||_opts.value;if(indentValue){token.level=inferLevel(token,indentValue)}}}function inferLevel(token,indentValue){return Math.max(token.value.split(indentValue).length-1,0)}},{debug:97,"mout/string/escapeRegExp":89,"mout/string/repeat":90,"rocambole-token":107}],101:[function(require,module,exports){arguments[4][97][0].apply(exports,arguments)},{"./debug":102,dup:97}],102:[function(require,module,exports){arguments[4][98][0].apply(exports,arguments)},{dup:98,ms:103}],103:[function(require,module,exports){arguments[4][99][0].apply(exports,arguments)},{dup:99}],104:[function(require,module,exports){(function(exports){if(typeof module==="object"&&module.exports===exports)exports=module.exports=SemVer;exports.SEMVER_SPEC_VERSION="2.0.0";var MAX_LENGTH=256;var MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;var re=exports.re=[];var src=exports.src=[];var R=0;var NUMERICIDENTIFIER=R++;src[NUMERICIDENTIFIER]="0|[1-9]\\d*";var NUMERICIDENTIFIERLOOSE=R++;src[NUMERICIDENTIFIERLOOSE]="[0-9]+";var NONNUMERICIDENTIFIER=R++;src[NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var MAINVERSION=R++;src[MAINVERSION]="("+src[NUMERICIDENTIFIER]+")\\."+"("+src[NUMERICIDENTIFIER]+")\\."+"("+src[NUMERICIDENTIFIER]+")";var MAINVERSIONLOOSE=R++;src[MAINVERSIONLOOSE]="("+src[NUMERICIDENTIFIERLOOSE]+")\\."+"("+src[NUMERICIDENTIFIERLOOSE]+")\\."+"("+src[NUMERICIDENTIFIERLOOSE]+")";var PRERELEASEIDENTIFIER=R++;src[PRERELEASEIDENTIFIER]="(?:"+src[NUMERICIDENTIFIER]+"|"+src[NONNUMERICIDENTIFIER]+")";var PRERELEASEIDENTIFIERLOOSE=R++;src[PRERELEASEIDENTIFIERLOOSE]="(?:"+src[NUMERICIDENTIFIERLOOSE]+"|"+src[NONNUMERICIDENTIFIER]+")";var PRERELEASE=R++;src[PRERELEASE]="(?:-("+src[PRERELEASEIDENTIFIER]+"(?:\\."+src[PRERELEASEIDENTIFIER]+")*))";var PRERELEASELOOSE=R++;src[PRERELEASELOOSE]="(?:-?("+src[PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+src[PRERELEASEIDENTIFIERLOOSE]+")*))";var BUILDIDENTIFIER=R++;src[BUILDIDENTIFIER]="[0-9A-Za-z-]+";var BUILD=R++;src[BUILD]="(?:\\+("+src[BUILDIDENTIFIER]+"(?:\\."+src[BUILDIDENTIFIER]+")*))";var FULL=R++;var FULLPLAIN="v?"+src[MAINVERSION]+src[PRERELEASE]+"?"+src[BUILD]+"?";src[FULL]="^"+FULLPLAIN+"$";var LOOSEPLAIN="[v=\\s]*"+src[MAINVERSIONLOOSE]+src[PRERELEASELOOSE]+"?"+src[BUILD]+"?";var LOOSE=R++;src[LOOSE]="^"+LOOSEPLAIN+"$";var GTLT=R++;src[GTLT]="((?:<|>)?=?)";var XRANGEIDENTIFIERLOOSE=R++;src[XRANGEIDENTIFIERLOOSE]=src[NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";var XRANGEIDENTIFIER=R++;src[XRANGEIDENTIFIER]=src[NUMERICIDENTIFIER]+"|x|X|\\*";var XRANGEPLAIN=R++;src[XRANGEPLAIN]="[v=\\s]*("+src[XRANGEIDENTIFIER]+")"+"(?:\\.("+src[XRANGEIDENTIFIER]+")"+"(?:\\.("+src[XRANGEIDENTIFIER]+")"+"(?:"+src[PRERELEASE]+")?"+src[BUILD]+"?"+")?)?";var XRANGEPLAINLOOSE=R++;src[XRANGEPLAINLOOSE]="[v=\\s]*("+src[XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+src[XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+src[XRANGEIDENTIFIERLOOSE]+")"+"(?:"+src[PRERELEASELOOSE]+")?"+src[BUILD]+"?"+")?)?";var XRANGE=R++;src[XRANGE]="^"+src[GTLT]+"\\s*"+src[XRANGEPLAIN]+"$";var XRANGELOOSE=R++;src[XRANGELOOSE]="^"+src[GTLT]+"\\s*"+src[XRANGEPLAINLOOSE]+"$";var LONETILDE=R++;src[LONETILDE]="(?:~>?)";var TILDETRIM=R++;src[TILDETRIM]="(\\s*)"+src[LONETILDE]+"\\s+";re[TILDETRIM]=new RegExp(src[TILDETRIM],"g");var tildeTrimReplace="$1~";var TILDE=R++;src[TILDE]="^"+src[LONETILDE]+src[XRANGEPLAIN]+"$";var TILDELOOSE=R++;src[TILDELOOSE]="^"+src[LONETILDE]+src[XRANGEPLAINLOOSE]+"$";var LONECARET=R++;src[LONECARET]="(?:\\^)";var CARETTRIM=R++;src[CARETTRIM]="(\\s*)"+src[LONECARET]+"\\s+";re[CARETTRIM]=new RegExp(src[CARETTRIM],"g");var caretTrimReplace="$1^";var CARET=R++;src[CARET]="^"+src[LONECARET]+src[XRANGEPLAIN]+"$";var CARETLOOSE=R++;src[CARETLOOSE]="^"+src[LONECARET]+src[XRANGEPLAINLOOSE]+"$";var COMPARATORLOOSE=R++;src[COMPARATORLOOSE]="^"+src[GTLT]+"\\s*("+LOOSEPLAIN+")$|^$";var COMPARATOR=R++;src[COMPARATOR]="^"+src[GTLT]+"\\s*("+FULLPLAIN+")$|^$";var COMPARATORTRIM=R++;src[COMPARATORTRIM]="(\\s*)"+src[GTLT]+"\\s*("+LOOSEPLAIN+"|"+src[XRANGEPLAIN]+")";re[COMPARATORTRIM]=new RegExp(src[COMPARATORTRIM],"g");var comparatorTrimReplace="$1$2$3";var HYPHENRANGE=R++;src[HYPHENRANGE]="^\\s*("+src[XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+src[XRANGEPLAIN]+")"+"\\s*$";var HYPHENRANGELOOSE=R++;src[HYPHENRANGELOOSE]="^\\s*("+src[XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+src[XRANGEPLAINLOOSE]+")"+"\\s*$";var STAR=R++;src[STAR]="(<|>)?=?\\s*\\*";for(var i=0;i<R;i++){if(!re[i])re[i]=new RegExp(src[i])}exports.parse=parse;function parse(version,loose){if(version instanceof SemVer)return version;if(typeof version!=="string")return null;if(version.length>MAX_LENGTH)return null;var r=loose?re[LOOSE]:re[FULL];if(!r.test(version))return null;try{return new SemVer(version,loose)}catch(er){return null}}exports.valid=valid;function valid(version,loose){var v=parse(version,loose);return v?v.version:null}exports.clean=clean;function clean(version,loose){var s=parse(version.trim().replace(/^[=v]+/,""),loose);return s?s.version:null}exports.SemVer=SemVer;function SemVer(version,loose){if(version instanceof SemVer){if(version.loose===loose)return version;else version=version.version}else if(typeof version!=="string"){throw new TypeError("Invalid Version: "+version)}if(version.length>MAX_LENGTH)throw new TypeError("version is longer than "+MAX_LENGTH+" characters");if(!(this instanceof SemVer))return new SemVer(version,loose);this.loose=loose;var m=version.trim().match(loose?re[LOOSE]:re[FULL]);if(!m)throw new TypeError("Invalid Version: "+version);this.raw=version;this.major=+m[1];this.minor=+m[2];this.patch=+m[3];if(this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");if(!m[4])this.prerelease=[];else this.prerelease=m[4].split(".").map(function(id){if(/^[0-9]+$/.test(id)){var num=+id;if(num>=0&&num<MAX_SAFE_INTEGER)return num}return id});this.build=m[5]?m[5].split("."):[];this.format()}SemVer.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};SemVer.prototype.inspect=function(){return'<SemVer "'+this+'">'};SemVer.prototype.toString=function(){return this.version};SemVer.prototype.compare=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);return this.compareMain(other)||this.comparePre(other)};SemVer.prototype.compareMain=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);return compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)};SemVer.prototype.comparePre=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);if(this.prerelease.length&&!other.prerelease.length)return-1;else if(!this.prerelease.length&&other.prerelease.length)return 1;else if(!this.prerelease.length&&!other.prerelease.length)return 0;var i=0;do{var a=this.prerelease[i];var b=other.prerelease[i];if(a===undefined&&b===undefined)return 0;else if(b===undefined)return 1;else if(a===undefined)return-1;else if(a===b)continue;else return compareIdentifiers(a,b)}while(++i)};SemVer.prototype.inc=function(release,identifier){switch(release){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",identifier);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",identifier);break;case"prepatch":this.prerelease.length=0;this.inc("patch",identifier);this.inc("pre",identifier);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",identifier);this.inc("pre",identifier);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1)this.prerelease.push(0)}if(identifier){if(this.prerelease[0]===identifier){if(isNaN(this.prerelease[1]))this.prerelease=[identifier,0]}else this.prerelease=[identifier,0]}break;default:throw new Error("invalid increment argument: "+release)}this.format();return this};exports.inc=inc;function inc(version,release,loose,identifier){if(typeof loose==="string"){identifier=loose;loose=undefined}try{return new SemVer(version,loose).inc(release,identifier).version}catch(er){return null}}exports.diff=diff;function diff(version1,version2){if(eq(version1,version2)){return null}else{var v1=parse(version1);var v2=parse(version2);if(v1.prerelease.length||v2.prerelease.length){for(var key in v1){if(key==="major"||key==="minor"||key==="patch"){if(v1[key]!==v2[key]){return"pre"+key}}}return"prerelease"}for(var key in v1){if(key==="major"||key==="minor"||key==="patch"){if(v1[key]!==v2[key]){return key}}}}}exports.compareIdentifiers=compareIdentifiers;var numeric=/^[0-9]+$/;function compareIdentifiers(a,b){var anum=numeric.test(a);var bnum=numeric.test(b);if(anum&&bnum){a=+a;b=+b}return anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:a>b?1:0}exports.rcompareIdentifiers=rcompareIdentifiers;function rcompareIdentifiers(a,b){return compareIdentifiers(b,a)}exports.major=major;function major(a,loose){return new SemVer(a,loose).major}exports.minor=minor;function minor(a,loose){return new SemVer(a,loose).minor}exports.patch=patch;function patch(a,loose){return new SemVer(a,loose).patch}exports.compare=compare;function compare(a,b,loose){return new SemVer(a,loose).compare(b)}exports.compareLoose=compareLoose;function compareLoose(a,b){return compare(a,b,true)}exports.rcompare=rcompare;function rcompare(a,b,loose){return compare(b,a,loose)}exports.sort=sort;function sort(list,loose){return list.sort(function(a,b){return exports.compare(a,b,loose)})}exports.rsort=rsort;function rsort(list,loose){return list.sort(function(a,b){return exports.rcompare(a,b,loose)})}exports.gt=gt;function gt(a,b,loose){return compare(a,b,loose)>0}exports.lt=lt;function lt(a,b,loose){return compare(a,b,loose)<0}exports.eq=eq;function eq(a,b,loose){return compare(a,b,loose)===0}exports.neq=neq;function neq(a,b,loose){return compare(a,b,loose)!==0}exports.gte=gte;function gte(a,b,loose){return compare(a,b,loose)>=0}exports.lte=lte;function lte(a,b,loose){return compare(a,b,loose)<=0}exports.cmp=cmp;function cmp(a,op,b,loose){var ret;switch(op){case"===":if(typeof a==="object")a=a.version;if(typeof b==="object")b=b.version;ret=a===b;break;case"!==":if(typeof a==="object")a=a.version;if(typeof b==="object")b=b.version;ret=a!==b;break;case"":case"=":case"==":ret=eq(a,b,loose);break;case"!=":ret=neq(a,b,loose);break;case">":ret=gt(a,b,loose);break;case">=":ret=gte(a,b,loose);break;case"<":ret=lt(a,b,loose);break;case"<=":ret=lte(a,b,loose);break;default:throw new TypeError("Invalid operator: "+op)}return ret}exports.Comparator=Comparator;function Comparator(comp,loose){if(comp instanceof Comparator){if(comp.loose===loose)return comp;else comp=comp.value}if(!(this instanceof Comparator))return new Comparator(comp,loose);this.loose=loose;this.parse(comp);if(this.semver===ANY)this.value="";else this.value=this.operator+this.semver.version}var ANY={};Comparator.prototype.parse=function(comp){var r=this.loose?re[COMPARATORLOOSE]:re[COMPARATOR];var m=comp.match(r);if(!m)throw new TypeError("Invalid comparator: "+comp);this.operator=m[1];if(this.operator==="=")this.operator="";if(!m[2])this.semver=ANY;else this.semver=new SemVer(m[2],this.loose)};Comparator.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(version){if(this.semver===ANY)return true;if(typeof version==="string")version=new SemVer(version,this.loose);return cmp(version,this.operator,this.semver,this.loose)};exports.Range=Range;function Range(range,loose){if(range instanceof Range&&range.loose===loose)return range;if(!(this instanceof Range))return new Range(range,loose);this.loose=loose;this.raw=range;this.set=range.split(/\s*\|\|\s*/).map(function(range){return this.parseRange(range.trim())},this).filter(function(c){return c.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+range)}this.format()}Range.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};Range.prototype.format=function(){this.range=this.set.map(function(comps){return comps.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(range){var loose=this.loose;range=range.trim();var hr=loose?re[HYPHENRANGELOOSE]:re[HYPHENRANGE];range=range.replace(hr,hyphenReplace);range=range.replace(re[COMPARATORTRIM],comparatorTrimReplace);range=range.replace(re[TILDETRIM],tildeTrimReplace);range=range.replace(re[CARETTRIM],caretTrimReplace);range=range.split(/\s+/).join(" ");var compRe=loose?re[COMPARATORLOOSE]:re[COMPARATOR];var set=range.split(" ").map(function(comp){return parseComparator(comp,loose)}).join(" ").split(/\s+/);if(this.loose){set=set.filter(function(comp){return!!comp.match(compRe)})}set=set.map(function(comp){return new Comparator(comp,loose)});return set};exports.toComparators=toComparators;function toComparators(range,loose){return new Range(range,loose).set.map(function(comp){return comp.map(function(c){return c.value}).join(" ").trim().split(" ")})}function parseComparator(comp,loose){comp=replaceCarets(comp,loose);comp=replaceTildes(comp,loose);comp=replaceXRanges(comp,loose);comp=replaceStars(comp,loose);return comp}function isX(id){return!id||id.toLowerCase()==="x"||id==="*"}function replaceTildes(comp,loose){return comp.trim().split(/\s+/).map(function(comp){return replaceTilde(comp,loose)}).join(" ")}function replaceTilde(comp,loose){var r=loose?re[TILDELOOSE]:re[TILDE];return comp.replace(r,function(_,M,m,p,pr){var ret;if(isX(M))ret="";else if(isX(m))ret=">="+M+".0.0 <"+(+M+1)+".0.0";else if(isX(p))ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0";else if(pr){if(pr.charAt(0)!=="-")pr="-"+pr;ret=">="+M+"."+m+"."+p+pr+" <"+M+"."+(+m+1)+".0"}else ret=">="+M+"."+m+"."+p+" <"+M+"."+(+m+1)+".0";return ret})}function replaceCarets(comp,loose){return comp.trim().split(/\s+/).map(function(comp){return replaceCaret(comp,loose)}).join(" ")}function replaceCaret(comp,loose){var r=loose?re[CARETLOOSE]:re[CARET];return comp.replace(r,function(_,M,m,p,pr){var ret;if(isX(M))ret="";else if(isX(m))ret=">="+M+".0.0 <"+(+M+1)+".0.0";else if(isX(p)){if(M==="0")ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0";else ret=">="+M+"."+m+".0 <"+(+M+1)+".0.0"}else if(pr){if(pr.charAt(0)!=="-")pr="-"+pr;if(M==="0"){if(m==="0")ret=">="+M+"."+m+"."+p+pr+" <"+M+"."+m+"."+(+p+1);else ret=">="+M+"."+m+"."+p+pr+" <"+M+"."+(+m+1)+".0"}else ret=">="+M+"."+m+"."+p+pr+" <"+(+M+1)+".0.0"}else{if(M==="0"){if(m==="0")ret=">="+M+"."+m+"."+p+" <"+M+"."+m+"."+(+p+1);else ret=">="+M+"."+m+"."+p+" <"+M+"."+(+m+1)+".0"}else ret=">="+M+"."+m+"."+p+" <"+(+M+1)+".0.0"}return ret})}function replaceXRanges(comp,loose){return comp.split(/\s+/).map(function(comp){return replaceXRange(comp,loose)}).join(" ")}function replaceXRange(comp,loose){comp=comp.trim();var r=loose?re[XRANGELOOSE]:re[XRANGE];return comp.replace(r,function(ret,gtlt,M,m,p,pr){var xM=isX(M);var xm=xM||isX(m);var xp=xm||isX(p);var anyX=xp;if(gtlt==="="&&anyX)gtlt="";if(xM){if(gtlt===">"||gtlt==="<"){
ret="<0.0.0"}else{ret="*"}}else if(gtlt&&anyX){if(xm)m=0;if(xp)p=0;if(gtlt===">"){gtlt=">=";if(xm){M=+M+1;m=0;p=0}else if(xp){m=+m+1;p=0}}else if(gtlt==="<="){gtlt="<";if(xm)M=+M+1;else m=+m+1}ret=gtlt+M+"."+m+"."+p}else if(xm){ret=">="+M+".0.0 <"+(+M+1)+".0.0"}else if(xp){ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0"}return ret})}function replaceStars(comp,loose){return comp.trim().replace(re[STAR],"")}function hyphenReplace($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr,tb){if(isX(fM))from="";else if(isX(fm))from=">="+fM+".0.0";else if(isX(fp))from=">="+fM+"."+fm+".0";else from=">="+from;if(isX(tM))to="";else if(isX(tm))to="<"+(+tM+1)+".0.0";else if(isX(tp))to="<"+tM+"."+(+tm+1)+".0";else if(tpr)to="<="+tM+"."+tm+"."+tp+"-"+tpr;else to="<="+to;return(from+" "+to).trim()}Range.prototype.test=function(version){if(!version)return false;if(typeof version==="string")version=new SemVer(version,this.loose);for(var i=0;i<this.set.length;i++){if(testSet(this.set[i],version))return true}return false};function testSet(set,version){for(var i=0;i<set.length;i++){if(!set[i].test(version))return false}if(version.prerelease.length){for(var i=0;i<set.length;i++){if(set[i].semver===ANY)continue;if(set[i].semver.prerelease.length>0){var allowed=set[i].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch)return true}}return false}return true}exports.satisfies=satisfies;function satisfies(version,range,loose){try{range=new Range(range,loose)}catch(er){return false}return range.test(version)}exports.maxSatisfying=maxSatisfying;function maxSatisfying(versions,range,loose){return versions.filter(function(version){return satisfies(version,range,loose)}).sort(function(a,b){return rcompare(a,b,loose)})[0]||null}exports.validRange=validRange;function validRange(range,loose){try{return new Range(range,loose).range||"*"}catch(er){return null}}exports.ltr=ltr;function ltr(version,range,loose){return outside(version,range,"<",loose)}exports.gtr=gtr;function gtr(version,range,loose){return outside(version,range,">",loose)}exports.outside=outside;function outside(version,range,hilo,loose){version=new SemVer(version,loose);range=new Range(range,loose);var gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt;ltefn=lte;ltfn=lt;comp=">";ecomp=">=";break;case"<":gtfn=lt;ltefn=gte;ltfn=gt;comp="<";ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(version,range,loose)){return false}for(var i=0;i<range.set.length;++i){var comparators=range.set[i];var high=null;var low=null;comparators.forEach(function(comparator){if(comparator.semver===ANY){comparator=new Comparator(">=0.0.0")}high=high||comparator;low=low||comparator;if(gtfn(comparator.semver,high.semver,loose)){high=comparator}else if(ltfn(comparator.semver,low.semver,loose)){low=comparator}});if(high.operator===comp||high.operator===ecomp){return false}if((!low.operator||low.operator===comp)&&ltefn(version,low.semver)){return false}else if(low.operator===ecomp&&ltfn(version,low.semver)){return false}}return true}if(typeof define==="function"&&define.amd)define(exports)})(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={})},{}],105:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var debug=require("debug");var debugBefore=debug("rocambole:br:before");var debugAfter=debug("rocambole:br:after");var debugBetween=debug("rocambole:br:between");var semver=require("semver");var _curOpts={value:"\n"};exports.setOptions=setOptions;function setOptions(opts){_curOpts=opts}exports.limit=limit;function limit(token,typeOrValue){limitBefore(token,typeOrValue);limitAfter(token,typeOrValue)}exports.limitBefore=limitBefore;function limitBefore(token,typeOrValue){var expected=expectedBefore(typeOrValue);debugBefore("typeOrValue: %s, expected: %s, value: %s",typeOrValue,expected,token&&token.value);if(expected<0)return;var start=getStartToken(token);limitInBetween("before",start,token,expected)}exports.limitAfter=limitAfter;function limitAfter(token,typeOrValue){var expected=expectedAfter(typeOrValue);debugAfter("typeOrValue: %s, expected: %s, value: %s",typeOrValue,expected,token&&token.value);if(expected<0)return;var end=getEndToken(token);limitInBetween("after",token,end,expected)}exports.expectedBefore=expectedBefore;function expectedBefore(typeOrValue){return getExpect("before",typeOrValue)}exports.expectedAfter=expectedAfter;function expectedAfter(typeOrValue){return getExpect("after",typeOrValue)}function getExpect(location,typeOrValue){var expected;if(typeof typeOrValue==="string"){expected=_curOpts[location][typeOrValue]}else{expected=typeOrValue}expected=expected!=null?expected:-1;if(typeof expected==="boolean"){expected=expected?">=1":0}if(expected<0){return expected}else if(typeof expected==="number"){return String(expected)}else{return expected}}function limitInBetween(location,start,end,expected){var n=getDiff(start,end,expected);debugBetween("diff: %d",n);if(n){_tk.removeInBetween(start,end,"WhiteSpace")}if(n<0){_tk.removeInBetween(start,end,function(token){return token.type==="LineBreak"&&n++<0&&!siblingIsComment(location,token)})}else if(n>0){var target=location==="after"?start:end;var insertNextTo=_tk[location];while(n-->0){insertNextTo(target,{type:"LineBreak",value:_curOpts.value})}}}function siblingIsComment(location,token){var prop=location==="before"?"prev":"next";return _tk.isComment(token[prop])}function getDiff(start,end,expected){if(start===end)return 0;var count=countBrInBetween(start,end);var vCount=String(count)+".0.0";if(semver.satisfies(vCount,expected)){return 0}else{return getSatisfyingMatch(count,vCount,expected)-count}}function getSatisfyingMatch(count,vCount,expected){var result;var diff=semver.gtr(vCount,expected)?-1:1;count+=diff;while(result==null&&count>=0&&count<100){if(semver.satisfies(String(count)+".0.0",expected)){result=count}count+=diff}return parseInt(result,10)}function countBrInBetween(start,end){var count=0;_tk.eachInBetween(start,end,function(token){if(_tk.isBr(token))count++});return count}function getEndToken(token){var end=_tk.findNextNonEmpty(token);if(shouldSkipToken(end)){end=_tk.findNextNonEmpty(end)}return end?end:token.root.endToken}function shouldSkipToken(token){var result=_tk.isComment(token)&&!isOnSeparateLine(token);return result&&getExpect("before",token.type)<=0}function isOnSeparateLine(token){return _tk.isBr(token.prev)||_tk.isEmpty(token.prev)&&_tk.isBr(token.prev.prev)}function getStartToken(token){var end=_tk.findPrevNonEmpty(token);return end?end:token.root.startToken}exports.limitBeforeEndOfFile=function(ast,amount){var typeOrValue=amount!=null?amount:"EndOfFile";var expected=getExpect("before",typeOrValue);if(expected<0)return;var lastNonEmpty=_tk.isEmpty(ast.endToken)?_tk.findPrevNonEmpty(ast.endToken):ast.endToken;if(lastNonEmpty){limitInBetween("after",lastNonEmpty,null,expected)}else{do{var br={type:"LineBreak",value:_curOpts.value};if(ast.startToken){_tk.after(ast.startToken,br)}else{ast.startToken=ast.endToken=br}}while(--expected)}}},{debug:101,"rocambole-token":107,semver:104}],106:[function(require,module,exports){"use strict";var makeCheck=require("./makeCheck");var isNotEmpty=require("./is").isNotEmpty;exports.findInBetween=findInBetween;function findInBetween(startToken,endToken,check){check=makeCheck(check);var found;var last=endToken&&endToken.next;while(startToken&&startToken!==last&&!found){if(check(startToken)){found=startToken}startToken=startToken.next}return found}exports.findInBetweenFromEnd=findInBetweenFromEnd;function findInBetweenFromEnd(startToken,endToken,check){check=makeCheck(check);var found;var last=startToken&&startToken.prev;while(endToken&&endToken!==last&&!found){if(check(endToken)){found=endToken}endToken=endToken.prev}return found}exports.findNext=findNext;function findNext(startToken,check){check=makeCheck(check);startToken=startToken&&startToken.next;while(startToken){if(check(startToken)){return startToken}startToken=startToken.next}}exports.findPrev=findPrev;function findPrev(endToken,check){check=makeCheck(check);endToken=endToken&&endToken.prev;while(endToken){if(check(endToken)){return endToken}endToken=endToken.prev}}exports.findNextNonEmpty=findNextNonEmpty;function findNextNonEmpty(startToken){return findNext(startToken,isNotEmpty)}exports.findPrevNonEmpty=findPrevNonEmpty;function findPrevNonEmpty(endToken){return findPrev(endToken,isNotEmpty)}},{"./is":109,"./makeCheck":110}],107:[function(require,module,exports){"use strict";function mixIn(target,source){Object.keys(source).forEach(function(key){target[key]=source[key]});return target}exports.eachInBetween=eachInBetween;function eachInBetween(startToken,endToken,iterator){var last=endToken&&endToken.next;while(startToken&&startToken!==last){iterator(startToken);startToken=startToken.next}}mixIn(exports,require("./find"));mixIn(exports,require("./insert"));mixIn(exports,require("./is"));mixIn(exports,require("./remove"))},{"./find":106,"./insert":108,"./is":109,"./remove":111}],108:[function(require,module,exports){"use strict";exports.before=before;function before(target,newToken){newToken.prev=target.prev;newToken.next=target;if(target.prev){target.prev.next=newToken}else if(target.root){target.root.startToken=newToken}target.prev=newToken;newToken.root=target.root;return newToken}exports.after=after;function after(target,newToken){if(target.next){target.next.prev=newToken}else if(target.root){target.root.endToken=newToken}newToken.prev=target;newToken.next=target.next;target.next=newToken;newToken.root=target.root;return newToken}},{}],109:[function(require,module,exports){"use strict";exports.isWs=isWs;function isWs(token){return token&&token.type==="WhiteSpace"}exports.isBr=isBr;function isBr(token){return token&&token.type==="LineBreak"}exports.isEmpty=isEmpty;function isEmpty(token){return token&&(token.type==="WhiteSpace"||token.type==="LineBreak"||token.type==="Indent")}exports.isNotEmpty=isNotEmpty;function isNotEmpty(token){return!isEmpty(token)}exports.isCode=isCode;function isCode(token){return!isEmpty(token)&&!isComment(token)}exports.isSemiColon=isSemiColon;function isSemiColon(token){return token&&(token.type==="Punctuator"&&token.value===";")}exports.isComma=isComma;function isComma(token){return token&&(token.type==="Punctuator"&&token.value===",")}exports.isIndent=isIndent;function isIndent(token){return token&&token.type==="Indent"}exports.isComment=isComment;function isComment(token){return token&&(token.type==="LineComment"||token.type==="BlockComment")}},{}],110:[function(require,module,exports){"use strict";module.exports=makeCheck;function makeCheck(orig){if(typeof orig==="string"){return makeStringCheck(orig)}else if(Array.isArray(orig)){return makeArrayCheck(orig)}return orig}function makeArrayCheck(arr){return function checkTypeAndValueByIndex(token){return token&&(arr.indexOf(token.type)!==-1||arr.indexOf(token.value)!==-1)}}function makeStringCheck(str){return function checkTypeAndValueByString(token){return token&&(token.type===str||token.value===str)}}},{}],111:[function(require,module,exports){"use strict";var makeCheck=require("./makeCheck");var isEmpty=require("./is").isEmpty;exports.remove=remove;function remove(target){if(target.next){target.next.prev=target.prev}else if(target.root){target.root.endToken=target.prev}if(target.prev){target.prev.next=target.next}else if(target.root){target.root.startToken=target.next}}exports.removeInBetween=removeInBetween;function removeInBetween(startToken,endToken,check){check=makeCheck(check);var last=endToken&&endToken.next;while(startToken&&startToken!==last){if(check(startToken)){remove(startToken)}startToken=startToken.next}}exports.removeAdjacent=removeAdjacent;function removeAdjacent(token,check){removeAdjacentBefore(token,check);removeAdjacentAfter(token,check)}exports.removeAdjacentBefore=removeAdjacentBefore;function removeAdjacentBefore(token,check){check=makeCheck(check);var prev=token.prev;while(prev&&check(prev)){remove(prev);prev=prev.prev}}exports.removeAdjacentAfter=removeAdjacentAfter;function removeAdjacentAfter(token,check){check=makeCheck(check);var next=token.next;while(next&&check(next)){remove(next);next=next.next}}exports.removeEmptyAdjacentBefore=removeEmptyAdjacentBefore;function removeEmptyAdjacentBefore(startToken){removeAdjacentBefore(startToken,isEmpty)}exports.removeEmptyAdjacentAfter=removeEmptyAdjacentAfter;function removeEmptyAdjacentAfter(startToken){removeAdjacentAfter(startToken,isEmpty)}exports.removeEmptyInBetween=removeEmptyInBetween;function removeEmptyInBetween(startToken,endToken){removeInBetween(startToken,endToken,isEmpty)}},{"./is":109,"./makeCheck":110}],112:[function(require,module,exports){arguments[4][97][0].apply(exports,arguments)},{"./debug":113,dup:97}],113:[function(require,module,exports){arguments[4][98][0].apply(exports,arguments)},{dup:98,ms:114}],114:[function(require,module,exports){arguments[4][99][0].apply(exports,arguments)},{dup:99}],115:[function(require,module,exports){"use strict";module.exports=repeat;function repeat(str,num){if(typeof str!=="string"){throw new TypeError("repeat-string expects a string.")}if(num===1)return str;if(num===2)return str+str;var max=str.length*num;if(cache!==str||typeof cache==="undefined"){cache=str;res=""}while(max>res.length&&num>0){if(num&1){res+=str}num>>=1;if(!num)break;str+=str}return res.substr(0,max)}var res="";var cache},{}],116:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var repeat=require("repeat-string");var debug=require("debug");var debugBefore=debug("rocambole:ws:before");var debugAfter=debug("rocambole:ws:after");var _curOpts={value:" ",before:{},after:{}};exports.setOptions=setOptions;function setOptions(opts){_curOpts=opts}exports.limit=limit;function limit(token,typeOrValue){limitBefore(token,typeOrValue);limitAfter(token,typeOrValue)}exports.limitBefore=limitBefore;function limitBefore(token,typeOrValue){var amount=expectedBefore(typeOrValue);debugBefore("typeOrValue: %s, amount: %s, token: %s",typeOrValue,amount,token.value);if(amount<0)return;update("before",token,amount)}exports.limitAfter=limitAfter;function limitAfter(token,typeOrValue){var amount=expectedAfter(typeOrValue);debugAfter("typeOrValue: %s, amount: %s, token: %s",typeOrValue,amount,token.value);if(amount<0)return;update("after",token,amount)}exports.expectedAfter=expectedAfter;function expectedAfter(typeOrValue){return getAmount("after",typeOrValue)}exports.expectedBefore=expectedBefore;function expectedBefore(typeOrValue){return getAmount("before",typeOrValue)}function getAmount(position,typeOrValue){if(typeof typeOrValue==="number"){return typeOrValue}var amount=_curOpts[position][typeOrValue];return amount==null?-1:amount}function update(position,target,amount){var adjacent=position==="before"?target.prev:target.next;var adjacentIsWs=_tk.isWs(adjacent);if(!adjacent||_tk.isBr(adjacent))return;if(amount===0&&adjacentIsWs){_tk.remove(adjacent);return}var ws;if(adjacentIsWs){ws=adjacent}else{ws={type:"WhiteSpace"}}ws.value=repeat(_curOpts.value||" ",amount);if(!adjacentIsWs){_tk[position](target,ws)}}},{debug:112,"repeat-string":115,"rocambole-token":107}],117:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.esprima={})}})(this,function(exports){"use strict";var Token,TokenName,FnExprTokens,Syntax,PlaceHolders,Messages,Regex,source,strict,sourceType,index,lineNumber,lineStart,hasLineTerminator,lastIndex,lastLineNumber,lastLineStart,startIndex,startLineNumber,startLineStart,scanning,length,lookahead,state,extra,isBindingElement,isAssignmentTarget,firstCoverInitializedNameError;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10};TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="<end>";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";TokenName[Token.RegularExpression]="RegularExpression";TokenName[Token.Template]="Template";FnExprTokens=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"};PlaceHolders={ArrowParameterPlaceHolder:"ArrowParameterPlaceHolder"};Messages={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",IllegalYield:"Unexpected token yield",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",ObjectPatternAsRestParameter:"Unexpected token {",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0"};Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function assert(condition,message){if(!condition){throw new Error("ASSERT: "+message)}}function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return"0123456789abcdefABCDEF".indexOf(ch)>=0}function isOctalDigit(ch){return"01234567".indexOf(ch)>=0}function octalToDecimal(ch){var octal=ch!=="0",code="01234567".indexOf(ch);if(index<length&&isOctalDigit(source[index])){octal=true;code=code*8+"01234567".indexOf(source[index++]);if("0123".indexOf(ch)>=0&&index<length&&isOctalDigit(source[index])){code=code*8+"01234567".indexOf(source[index++])}}return{code:code,octal:octal}}function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function isFutureReservedWord(id){switch(id){case"enum":case"export":case"import":case"super":return true;default:return false}}function isStrictModeReservedWord(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isKeyword(id){switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try"||id==="let";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}function addComment(type,value,start,end,loc){var comment;assert(typeof start==="number","Comment must have valid position");state.lastCommentStart=start;comment={type:type,value:value};if(extra.range){comment.range=[start,end]}if(extra.loc){comment.loc=loc}extra.comments.push(comment);if(extra.attachComment){extra.leadingComments.push(comment);extra.trailingComments.push(comment)}}function skipSingleLineComment(offset){var start,loc,ch,comment;start=index-offset;loc={start:{line:lineNumber,column:index-lineStart-offset}};while(index<length){ch=source.charCodeAt(index);++index;if(isLineTerminator(ch)){hasLineTerminator=true;if(extra.comments){comment=source.slice(start+offset,index-1);loc.end={line:lineNumber,column:index-lineStart-1};addComment("Line",comment,start,index-1,loc)}if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;return}}if(extra.comments){comment=source.slice(start+offset,index);loc.end={line:lineNumber,column:index-lineStart};addComment("Line",comment,start,index,loc)}}function skipMultiLineComment(){var start,loc,ch,comment;if(extra.comments){start=index-2;loc={start:{line:lineNumber,column:index-lineStart-2}}}while(index<length){ch=source.charCodeAt(index);if(isLineTerminator(ch)){if(ch===13&&source.charCodeAt(index+1)===10){++index}hasLineTerminator=true;++lineNumber;++index;lineStart=index}else if(ch===42){if(source.charCodeAt(index+1)===47){++index;++index;if(extra.comments){comment=source.slice(start+2,index-2);loc.end={line:lineNumber,column:index-lineStart};addComment("Block",comment,start,index,loc)}return}++index}else{++index}}if(extra.comments){loc.end={line:lineNumber,column:index-lineStart};comment=source.slice(start+2,index);addComment("Block",comment,start,index,loc)}tolerateUnexpectedToken()}function skipComment(){var ch,start;hasLineTerminator=false;start=index===0;while(index<length){ch=source.charCodeAt(index);if(isWhiteSpace(ch)){++index}else if(isLineTerminator(ch)){hasLineTerminator=true;++index;if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;start=true}else if(ch===47){ch=source.charCodeAt(index+1);if(ch===47){++index;++index;skipSingleLineComment(2);start=true}else if(ch===42){++index;++index;skipMultiLineComment()}else{break}}else if(start&&ch===45){if(source.charCodeAt(index+1)===45&&source.charCodeAt(index+2)===62){index+=3;skipSingleLineComment(3)}else{break}}else if(ch===60){if(source.slice(index+1,index+4)==="!--"){++index;++index;++index;++index;skipSingleLineComment(4)}else{break}}else{break}}}function scanHexEscape(prefix){var i,len,ch,code=0;len=prefix==="u"?4:2;for(i=0;i<len;++i){if(index<length&&isHexDigit(source[index])){ch=source[index++];code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}else{return""}}return String.fromCharCode(code)}function scanUnicodeCodePointEscape(){var ch,code,cu1,cu2;ch=source[index];code=0;if(ch==="}"){throwUnexpectedToken()}while(index<length){ch=source[index++];if(!isHexDigit(ch)){break}code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}if(code>1114111||ch!=="}"){throwUnexpectedToken()}if(code<=65535){return String.fromCharCode(code)}cu1=(code-65536>>10)+55296;cu2=(code-65536&1023)+56320;return String.fromCharCode(cu1,cu2)}function getEscapedIdentifier(){var ch,id;ch=source.charCodeAt(index++);id=String.fromCharCode(ch);if(ch===92){if(source.charCodeAt(index)!==117){throwUnexpectedToken()}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!isIdentifierStart(ch.charCodeAt(0))){throwUnexpectedToken()}id=ch}while(index<length){ch=source.charCodeAt(index);if(!isIdentifierPart(ch)){break}++index;id+=String.fromCharCode(ch);if(ch===92){id=id.substr(0,id.length-1);if(source.charCodeAt(index)!==117){throwUnexpectedToken()}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!isIdentifierPart(ch.charCodeAt(0))){throwUnexpectedToken()}id+=ch}}return id}function getIdentifier(){var start,ch;start=index++;while(index<length){ch=source.charCodeAt(index);if(ch===92){index=start;return getEscapedIdentifier()}if(isIdentifierPart(ch)){++index}else{break}}return source.slice(start,index)}function scanIdentifier(){var start,id,type;start=index;id=source.charCodeAt(index)===92?getEscapedIdentifier():getIdentifier();if(id.length===1){type=Token.Identifier}else if(isKeyword(id)){type=Token.Keyword}else if(id==="null"){type=Token.NullLiteral}else if(id==="true"||id==="false"){type=Token.BooleanLiteral}else{type=Token.Identifier}return{type:type,value:id,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanPunctuator(){var token,str;token={type:Token.Punctuator,value:"",lineNumber:lineNumber,lineStart:lineStart,start:index,end:index};str=source[index];switch(str){case"(":if(extra.tokenize){extra.openParenToken=extra.tokens.length}++index;break;case"{":if(extra.tokenize){extra.openCurlyToken=extra.tokens.length}state.curlyStack.push("{");++index;break;case".":++index;if(source[index]==="."&&source[index+1]==="."){index+=2;str="..."}break;case"}":++index;state.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++index;break;default:str=source.substr(index,4);if(str===">>>="){index+=4}else{str=str.substr(0,3);if(str==="==="||str==="!=="||str===">>>"||str==="<<="||str===">>="){index+=3}else{str=str.substr(0,2);if(str==="&&"||str==="||"||str==="=="||str==="!="||str==="+="||str==="-="||str==="*="||str==="/="||str==="++"||str==="--"||str==="<<"||str===">>"||str==="&="||str==="|="||str==="^="||str==="%="||str==="<="||str===">="||str==="=>"){index+=2}else{str=source[index];if("<>=!+-*%&|^/".indexOf(str)>=0){++index}}}}}if(index===token.start){throwUnexpectedToken()}token.end=index;token.value=str;return token}function scanHexLiteral(start){var number="";while(index<length){if(!isHexDigit(source[index])){break}number+=source[index++]}if(number.length===0){throwUnexpectedToken()}if(isIdentifierStart(source.charCodeAt(index))){
throwUnexpectedToken()}return{type:Token.NumericLiteral,value:parseInt("0x"+number,16),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanBinaryLiteral(start){var ch,number;number="";while(index<length){ch=source[index];if(ch!=="0"&&ch!=="1"){break}number+=source[index++]}if(number.length===0){throwUnexpectedToken()}if(index<length){ch=source.charCodeAt(index);if(isIdentifierStart(ch)||isDecimalDigit(ch)){throwUnexpectedToken()}}return{type:Token.NumericLiteral,value:parseInt(number,2),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanOctalLiteral(prefix,start){var number,octal;if(isOctalDigit(prefix)){octal=true;number="0"+source[index++]}else{octal=false;++index;number=""}while(index<length){if(!isOctalDigit(source[index])){break}number+=source[index++]}if(!octal&&number.length===0){throwUnexpectedToken()}if(isIdentifierStart(source.charCodeAt(index))||isDecimalDigit(source.charCodeAt(index))){throwUnexpectedToken()}return{type:Token.NumericLiteral,value:parseInt(number,8),octal:octal,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function isImplicitOctalLiteral(){var i,ch;for(i=index+1;i<length;++i){ch=source[i];if(ch==="8"||ch==="9"){return false}if(!isOctalDigit(ch)){return true}}return true}function scanNumericLiteral(){var number,start,ch;ch=source[index];assert(isDecimalDigit(ch.charCodeAt(0))||ch===".","Numeric literal must start with a decimal digit or a decimal point");start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch==="x"||ch==="X"){++index;return scanHexLiteral(start)}if(ch==="b"||ch==="B"){++index;return scanBinaryLiteral(start)}if(ch==="o"||ch==="O"){return scanOctalLiteral(ch,start)}if(isOctalDigit(ch)){if(isImplicitOctalLiteral()){return scanOctalLiteral(ch,start)}}}while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="."){number+=source[index++];while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-"){number+=source[index++]}if(isDecimalDigit(source.charCodeAt(index))){while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}}else{throwUnexpectedToken()}}if(isIdentifierStart(source.charCodeAt(index))){throwUnexpectedToken()}return{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanStringLiteral(){var str="",quote,start,ch,unescaped,octToDec,octal=false;quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");start=index;++index;while(index<length){ch=source[index++];if(ch===quote){quote="";break}else if(ch==="\\"){ch=source[index++];if(!ch||!isLineTerminator(ch.charCodeAt(0))){switch(ch){case"u":case"x":if(source[index]==="{"){++index;str+=scanUnicodeCodePointEscape()}else{unescaped=scanHexEscape(ch);if(!unescaped){throw throwUnexpectedToken()}str+=unescaped}break;case"n":str+="\n";break;case"r":str+="\r";break;case"t":str+=" ";break;case"b":str+="\b";break;case"f":str+="\f";break;case"v":str+=" ";break;case"8":case"9":throw throwUnexpectedToken();default:if(isOctalDigit(ch)){octToDec=octalToDecimal(ch);octal=octToDec.octal||octal;str+=String.fromCharCode(octToDec.code)}else{str+=ch}break}}else{++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index}}else if(isLineTerminator(ch.charCodeAt(0))){break}else{str+=ch}}if(quote!==""){throwUnexpectedToken()}return{type:Token.StringLiteral,value:str,octal:octal,lineNumber:startLineNumber,lineStart:startLineStart,start:start,end:index}}function scanTemplate(){var cooked="",ch,start,rawOffset,terminated,head,tail,restore,unescaped;terminated=false;tail=false;start=index;head=source[index]==="`";rawOffset=2;++index;while(index<length){ch=source[index++];if(ch==="`"){rawOffset=1;tail=true;terminated=true;break}else if(ch==="$"){if(source[index]==="{"){state.curlyStack.push("${");++index;terminated=true;break}cooked+=ch}else if(ch==="\\"){ch=source[index++];if(!isLineTerminator(ch.charCodeAt(0))){switch(ch){case"n":cooked+="\n";break;case"r":cooked+="\r";break;case"t":cooked+=" ";break;case"u":case"x":if(source[index]==="{"){++index;cooked+=scanUnicodeCodePointEscape()}else{restore=index;unescaped=scanHexEscape(ch);if(unescaped){cooked+=unescaped}else{index=restore;cooked+=ch}}break;case"b":cooked+="\b";break;case"f":cooked+="\f";break;case"v":cooked+=" ";break;default:if(ch==="0"){if(isDecimalDigit(source.charCodeAt(index))){throwError(Messages.TemplateOctalLiteral)}cooked+="\x00"}else if(isOctalDigit(ch)){throwError(Messages.TemplateOctalLiteral)}else{cooked+=ch}break}}else{++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index}}else if(isLineTerminator(ch.charCodeAt(0))){++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index;cooked+="\n"}else{cooked+=ch}}if(!terminated){throwUnexpectedToken()}if(!head){state.curlyStack.pop()}return{type:Token.Template,value:{cooked:cooked,raw:source.slice(start+1,index-rawOffset)},head:head,tail:tail,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function testRegExp(pattern,flags){var astralSubstitute="￿",tmp=pattern;if(flags.indexOf("u")>=0){tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function($0,$1,$2){var codePoint=parseInt($1||$2,16);if(codePoint>1114111){throwUnexpectedToken(null,Messages.InvalidRegExp)}if(codePoint<=65535){return String.fromCharCode(codePoint)}return astralSubstitute}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,astralSubstitute)}try{RegExp(tmp)}catch(e){throwUnexpectedToken(null,Messages.InvalidRegExp)}try{return new RegExp(pattern,flags)}catch(exception){return null}}function scanRegExpBody(){var ch,str,classMarker,terminated,body;ch=source[index];assert(ch==="/","Regular expression literal must start with a slash");str=source[index++];classMarker=false;terminated=false;while(index<length){ch=source[index++];str+=ch;if(ch==="\\"){ch=source[index++];if(isLineTerminator(ch.charCodeAt(0))){throwUnexpectedToken(null,Messages.UnterminatedRegExp)}str+=ch}else if(isLineTerminator(ch.charCodeAt(0))){throwUnexpectedToken(null,Messages.UnterminatedRegExp)}else if(classMarker){if(ch==="]"){classMarker=false}}else{if(ch==="/"){terminated=true;break}else if(ch==="["){classMarker=true}}}if(!terminated){throwUnexpectedToken(null,Messages.UnterminatedRegExp)}body=str.substr(1,str.length-2);return{value:body,literal:str}}function scanRegExpFlags(){var ch,str,flags,restore;str="";flags="";while(index<length){ch=source[index];if(!isIdentifierPart(ch.charCodeAt(0))){break}++index;if(ch==="\\"&&index<length){ch=source[index];if(ch==="u"){++index;restore=index;ch=scanHexEscape("u");if(ch){flags+=ch;for(str+="\\u";restore<index;++restore){str+=source[restore]}}else{index=restore;flags+="u";str+="\\u"}tolerateUnexpectedToken()}else{str+="\\";tolerateUnexpectedToken()}}else{flags+=ch;str+=ch}}return{value:flags,literal:str}}function scanRegExp(){scanning=true;var start,body,flags,value;lookahead=null;skipComment();start=index;body=scanRegExpBody();flags=scanRegExpFlags();value=testRegExp(body.value,flags.value);scanning=false;if(extra.tokenize){return{type:Token.RegularExpression,value:value,regex:{pattern:body.value,flags:flags.value},lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}return{literal:body.literal+flags.literal,value:value,regex:{pattern:body.value,flags:flags.value},start:start,end:index}}function collectRegex(){var pos,loc,regex,token;skipComment();pos=index;loc={start:{line:lineNumber,column:index-lineStart}};regex=scanRegExp();loc.end={line:lineNumber,column:index-lineStart};if(!extra.tokenize){if(extra.tokens.length>0){token=extra.tokens[extra.tokens.length-1];if(token.range[0]===pos&&token.type==="Punctuator"){if(token.value==="/"||token.value==="/="){extra.tokens.pop()}}}extra.tokens.push({type:"RegularExpression",value:regex.literal,regex:regex.regex,range:[pos,index],loc:loc})}return regex}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advanceSlash(){var prevToken,checkToken;prevToken=extra.tokens[extra.tokens.length-1];if(!prevToken){return collectRegex()}if(prevToken.type==="Punctuator"){if(prevToken.value==="]"){return scanPunctuator()}if(prevToken.value===")"){checkToken=extra.tokens[extra.openParenToken-1];if(checkToken&&checkToken.type==="Keyword"&&(checkToken.value==="if"||checkToken.value==="while"||checkToken.value==="for"||checkToken.value==="with")){return collectRegex()}return scanPunctuator()}if(prevToken.value==="}"){if(extra.tokens[extra.openCurlyToken-3]&&extra.tokens[extra.openCurlyToken-3].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-4];if(!checkToken){return scanPunctuator()}}else if(extra.tokens[extra.openCurlyToken-4]&&extra.tokens[extra.openCurlyToken-4].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-5];if(!checkToken){return collectRegex()}}else{return scanPunctuator()}if(FnExprTokens.indexOf(checkToken.value)>=0){return scanPunctuator()}return collectRegex()}return collectRegex()}if(prevToken.type==="Keyword"&&prevToken.value!=="this"){return collectRegex()}return scanPunctuator()}function advance(){var ch,token;if(index>=length){return{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,start:index,end:index}}ch=source.charCodeAt(index);if(isIdentifierStart(ch)){token=scanIdentifier();if(strict&&isStrictModeReservedWord(token.value)){token.type=Token.Keyword}return token}if(ch===40||ch===41||ch===59){return scanPunctuator()}if(ch===39||ch===34){return scanStringLiteral()}if(ch===46){if(isDecimalDigit(source.charCodeAt(index+1))){return scanNumericLiteral()}return scanPunctuator()}if(isDecimalDigit(ch)){return scanNumericLiteral()}if(extra.tokenize&&ch===47){return advanceSlash()}if(ch===96||ch===125&&state.curlyStack[state.curlyStack.length-1]==="${"){return scanTemplate()}return scanPunctuator()}function collectToken(){var loc,token,value,entry;loc={start:{line:lineNumber,column:index-lineStart}};token=advance();loc.end={line:lineNumber,column:index-lineStart};if(token.type!==Token.EOF){value=source.slice(token.start,token.end);entry={type:TokenName[token.type],value:value,range:[token.start,token.end],loc:loc};if(token.regex){entry.regex={pattern:token.regex.pattern,flags:token.regex.flags}}extra.tokens.push(entry)}return token}function lex(){var token;scanning=true;lastIndex=index;lastLineNumber=lineNumber;lastLineStart=lineStart;skipComment();token=lookahead;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();scanning=false;return token}function peek(){scanning=true;skipComment();lastIndex=index;lastLineNumber=lineNumber;lastLineStart=lineStart;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();scanning=false}function Position(){this.line=startLineNumber;this.column=startIndex-startLineStart}function SourceLocation(){this.start=new Position;this.end=null}function WrappingSourceLocation(startToken){this.start={line:startToken.lineNumber,column:startToken.start-startToken.lineStart};this.end=null}function Node(){if(extra.range){this.range=[startIndex,0]}if(extra.loc){this.loc=new SourceLocation}}function WrappingNode(startToken){if(extra.range){this.range=[startToken.start,0]}if(extra.loc){this.loc=new WrappingSourceLocation(startToken)}}WrappingNode.prototype=Node.prototype={processComment:function(){var lastChild,leadingComments,trailingComments,bottomRight=extra.bottomRightStack,i,comment,last=bottomRight[bottomRight.length-1];if(this.type===Syntax.Program){if(this.body.length>0){return}}if(extra.trailingComments.length>0){trailingComments=[];for(i=extra.trailingComments.length-1;i>=0;--i){comment=extra.trailingComments[i];if(comment.range[0]>=this.range[1]){trailingComments.unshift(comment);extra.trailingComments.splice(i,1)}}extra.trailingComments=[]}else{if(last&&last.trailingComments&&last.trailingComments[0].range[0]>=this.range[1]){trailingComments=last.trailingComments;delete last.trailingComments}}while(last&&last.range[0]>=this.range[0]){lastChild=bottomRight.pop();last=bottomRight[bottomRight.length-1]}if(lastChild){if(lastChild.leadingComments){leadingComments=[];for(i=lastChild.leadingComments.length-1;i>=0;--i){comment=lastChild.leadingComments[i];if(comment.range[1]<=this.range[0]){leadingComments.unshift(comment);lastChild.leadingComments.splice(i,1)}}if(!lastChild.leadingComments.length){lastChild.leadingComments=undefined}}}else if(extra.leadingComments.length>0){leadingComments=[];for(i=extra.leadingComments.length-1;i>=0;--i){comment=extra.leadingComments[i];if(comment.range[1]<=this.range[0]){leadingComments.unshift(comment);extra.leadingComments.splice(i,1)}}}if(leadingComments&&leadingComments.length>0){this.leadingComments=leadingComments}if(trailingComments&&trailingComments.length>0){this.trailingComments=trailingComments}bottomRight.push(this)},finish:function(){if(extra.range){this.range[1]=lastIndex}if(extra.loc){this.loc.end={line:lastLineNumber,column:lastIndex-lastLineStart};if(extra.source){this.loc.source=extra.source}}if(extra.attachComment){this.processComment()}},finishArrayExpression:function(elements){this.type=Syntax.ArrayExpression;this.elements=elements;this.finish();return this},finishArrayPattern:function(elements){this.type=Syntax.ArrayPattern;this.elements=elements;this.finish();return this},finishArrowFunctionExpression:function(params,defaults,body,expression){this.type=Syntax.ArrowFunctionExpression;this.id=null;this.params=params;this.defaults=defaults;this.body=body;this.generator=false;this.expression=expression;this.finish();return this},finishAssignmentExpression:function(operator,left,right){this.type=Syntax.AssignmentExpression;this.operator=operator;this.left=left;this.right=right;this.finish();return this},finishAssignmentPattern:function(left,right){this.type=Syntax.AssignmentPattern;this.left=left;this.right=right;this.finish();return this},finishBinaryExpression:function(operator,left,right){this.type=operator==="||"||operator==="&&"?Syntax.LogicalExpression:Syntax.BinaryExpression;this.operator=operator;this.left=left;this.right=right;this.finish();return this},finishBlockStatement:function(body){this.type=Syntax.BlockStatement;this.body=body;this.finish();return this},finishBreakStatement:function(label){this.type=Syntax.BreakStatement;this.label=label;this.finish();return this},finishCallExpression:function(callee,args){this.type=Syntax.CallExpression;this.callee=callee;this.arguments=args;this.finish();return this},finishCatchClause:function(param,body){this.type=Syntax.CatchClause;this.param=param;this.body=body;this.finish();return this},finishClassBody:function(body){this.type=Syntax.ClassBody;this.body=body;this.finish();return this},finishClassDeclaration:function(id,superClass,body){this.type=Syntax.ClassDeclaration;this.id=id;this.superClass=superClass;this.body=body;this.finish();return this},finishClassExpression:function(id,superClass,body){this.type=Syntax.ClassExpression;this.id=id;this.superClass=superClass;this.body=body;this.finish();return this},finishConditionalExpression:function(test,consequent,alternate){this.type=Syntax.ConditionalExpression;this.test=test;this.consequent=consequent;this.alternate=alternate;this.finish();return this},finishContinueStatement:function(label){this.type=Syntax.ContinueStatement;this.label=label;this.finish();return this},finishDebuggerStatement:function(){this.type=Syntax.DebuggerStatement;this.finish();return this},finishDoWhileStatement:function(body,test){this.type=Syntax.DoWhileStatement;this.body=body;this.test=test;this.finish();return this},finishEmptyStatement:function(){this.type=Syntax.EmptyStatement;this.finish();return this},finishExpressionStatement:function(expression){this.type=Syntax.ExpressionStatement;this.expression=expression;this.finish();return this},finishForStatement:function(init,test,update,body){this.type=Syntax.ForStatement;this.init=init;this.test=test;this.update=update;this.body=body;this.finish();return this},finishForOfStatement:function(left,right,body){this.type=Syntax.ForOfStatement;this.left=left;this.right=right;this.body=body;this.finish();return this},finishForInStatement:function(left,right,body){this.type=Syntax.ForInStatement;this.left=left;this.right=right;this.body=body;this.each=false;this.finish();return this},finishFunctionDeclaration:function(id,params,defaults,body,generator){this.type=Syntax.FunctionDeclaration;this.id=id;this.params=params;this.defaults=defaults;this.body=body;this.generator=generator;this.expression=false;this.finish();return this},finishFunctionExpression:function(id,params,defaults,body,generator){this.type=Syntax.FunctionExpression;this.id=id;this.params=params;this.defaults=defaults;this.body=body;this.generator=generator;this.expression=false;this.finish();return this},finishIdentifier:function(name){this.type=Syntax.Identifier;this.name=name;this.finish();return this},finishIfStatement:function(test,consequent,alternate){this.type=Syntax.IfStatement;this.test=test;this.consequent=consequent;this.alternate=alternate;this.finish();return this},finishLabeledStatement:function(label,body){this.type=Syntax.LabeledStatement;this.label=label;this.body=body;this.finish();return this},finishLiteral:function(token){this.type=Syntax.Literal;this.value=token.value;this.raw=source.slice(token.start,token.end);if(token.regex){this.regex=token.regex}this.finish();return this},finishMemberExpression:function(accessor,object,property){this.type=Syntax.MemberExpression;this.computed=accessor==="[";this.object=object;this.property=property;this.finish();return this},finishNewExpression:function(callee,args){this.type=Syntax.NewExpression;this.callee=callee;this.arguments=args;this.finish();return this},finishObjectExpression:function(properties){this.type=Syntax.ObjectExpression;this.properties=properties;this.finish();return this},finishObjectPattern:function(properties){this.type=Syntax.ObjectPattern;this.properties=properties;this.finish();return this},finishPostfixExpression:function(operator,argument){this.type=Syntax.UpdateExpression;this.operator=operator;this.argument=argument;this.prefix=false;this.finish();return this},finishProgram:function(body){this.type=Syntax.Program;this.body=body;if(sourceType==="module"){this.sourceType=sourceType}this.finish();return this},finishProperty:function(kind,key,computed,value,method,shorthand){this.type=Syntax.Property;this.key=key;this.computed=computed;this.value=value;this.kind=kind;this.method=method;this.shorthand=shorthand;this.finish();return this},finishRestElement:function(argument){this.type=Syntax.RestElement;this.argument=argument;this.finish();return this},finishReturnStatement:function(argument){this.type=Syntax.ReturnStatement;this.argument=argument;this.finish();return this},finishSequenceExpression:function(expressions){this.type=Syntax.SequenceExpression;this.expressions=expressions;this.finish();return this},finishSpreadElement:function(argument){this.type=Syntax.SpreadElement;this.argument=argument;this.finish();return this},finishSwitchCase:function(test,consequent){this.type=Syntax.SwitchCase;this.test=test;this.consequent=consequent;this.finish();return this},finishSuper:function(){this.type=Syntax.Super;this.finish();return this},finishSwitchStatement:function(discriminant,cases){this.type=Syntax.SwitchStatement;this.discriminant=discriminant;this.cases=cases;this.finish();return this},finishTaggedTemplateExpression:function(tag,quasi){this.type=Syntax.TaggedTemplateExpression;this.tag=tag;this.quasi=quasi;this.finish();return this},finishTemplateElement:function(value,tail){this.type=Syntax.TemplateElement;this.value=value;this.tail=tail;this.finish();return this},finishTemplateLiteral:function(quasis,expressions){this.type=Syntax.TemplateLiteral;this.quasis=quasis;this.expressions=expressions;this.finish();return this},finishThisExpression:function(){this.type=Syntax.ThisExpression;this.finish();return this},finishThrowStatement:function(argument){this.type=Syntax.ThrowStatement;this.argument=argument;this.finish();return this},finishTryStatement:function(block,handler,finalizer){this.type=Syntax.TryStatement;this.block=block;this.guardedHandlers=[];this.handlers=handler?[handler]:[];this.handler=handler;this.finalizer=finalizer;this.finish();return this},finishUnaryExpression:function(operator,argument){this.type=operator==="++"||operator==="--"?Syntax.UpdateExpression:Syntax.UnaryExpression;this.operator=operator;this.argument=argument;this.prefix=true;this.finish();return this},finishVariableDeclaration:function(declarations){this.type=Syntax.VariableDeclaration;this.declarations=declarations;this.kind="var";this.finish();return this},finishLexicalDeclaration:function(declarations,kind){this.type=Syntax.VariableDeclaration;this.declarations=declarations;this.kind=kind;this.finish();return this},finishVariableDeclarator:function(id,init){this.type=Syntax.VariableDeclarator;this.id=id;this.init=init;this.finish();return this},finishWhileStatement:function(test,body){this.type=Syntax.WhileStatement;this.test=test;this.body=body;this.finish();return this},finishWithStatement:function(object,body){this.type=Syntax.WithStatement;this.object=object;this.body=body;this.finish();return this},finishExportSpecifier:function(local,exported){this.type=Syntax.ExportSpecifier;this.exported=exported||local;this.local=local;this.finish();return this},finishImportDefaultSpecifier:function(local){this.type=Syntax.ImportDefaultSpecifier;this.local=local;this.finish();return this},finishImportNamespaceSpecifier:function(local){this.type=Syntax.ImportNamespaceSpecifier;this.local=local;this.finish();return this},finishExportNamedDeclaration:function(declaration,specifiers,src){this.type=Syntax.ExportNamedDeclaration;this.declaration=declaration;this.specifiers=specifiers;this.source=src;this.finish();return this},finishExportDefaultDeclaration:function(declaration){this.type=Syntax.ExportDefaultDeclaration;this.declaration=declaration;this.finish();return this},finishExportAllDeclaration:function(src){this.type=Syntax.ExportAllDeclaration;this.source=src;this.finish();return this},finishImportSpecifier:function(local,imported){this.type=Syntax.ImportSpecifier;this.local=local||imported;this.imported=imported;this.finish();return this},finishImportDeclaration:function(specifiers,src){this.type=Syntax.ImportDeclaration;this.specifiers=specifiers;this.source=src;this.finish();return this},finishYieldExpression:function(argument,delegate){this.type=Syntax.YieldExpression;this.argument=argument;this.delegate=delegate;this.finish();return this}};function recordError(error){var e,existing;for(e=0;e<extra.errors.length;e++){existing=extra.errors[e];if(existing.index===error.index&&existing.message===error.message){return}}extra.errors.push(error)}function createError(line,pos,description){var error=new Error("Line "+line+": "+description);error.index=pos;error.lineNumber=line;error.column=pos-(scanning?lineStart:lastLineStart)+1;error.description=description;return error}function throwError(messageFormat){var args,msg;args=Array.prototype.slice.call(arguments,1);msg=messageFormat.replace(/%(\d)/g,function(whole,idx){assert(idx<args.length,"Message reference must be in range");return args[idx]});throw createError(lastLineNumber,lastIndex,msg)}function tolerateError(messageFormat){var args,msg,error;args=Array.prototype.slice.call(arguments,1);msg=messageFormat.replace(/%(\d)/g,function(whole,idx){assert(idx<args.length,"Message reference must be in range");return args[idx]});error=createError(lineNumber,lastIndex,msg);if(extra.errors){recordError(error)}else{throw error}}function unexpectedTokenError(token,message){var value,msg=message||Messages.UnexpectedToken;if(token){if(!message){msg=token.type===Token.EOF?Messages.UnexpectedEOS:token.type===Token.Identifier?Messages.UnexpectedIdentifier:token.type===Token.NumericLiteral?Messages.UnexpectedNumber:token.type===Token.StringLiteral?Messages.UnexpectedString:token.type===Token.Template?Messages.UnexpectedTemplate:Messages.UnexpectedToken;if(token.type===Token.Keyword){if(isFutureReservedWord(token.value)){msg=Messages.UnexpectedReserved}else if(strict&&isStrictModeReservedWord(token.value)){msg=Messages.StrictReservedWord}}}value=token.type===Token.Template?token.value.raw:token.value}else{value="ILLEGAL"}msg=msg.replace("%0",value);return token&&typeof token.lineNumber==="number"?createError(token.lineNumber,token.start,msg):createError(scanning?lineNumber:lastLineNumber,scanning?index:lastIndex,msg)}function throwUnexpectedToken(token,message){throw unexpectedTokenError(token,message)}function tolerateUnexpectedToken(token,message){var error=unexpectedTokenError(token,message);if(extra.errors){recordError(error)}else{throw error}}function expect(value){var token=lex();if(token.type!==Token.Punctuator||token.value!==value){throwUnexpectedToken(token)}}function expectCommaSeparator(){var token;if(extra.errors){token=lookahead;if(token.type===Token.Punctuator&&token.value===","){lex()}else if(token.type===Token.Punctuator&&token.value===";"){lex();tolerateUnexpectedToken(token)}else{tolerateUnexpectedToken(token,Messages.UnexpectedToken)}}else{expect(",")}}function expectKeyword(keyword){var token=lex();if(token.type!==Token.Keyword||token.value!==keyword){throwUnexpectedToken(token)}}function match(value){return lookahead.type===Token.Punctuator&&lookahead.value===value}function matchKeyword(keyword){return lookahead.type===Token.Keyword&&lookahead.value===keyword}function matchContextualKeyword(keyword){return lookahead.type===Token.Identifier&&lookahead.value===keyword}function matchAssign(){var op;if(lookahead.type!==Token.Punctuator){return false}op=lookahead.value;return op==="="||op==="*="||op==="/="||op==="%="||op==="+="||op==="-="||op==="<<="||op===">>="||op===">>>="||op==="&="||op==="^="||op==="|="}function consumeSemicolon(){if(source.charCodeAt(startIndex)===59||match(";")){lex();return}if(hasLineTerminator){return}lastIndex=startIndex;lastLineNumber=startLineNumber;lastLineStart=startLineStart;if(lookahead.type!==Token.EOF&&!match("}")){throwUnexpectedToken(lookahead)}}function isolateCoverGrammar(parser){var oldIsBindingElement=isBindingElement,oldIsAssignmentTarget=isAssignmentTarget,oldFirstCoverInitializedNameError=firstCoverInitializedNameError,result;isBindingElement=true;isAssignmentTarget=true;firstCoverInitializedNameError=null;result=parser();if(firstCoverInitializedNameError!==null){throwUnexpectedToken(firstCoverInitializedNameError)}isBindingElement=oldIsBindingElement;isAssignmentTarget=oldIsAssignmentTarget;firstCoverInitializedNameError=oldFirstCoverInitializedNameError;return result}function inheritCoverGrammar(parser){var oldIsBindingElement=isBindingElement,oldIsAssignmentTarget=isAssignmentTarget,oldFirstCoverInitializedNameError=firstCoverInitializedNameError,result;isBindingElement=true;isAssignmentTarget=true;firstCoverInitializedNameError=null;result=parser();isBindingElement=isBindingElement&&oldIsBindingElement;isAssignmentTarget=isAssignmentTarget&&oldIsAssignmentTarget;firstCoverInitializedNameError=oldFirstCoverInitializedNameError||firstCoverInitializedNameError;return result}function parseArrayPattern(params){var node=new Node,elements=[],rest,restNode;expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else{if(match("...")){restNode=new Node;lex();params.push(lookahead);rest=parseVariableIdentifier(params);elements.push(restNode.finishRestElement(rest));break}else{elements.push(parsePatternWithDefault(params))}if(!match("]")){expect(",")}}}expect("]");return node.finishArrayPattern(elements)}function parsePropertyPattern(params){var node=new Node,key,keyToken,computed=match("["),init;if(lookahead.type===Token.Identifier){keyToken=lookahead;key=parseVariableIdentifier();if(match("=")){params.push(keyToken);lex();init=parseAssignmentExpression();return node.finishProperty("init",key,false,new WrappingNode(keyToken).finishAssignmentPattern(key,init),false,false)}else if(!match(":")){params.push(keyToken);return node.finishProperty("init",key,false,key,false,true)}}else{key=parseObjectPropertyKey(params)}expect(":");init=parsePatternWithDefault(params);return node.finishProperty("init",key,computed,init,false,false)}function parseObjectPattern(params){var node=new Node,properties=[];expect("{");while(!match("}")){properties.push(parsePropertyPattern(params));if(!match("}")){expect(",")}}lex();return node.finishObjectPattern(properties)}function parsePattern(params){var identifier;if(lookahead.type===Token.Identifier){params.push(lookahead);identifier=parseVariableIdentifier();return identifier}else if(match("[")){return parseArrayPattern(params)}else if(match("{")){return parseObjectPattern(params)}throwUnexpectedToken(lookahead)}function parsePatternWithDefault(params){var startToken=lookahead,pattern,right;pattern=parsePattern(params);if(match("=")){lex();right=isolateCoverGrammar(parseAssignmentExpression);pattern=new WrappingNode(startToken).finishAssignmentPattern(pattern,right)}return pattern}function parseArrayInitialiser(){var elements=[],node=new Node,restSpread;expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else if(match("...")){restSpread=new Node;lex();restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression));if(!match("]")){isAssignmentTarget=isBindingElement=false;expect(",")}elements.push(restSpread)}else{elements.push(inheritCoverGrammar(parseAssignmentExpression));if(!match("]")){expect(",")}}}lex();return node.finishArrayExpression(elements)}function parsePropertyFunction(node,paramInfo,isGenerator){var previousStrict,body;isAssignmentTarget=isBindingElement=false;previousStrict=strict;body=isolateCoverGrammar(parseFunctionSourceElements);if(strict&&paramInfo.firstRestricted){tolerateUnexpectedToken(paramInfo.firstRestricted,paramInfo.message)}if(strict&&paramInfo.stricted){tolerateUnexpectedToken(paramInfo.stricted,paramInfo.message)}strict=previousStrict;return node.finishFunctionExpression(null,paramInfo.params,paramInfo.defaults,body,isGenerator)}function parsePropertyMethodFunction(){var params,method,node=new Node,previousAllowYield=state.allowYield;state.allowYield=false;params=parseParams();state.allowYield=previousAllowYield;state.allowYield=false;method=parsePropertyFunction(node,params,false);state.allowYield=previousAllowYield;return method}function parseObjectPropertyKey(){var token,node=new Node,expr;token=lex();switch(token.type){case Token.StringLiteral:case Token.NumericLiteral:if(strict&&token.octal){tolerateUnexpectedToken(token,Messages.StrictOctalLiteral)}return node.finishLiteral(token);case Token.Identifier:case Token.BooleanLiteral:case Token.NullLiteral:case Token.Keyword:return node.finishIdentifier(token.value);case Token.Punctuator:if(token.value==="["){expr=isolateCoverGrammar(parseAssignmentExpression);expect("]");return expr}break}throwUnexpectedToken(token)}function lookaheadPropertyName(){switch(lookahead.type){case Token.Identifier:case Token.StringLiteral:case Token.BooleanLiteral:case Token.NullLiteral:case Token.NumericLiteral:case Token.Keyword:return true;case Token.Punctuator:return lookahead.value==="["}return false}function tryParseMethodDefinition(token,key,computed,node){var value,options,methodNode,params,previousAllowYield=state.allowYield;if(token.type===Token.Identifier){if(token.value==="get"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodNode=new Node;expect("(");expect(")");state.allowYield=false;value=parsePropertyFunction(methodNode,{
params:[],defaults:[],stricted:null,firstRestricted:null,message:null},false);state.allowYield=previousAllowYield;return node.finishProperty("get",key,computed,value,false,false)}else if(token.value==="set"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodNode=new Node;expect("(");options={params:[],defaultCount:0,defaults:[],firstRestricted:null,paramSet:{}};if(match(")")){tolerateUnexpectedToken(lookahead)}else{state.allowYield=false;parseParam(options);state.allowYield=previousAllowYield;if(options.defaultCount===0){options.defaults=[]}}expect(")");state.allowYield=false;value=parsePropertyFunction(methodNode,options,false);state.allowYield=previousAllowYield;return node.finishProperty("set",key,computed,value,false,false)}}else if(token.type===Token.Punctuator&&token.value==="*"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodNode=new Node;state.allowYield=false;params=parseParams();state.allowYield=previousAllowYield;state.allowYield=true;value=parsePropertyFunction(methodNode,params,true);state.allowYield=previousAllowYield;return node.finishProperty("init",key,computed,value,true,false)}if(key&&match("(")){value=parsePropertyMethodFunction();return node.finishProperty("init",key,computed,value,true,false)}return null}function checkProto(key,computed,hasProto){if(computed===false&&(key.type===Syntax.Identifier&&key.name==="__proto__"||key.type===Syntax.Literal&&key.value==="__proto__")){if(hasProto.value){tolerateError(Messages.DuplicateProtoProperty)}else{hasProto.value=true}}}function parseObjectProperty(hasProto){var token=lookahead,node=new Node,computed,key,maybeMethod,value;computed=match("[");if(match("*")){lex()}else{key=parseObjectPropertyKey()}maybeMethod=tryParseMethodDefinition(token,key,computed,node);if(maybeMethod){checkProto(maybeMethod.key,maybeMethod.computed,hasProto);return maybeMethod}if(!key){throwUnexpectedToken(lookahead)}checkProto(key,computed,hasProto);if(match(":")){lex();value=inheritCoverGrammar(parseAssignmentExpression);return node.finishProperty("init",key,computed,value,false,false)}if(token.type===Token.Identifier){if(match("=")){firstCoverInitializedNameError=lookahead;lex();value=isolateCoverGrammar(parseAssignmentExpression);return node.finishProperty("init",key,computed,new WrappingNode(token).finishAssignmentPattern(key,value),false,true)}return node.finishProperty("init",key,computed,key,false,true)}throwUnexpectedToken(lookahead)}function parseObjectInitialiser(){var properties=[],hasProto={value:false},node=new Node;expect("{");while(!match("}")){properties.push(parseObjectProperty(hasProto));if(!match("}")){expectCommaSeparator()}}expect("}");return node.finishObjectExpression(properties)}function reinterpretExpressionAsPattern(expr){var i;switch(expr.type){case Syntax.Identifier:case Syntax.MemberExpression:case Syntax.RestElement:case Syntax.AssignmentPattern:break;case Syntax.SpreadElement:expr.type=Syntax.RestElement;reinterpretExpressionAsPattern(expr.argument);break;case Syntax.ArrayExpression:expr.type=Syntax.ArrayPattern;for(i=0;i<expr.elements.length;i++){if(expr.elements[i]!==null){reinterpretExpressionAsPattern(expr.elements[i])}}break;case Syntax.ObjectExpression:expr.type=Syntax.ObjectPattern;for(i=0;i<expr.properties.length;i++){reinterpretExpressionAsPattern(expr.properties[i].value)}break;case Syntax.AssignmentExpression:expr.type=Syntax.AssignmentPattern;reinterpretExpressionAsPattern(expr.left);break;default:break}}function parseTemplateElement(option){var node,token;if(lookahead.type!==Token.Template||option.head&&!lookahead.head){throwUnexpectedToken()}node=new Node;token=lex();return node.finishTemplateElement({raw:token.value.raw,cooked:token.value.cooked},token.tail)}function parseTemplateLiteral(){var quasi,quasis,expressions,node=new Node;quasi=parseTemplateElement({head:true});quasis=[quasi];expressions=[];while(!quasi.tail){expressions.push(parseExpression());quasi=parseTemplateElement({head:false});quasis.push(quasi)}return node.finishTemplateLiteral(quasis,expressions)}function parseGroupExpression(){var expr,expressions,startToken,i,params=[];expect("(");if(match(")")){lex();if(!match("=>")){expect("=>")}return{type:PlaceHolders.ArrowParameterPlaceHolder,params:[],rawParams:[]}}startToken=lookahead;if(match("...")){expr=parseRestElement(params);expect(")");if(!match("=>")){expect("=>")}return{type:PlaceHolders.ArrowParameterPlaceHolder,params:[expr]}}isBindingElement=true;expr=inheritCoverGrammar(parseAssignmentExpression);if(match(",")){isAssignmentTarget=false;expressions=[expr];while(startIndex<length){if(!match(",")){break}lex();if(match("...")){if(!isBindingElement){throwUnexpectedToken(lookahead)}expressions.push(parseRestElement(params));expect(")");if(!match("=>")){expect("=>")}isBindingElement=false;for(i=0;i<expressions.length;i++){reinterpretExpressionAsPattern(expressions[i])}return{type:PlaceHolders.ArrowParameterPlaceHolder,params:expressions}}expressions.push(inheritCoverGrammar(parseAssignmentExpression))}expr=new WrappingNode(startToken).finishSequenceExpression(expressions)}expect(")");if(match("=>")){if(!isBindingElement){throwUnexpectedToken(lookahead)}if(expr.type===Syntax.SequenceExpression){for(i=0;i<expr.expressions.length;i++){reinterpretExpressionAsPattern(expr.expressions[i])}}else{reinterpretExpressionAsPattern(expr)}expr={type:PlaceHolders.ArrowParameterPlaceHolder,params:expr.type===Syntax.SequenceExpression?expr.expressions:[expr]}}isBindingElement=false;return expr}function parsePrimaryExpression(){var type,token,expr,node;if(match("(")){isBindingElement=false;return inheritCoverGrammar(parseGroupExpression)}if(match("[")){return inheritCoverGrammar(parseArrayInitialiser)}if(match("{")){return inheritCoverGrammar(parseObjectInitialiser)}type=lookahead.type;node=new Node;if(type===Token.Identifier){expr=node.finishIdentifier(lex().value)}else if(type===Token.StringLiteral||type===Token.NumericLiteral){isAssignmentTarget=isBindingElement=false;if(strict&&lookahead.octal){tolerateUnexpectedToken(lookahead,Messages.StrictOctalLiteral)}expr=node.finishLiteral(lex())}else if(type===Token.Keyword){isAssignmentTarget=isBindingElement=false;if(matchKeyword("function")){return parseFunctionExpression()}if(matchKeyword("this")){lex();return node.finishThisExpression()}if(matchKeyword("class")){return parseClassExpression()}throwUnexpectedToken(lex())}else if(type===Token.BooleanLiteral){isAssignmentTarget=isBindingElement=false;token=lex();token.value=token.value==="true";expr=node.finishLiteral(token)}else if(type===Token.NullLiteral){isAssignmentTarget=isBindingElement=false;token=lex();token.value=null;expr=node.finishLiteral(token)}else if(match("/")||match("/=")){isAssignmentTarget=isBindingElement=false;index=startIndex;if(typeof extra.tokens!=="undefined"){token=collectRegex()}else{token=scanRegExp()}lex();expr=node.finishLiteral(token)}else if(type===Token.Template){expr=parseTemplateLiteral()}else{throwUnexpectedToken(lex())}return expr}function parseArguments(){var args=[],expr;expect("(");if(!match(")")){while(startIndex<length){if(match("...")){expr=new Node;lex();expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression))}else{expr=isolateCoverGrammar(parseAssignmentExpression)}args.push(expr);if(match(")")){break}expectCommaSeparator()}}expect(")");return args}function parseNonComputedProperty(){var token,node=new Node;token=lex();if(!isIdentifierName(token)){throwUnexpectedToken(token)}return node.finishIdentifier(token.value)}function parseNonComputedMember(){expect(".");return parseNonComputedProperty()}function parseComputedMember(){var expr;expect("[");expr=isolateCoverGrammar(parseExpression);expect("]");return expr}function parseNewExpression(){var callee,args,node=new Node;expectKeyword("new");callee=isolateCoverGrammar(parseLeftHandSideExpression);args=match("(")?parseArguments():[];isAssignmentTarget=isBindingElement=false;return node.finishNewExpression(callee,args)}function parseLeftHandSideExpressionAllowCall(){var quasi,expr,args,property,startToken,previousAllowIn=state.allowIn;startToken=lookahead;state.allowIn=true;if(matchKeyword("super")&&state.inFunctionBody){expr=new Node;lex();expr=expr.finishSuper();if(!match("(")&&!match(".")&&!match("[")){throwUnexpectedToken(lookahead)}}else{expr=inheritCoverGrammar(matchKeyword("new")?parseNewExpression:parsePrimaryExpression)}for(;;){if(match(".")){isBindingElement=false;isAssignmentTarget=true;property=parseNonComputedMember();expr=new WrappingNode(startToken).finishMemberExpression(".",expr,property)}else if(match("(")){isBindingElement=false;isAssignmentTarget=false;args=parseArguments();expr=new WrappingNode(startToken).finishCallExpression(expr,args)}else if(match("[")){isBindingElement=false;isAssignmentTarget=true;property=parseComputedMember();expr=new WrappingNode(startToken).finishMemberExpression("[",expr,property)}else if(lookahead.type===Token.Template&&lookahead.head){quasi=parseTemplateLiteral();expr=new WrappingNode(startToken).finishTaggedTemplateExpression(expr,quasi)}else{break}}state.allowIn=previousAllowIn;return expr}function parseLeftHandSideExpression(){var quasi,expr,property,startToken;assert(state.allowIn,"callee of new expression always allow in keyword.");startToken=lookahead;if(matchKeyword("super")&&state.inFunctionBody){expr=new Node;lex();expr=expr.finishSuper();if(!match("[")&&!match(".")){throwUnexpectedToken(lookahead)}}else{expr=inheritCoverGrammar(matchKeyword("new")?parseNewExpression:parsePrimaryExpression)}for(;;){if(match("[")){isBindingElement=false;isAssignmentTarget=true;property=parseComputedMember();expr=new WrappingNode(startToken).finishMemberExpression("[",expr,property)}else if(match(".")){isBindingElement=false;isAssignmentTarget=true;property=parseNonComputedMember();expr=new WrappingNode(startToken).finishMemberExpression(".",expr,property)}else if(lookahead.type===Token.Template&&lookahead.head){quasi=parseTemplateLiteral();expr=new WrappingNode(startToken).finishTaggedTemplateExpression(expr,quasi)}else{break}}return expr}function parsePostfixExpression(){var expr,token,startToken=lookahead;expr=inheritCoverGrammar(parseLeftHandSideExpressionAllowCall);if(!hasLineTerminator&&lookahead.type===Token.Punctuator){if(match("++")||match("--")){if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){tolerateError(Messages.StrictLHSPostfix)}if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInAssignment)}isAssignmentTarget=isBindingElement=false;token=lex();expr=new WrappingNode(startToken).finishPostfixExpression(token.value,expr)}}return expr}function parseUnaryExpression(){var token,expr,startToken;if(lookahead.type!==Token.Punctuator&&lookahead.type!==Token.Keyword){expr=parsePostfixExpression()}else if(match("++")||match("--")){startToken=lookahead;token=lex();expr=inheritCoverGrammar(parseUnaryExpression);if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){tolerateError(Messages.StrictLHSPrefix)}if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInAssignment)}expr=new WrappingNode(startToken).finishUnaryExpression(token.value,expr);isAssignmentTarget=isBindingElement=false}else if(match("+")||match("-")||match("~")||match("!")){startToken=lookahead;token=lex();expr=inheritCoverGrammar(parseUnaryExpression);expr=new WrappingNode(startToken).finishUnaryExpression(token.value,expr);isAssignmentTarget=isBindingElement=false}else if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof")){startToken=lookahead;token=lex();expr=inheritCoverGrammar(parseUnaryExpression);expr=new WrappingNode(startToken).finishUnaryExpression(token.value,expr);if(strict&&expr.operator==="delete"&&expr.argument.type===Syntax.Identifier){tolerateError(Messages.StrictDelete)}isAssignmentTarget=isBindingElement=false}else{expr=parsePostfixExpression()}return expr}function binaryPrecedence(token,allowIn){var prec=0;if(token.type!==Token.Punctuator&&token.type!==Token.Keyword){return 0}switch(token.value){case"||":prec=1;break;case"&&":prec=2;break;case"|":prec=3;break;case"^":prec=4;break;case"&":prec=5;break;case"==":case"!=":case"===":case"!==":prec=6;break;case"<":case">":case"<=":case">=":case"instanceof":prec=7;break;case"in":prec=allowIn?7:0;break;case"<<":case">>":case">>>":prec=8;break;case"+":case"-":prec=9;break;case"*":case"/":case"%":prec=11;break;default:break}return prec}function parseBinaryExpression(){var marker,markers,expr,token,prec,stack,right,operator,left,i;marker=lookahead;left=inheritCoverGrammar(parseUnaryExpression);token=lookahead;prec=binaryPrecedence(token,state.allowIn);if(prec===0){return left}isAssignmentTarget=isBindingElement=false;token.prec=prec;lex();markers=[marker,lookahead];right=isolateCoverGrammar(parseUnaryExpression);stack=[left,token,right];while((prec=binaryPrecedence(lookahead,state.allowIn))>0){while(stack.length>2&&prec<=stack[stack.length-2].prec){right=stack.pop();operator=stack.pop().value;left=stack.pop();markers.pop();expr=new WrappingNode(markers[markers.length-1]).finishBinaryExpression(operator,left,right);stack.push(expr)}token=lex();token.prec=prec;stack.push(token);markers.push(lookahead);expr=isolateCoverGrammar(parseUnaryExpression);stack.push(expr)}i=stack.length-1;expr=stack[i];markers.pop();while(i>1){expr=new WrappingNode(markers.pop()).finishBinaryExpression(stack[i-1].value,stack[i-2],expr);i-=2}return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent,alternate,startToken;startToken=lookahead;expr=inheritCoverGrammar(parseBinaryExpression);if(match("?")){lex();previousAllowIn=state.allowIn;state.allowIn=true;consequent=isolateCoverGrammar(parseAssignmentExpression);state.allowIn=previousAllowIn;expect(":");alternate=isolateCoverGrammar(parseAssignmentExpression);expr=new WrappingNode(startToken).finishConditionalExpression(expr,consequent,alternate);isAssignmentTarget=isBindingElement=false}return expr}function parseConciseBody(){if(match("{")){return parseFunctionSourceElements()}return isolateCoverGrammar(parseAssignmentExpression)}function checkPatternParam(options,param){var i;switch(param.type){case Syntax.Identifier:validateParam(options,param,param.name);break;case Syntax.RestElement:checkPatternParam(options,param.argument);break;case Syntax.AssignmentPattern:checkPatternParam(options,param.left);break;case Syntax.ArrayPattern:for(i=0;i<param.elements.length;i++){if(param.elements[i]!==null){checkPatternParam(options,param.elements[i])}}break;default:assert(param.type===Syntax.ObjectPattern,"Invalid type");for(i=0;i<param.properties.length;i++){checkPatternParam(options,param.properties[i].value)}break}}function reinterpretAsCoverFormalsList(expr){var i,len,param,params,defaults,defaultCount,options,token;defaults=[];defaultCount=0;params=[expr];switch(expr.type){case Syntax.Identifier:break;case PlaceHolders.ArrowParameterPlaceHolder:params=expr.params;break;default:return null}options={paramSet:{}};for(i=0,len=params.length;i<len;i+=1){param=params[i];switch(param.type){case Syntax.AssignmentPattern:params[i]=param.left;defaults.push(param.right);++defaultCount;checkPatternParam(options,param.left);break;default:checkPatternParam(options,param);params[i]=param;defaults.push(null);break}}if(options.message===Messages.StrictParamDupe){token=strict?options.stricted:options.firstRestricted;throwUnexpectedToken(token,options.message)}if(defaultCount===0){defaults=[]}return{params:params,defaults:defaults,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseArrowFunctionExpression(options,node){var previousStrict,body;if(hasLineTerminator){tolerateUnexpectedToken(lookahead)}expect("=>");previousStrict=strict;body=parseConciseBody();if(strict&&options.firstRestricted){throwUnexpectedToken(options.firstRestricted,options.message)}if(strict&&options.stricted){tolerateUnexpectedToken(options.stricted,options.message)}strict=previousStrict;return node.finishArrowFunctionExpression(options.params,options.defaults,body,body.type!==Syntax.BlockStatement)}function parseYieldExpression(){var argument,expr,delegate;expr=new Node;if(!state.allowYield){tolerateUnexpectedToken(lookahead,Messages.IllegalYield)}expectKeyword("yield");if(!hasLineTerminator){delegate=match("*");if(delegate){lex();argument=parseExpression()}else{if(!match(";")&&!match("}")&&lookahead.type!==Token.EOF){argument=parseExpression()}}}return expr.finishYieldExpression(argument,delegate)}function parseAssignmentExpression(){var token,expr,right,list,startToken;startToken=lookahead;token=lookahead;if(matchKeyword("yield")){return parseYieldExpression()}expr=parseConditionalExpression();if(expr.type===PlaceHolders.ArrowParameterPlaceHolder||match("=>")){isAssignmentTarget=isBindingElement=false;list=reinterpretAsCoverFormalsList(expr);if(list){firstCoverInitializedNameError=null;return parseArrowFunctionExpression(list,new WrappingNode(startToken))}return expr}if(matchAssign()){if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInAssignment)}if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){tolerateUnexpectedToken(token,Messages.StrictLHSAssignment)}if(!match("=")){isAssignmentTarget=isBindingElement=false}else{reinterpretExpressionAsPattern(expr)}token=lex();right=isolateCoverGrammar(parseAssignmentExpression);expr=new WrappingNode(startToken).finishAssignmentExpression(token.value,expr,right);firstCoverInitializedNameError=null}return expr}function parseExpression(){var expr,startToken=lookahead,expressions;expr=isolateCoverGrammar(parseAssignmentExpression);if(match(",")){expressions=[expr];while(startIndex<length){if(!match(",")){break}lex();expressions.push(isolateCoverGrammar(parseAssignmentExpression))}expr=new WrappingNode(startToken).finishSequenceExpression(expressions)}return expr}function parseStatementListItem(){if(lookahead.type===Token.Keyword){switch(lookahead.value){case"export":if(sourceType!=="module"){tolerateUnexpectedToken(lookahead,Messages.IllegalExportDeclaration)}return parseExportDeclaration();case"import":if(sourceType!=="module"){tolerateUnexpectedToken(lookahead,Messages.IllegalImportDeclaration)}return parseImportDeclaration();case"const":case"let":return parseLexicalDeclaration({inFor:false});case"function":return parseFunctionDeclaration(new Node);case"class":return parseClassDeclaration()}}return parseStatement()}function parseStatementList(){var list=[];while(startIndex<length){if(match("}")){break}list.push(parseStatementListItem())}return list}function parseBlock(){var block,node=new Node;expect("{");block=parseStatementList();expect("}");return node.finishBlockStatement(block)}function parseVariableIdentifier(){var token,node=new Node;token=lex();if(token.type!==Token.Identifier){if(strict&&token.type===Token.Keyword&&isStrictModeReservedWord(token.value)){tolerateUnexpectedToken(token,Messages.StrictReservedWord)}else{throwUnexpectedToken(token)}}return node.finishIdentifier(token.value)}function parseVariableDeclaration(){var init=null,id,node=new Node,params=[];id=parsePattern(params);if(strict&&isRestrictedWord(id.name)){tolerateError(Messages.StrictVarName)}if(match("=")){lex();init=isolateCoverGrammar(parseAssignmentExpression)}else if(id.type!==Syntax.Identifier){expect("=")}return node.finishVariableDeclarator(id,init)}function parseVariableDeclarationList(){var list=[];do{list.push(parseVariableDeclaration());if(!match(",")){break}lex()}while(startIndex<length);return list}function parseVariableStatement(node){var declarations;expectKeyword("var");declarations=parseVariableDeclarationList();consumeSemicolon();return node.finishVariableDeclaration(declarations)}function parseLexicalBinding(kind,options){var init=null,id,node=new Node,params=[];id=parsePattern(params);if(strict&&id.type===Syntax.Identifier&&isRestrictedWord(id.name)){tolerateError(Messages.StrictVarName)}if(kind==="const"){if(!matchKeyword("in")&&!matchContextualKeyword("of")){expect("=");init=isolateCoverGrammar(parseAssignmentExpression)}}else if(!options.inFor&&id.type!==Syntax.Identifier||match("=")){expect("=");init=isolateCoverGrammar(parseAssignmentExpression)}return node.finishVariableDeclarator(id,init)}function parseBindingList(kind,options){var list=[];do{list.push(parseLexicalBinding(kind,options));if(!match(",")){break}lex()}while(startIndex<length);return list}function parseLexicalDeclaration(options){var kind,declarations,node=new Node;kind=lex().value;assert(kind==="let"||kind==="const","Lexical declaration must be either let or const");declarations=parseBindingList(kind,options);consumeSemicolon();return node.finishLexicalDeclaration(declarations,kind)}function parseRestElement(params){var param,node=new Node;lex();if(match("{")){throwError(Messages.ObjectPatternAsRestParameter)}params.push(lookahead);param=parseVariableIdentifier();if(match("=")){throwError(Messages.DefaultRestParameter)}if(!match(")")){throwError(Messages.ParameterAfterRestParameter)}return node.finishRestElement(param)}function parseEmptyStatement(node){expect(";");return node.finishEmptyStatement()}function parseExpressionStatement(node){var expr=parseExpression();consumeSemicolon();return node.finishExpressionStatement(expr)}function parseIfStatement(node){var test,consequent,alternate;expectKeyword("if");expect("(");test=parseExpression();expect(")");consequent=parseStatement();if(matchKeyword("else")){lex();alternate=parseStatement()}else{alternate=null}return node.finishIfStatement(test,consequent,alternate)}function parseDoWhileStatement(node){var body,test,oldInIteration;expectKeyword("do");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");if(match(";")){lex()}return node.finishDoWhileStatement(body,test)}function parseWhileStatement(node){var test,body,oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;return node.finishWhileStatement(test,body)}function parseForStatement(node){var init,forIn,initSeq,initStartToken,test,update,left,right,kind,declarations,body,oldInIteration,previousAllowIn=state.allowIn;init=test=update=null;forIn=true;expectKeyword("for");expect("(");if(match(";")){lex()}else{if(matchKeyword("var")){init=new Node;lex();state.allowIn=false;init=init.finishVariableDeclaration(parseVariableDeclarationList());state.allowIn=previousAllowIn;if(init.declarations.length===1&&matchKeyword("in")){lex();left=init;right=parseExpression();init=null}else if(init.declarations.length===1&&init.declarations[0].init===null&&matchContextualKeyword("of")){lex();left=init;right=parseAssignmentExpression();init=null;forIn=false}else{expect(";")}}else if(matchKeyword("const")||matchKeyword("let")){init=new Node;kind=lex().value;state.allowIn=false;declarations=parseBindingList(kind,{inFor:true});state.allowIn=previousAllowIn;if(declarations.length===1&&declarations[0].init===null&&matchKeyword("in")){init=init.finishLexicalDeclaration(declarations,kind);lex();left=init;right=parseExpression();init=null}else if(declarations.length===1&&declarations[0].init===null&&matchContextualKeyword("of")){init=init.finishLexicalDeclaration(declarations,kind);lex();left=init;right=parseAssignmentExpression();init=null;forIn=false}else{consumeSemicolon();init=init.finishLexicalDeclaration(declarations,kind)}}else{initStartToken=lookahead;state.allowIn=false;init=inheritCoverGrammar(parseAssignmentExpression);state.allowIn=previousAllowIn;if(matchKeyword("in")){if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInForIn)}lex();reinterpretExpressionAsPattern(init);left=init;right=parseExpression();init=null}else if(matchContextualKeyword("of")){if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInForLoop)}lex();reinterpretExpressionAsPattern(init);left=init;right=parseAssignmentExpression();init=null;forIn=false}else{if(match(",")){initSeq=[init];while(match(",")){lex();initSeq.push(isolateCoverGrammar(parseAssignmentExpression))}init=new WrappingNode(initStartToken).finishSequenceExpression(initSeq)}expect(";")}}}if(typeof left==="undefined"){if(!match(";")){test=parseExpression()}expect(";");if(!match(")")){update=parseExpression()}}expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=isolateCoverGrammar(parseStatement);state.inIteration=oldInIteration;return typeof left==="undefined"?node.finishForStatement(init,test,update,body):forIn?node.finishForInStatement(left,right,body):node.finishForOfStatement(left,right,body)}function parseContinueStatement(node){var label=null,key;expectKeyword("continue");if(source.charCodeAt(startIndex)===59){lex();if(!state.inIteration){throwError(Messages.IllegalContinue)}return node.finishContinueStatement(null)}if(hasLineTerminator){if(!state.inIteration){throwError(Messages.IllegalContinue)}return node.finishContinueStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();key="$"+label.name;if(!Object.prototype.hasOwnProperty.call(state.labelSet,key)){throwError(Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!state.inIteration){throwError(Messages.IllegalContinue)}return node.finishContinueStatement(label)}function parseBreakStatement(node){var label=null,key;expectKeyword("break");if(source.charCodeAt(lastIndex)===59){lex();if(!(state.inIteration||state.inSwitch)){throwError(Messages.IllegalBreak)}return node.finishBreakStatement(null)}if(hasLineTerminator){if(!(state.inIteration||state.inSwitch)){throwError(Messages.IllegalBreak)}return node.finishBreakStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();key="$"+label.name;if(!Object.prototype.hasOwnProperty.call(state.labelSet,key)){throwError(Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!(state.inIteration||state.inSwitch)){throwError(Messages.IllegalBreak)}return node.finishBreakStatement(label)}function parseReturnStatement(node){var argument=null;expectKeyword("return");if(!state.inFunctionBody){tolerateError(Messages.IllegalReturn)}if(source.charCodeAt(lastIndex)===32){if(isIdentifierStart(source.charCodeAt(lastIndex+1))){argument=parseExpression();consumeSemicolon();return node.finishReturnStatement(argument)}}if(hasLineTerminator){return node.finishReturnStatement(null)}if(!match(";")){if(!match("}")&&lookahead.type!==Token.EOF){argument=parseExpression()}}consumeSemicolon();return node.finishReturnStatement(argument)}function parseWithStatement(node){var object,body;if(strict){tolerateError(Messages.StrictModeWith)}expectKeyword("with");expect("(");object=parseExpression();expect(")");body=parseStatement();return node.finishWithStatement(object,body)}function parseSwitchCase(){var test,consequent=[],statement,node=new Node;if(matchKeyword("default")){lex();test=null}else{expectKeyword("case");test=parseExpression()}expect(":");while(startIndex<length){if(match("}")||matchKeyword("default")||matchKeyword("case")){break}statement=parseStatementListItem();consequent.push(statement)}return node.finishSwitchCase(test,consequent)}function parseSwitchStatement(node){var discriminant,cases,clause,oldInSwitch,defaultFound;expectKeyword("switch");expect("(");discriminant=parseExpression();expect(")");expect("{");cases=[];if(match("}")){lex();return node.finishSwitchStatement(discriminant,cases)}oldInSwitch=state.inSwitch;state.inSwitch=true;defaultFound=false;while(startIndex<length){if(match("}")){break}clause=parseSwitchCase();if(clause.test===null){if(defaultFound){throwError(Messages.MultipleDefaultsInSwitch)}defaultFound=true}cases.push(clause)}state.inSwitch=oldInSwitch;expect("}");return node.finishSwitchStatement(discriminant,cases)}function parseThrowStatement(node){var argument;expectKeyword("throw");if(hasLineTerminator){throwError(Messages.NewlineAfterThrow)}argument=parseExpression();consumeSemicolon();return node.finishThrowStatement(argument)}function parseCatchClause(){var param,params=[],paramMap={},key,i,body,node=new Node;expectKeyword("catch");expect("(");if(match(")")){throwUnexpectedToken(lookahead)}param=parsePattern(params);for(i=0;i<params.length;i++){key="$"+params[i].value;if(Object.prototype.hasOwnProperty.call(paramMap,key)){tolerateError(Messages.DuplicateBinding,params[i].value)}paramMap[key]=true}if(strict&&isRestrictedWord(param.name)){tolerateError(Messages.StrictCatchVariable)}expect(")");body=parseBlock();return node.finishCatchClause(param,body)}function parseTryStatement(node){var block,handler=null,finalizer=null;expectKeyword("try");block=parseBlock();if(matchKeyword("catch")){handler=parseCatchClause()}if(matchKeyword("finally")){lex();finalizer=parseBlock()}if(!handler&&!finalizer){throwError(Messages.NoCatchOrFinally)}return node.finishTryStatement(block,handler,finalizer)}function parseDebuggerStatement(node){expectKeyword("debugger");consumeSemicolon();return node.finishDebuggerStatement()}function parseStatement(){var type=lookahead.type,expr,labeledBody,key,node;if(type===Token.EOF){throwUnexpectedToken(lookahead)}if(type===Token.Punctuator&&lookahead.value==="{"){return parseBlock()}isAssignmentTarget=isBindingElement=true;node=new Node;if(type===Token.Punctuator){switch(lookahead.value){case";":return parseEmptyStatement(node);case"(":return parseExpressionStatement(node);default:break}}else if(type===Token.Keyword){switch(lookahead.value){case"break":return parseBreakStatement(node);case"continue":return parseContinueStatement(node);case"debugger":return parseDebuggerStatement(node);case"do":return parseDoWhileStatement(node);case"for":return parseForStatement(node);case"function":return parseFunctionDeclaration(node);case"if":return parseIfStatement(node);case"return":return parseReturnStatement(node);case"switch":return parseSwitchStatement(node);case"throw":return parseThrowStatement(node);case"try":return parseTryStatement(node);case"var":return parseVariableStatement(node);case"while":return parseWhileStatement(node);case"with":return parseWithStatement(node);default:break}}expr=parseExpression();if(expr.type===Syntax.Identifier&&match(":")){lex();key="$"+expr.name;if(Object.prototype.hasOwnProperty.call(state.labelSet,key)){throwError(Messages.Redeclaration,"Label",expr.name)}state.labelSet[key]=true;labeledBody=parseStatement();delete state.labelSet[key];return node.finishLabeledStatement(expr,labeledBody)}consumeSemicolon();return node.finishExpressionStatement(expr)}function parseFunctionSourceElements(){var statement,body=[],token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody,oldParenthesisCount,node=new Node;expect("{");while(startIndex<length){if(lookahead.type!==Token.StringLiteral){break}token=lookahead;statement=parseStatementListItem();body.push(statement);if(statement.expression.type!==Syntax.Literal){break}directive=source.slice(token.start+1,token.end-1);if(directive==="use strict"){strict=true;if(firstRestricted){tolerateUnexpectedToken(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}oldLabelSet=state.labelSet;oldInIteration=state.inIteration;oldInSwitch=state.inSwitch;oldInFunctionBody=state.inFunctionBody;oldParenthesisCount=state.parenthesizedCount;state.labelSet={};state.inIteration=false;state.inSwitch=false;state.inFunctionBody=true;state.parenthesizedCount=0;while(startIndex<length){if(match("}")){break}body.push(parseStatementListItem())}expect("}");state.labelSet=oldLabelSet;state.inIteration=oldInIteration;state.inSwitch=oldInSwitch;state.inFunctionBody=oldInFunctionBody;state.parenthesizedCount=oldParenthesisCount;return node.finishBlockStatement(body)}function validateParam(options,param,name){var key="$"+name;if(strict){if(isRestrictedWord(name)){options.stricted=param;
options.message=Messages.StrictParamName}if(Object.prototype.hasOwnProperty.call(options.paramSet,key)){options.stricted=param;options.message=Messages.StrictParamDupe}}else if(!options.firstRestricted){if(isRestrictedWord(name)){options.firstRestricted=param;options.message=Messages.StrictParamName}else if(isStrictModeReservedWord(name)){options.firstRestricted=param;options.message=Messages.StrictReservedWord}else if(Object.prototype.hasOwnProperty.call(options.paramSet,key)){options.stricted=param;options.message=Messages.StrictParamDupe}}options.paramSet[key]=true}function parseParam(options){var token,param,params=[],i,def;token=lookahead;if(token.value==="..."){param=parseRestElement(params);validateParam(options,param.argument,param.argument.name);options.params.push(param);options.defaults.push(null);return false}param=parsePatternWithDefault(params);for(i=0;i<params.length;i++){validateParam(options,params[i],params[i].value)}if(param.type===Syntax.AssignmentPattern){def=param.right;param=param.left;++options.defaultCount}options.params.push(param);options.defaults.push(def);return!match(")")}function parseParams(firstRestricted){var options;options={params:[],defaultCount:0,defaults:[],firstRestricted:firstRestricted};expect("(");if(!match(")")){options.paramSet={};while(startIndex<length){if(!parseParam(options)){break}expect(",")}}expect(")");if(options.defaultCount===0){options.defaults=[]}return{params:options.params,defaults:options.defaults,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseFunctionDeclaration(node,identifierIsOptional){var id=null,params=[],defaults=[],body,token,stricted,tmp,firstRestricted,message,previousStrict,isGenerator,previousAllowYield;expectKeyword("function");isGenerator=match("*");if(isGenerator){lex()}if(!identifierIsOptional||!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){tolerateUnexpectedToken(token,Messages.StrictFunctionName)}}else{if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}previousAllowYield=state.allowYield;state.allowYield=false;tmp=parseParams(firstRestricted);state.allowYield=previousAllowYield;params=tmp.params;defaults=tmp.defaults;stricted=tmp.stricted;firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousAllowYield=state.allowYield;previousStrict=strict;state.allowYield=isGenerator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwUnexpectedToken(firstRestricted,message)}if(strict&&stricted){tolerateUnexpectedToken(stricted,message)}strict=previousStrict;state.allowYield=previousAllowYield;return node.finishFunctionDeclaration(id,params,defaults,body,isGenerator)}function parseFunctionExpression(){var token,id=null,stricted,firstRestricted,message,tmp,params=[],defaults=[],body,previousStrict,node=new Node,isGenerator,previousAllowYield;expectKeyword("function");isGenerator=match("*");if(isGenerator){lex()}if(!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){tolerateUnexpectedToken(token,Messages.StrictFunctionName)}}else{if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}previousAllowYield=state.allowYield;state.allowYield=false;tmp=parseParams(firstRestricted);state.allowYield=previousAllowYield;params=tmp.params;defaults=tmp.defaults;stricted=tmp.stricted;firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousStrict=strict;previousAllowYield=state.allowYield;state.allowYield=isGenerator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwUnexpectedToken(firstRestricted,message)}if(strict&&stricted){tolerateUnexpectedToken(stricted,message)}strict=previousStrict;state.allowYield=previousAllowYield;return node.finishFunctionExpression(id,params,defaults,body,isGenerator)}function parseClassBody(){var classBody,token,isStatic,hasConstructor=false,body,method,computed,key;classBody=new Node;expect("{");body=[];while(!match("}")){if(match(";")){lex()}else{method=new Node;token=lookahead;isStatic=false;computed=match("[");if(match("*")){lex()}else{key=parseObjectPropertyKey();if(key.name==="static"&&(lookaheadPropertyName()||match("*"))){token=lookahead;isStatic=true;computed=match("[");if(match("*")){lex()}else{key=parseObjectPropertyKey()}}}method=tryParseMethodDefinition(token,key,computed,method);if(method){method["static"]=isStatic;if(method.kind==="init"){method.kind="method"}if(!isStatic){if(!method.computed&&(method.key.name||method.key.value.toString())==="constructor"){if(method.kind!=="method"||!method.method||method.value.generator){throwUnexpectedToken(token,Messages.ConstructorSpecialMethod)}if(hasConstructor){throwUnexpectedToken(token,Messages.DuplicateConstructor)}else{hasConstructor=true}method.kind="constructor"}}else{if(!method.computed&&(method.key.name||method.key.value.toString())==="prototype"){throwUnexpectedToken(token,Messages.StaticPrototype)}}method.type=Syntax.MethodDefinition;delete method.method;delete method.shorthand;body.push(method)}else{throwUnexpectedToken(lookahead)}}}lex();return classBody.finishClassBody(body)}function parseClassDeclaration(identifierIsOptional){var id=null,superClass=null,classNode=new Node,classBody,previousStrict=strict;strict=true;expectKeyword("class");if(!identifierIsOptional||lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=isolateCoverGrammar(parseLeftHandSideExpressionAllowCall)}classBody=parseClassBody();strict=previousStrict;return classNode.finishClassDeclaration(id,superClass,classBody)}function parseClassExpression(){var id=null,superClass=null,classNode=new Node,classBody,previousStrict=strict;strict=true;expectKeyword("class");if(lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=isolateCoverGrammar(parseLeftHandSideExpressionAllowCall)}classBody=parseClassBody();strict=previousStrict;return classNode.finishClassExpression(id,superClass,classBody)}function parseModuleSpecifier(){var node=new Node;if(lookahead.type!==Token.StringLiteral){throwError(Messages.InvalidModuleSpecifier)}return node.finishLiteral(lex())}function parseExportSpecifier(){var exported,local,node=new Node,def;if(matchKeyword("default")){def=new Node;lex();local=def.finishIdentifier("default")}else{local=parseVariableIdentifier()}if(matchContextualKeyword("as")){lex();exported=parseNonComputedProperty()}return node.finishExportSpecifier(local,exported)}function parseExportNamedDeclaration(node){var declaration=null,isExportFromIdentifier,src=null,specifiers=[];if(lookahead.type===Token.Keyword){switch(lookahead.value){case"let":case"const":case"var":case"class":case"function":declaration=parseStatementListItem();return node.finishExportNamedDeclaration(declaration,specifiers,null)}}expect("{");if(!match("}")){do{isExportFromIdentifier=isExportFromIdentifier||matchKeyword("default");specifiers.push(parseExportSpecifier())}while(match(",")&&lex())}expect("}");if(matchContextualKeyword("from")){lex();src=parseModuleSpecifier();consumeSemicolon()}else if(isExportFromIdentifier){throwError(lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}else{consumeSemicolon()}return node.finishExportNamedDeclaration(declaration,specifiers,src)}function parseExportDefaultDeclaration(node){var declaration=null,expression=null;expectKeyword("default");if(matchKeyword("function")){declaration=parseFunctionDeclaration(new Node,true);return node.finishExportDefaultDeclaration(declaration)}if(matchKeyword("class")){declaration=parseClassDeclaration(true);return node.finishExportDefaultDeclaration(declaration)}if(matchContextualKeyword("from")){throwError(Messages.UnexpectedToken,lookahead.value)}if(match("{")){expression=parseObjectInitialiser()}else if(match("[")){expression=parseArrayInitialiser()}else{expression=parseAssignmentExpression()}consumeSemicolon();return node.finishExportDefaultDeclaration(expression)}function parseExportAllDeclaration(node){var src;expect("*");if(!matchContextualKeyword("from")){throwError(lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return node.finishExportAllDeclaration(src)}function parseExportDeclaration(){var node=new Node;if(state.inFunctionBody){throwError(Messages.IllegalExportDeclaration)}expectKeyword("export");if(matchKeyword("default")){return parseExportDefaultDeclaration(node)}if(match("*")){return parseExportAllDeclaration(node)}return parseExportNamedDeclaration(node)}function parseImportSpecifier(){var local,imported,node=new Node;imported=parseNonComputedProperty();if(matchContextualKeyword("as")){lex();local=parseVariableIdentifier()}return node.finishImportSpecifier(local,imported)}function parseNamedImports(){var specifiers=[];expect("{");if(!match("}")){do{specifiers.push(parseImportSpecifier())}while(match(",")&&lex())}expect("}");return specifiers}function parseImportDefaultSpecifier(){var local,node=new Node;local=parseNonComputedProperty();return node.finishImportDefaultSpecifier(local)}function parseImportNamespaceSpecifier(){var local,node=new Node;expect("*");if(!matchContextualKeyword("as")){throwError(Messages.NoAsAfterImportNamespace)}lex();local=parseNonComputedProperty();return node.finishImportNamespaceSpecifier(local)}function parseImportDeclaration(){var specifiers,src,node=new Node;if(state.inFunctionBody){throwError(Messages.IllegalImportDeclaration)}expectKeyword("import");specifiers=[];if(lookahead.type===Token.StringLiteral){src=parseModuleSpecifier();consumeSemicolon();return node.finishImportDeclaration(specifiers,src)}if(!matchKeyword("default")&&isIdentifierName(lookahead)){specifiers.push(parseImportDefaultSpecifier());if(match(",")){lex()}}if(match("*")){specifiers.push(parseImportNamespaceSpecifier())}else if(match("{")){specifiers=specifiers.concat(parseNamedImports())}if(!matchContextualKeyword("from")){throwError(lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return node.finishImportDeclaration(specifiers,src)}function parseScriptBody(){var statement,body=[],token,directive,firstRestricted;while(startIndex<length){token=lookahead;if(token.type!==Token.StringLiteral){break}statement=parseStatementListItem();body.push(statement);if(statement.expression.type!==Syntax.Literal){break}directive=source.slice(token.start+1,token.end-1);if(directive==="use strict"){strict=true;if(firstRestricted){tolerateUnexpectedToken(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}while(startIndex<length){statement=parseStatementListItem();if(typeof statement==="undefined"){break}body.push(statement)}return body}function parseProgram(){var body,node;peek();node=new Node;body=parseScriptBody();return node.finishProgram(body)}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=0;i<extra.tokens.length;++i){entry=extra.tokens[i];token={type:entry.type,value:entry.value};if(entry.regex){token.regex={pattern:entry.regex.pattern,flags:entry.regex.flags}}if(extra.range){token.range=entry.range}if(extra.loc){token.loc=entry.loc}tokens.push(token)}extra.tokens=tokens}function tokenize(code,options){var toString,tokens;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;length=source.length;lookahead=null;state={allowIn:true,allowYield:false,labelSet:{},inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,curlyStack:[]};extra={};options=options||{};options.tokens=true;extra.tokens=[];extra.tokenize=true;extra.openParenToken=-1;extra.openCurlyToken=-1;extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}try{peek();if(lookahead.type===Token.EOF){return extra.tokens}lex();while(lookahead.type!==Token.EOF){try{lex()}catch(lexError){if(extra.errors){recordError(lexError);break}else{throw lexError}}}filterTokenLocation();tokens=extra.tokens;if(typeof extra.comments!=="undefined"){tokens.comments=extra.comments}if(typeof extra.errors!=="undefined"){tokens.errors=extra.errors}}catch(e){throw e}finally{extra={}}return tokens}function parse(code,options){var program,toString;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;length=source.length;lookahead=null;state={allowIn:true,allowYield:false,labelSet:{},inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,curlyStack:[]};sourceType="script";strict=false;extra={};if(typeof options!=="undefined"){extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;extra.attachComment=typeof options.attachComment==="boolean"&&options.attachComment;if(extra.loc&&options.source!==null&&options.source!==undefined){extra.source=toString(options.source)}if(typeof options.tokens==="boolean"&&options.tokens){extra.tokens=[]}if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}if(extra.attachComment){extra.range=true;extra.comments=[];extra.bottomRightStack=[];extra.trailingComments=[];extra.leadingComments=[]}if(options.sourceType==="module"){sourceType=options.sourceType;strict=true}}try{program=parseProgram();if(typeof extra.comments!=="undefined"){program.comments=extra.comments}if(typeof extra.tokens!=="undefined"){filterTokenLocation();program.tokens=extra.tokens}if(typeof extra.errors!=="undefined"){program.errors=extra.errors}}catch(e){throw e}finally{extra={}}return program}exports.version="2.4.1";exports.tokenize=tokenize;exports.parse=parse;exports.Syntax=function(){var name,types={};if(typeof Object.create==="function"){types=Object.create(null)}for(name in Syntax){if(Syntax.hasOwnProperty(name)){types[name]=Syntax[name]}}if(typeof Object.freeze==="function"){Object.freeze(types)}return types}()})},{}],118:[function(require,module,exports){"use strict";var esprima=require("esprima");exports.BYPASS_RECURSION={root:true,comments:true,tokens:true,loc:true,range:true,parent:true,next:true,prev:true,handler:true,type:true,raw:true,startToken:true,endToken:true};var _addLocInfo;exports.parseFn=esprima.parse;exports.parseContext=esprima;exports.parseOptions={range:true,tokens:true,comment:true};exports.parse=function parse(source,opts){opts=opts||{};_addLocInfo=Boolean(opts.loc);source=source.toString();Object.keys(exports.parseOptions).forEach(function(key){if(!(key in opts)){opts[key]=exports.parseOptions[key]}});var ast=exports.parseFn.call(exports.parseContext,source,opts);if(!ast.tokens.length&&!ast.comments.length){ast.depth=0;ast.startToken=ast.endToken=null;ast.toString=_nodeProto.toString;return ast}instrumentTokens(ast,source);var lastToken=ast.tokens[ast.tokens.length-1];ast.range[0]=ast.tokens[0].range[0];ast.range[1]=lastToken.range[1];if(_addLocInfo){ast.loc.start.line=0;ast.loc.start.column=0;ast.loc.end.line=lastToken.loc.end.line;ast.loc.end.column=lastToken.loc.end.column}var toString=_nodeProto.toString;var instrumentNodes=function(node,parent,prev,next){node.parent=parent;node.prev=prev;node.next=next;node.depth=parent?parent.depth+1:0;node.toString=toString;var prevToken=prev?prev.endToken:parent?parent.startToken:null;var nextToken=parent?parent.endToken:null;node.startToken=prevToken?getNodeStartToken(prevToken,node.range):ast.tokens[0];node.endToken=nextToken?getNodeEndToken(nextToken,node.range):ast.tokens[ast.tokens.length-1]};recursiveWalk(ast,instrumentNodes);return ast};var _nodeProto={};_nodeProto.toString=function(){var str="";var token=this.startToken;if(!token)return str;do{str+="raw"in token?token.raw:token.value;token=token.next}while(token&&token!==this.endToken.next);return str};function getNodeStartToken(token,range){var startRange=range[0];while(token){if(token.range[0]>=startRange){return token}token=token.next}}function getNodeEndToken(token,range){var endRange=range[1];while(token){if(token.range[1]<=endRange){return token}token=token.prev}}function getPrevToken(tokens,range){var result,token,startRange=range[0],n=tokens.length;while(n--){token=tokens[n];if(token.range[1]<=startRange){result=token;break}}return result}function instrumentTokens(ast,source){var tokens=ast.tokens;var comments=ast.comments;var comment,q=-1,nComments=comments.length;while(++q<nComments){comment=comments[q];comment.raw=comment.type==="Block"?"/*"+comment.value+"*/":"//"+comment.value;comment.type+="Comment";var prevToken=getPrevToken(tokens,comment.range);var prevIndex=prevToken?tokens.indexOf(prevToken):-1;tokens.splice(prevIndex+1,0,comment)}var result=[];var wsTokens;var firstToken=ast.tokens[0];var raw;if(firstToken.range[0]){raw=source.substring(0,firstToken.range[0]);result=result.concat(getWhiteSpaceTokens(raw,null))}var i=-1,nTokens=tokens.length,token,prev;var k,nWs;while(++i<nTokens){token=tokens[i];if(i){if(prev.range[1]<token.range[0]){wsTokens=getWhiteSpaceTokens(source.substring(prev.range[1],token.range[0]),prev);k=-1;nWs=wsTokens.length;while(++k<nWs){result.push(wsTokens[k])}}}result.push(token);prev=token}var lastToken=ast.tokens[ast.tokens.length-1];if(lastToken.range[1]<source.length){wsTokens=getWhiteSpaceTokens(source.substring(lastToken.range[1],source.length),lastToken);k=-1;nWs=wsTokens.length;while(++k<nWs){result.push(wsTokens[k])}}var n;for(i=0,n=result.length,token;i<n;i++){token=result[i];token.prev=i?result[i-1]:undefined;token.next=result[i+1];token.root=ast;if(token.type==="BlockComment"&&token.prev&&token.prev.type==="WhiteSpace"&&(!token.prev.prev||token.prev.prev.type==="LineBreak")){token.originalIndent=token.prev.value}}ast.tokens=result}function getWhiteSpaceTokens(raw,prev){var whiteSpaces=getWhiteSpaces(raw);var startRange=prev?prev.range[1]:0;var startLine,startColumn;if(_addLocInfo){startLine=prev?prev.loc.end.line:1;startColumn=prev?prev.loc.end.column:0}var tokens=[];for(var i=0,n=whiteSpaces.length,value;i<n;i++){value=whiteSpaces[i];var wsToken={value:value};var isBr="\r\n".indexOf(value)>=0;wsToken.type=isBr?"LineBreak":"WhiteSpace";wsToken.range=[startRange,startRange+value.length];if(_addLocInfo){wsToken.loc={start:{line:startLine,column:startColumn},end:{line:startLine,column:startColumn+value.length}};if(isBr){startLine=wsToken.loc.end.line+1;startColumn=0}else{startLine=wsToken.loc.end.line;startColumn=wsToken.loc.end.column}}startRange+=value.length;tokens.push(wsToken)}return tokens}function getWhiteSpaces(source){var result=[];var whiteSpaces=source.split("");var buf="";for(var value,i=0,nSpaces=whiteSpaces.length;i<nSpaces;i++){value=whiteSpaces[i];switch(value){case"\n":if(buf==="\r"){result.push(buf+value)}else{if(buf){result.push(buf)}result.push(value)}buf="";break;case"\r":if(buf){result.push(buf)}buf=value;break;default:if(buf==="\r"){result.push(buf);buf=value}else{buf+=value}}}if(buf){result.push(buf)}return result}exports.walk=exports.recursive=recursiveWalk;function recursiveWalk(node,fn,parent,prev,next){if(!node||fn(node,parent,prev,next)===false){return}var keys=Object.keys(node),child,key;for(var i=0,nKeys=keys.length;i<nKeys;i++){key=keys[i];child=node[key];if(!child||typeof child!=="object"||exports.BYPASS_RECURSION[key]){continue}if(typeof child.type==="string"){recursiveWalk(child,fn,node)}else if(typeof child.length==="number"){for(var k=0,nChilds=child.length;k<nChilds;k++){recursiveWalk(child[k],fn,node,k?child[k-1]:undefined,child[k+1])}}}}exports.moonwalk=function moonwalk(ast,fn){if(typeof ast==="string"){ast=exports.parse(ast)}var swap=[];recursiveWalk(ast,function(node){if(!swap[node.depth]){swap[node.depth]=[]}swap[node.depth].push(node)});var nodes=[];var nDepths=swap.length,cur;while(cur=swap[--nDepths]){for(var i=0,n=cur.length;i<n;i++){nodes.push(cur[i])}}nodes.forEach(fn);return ast}},{esprima:117}],119:[function(require,module,exports){(function(){"use strict";function stripJsonComments(str){var currentChar;var nextChar;var insideString=false;var insideComment=false;var ret="";for(var i=0;i<str.length;i++){currentChar=str[i];nextChar=str[i+1];if(!insideComment&&str[i-1]!=="\\"&&currentChar==='"'){insideString=!insideString}if(insideString){ret+=currentChar;continue}if(!insideComment&&currentChar+nextChar==="//"){insideComment="single";i++}else if(insideComment==="single"&&currentChar+nextChar==="\r\n"){insideComment=false;i++}else if(insideComment==="single"&&currentChar==="\n"){insideComment=false}else if(!insideComment&&currentChar+nextChar==="/*"){insideComment="multi";i++;continue}else if(insideComment==="multi"&&currentChar+nextChar==="*/"){insideComment=false;i++;continue}if(insideComment){continue}ret+=currentChar}return ret}if(typeof module!=="undefined"&&module.exports){module.exports=stripJsonComments}else{window.stripJsonComments=stripJsonComments}})()},{}],120:[function(require,module,exports){"use strict";module.exports=require("os-homedir")()},{"os-homedir":121}],121:[function(require,module,exports){(function(process){"use strict";var os=require("os");function homedir(){var env=process.env;var home=env.HOME;var user=env.LOGNAME||env.USER||env.LNAME||env.USERNAME;if(process.platform==="win32"){return env.USERPROFILE||env.HOMEDRIVE+env.HOMEPATH||home||null}if(process.platform==="darwin"){return home||(user?"/Users/"+user:null)}if(process.platform==="linux"){return home||(user?process.getuid()===0?"/root":"/home/"+user:null)}return home||null}module.exports=typeof os.homedir==="function"?os.homedir:homedir}).call(this,require("_process"))},{_process:4,os:2}],esformatter:[function(require,module,exports){"use strict";var plugins=require("./plugins");exports.diff=require("./diff");exports.hooks=require("./hooks");exports.format=require("./format");exports.transform=require("./transform");exports.rc=require("./options").getRc;exports.register=plugins.register;exports.unregister=plugins.unregister;exports.unregisterAll=plugins.unregisterAll},{"./diff":5,"./format":6,"./hooks":7,"./options":49,"./plugins":50,"./transform":53}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var hasOwn=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var undefined;var isArray=function isArray(arr){if(typeof Array.isArray==="function"){return Array.isArray(arr)}return toStr.call(arr)==="[object Array]"};var isPlainObject=function isPlainObject(obj){"use strict";if(!obj||toStr.call(obj)!=="[object Object]"){return false}var has_own_constructor=hasOwn.call(obj,"constructor");var has_is_property_of_method=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&!has_own_constructor&&!has_is_property_of_method){return false}var key;for(key in obj){}return key===undefined||hasOwn.call(obj,key)};module.exports=function extend(){"use strict";var options,name,src,copy,copyIsArray,clone,target=arguments[0],i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}else if(typeof target!=="object"&&typeof target!=="function"||target==null){target={}}for(;i<length;++i){options=arguments[i];if(options!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&(isPlainObject(copy)||(copyIsArray=isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&isArray(src)?src:[]}else{clone=src&&isPlainObject(src)?src:{}}target[name]=extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target}},{}],2:[function(require,module,exports){var parse=require("espree").parse;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};var forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);for(var i=0;i<xs.length;i++){fn.call(xs,xs[i],i,xs)}};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};module.exports=function(src,opts,fn){if(typeof opts==="function"){fn=opts;opts={}}if(typeof src==="object"){opts=src;src=opts.source;delete opts.source}src=src===undefined?opts.source:src;opts.range=true;if(typeof src!=="string")src=String(src);var ast=parse(src,opts);var result={chunks:src.split(""),toString:function(){return result.chunks.join("")},inspect:function(){return result.toString()}};var index=0;(function walk(node,parent){insertHelpers(node,parent,result.chunks);forEach(objectKeys(node),function(key){if(key==="parent")return;var child=node[key];if(isArray(child)){forEach(child,function(c){if(c&&typeof c.type==="string"){walk(c,node)}})}else if(child&&typeof child.type==="string"){walk(child,node)}});fn(node)})(ast,undefined);return result};function insertHelpers(node,parent,chunks){if(!node.range)return;node.parent=parent;node.source=function(){return chunks.slice(node.range[0],node.range[1]).join("")};if(node.update&&typeof node.update==="object"){var prev=node.update;forEach(objectKeys(prev),function(key){update[key]=prev[key]});node.update=update}else{node.update=update}function update(s){chunks[node.range[0]]=s;for(var i=node.range[0]+1;i<node.range[1];i++){chunks[i]=""}}}},{espree:3}],3:[function(require,module,exports){"use strict";var syntax=require("./lib/syntax"),tokenInfo=require("./lib/token-info"),astNodeTypes=require("./lib/ast-node-types"),astNodeFactory=require("./lib/ast-node-factory"),defaultFeatures=require("./lib/features"),Messages=require("./lib/messages"),XHTMLEntities=require("./lib/xhtml-entities"),StringMap=require("./lib/string-map"),commentAttachment=require("./lib/comment-attachment");var Token=tokenInfo.Token,TokenName=tokenInfo.TokenName,FnExprTokens=tokenInfo.FnExprTokens,Regex=syntax.Regex,PropertyKind,source,strict,index,lineNumber,lineStart,length,lookahead,state,extra;PropertyKind={Data:1,Get:2,Set:4};function assert(condition,message){if(!condition){throw new Error("ASSERT: "+message)}}function addComment(type,value,start,end,loc){var comment;assert(typeof start==="number","Comment must have valid position");if(state.lastCommentStart>=start){return}state.lastCommentStart=start;comment={type:type,value:value};if(extra.range){comment.range=[start,end]}if(extra.loc){comment.loc=loc}extra.comments.push(comment);if(extra.attachComment){commentAttachment.addComment(comment)}}function skipSingleLineComment(offset){var start,loc,ch,comment;start=index-offset;loc={start:{line:lineNumber,column:index-lineStart-offset}};while(index<length){ch=source.charCodeAt(index);++index;if(syntax.isLineTerminator(ch)){if(extra.comments){comment=source.slice(start+offset,index-1);loc.end={line:lineNumber,column:index-lineStart-1};addComment("Line",comment,start,index-1,loc)}if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;return}}if(extra.comments){comment=source.slice(start+offset,index);loc.end={line:lineNumber,column:index-lineStart};addComment("Line",comment,start,index,loc)}}function skipMultiLineComment(){var start,loc,ch,comment;if(extra.comments){start=index-2;loc={start:{line:lineNumber,column:index-lineStart-2}}}while(index<length){ch=source.charCodeAt(index);if(syntax.isLineTerminator(ch)){if(ch===13&&source.charCodeAt(index+1)===10){++index}++lineNumber;++index;lineStart=index;if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else if(ch===42){if(source.charCodeAt(index+1)===47){++index;++index;if(extra.comments){comment=source.slice(start+2,index-2);loc.end={line:lineNumber,column:index-lineStart};addComment("Block",comment,start,index,loc)}return}++index}else{++index}}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function skipComment(){var ch,start;start=index===0;while(index<length){ch=source.charCodeAt(index);if(syntax.isWhiteSpace(ch)){++index}else if(syntax.isLineTerminator(ch)){++index;if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;start=true}else if(ch===47){ch=source.charCodeAt(index+1);if(ch===47){++index;++index;skipSingleLineComment(2);start=true}else if(ch===42){++index;++index;skipMultiLineComment()}else{break}}else if(start&&ch===45){if(source.charCodeAt(index+1)===45&&source.charCodeAt(index+2)===62){index+=3;skipSingleLineComment(3)}else{break}}else if(ch===60){if(source.slice(index+1,index+4)==="!--"){++index;++index;++index;++index;skipSingleLineComment(4)}else{break}}else{break}}}function scanHexEscape(prefix){var i,len,ch,code=0;len=prefix==="u"?4:2;for(i=0;i<len;++i){if(index<length&&syntax.isHexDigit(source[index])){ch=source[index++];code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}else{return""}}return String.fromCharCode(code)}function scanUnicodeCodePointEscape(){var ch,code,cu1,cu2;ch=source[index];code=0;if(ch==="}"){throwError({},Messages.UnexpectedToken,"ILLEGAL")}while(index<length){ch=source[index++];if(!syntax.isHexDigit(ch)){break}code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}if(code>1114111||ch!=="}"){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(code<=65535){return String.fromCharCode(code)}cu1=(code-65536>>10)+55296;cu2=(code-65536&1023)+56320;return String.fromCharCode(cu1,cu2)}function getEscapedIdentifier(){var ch,id;ch=source.charCodeAt(index++);id=String.fromCharCode(ch);if(ch===92){if(source.charCodeAt(index)!==117){throwError({},Messages.UnexpectedToken,"ILLEGAL")}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!syntax.isIdentifierStart(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}id=ch}while(index<length){ch=source.charCodeAt(index);if(!syntax.isIdentifierPart(ch)){break}++index;id+=String.fromCharCode(ch);if(ch===92){id=id.substr(0,id.length-1);if(source.charCodeAt(index)!==117){throwError({},Messages.UnexpectedToken,"ILLEGAL")}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!syntax.isIdentifierPart(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}id+=ch}}return id}function getIdentifier(){var start,ch;start=index++;while(index<length){ch=source.charCodeAt(index);if(ch===92){index=start;return getEscapedIdentifier()}if(syntax.isIdentifierPart(ch)){++index}else{break}}return source.slice(start,index)}function scanIdentifier(){var start,id,type;start=index;id=source.charCodeAt(index)===92?getEscapedIdentifier():getIdentifier();if(id.length===1){type=Token.Identifier}else if(syntax.isKeyword(id,strict,extra.ecmaFeatures)){type=Token.Keyword}else if(id==="null"){type=Token.NullLiteral}else if(id==="true"||id==="false"){type=Token.BooleanLiteral}else{type=Token.Identifier}return{type:type,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanPunctuator(){var start=index,code=source.charCodeAt(index),code2,ch1=source[index],ch2,ch3,ch4;switch(code){case 40:case 41:case 59:case 44:case 91:case 93:case 58:
case 63:case 126:++index;if(extra.tokenize&&code===40){extra.openParenToken=extra.tokens.length}return{type:Token.Punctuator,value:String.fromCharCode(code),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};case 123:case 125:++index;if(extra.tokenize&&code===123){extra.openCurlyToken=extra.tokens.length}if(index>state.curlyLastIndex){state.curlyLastIndex=index;if(code===123){state.curlyStack.push("{")}else{state.curlyStack.pop()}}return{type:Token.Punctuator,value:String.fromCharCode(code),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};default:code2=source.charCodeAt(index+1);if(code2===61){switch(code){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:index+=2;return{type:Token.Punctuator,value:String.fromCharCode(code)+String.fromCharCode(code2),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};case 33:case 61:index+=2;if(source.charCodeAt(index)===61){++index}return{type:Token.Punctuator,value:source.slice(start,index),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]};default:break}}break}ch2=source[index+1];ch3=source[index+2];ch4=source[index+3];if(ch1===">"&&ch2===">"&&ch3===">"){if(ch4==="="){index+=4;return{type:Token.Punctuator,value:">>>=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if(ch1===">"&&ch2===">"&&ch3===">"){index+=3;return{type:Token.Punctuator,value:">>>",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1==="<"&&ch2==="<"&&ch3==="="){index+=3;return{type:Token.Punctuator,value:"<<=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1===">"&&ch2===">"&&ch3==="="){index+=3;return{type:Token.Punctuator,value:">>=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(extra.ecmaFeatures.spread||extra.ecmaFeatures.restParams||extra.ecmaFeatures.jsx&&state.inJSXSpreadAttribute){if(ch1==="."&&ch2==="."&&ch3==="."){index+=3;return{type:Token.Punctuator,value:"...",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if(ch1===ch2&&"+-<>&|".indexOf(ch1)>=0){index+=2;return{type:Token.Punctuator,value:ch1+ch2,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(extra.ecmaFeatures.arrowFunctions){if(ch1==="="&&ch2===">"){index+=2;return{type:Token.Punctuator,value:"=>",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if("<>=!+-*%&|^/".indexOf(ch1)>=0){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1==="."){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function scanHexLiteral(start){var number="";while(index<length){if(!syntax.isHexDigit(source[index])){break}number+=source[index++]}if(number.length===0){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(syntax.isIdentifierStart(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseInt("0x"+number,16),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanBinaryLiteral(start){var ch,number="";while(index<length){ch=source[index];if(ch!=="0"&&ch!=="1"){break}number+=source[index++]}if(number.length===0){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(index<length){ch=source.charCodeAt(index);if(syntax.isIdentifierStart(ch)||syntax.isDecimalDigit(ch)){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}return{type:Token.NumericLiteral,value:parseInt(number,2),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanOctalLiteral(prefix,start){var number,octal;if(syntax.isOctalDigit(prefix)){octal=true;number="0"+source[index++]}else{octal=false;++index;number=""}while(index<length){if(!syntax.isOctalDigit(source[index])){break}number+=source[index++]}if(!octal&&number.length===0){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(syntax.isIdentifierStart(source.charCodeAt(index))||syntax.isDecimalDigit(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseInt(number,8),octal:octal,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanNumericLiteral(){var number,start,ch;ch=source[index];assert(syntax.isDecimalDigit(ch.charCodeAt(0))||ch===".","Numeric literal must start with a decimal digit or a decimal point");start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch==="x"||ch==="X"){++index;return scanHexLiteral(start)}if(extra.ecmaFeatures.binaryLiterals){if(ch==="b"||ch==="B"){++index;return scanBinaryLiteral(start)}}if(extra.ecmaFeatures.octalLiterals&&(ch==="o"||ch==="O")||syntax.isOctalDigit(ch)){return scanOctalLiteral(ch,start)}if(ch&&syntax.isDecimalDigit(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}while(syntax.isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="."){number+=source[index++];while(syntax.isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-"){number+=source[index++]}if(syntax.isDecimalDigit(source.charCodeAt(index))){while(syntax.isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}}else{throwError({},Messages.UnexpectedToken,"ILLEGAL")}}if(syntax.isIdentifierStart(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanEscapeSequence(ch){var code,unescaped,restore,escapedCh,octal=false;if(!ch){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(syntax.isLineTerminator(ch.charCodeAt(0))){++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index;escapedCh=""}else if(ch==="u"&&source[index]==="{"){if(extra.ecmaFeatures.unicodeCodePointEscapes){++index;escapedCh=scanUnicodeCodePointEscape()}else{throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else if(ch==="u"||ch==="x"){restore=index;unescaped=scanHexEscape(ch);if(unescaped){escapedCh=unescaped}else{index=restore;escapedCh=ch}}else if(ch==="n"){escapedCh="\n"}else if(ch==="r"){escapedCh="\r"}else if(ch==="t"){escapedCh=" "}else if(ch==="b"){escapedCh="\b"}else if(ch==="f"){escapedCh="\f"}else if(ch==="v"){escapedCh=" "}else if(syntax.isOctalDigit(ch)){code="01234567".indexOf(ch);if(code!==0){octal=true}if(index<length&&syntax.isOctalDigit(source[index])){octal=true;code=code*8+"01234567".indexOf(source[index++]);if("0123".indexOf(ch)>=0&&index<length&&syntax.isOctalDigit(source[index])){code=code*8+"01234567".indexOf(source[index++])}}escapedCh=String.fromCharCode(code)}else{escapedCh=ch}return{ch:escapedCh,octal:octal}}function scanStringLiteral(){var str="",ch,escapedSequence,octal=false,start=index,startLineNumber=lineNumber,startLineStart=lineStart,quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");++index;while(index<length){ch=source[index++];if(syntax.isLineTerminator(ch.charCodeAt(0))){break}else if(ch===quote){quote="";break}else if(ch==="\\"){ch=source[index++];escapedSequence=scanEscapeSequence(ch);str+=escapedSequence.ch;octal=escapedSequence.octal||octal}else{str+=ch}}if(quote!==""){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.StringLiteral,value:str,octal:octal,startLineNumber:startLineNumber,startLineStart:startLineStart,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanTemplate(){var cooked="",ch,escapedSequence,start=index,terminated=false,tail=false,head=source[index]==="`";++index;while(index<length){ch=source[index++];if(ch==="`"){tail=true;terminated=true;break}else if(ch==="$"){if(source[index]==="{"){++index;terminated=true;break}cooked+=ch}else if(ch==="\\"){ch=source[index++];escapedSequence=scanEscapeSequence(ch);if(escapedSequence.octal){throwError({},Messages.TemplateOctalLiteral)}cooked+=escapedSequence.ch}else if(syntax.isLineTerminator(ch.charCodeAt(0))){++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index;cooked+="\n"}else{cooked+=ch}}if(!terminated){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(index>state.curlyLastIndex){state.curlyLastIndex=index;if(!tail){state.curlyStack.push("template")}if(!head){state.curlyStack.pop()}}return{type:Token.Template,value:{cooked:cooked,raw:source.slice(start+1,index-(tail?1:2))},head:head,tail:tail,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function testRegExp(pattern,flags){var tmp=pattern,validFlags="gmsi";if(extra.ecmaFeatures.regexYFlag){validFlags+="y"}if(extra.ecmaFeatures.regexUFlag){validFlags+="u"}if(!RegExp("^["+validFlags+"]*$").test(flags)){throwError({},Messages.InvalidRegExpFlag)}if(flags.indexOf("u")>=0){tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g,function($0,$1){if(parseInt($1,16)<=1114111){return"x"}throwError({},Messages.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}try{RegExp(tmp)}catch(e){throwError({},Messages.InvalidRegExp)}try{return new RegExp(pattern,flags)}catch(exception){return null}}function scanRegExpBody(){var ch,str,classMarker,terminated,body;ch=source[index];assert(ch==="/","Regular expression literal must start with a slash");str=source[index++];classMarker=false;terminated=false;while(index<length){ch=source[index++];str+=ch;if(ch==="\\"){ch=source[index++];if(syntax.isLineTerminator(ch.charCodeAt(0))){throwError({},Messages.UnterminatedRegExp)}str+=ch}else if(syntax.isLineTerminator(ch.charCodeAt(0))){throwError({},Messages.UnterminatedRegExp)}else if(classMarker){if(ch==="]"){classMarker=false}}else{if(ch==="/"){terminated=true;break}else if(ch==="["){classMarker=true}}}if(!terminated){throwError({},Messages.UnterminatedRegExp)}body=str.substr(1,str.length-2);return{value:body,literal:str}}function scanRegExpFlags(){var ch,str,flags,restore;str="";flags="";while(index<length){ch=source[index];if(!syntax.isIdentifierPart(ch.charCodeAt(0))){break}++index;if(ch==="\\"&&index<length){ch=source[index];if(ch==="u"){++index;restore=index;ch=scanHexEscape("u");if(ch){flags+=ch;for(str+="\\u";restore<index;++restore){str+=source[restore]}}else{index=restore;flags+="u";str+="\\u"}throwErrorTolerant({},Messages.UnexpectedToken,"ILLEGAL")}else{str+="\\";throwErrorTolerant({},Messages.UnexpectedToken,"ILLEGAL")}}else{flags+=ch;str+=ch}}return{value:flags,literal:str}}function scanRegExp(){var start,body,flags,value;lookahead=null;skipComment();start=index;body=scanRegExpBody();flags=scanRegExpFlags();value=testRegExp(body.value,flags.value);if(extra.tokenize){return{type:Token.RegularExpression,value:value,regex:{pattern:body.value,flags:flags.value},lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}return{literal:body.literal+flags.literal,value:value,regex:{pattern:body.value,flags:flags.value},range:[start,index]}}function collectRegex(){var pos,loc,regex,token;skipComment();pos=index;loc={start:{line:lineNumber,column:index-lineStart}};regex=scanRegExp();loc.end={line:lineNumber,column:index-lineStart};if(!extra.tokenize){if(extra.tokens.length>0){token=extra.tokens[extra.tokens.length-1];if(token.range[0]===pos&&token.type==="Punctuator"){if(token.value==="/"||token.value==="/="){extra.tokens.pop()}}}extra.tokens.push({type:"RegularExpression",value:regex.literal,regex:regex.regex,range:[pos,index],loc:loc})}return regex}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advanceSlash(){var prevToken,checkToken;prevToken=extra.tokens[extra.tokens.length-1];if(!prevToken){return collectRegex()}if(prevToken.type==="Punctuator"){if(prevToken.value==="]"){return scanPunctuator()}if(prevToken.value===")"){checkToken=extra.tokens[extra.openParenToken-1];if(checkToken&&checkToken.type==="Keyword"&&(checkToken.value==="if"||checkToken.value==="while"||checkToken.value==="for"||checkToken.value==="with")){return collectRegex()}return scanPunctuator()}if(prevToken.value==="}"){if(extra.tokens[extra.openCurlyToken-3]&&extra.tokens[extra.openCurlyToken-3].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-4];if(!checkToken){return scanPunctuator()}}else if(extra.tokens[extra.openCurlyToken-4]&&extra.tokens[extra.openCurlyToken-4].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-5];if(!checkToken){return collectRegex()}}else{return scanPunctuator()}if(FnExprTokens.indexOf(checkToken.value)>=0){return scanPunctuator()}return collectRegex()}return collectRegex()}if(prevToken.type==="Keyword"){return collectRegex()}return scanPunctuator()}function advance(){var ch,allowJSX=extra.ecmaFeatures.jsx,allowTemplateStrings=extra.ecmaFeatures.templateStrings;if(!allowJSX||!state.inJSXChild){skipComment()}if(index>=length){return{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,range:[index,index]}}if(allowJSX&&state.inJSXChild){return advanceJSXChild()}ch=source.charCodeAt(index);if(ch===40||ch===41||ch===59){return scanPunctuator()}if(ch===39||ch===34){if(allowJSX&&state.inJSXTag){return scanJSXStringLiteral()}return scanStringLiteral()}if(allowJSX&&state.inJSXTag&&syntax.isJSXIdentifierStart(ch)){return scanJSXIdentifier()}if(allowTemplateStrings){if(ch===96||ch===125&&state.curlyStack[state.curlyStack.length-1]==="template"){return scanTemplate()}}if(syntax.isIdentifierStart(ch)){return scanIdentifier()}if(ch===46){if(syntax.isDecimalDigit(source.charCodeAt(index+1))){return scanNumericLiteral()}return scanPunctuator()}if(syntax.isDecimalDigit(ch)){return scanNumericLiteral()}if(extra.tokenize&&ch===47){return advanceSlash()}return scanPunctuator()}function collectToken(){var loc,token,range,value,entry,allowJSX=extra.ecmaFeatures.jsx;if(!allowJSX||!state.inJSXChild){skipComment()}loc={start:{line:lineNumber,column:index-lineStart}};token=advance();loc.end={line:lineNumber,column:index-lineStart};if(token.type!==Token.EOF){range=[token.range[0],token.range[1]];value=source.slice(token.range[0],token.range[1]);entry={type:TokenName[token.type],value:value,range:range,loc:loc};if(token.regex){entry.regex={pattern:token.regex.pattern,flags:token.regex.flags}}extra.tokens.push(entry)}return token}function lex(){var token;token=lookahead;index=token.range[1];lineNumber=token.lineNumber;lineStart=token.lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();index=token.range[1];lineNumber=token.lineNumber;lineStart=token.lineStart;return token}function peek(){var pos,line,start;pos=index;line=lineNumber;start=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();index=pos;lineNumber=line;lineStart=start}function lookahead2(){var adv,pos,line,start,result;adv=typeof extra.advance==="function"?extra.advance:advance;pos=index;line=lineNumber;start=lineStart;if(lookahead===null){lookahead=adv()}index=lookahead.range[1];lineNumber=lookahead.lineNumber;lineStart=lookahead.lineStart;result=adv();index=pos;lineNumber=line;lineStart=start;return result}function getQualifiedJSXName(object){if(object.type===astNodeTypes.JSXIdentifier){return object.name}if(object.type===astNodeTypes.JSXNamespacedName){return object.namespace.name+":"+object.name.name}if(object.type===astNodeTypes.JSXMemberExpression){return getQualifiedJSXName(object.object)+"."+getQualifiedJSXName(object.property)}throwUnexpected(object)}function scanJSXIdentifier(){var ch,start,value="";start=index;while(index<length){ch=source.charCodeAt(index);if(!syntax.isJSXIdentifierPart(ch)){break}value+=source[index++]}return{type:Token.JSXIdentifier,value:value,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanJSXEntity(){var ch,str="",start=index,count=0,code;ch=source[index];assert(ch==="&","Entity must start with an ampersand");index++;while(index<length&&count++<10){ch=source[index++];if(ch===";"){break}str+=ch}if(ch===";"){if(str[0]==="#"){if(str[1]==="x"){code=+("0"+str.substr(1))}else{code=+str.substr(1).replace(Regex.LeadingZeros,"")}if(!isNaN(code)){return String.fromCharCode(code)}}else if(XHTMLEntities[str]){return XHTMLEntities[str]}}index=start+1;return"&"}function scanJSXText(stopChars){var ch,str="",start;start=index;while(index<length){ch=source[index];if(stopChars.indexOf(ch)!==-1){break}if(ch==="&"){str+=scanJSXEntity()}else{index++;if(ch==="\r"&&source[index]==="\n"){str+=ch;ch=source[index];index++}if(syntax.isLineTerminator(ch.charCodeAt(0))){++lineNumber;lineStart=index}str+=ch}}return{type:Token.JSXText,value:str,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanJSXStringLiteral(){var innerToken,quote,start;quote=source[index];assert(quote==='"'||quote==="'","String literal must starts with a quote");start=index;++index;innerToken=scanJSXText([quote]);if(quote!==source[index]){throwError({},Messages.UnexpectedToken,"ILLEGAL")}++index;innerToken.range=[start,index];return innerToken}function advanceJSXChild(){var ch=source.charCodeAt(index);if(ch!==123&&ch!==60){return scanJSXText(["<","{"])}return scanPunctuator()}function parseJSXIdentifier(){var token,marker=markerCreate();if(lookahead.type!==Token.JSXIdentifier){throwUnexpected(lookahead)}token=lex();return markerApply(marker,astNodeFactory.createJSXIdentifier(token.value))}function parseJSXNamespacedName(){var namespace,name,marker=markerCreate();namespace=parseJSXIdentifier();expect(":");name=parseJSXIdentifier();return markerApply(marker,astNodeFactory.createJSXNamespacedName(namespace,name))}function parseJSXMemberExpression(){var marker=markerCreate(),expr=parseJSXIdentifier();while(match(".")){lex();expr=markerApply(marker,astNodeFactory.createJSXMemberExpression(expr,parseJSXIdentifier()))}return expr}function parseJSXElementName(){if(lookahead2().value===":"){return parseJSXNamespacedName()}if(lookahead2().value==="."){return parseJSXMemberExpression()}return parseJSXIdentifier()}function parseJSXAttributeName(){if(lookahead2().value===":"){return parseJSXNamespacedName()}return parseJSXIdentifier()}function parseJSXAttributeValue(){var value,marker;if(match("{")){value=parseJSXExpressionContainer();if(value.expression.type===astNodeTypes.JSXEmptyExpression){throwError(value,"JSX attributes must only be assigned a non-empty "+"expression")}}else if(match("<")){value=parseJSXElement()}else if(lookahead.type===Token.JSXText){marker=markerCreate();value=markerApply(marker,astNodeFactory.createLiteralFromSource(lex(),source))}else{throwError({},Messages.InvalidJSXAttributeValue)}return value}function parseJSXEmptyExpression(){var marker=markerCreatePreserveWhitespace();while(source.charAt(index)!=="}"){index++}return markerApply(marker,astNodeFactory.createJSXEmptyExpression())}function parseJSXExpressionContainer(){var expression,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=false;expect("{");if(match("}")){expression=parseJSXEmptyExpression()}else{expression=parseExpression()}state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;expect("}");return markerApply(marker,astNodeFactory.createJSXExpressionContainer(expression))}function parseJSXSpreadAttribute(){var expression,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=false;state.inJSXSpreadAttribute=true;expect("{");expect("...");state.inJSXSpreadAttribute=false;expression=parseAssignmentExpression();state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;expect("}");return markerApply(marker,astNodeFactory.createJSXSpreadAttribute(expression))}function parseJSXAttribute(){var name,marker;if(match("{")){return parseJSXSpreadAttribute()}marker=markerCreate();name=parseJSXAttributeName();if(match("=")){lex();return markerApply(marker,astNodeFactory.createJSXAttribute(name,parseJSXAttributeValue()))}return markerApply(marker,astNodeFactory.createJSXAttribute(name))}function parseJSXChild(){var token,marker;if(match("{")){token=parseJSXExpressionContainer()}else if(lookahead.type===Token.JSXText){marker=markerCreatePreserveWhitespace();token=markerApply(marker,astNodeFactory.createLiteralFromSource(lex(),source))}else{token=parseJSXElement()}return token}function parseJSXClosingElement(){var name,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=true;expect("<");expect("/");name=parseJSXElementName();state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;expect(">");return markerApply(marker,astNodeFactory.createJSXClosingElement(name))}function parseJSXOpeningElement(){var name,attributes=[],selfClosing=false,origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;state.inJSXChild=false;state.inJSXTag=true;expect("<");name=parseJSXElementName();while(index<length&&lookahead.value!=="/"&&lookahead.value!==">"){attributes.push(parseJSXAttribute())}state.inJSXTag=origInJSXTag;if(lookahead.value==="/"){expect("/");state.inJSXChild=origInJSXChild;expect(">");selfClosing=true}else{state.inJSXChild=true;expect(">")}return markerApply(marker,astNodeFactory.createJSXOpeningElement(name,attributes,selfClosing))}function parseJSXElement(){var openingElement,closingElement=null,children=[],origInJSXChild,origInJSXTag,marker=markerCreate();origInJSXChild=state.inJSXChild;origInJSXTag=state.inJSXTag;openingElement=parseJSXOpeningElement();if(!openingElement.selfClosing){while(index<length){state.inJSXChild=false;if(lookahead.value==="<"&&lookahead2().value==="/"){break}state.inJSXChild=true;children.push(parseJSXChild())}state.inJSXChild=origInJSXChild;state.inJSXTag=origInJSXTag;closingElement=parseJSXClosingElement();if(getQualifiedJSXName(closingElement.name)!==getQualifiedJSXName(openingElement.name)){throwError({},Messages.ExpectedJSXClosingTag,getQualifiedJSXName(openingElement.name))}}if(!origInJSXChild&&match("<")){throwError(lookahead,Messages.AdjacentJSXElements)}return markerApply(marker,astNodeFactory.createJSXElement(openingElement,closingElement,children))}function markerApply(marker,node){if(extra.range){node.range=[marker.offset,index]}if(extra.loc){node.loc={start:{line:marker.line,column:marker.col},end:{line:lineNumber,column:index-lineStart}};if(extra.source){node.loc.source=extra.source}}if(extra.attachComment){commentAttachment.processComment(node)}return node}function markerCreate(){if(!extra.loc&&!extra.range){return undefined}skipComment();return{offset:index,line:lineNumber,col:index-lineStart}}function markerCreatePreserveWhitespace(){if(!extra.loc&&!extra.range){return undefined}return{offset:index,line:lineNumber,col:index-lineStart}}function peekLineTerminator(){var pos,line,start,found;pos=index;line=lineNumber;start=lineStart;skipComment();found=lineNumber!==line;index=pos;lineNumber=line;lineStart=start;return found}function throwError(token,messageFormat){var error,args=Array.prototype.slice.call(arguments,2),msg=messageFormat.replace(/%(\d)/g,function(whole,index){assert(index<args.length,"Message reference must be in range");return args[index]});if(typeof token.lineNumber==="number"){error=new Error("Line "+token.lineNumber+": "+msg);error.index=token.range[0];error.lineNumber=token.lineNumber;error.column=token.range[0]-lineStart+1}else{error=new Error("Line "+lineNumber+": "+msg);error.index=index;error.lineNumber=lineNumber;error.column=index-lineStart+1}error.description=msg;throw error}function throwErrorTolerant(){try{throwError.apply(null,arguments)}catch(e){if(extra.errors){extra.errors.push(e)}else{throw e}}}function throwUnexpected(token){if(token.type===Token.EOF){throwError(token,Messages.UnexpectedEOS)}if(token.type===Token.NumericLiteral){throwError(token,Messages.UnexpectedNumber)}if(token.type===Token.StringLiteral||token.type===Token.JSXText){throwError(token,Messages.UnexpectedString)}if(token.type===Token.Identifier){throwError(token,Messages.UnexpectedIdentifier)}if(token.type===Token.Keyword){if(syntax.isFutureReservedWord(token.value)){throwError(token,Messages.UnexpectedReserved)}else if(strict&&syntax.isStrictModeReservedWord(token.value,extra.ecmaFeatures)){throwErrorTolerant(token,Messages.StrictReservedWord);return}throwError(token,Messages.UnexpectedToken,token.value)}if(token.type===Token.Template){throwError(token,Messages.UnexpectedTemplate,token.value.raw)}throwError(token,Messages.UnexpectedToken,token.value)}function expect(value){var token=lex();if(token.type!==Token.Punctuator||token.value!==value){throwUnexpected(token)}}function expectKeyword(keyword){var token=lex();if(token.type!==Token.Keyword||token.value!==keyword){throwUnexpected(token)}}function match(value){return lookahead.type===Token.Punctuator&&lookahead.value===value}function matchKeyword(keyword){return lookahead.type===Token.Keyword&&lookahead.value===keyword}function matchContextualKeyword(keyword){return lookahead.type===Token.Identifier&&lookahead.value===keyword}function matchAssign(){var op;if(lookahead.type!==Token.Punctuator){return false}op=lookahead.value;return op==="="||op==="*="||op==="/="||op==="%="||op==="+="||op==="-="||op==="<<="||op===">>="||op===">>>="||op==="&="||op==="^="||op==="|="}function consumeSemicolon(){var line;if(source.charCodeAt(index)===59||match(";")){lex();return}line=lineNumber;skipComment();if(lineNumber!==line){return}if(lookahead.type!==Token.EOF&&!match("}")){throwUnexpected(lookahead)}}function isLeftHandSide(expr){return expr.type===astNodeTypes.Identifier||expr.type===astNodeTypes.MemberExpression}function parseArrayInitialiser(){var elements=[],marker=markerCreate(),tmp;expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else{tmp=parseSpreadOrAssignmentExpression();elements.push(tmp);if(!match("]")){expect(",")}}}expect("]");return markerApply(marker,astNodeFactory.createArrayExpression(elements))}function parsePropertyFunction(paramInfo,options){var previousStrict=strict,previousYieldAllowed=state.yieldAllowed,generator=options?options.generator:false,body;state.yieldAllowed=generator;body=parseFunctionSourceElements();if(strict&&paramInfo.firstRestricted){throwErrorTolerant(paramInfo.firstRestricted,Messages.StrictParamName)}if(strict&&paramInfo.stricted){throwErrorTolerant(paramInfo.stricted,paramInfo.message)}strict=previousStrict;state.yieldAllowed=previousYieldAllowed;return markerApply(options.marker,astNodeFactory.createFunctionExpression(null,paramInfo.params,body,generator,body.type!==astNodeTypes.BlockStatement))}function parsePropertyMethodFunction(options){var previousStrict=strict,marker=markerCreate(),params,method;strict=true;params=parseParams();if(params.stricted){throwErrorTolerant(params.stricted,params.message)}method=parsePropertyFunction(params,{generator:options?options.generator:false,marker:marker});strict=previousStrict;return method}function parseObjectPropertyKey(){var marker=markerCreate(),token=lex(),allowObjectLiteralComputed=extra.ecmaFeatures.objectLiteralComputedProperties,expr,result;switch(token.type){case Token.StringLiteral:case Token.NumericLiteral:if(strict&&token.octal){throwErrorTolerant(token,Messages.StrictOctalLiteral)}return markerApply(marker,astNodeFactory.createLiteralFromSource(token,source));case Token.Identifier:case Token.BooleanLiteral:case Token.NullLiteral:case Token.Keyword:return markerApply(marker,astNodeFactory.createIdentifier(token.value));case Token.Punctuator:if((!state.inObjectLiteral||allowObjectLiteralComputed)&&token.value==="["){marker=markerCreate();expr=parseAssignmentExpression();result=markerApply(marker,expr);expect("]");return result}}throwUnexpected(token)}function lookaheadPropertyName(){switch(lookahead.type){case Token.Identifier:case Token.StringLiteral:case Token.BooleanLiteral:case Token.NullLiteral:case Token.NumericLiteral:case Token.Keyword:return true;case Token.Punctuator:return lookahead.value==="["}return false}function tryParseMethodDefinition(token,key,computed,marker){var value,options,methodMarker;if(token.type===Token.Identifier){if(token.value==="get"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");expect(")");value=parsePropertyFunction({params:[],stricted:null,firstRestricted:null,message:null},{marker:methodMarker});return markerApply(marker,astNodeFactory.createProperty("get",key,value,false,false,computed))}else if(token.value==="set"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");options={params:[],defaultCount:0,stricted:null,firstRestricted:null,paramSet:new StringMap};if(match(")")){throwErrorTolerant(lookahead,Messages.UnexpectedToken,lookahead.value)}else{parseParam(options)}expect(")");value=parsePropertyFunction(options,{marker:methodMarker});return markerApply(marker,astNodeFactory.createProperty("set",key,value,false,false,computed))}}if(match("(")){value=parsePropertyMethodFunction();return markerApply(marker,astNodeFactory.createProperty("init",key,value,true,false,computed))}return null}function parseGeneratorProperty(key,marker){var computed=lookahead.type===Token.Punctuator&&lookahead.value==="[";if(!match("(")){throwUnexpected(lex())}return markerApply(marker,astNodeFactory.createProperty("init",key,parsePropertyMethodFunction({generator:true}),true,false,computed))}function parseObjectProperty(){var token,key,id,computed,methodMarker,options;var allowComputed=extra.ecmaFeatures.objectLiteralComputedProperties,allowMethod=extra.ecmaFeatures.objectLiteralShorthandMethods,allowShorthand=extra.ecmaFeatures.objectLiteralShorthandProperties,allowGenerators=extra.ecmaFeatures.generators,allowDestructuring=extra.ecmaFeatures.destructuring,marker=markerCreate();token=lookahead;computed=token.value==="["&&token.type===Token.Punctuator;if(token.type===Token.Identifier||allowComputed&&computed){id=parseObjectPropertyKey();if(token.value==="get"&&!(match(":")||match("(")||match(",")||match("}"))){computed=lookahead.value==="[";key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");expect(")");return markerApply(marker,astNodeFactory.createProperty("get",key,parsePropertyFunction({generator:false},{marker:methodMarker}),false,false,computed))}if(token.value==="set"&&!(match(":")||match("(")||match(",")||match("}"))){computed=lookahead.value==="[";key=parseObjectPropertyKey();methodMarker=markerCreate();expect("(");options={params:[],defaultCount:0,stricted:null,firstRestricted:null,paramSet:new StringMap};if(match(")")){throwErrorTolerant(lookahead,Messages.UnexpectedToken,lookahead.value)}else{parseParam(options)}expect(")");return markerApply(marker,astNodeFactory.createProperty("set",key,parsePropertyFunction(options,{marker:methodMarker}),false,false,computed))}if(match(":")){lex();return markerApply(marker,astNodeFactory.createProperty("init",id,parseAssignmentExpression(),false,false,computed))}if(allowMethod&&match("(")){return markerApply(marker,astNodeFactory.createProperty("init",id,parsePropertyMethodFunction({generator:false}),true,false,computed))}if(allowDestructuring&&match("=")){lex();var value=parseAssignmentExpression();var prop=markerApply(marker,astNodeFactory.createAssignmentExpression("=",id,value));prop.type=astNodeTypes.AssignmentPattern;var fullProperty=astNodeFactory.createProperty("init",id,prop,false,true,computed);return markerApply(marker,fullProperty)}if(computed||!allowShorthand&&!allowDestructuring){throwUnexpected(lookahead)}return markerApply(marker,astNodeFactory.createProperty("init",id,id,false,true,false))}if(token.type===Token.EOF||token.type===Token.Punctuator){if(!allowGenerators||!match("*")||!allowMethod){throwUnexpected(token)}lex();id=parseObjectPropertyKey();return parseGeneratorProperty(id,marker);
}key=parseObjectPropertyKey();if(match(":")){lex();return markerApply(marker,astNodeFactory.createProperty("init",key,parseAssignmentExpression(),false,false,false))}if(allowMethod&&match("(")){return markerApply(marker,astNodeFactory.createProperty("init",key,parsePropertyMethodFunction(),true,false,false))}throwUnexpected(lex())}function getFieldName(key){var toString=String;if(key.type===astNodeTypes.Identifier){return key.name}return toString(key.value)}function parseObjectInitialiser(){var marker=markerCreate(),allowDuplicates=extra.ecmaFeatures.objectLiteralDuplicateProperties,properties=[],property,name,propertyFn,kind,storedKind,previousInObjectLiteral=state.inObjectLiteral,kindMap=new StringMap;state.inObjectLiteral=true;expect("{");while(!match("}")){property=parseObjectProperty();if(!property.computed){name=getFieldName(property.key);propertyFn=property.kind==="get"?PropertyKind.Get:PropertyKind.Set;kind=property.kind==="init"?PropertyKind.Data:propertyFn;if(kindMap.has(name)){storedKind=kindMap.get(name);if(storedKind===PropertyKind.Data){if(kind===PropertyKind.Data&&name==="__proto__"&&allowDuplicates){throwErrorTolerant({},Messages.DuplicatePrototypeProperty)}else if(strict&&kind===PropertyKind.Data&&!allowDuplicates){throwErrorTolerant({},Messages.StrictDuplicateProperty)}else if(kind!==PropertyKind.Data){throwErrorTolerant({},Messages.AccessorDataProperty)}}else{if(kind===PropertyKind.Data){throwErrorTolerant({},Messages.AccessorDataProperty)}else if(storedKind&kind){throwErrorTolerant({},Messages.AccessorGetSet)}}kindMap.set(name,storedKind|kind)}else{kindMap.set(name,kind)}}properties.push(property);if(!match("}")){expect(",")}}expect("}");state.inObjectLiteral=previousInObjectLiteral;return markerApply(marker,astNodeFactory.createObjectExpression(properties))}function parseTemplateElement(option){var marker,token;if(lookahead.type!==Token.Template||option.head&&!lookahead.head){throwError({},Messages.UnexpectedToken,"ILLEGAL")}marker=markerCreate();token=lex();return markerApply(marker,astNodeFactory.createTemplateElement({raw:token.value.raw,cooked:token.value.cooked},token.tail))}function parseTemplateLiteral(){var quasi,quasis,expressions,marker=markerCreate();quasi=parseTemplateElement({head:true});quasis=[quasi];expressions=[];while(!quasi.tail){expressions.push(parseExpression());quasi=parseTemplateElement({head:false});quasis.push(quasi)}return markerApply(marker,astNodeFactory.createTemplateLiteral(quasis,expressions))}function parseGroupExpression(){var expr;expect("(");++state.parenthesisCount;expr=parseExpression();expect(")");return expr}function parsePrimaryExpression(){var type,token,expr,marker,allowJSX=extra.ecmaFeatures.jsx,allowClasses=extra.ecmaFeatures.classes,allowSuper=allowClasses||extra.ecmaFeatures.superInFunctions;if(match("(")){return parseGroupExpression()}if(match("[")){return parseArrayInitialiser()}if(match("{")){return parseObjectInitialiser()}if(allowJSX&&match("<")){return parseJSXElement()}type=lookahead.type;marker=markerCreate();if(type===Token.Identifier){expr=astNodeFactory.createIdentifier(lex().value)}else if(type===Token.StringLiteral||type===Token.NumericLiteral){if(strict&&lookahead.octal){throwErrorTolerant(lookahead,Messages.StrictOctalLiteral)}expr=astNodeFactory.createLiteralFromSource(lex(),source)}else if(type===Token.Keyword){if(matchKeyword("function")){return parseFunctionExpression()}if(allowSuper&&matchKeyword("super")&&state.inFunctionBody){marker=markerCreate();lex();return markerApply(marker,astNodeFactory.createSuper())}if(matchKeyword("this")){marker=markerCreate();lex();return markerApply(marker,astNodeFactory.createThisExpression())}if(allowClasses&&matchKeyword("class")){return parseClassExpression()}throwUnexpected(lex())}else if(type===Token.BooleanLiteral){token=lex();token.value=token.value==="true";expr=astNodeFactory.createLiteralFromSource(token,source)}else if(type===Token.NullLiteral){token=lex();token.value=null;expr=astNodeFactory.createLiteralFromSource(token,source)}else if(match("/")||match("/=")){if(typeof extra.tokens!=="undefined"){expr=astNodeFactory.createLiteralFromSource(collectRegex(),source)}else{expr=astNodeFactory.createLiteralFromSource(scanRegExp(),source)}peek()}else if(type===Token.Template){return parseTemplateLiteral()}else{throwUnexpected(lex())}return markerApply(marker,expr)}function parseArguments(){var args=[],arg;expect("(");if(!match(")")){while(index<length){arg=parseSpreadOrAssignmentExpression();args.push(arg);if(match(")")){break}expect(",")}}expect(")");return args}function parseSpreadOrAssignmentExpression(){if(match("...")){var marker=markerCreate();lex();return markerApply(marker,astNodeFactory.createSpreadElement(parseAssignmentExpression()))}return parseAssignmentExpression()}function parseNonComputedProperty(){var token,marker=markerCreate();token=lex();if(!isIdentifierName(token)){throwUnexpected(token)}return markerApply(marker,astNodeFactory.createIdentifier(token.value))}function parseNonComputedMember(){expect(".");return parseNonComputedProperty()}function parseComputedMember(){var expr;expect("[");expr=parseExpression();expect("]");return expr}function parseNewExpression(){var callee,args,marker=markerCreate();expectKeyword("new");callee=parseLeftHandSideExpression();args=match("(")?parseArguments():[];return markerApply(marker,astNodeFactory.createNewExpression(callee,args))}function parseLeftHandSideExpressionAllowCall(){var expr,args,previousAllowIn=state.allowIn,marker=markerCreate();state.allowIn=true;expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();state.allowIn=previousAllowIn;while(match(".")||match("[")||match("(")||lookahead.type===Token.Template&&lookahead.head){if(match("(")){args=parseArguments();expr=markerApply(marker,astNodeFactory.createCallExpression(expr,args))}else if(match("[")){expr=markerApply(marker,astNodeFactory.createMemberExpression("[",expr,parseComputedMember()))}else if(match(".")){expr=markerApply(marker,astNodeFactory.createMemberExpression(".",expr,parseNonComputedMember()))}else{expr=markerApply(marker,astNodeFactory.createTaggedTemplateExpression(expr,parseTemplateLiteral()))}}return expr}function parseLeftHandSideExpression(){var expr,previousAllowIn=state.allowIn,marker=markerCreate();expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();state.allowIn=previousAllowIn;while(match(".")||match("[")||lookahead.type===Token.Template&&lookahead.head){if(match("[")){expr=markerApply(marker,astNodeFactory.createMemberExpression("[",expr,parseComputedMember()))}else if(match(".")){expr=markerApply(marker,astNodeFactory.createMemberExpression(".",expr,parseNonComputedMember()))}else{expr=markerApply(marker,astNodeFactory.createTaggedTemplateExpression(expr,parseTemplateLiteral()))}}return expr}function parsePostfixExpression(){var expr,token,marker=markerCreate();expr=parseLeftHandSideExpressionAllowCall();if(lookahead.type===Token.Punctuator){if((match("++")||match("--"))&&!peekLineTerminator()){if(strict&&expr.type===astNodeTypes.Identifier&&syntax.isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.StrictLHSPostfix)}if(!isLeftHandSide(expr)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}token=lex();expr=markerApply(marker,astNodeFactory.createPostfixExpression(token.value,expr))}}return expr}function parseUnaryExpression(){var token,expr,marker;if(lookahead.type!==Token.Punctuator&&lookahead.type!==Token.Keyword){expr=parsePostfixExpression()}else if(match("++")||match("--")){marker=markerCreate();token=lex();expr=parseUnaryExpression();if(strict&&expr.type===astNodeTypes.Identifier&&syntax.isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.StrictLHSPrefix)}if(!isLeftHandSide(expr)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}expr=astNodeFactory.createUnaryExpression(token.value,expr);expr=markerApply(marker,expr)}else if(match("+")||match("-")||match("~")||match("!")){marker=markerCreate();token=lex();expr=parseUnaryExpression();expr=astNodeFactory.createUnaryExpression(token.value,expr);expr=markerApply(marker,expr)}else if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof")){marker=markerCreate();token=lex();expr=parseUnaryExpression();expr=astNodeFactory.createUnaryExpression(token.value,expr);expr=markerApply(marker,expr);if(strict&&expr.operator==="delete"&&expr.argument.type===astNodeTypes.Identifier){throwErrorTolerant({},Messages.StrictDelete)}}else{expr=parsePostfixExpression()}return expr}function binaryPrecedence(token,allowIn){var prec=0;if(token.type!==Token.Punctuator&&token.type!==Token.Keyword){return 0}switch(token.value){case"||":prec=1;break;case"&&":prec=2;break;case"|":prec=3;break;case"^":prec=4;break;case"&":prec=5;break;case"==":case"!=":case"===":case"!==":prec=6;break;case"<":case">":case"<=":case">=":case"instanceof":prec=7;break;case"in":prec=allowIn?7:0;break;case"<<":case">>":case">>>":prec=8;break;case"+":case"-":prec=9;break;case"*":case"/":case"%":prec=11;break;default:break}return prec}function parseBinaryExpression(){var expr,token,prec,previousAllowIn,stack,right,operator,left,i,marker,markers;previousAllowIn=state.allowIn;state.allowIn=true;marker=markerCreate();left=parseUnaryExpression();token=lookahead;prec=binaryPrecedence(token,previousAllowIn);if(prec===0){return left}token.prec=prec;lex();markers=[marker,markerCreate()];right=parseUnaryExpression();stack=[left,token,right];while((prec=binaryPrecedence(lookahead,previousAllowIn))>0){while(stack.length>2&&prec<=stack[stack.length-2].prec){right=stack.pop();operator=stack.pop().value;left=stack.pop();expr=astNodeFactory.createBinaryExpression(operator,left,right);markers.pop();marker=markers.pop();markerApply(marker,expr);stack.push(expr);markers.push(marker)}token=lex();token.prec=prec;stack.push(token);markers.push(markerCreate());expr=parseUnaryExpression();stack.push(expr)}state.allowIn=previousAllowIn;i=stack.length-1;expr=stack[i];markers.pop();while(i>1){expr=astNodeFactory.createBinaryExpression(stack[i-1].value,stack[i-2],expr);i-=2;marker=markers.pop();markerApply(marker,expr)}return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent,alternate,marker=markerCreate();expr=parseBinaryExpression();if(match("?")){lex();previousAllowIn=state.allowIn;state.allowIn=true;consequent=parseAssignmentExpression();state.allowIn=previousAllowIn;expect(":");alternate=parseAssignmentExpression();expr=astNodeFactory.createConditionalExpression(expr,consequent,alternate);markerApply(marker,expr)}return expr}function parseConciseBody(){if(match("{")){return parseFunctionSourceElements()}return parseAssignmentExpression()}function reinterpretAsCoverFormalsList(expressions){var i,len,param,params,options,allowRestParams=extra.ecmaFeatures.restParams;params=[];options={paramSet:new StringMap};for(i=0,len=expressions.length;i<len;i+=1){param=expressions[i];if(param.type===astNodeTypes.Identifier){params.push(param);validateParam(options,param,param.name)}else if(param.type===astNodeTypes.ObjectExpression||param.type===astNodeTypes.ArrayExpression){reinterpretAsDestructuredParameter(options,param);params.push(param)}else if(param.type===astNodeTypes.SpreadElement){assert(i===len-1,"It is guaranteed that SpreadElement is last element by parseExpression");if(param.argument.type!==astNodeTypes.Identifier){throwError({},Messages.UnexpectedToken,"[")}if(!allowRestParams){throwError({},Messages.UnexpectedToken,".")}reinterpretAsDestructuredParameter(options,param.argument);param.type=astNodeTypes.RestElement;params.push(param)}else if(param.type===astNodeTypes.RestElement){params.push(param);validateParam(options,param.argument,param.argument.name)}else if(param.type===astNodeTypes.AssignmentExpression){param.type=astNodeTypes.AssignmentPattern;delete param.operator;params.push(param);validateParam(options,param.left,param.left.name)}else{return null}}if(options.message===Messages.StrictParamDupe){throwError(strict?options.stricted:options.firstRestricted,options.message)}return{params:params,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseArrowFunctionExpression(options,marker){var previousStrict,body;expect("=>");previousStrict=strict;body=parseConciseBody();if(strict&&options.firstRestricted){throwError(options.firstRestricted,options.message)}if(strict&&options.stricted){throwErrorTolerant(options.stricted,options.message)}strict=previousStrict;return markerApply(marker,astNodeFactory.createArrowFunctionExpression(options.params,body,body.type!==astNodeTypes.BlockStatement))}function reinterpretAsAssignmentBindingPattern(expr){var i,len,property,element,allowDestructuring=extra.ecmaFeatures.destructuring;if(!allowDestructuring){throwUnexpected(lex())}if(expr.type===astNodeTypes.ObjectExpression){expr.type=astNodeTypes.ObjectPattern;for(i=0,len=expr.properties.length;i<len;i+=1){property=expr.properties[i];if(property.kind!=="init"){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}reinterpretAsAssignmentBindingPattern(property.value)}}else if(expr.type===astNodeTypes.ArrayExpression){expr.type=astNodeTypes.ArrayPattern;for(i=0,len=expr.elements.length;i<len;i+=1){element=expr.elements[i];if(element){reinterpretAsAssignmentBindingPattern(element)}}}else if(expr.type===astNodeTypes.Identifier){if(syntax.isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}}else if(expr.type===astNodeTypes.SpreadElement){reinterpretAsAssignmentBindingPattern(expr.argument);if(expr.argument.type===astNodeTypes.ObjectPattern){throwErrorTolerant({},Messages.ObjectPatternAsSpread)}}else if(expr.type==="AssignmentExpression"&&expr.operator==="="){expr.type=astNodeTypes.AssignmentPattern}else{if(expr.type!==astNodeTypes.MemberExpression&&expr.type!==astNodeTypes.CallExpression&&expr.type!==astNodeTypes.NewExpression&&expr.type!==astNodeTypes.AssignmentPattern){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}}}function reinterpretAsDestructuredParameter(options,expr){var i,len,property,element,allowDestructuring=extra.ecmaFeatures.destructuring;if(!allowDestructuring){throwUnexpected(lex())}if(expr.type===astNodeTypes.ObjectExpression){expr.type=astNodeTypes.ObjectPattern;for(i=0,len=expr.properties.length;i<len;i+=1){property=expr.properties[i];if(property.kind!=="init"){throwErrorTolerant({},Messages.InvalidLHSInFormalsList)}reinterpretAsDestructuredParameter(options,property.value)}}else if(expr.type===astNodeTypes.ArrayExpression){expr.type=astNodeTypes.ArrayPattern;for(i=0,len=expr.elements.length;i<len;i+=1){element=expr.elements[i];if(element){reinterpretAsDestructuredParameter(options,element)}}}else if(expr.type===astNodeTypes.Identifier){validateParam(options,expr,expr.name)}else if(expr.type===astNodeTypes.SpreadElement){if(expr.argument.type!==astNodeTypes.Identifier){throwErrorTolerant({},Messages.InvalidLHSInFormalsList)}validateParam(options,expr.argument,expr.argument.name)}else if(expr.type===astNodeTypes.AssignmentExpression&&expr.operator==="="){expr.type=astNodeTypes.AssignmentPattern}else if(expr.type!==astNodeTypes.AssignmentPattern){throwError({},Messages.InvalidLHSInFormalsList)}}function parseAssignmentExpression(){var token,left,right,node,params,marker,startsWithParen=false,oldParenthesisCount=state.parenthesisCount,allowGenerators=extra.ecmaFeatures.generators;if(allowGenerators&&(state.yieldAllowed&&matchContextualKeyword("yield")||strict&&matchKeyword("yield"))){return parseYieldExpression()}marker=markerCreate();if(match("(")){token=lookahead2();if(token.value===")"&&token.type===Token.Punctuator||token.value==="..."){params=parseParams();if(!match("=>")){throwUnexpected(lex())}return parseArrowFunctionExpression(params,marker)}startsWithParen=true}token=lookahead;node=left=parseConditionalExpression();if(match("=>")&&(state.parenthesisCount===oldParenthesisCount||state.parenthesisCount===oldParenthesisCount+1)){if(node.type===astNodeTypes.Identifier){params=reinterpretAsCoverFormalsList([node])}else if(node.type===astNodeTypes.AssignmentExpression||node.type===astNodeTypes.ArrayExpression||node.type===astNodeTypes.ObjectExpression){if(!startsWithParen){throwUnexpected(lex())}params=reinterpretAsCoverFormalsList([node])}else if(node.type===astNodeTypes.SequenceExpression){params=reinterpretAsCoverFormalsList(node.expressions)}if(params){return parseArrowFunctionExpression(params,marker)}}if(matchAssign()){if(strict&&left.type===astNodeTypes.Identifier&&syntax.isRestrictedWord(left.name)){throwErrorTolerant(token,Messages.StrictLHSAssignment)}if(match("=")&&(node.type===astNodeTypes.ObjectExpression||node.type===astNodeTypes.ArrayExpression)){reinterpretAsAssignmentBindingPattern(node)}else if(!isLeftHandSide(node)){throwErrorTolerant({},Messages.InvalidLHSInAssignment)}token=lex();right=parseAssignmentExpression();node=markerApply(marker,astNodeFactory.createAssignmentExpression(token.value,left,right))}return node}function parseExpression(){var marker=markerCreate(),expr=parseAssignmentExpression(),expressions=[expr],sequence,spreadFound;if(match(",")){while(index<length){if(!match(",")){break}lex();expr=parseSpreadOrAssignmentExpression();expressions.push(expr);if(expr.type===astNodeTypes.SpreadElement){spreadFound=true;if(!match(")")){throwError({},Messages.ElementAfterSpreadElement)}break}}sequence=markerApply(marker,astNodeFactory.createSequenceExpression(expressions))}if(spreadFound&&lookahead2().value!=="=>"){throwError({},Messages.IllegalSpread)}return sequence||expr}function parseStatementList(){var list=[],statement;while(index<length){if(match("}")){break}statement=parseSourceElement();if(typeof statement==="undefined"){break}list.push(statement)}return list}function parseBlock(){var block,marker=markerCreate();expect("{");block=parseStatementList();expect("}");return markerApply(marker,astNodeFactory.createBlockStatement(block))}function parseVariableIdentifier(){var token,marker=markerCreate();token=lex();if(token.type!==Token.Identifier){if(strict&&token.type===Token.Keyword&&syntax.isStrictModeReservedWord(token.value,extra.ecmaFeatures)){throwErrorTolerant(token,Messages.StrictReservedWord)}else{throwUnexpected(token)}}return markerApply(marker,astNodeFactory.createIdentifier(token.value))}function parseVariableDeclaration(kind){var id,marker=markerCreate(),init=null;if(match("{")){id=parseObjectInitialiser();reinterpretAsAssignmentBindingPattern(id)}else if(match("[")){id=parseArrayInitialiser();reinterpretAsAssignmentBindingPattern(id)}else{id=state.allowKeyword?parseNonComputedProperty():parseVariableIdentifier();if(strict&&syntax.isRestrictedWord(id.name)){throwErrorTolerant({},Messages.StrictVarName)}}if(kind==="const"){if(!match("=")){throwError({},Messages.NoUnintializedConst)}expect("=");init=parseAssignmentExpression()}else if(match("=")){lex();init=parseAssignmentExpression()}return markerApply(marker,astNodeFactory.createVariableDeclarator(id,init))}function parseVariableDeclarationList(kind){var list=[];do{list.push(parseVariableDeclaration(kind));if(!match(",")){break}lex()}while(index<length);return list}function parseVariableStatement(){var declarations;expectKeyword("var");declarations=parseVariableDeclarationList();consumeSemicolon();return astNodeFactory.createVariableDeclaration(declarations,"var")}function parseConstLetDeclaration(kind){var declarations,marker=markerCreate();expectKeyword(kind);declarations=parseVariableDeclarationList(kind);consumeSemicolon();return markerApply(marker,astNodeFactory.createVariableDeclaration(declarations,kind))}function parseRestElement(){var param,marker=markerCreate();lex();if(match("{")){throwError(lookahead,Messages.ObjectPatternAsRestParameter)}param=parseVariableIdentifier();if(match("=")){throwError(lookahead,Messages.DefaultRestParameter)}if(!match(")")){throwError(lookahead,Messages.ParameterAfterRestParameter)}return markerApply(marker,astNodeFactory.createRestElement(param))}function parseEmptyStatement(){expect(";");return astNodeFactory.createEmptyStatement()}function parseExpressionStatement(){var expr=parseExpression();consumeSemicolon();return astNodeFactory.createExpressionStatement(expr)}function parseIfStatement(){var test,consequent,alternate;expectKeyword("if");expect("(");test=parseExpression();expect(")");consequent=parseStatement();if(matchKeyword("else")){lex();alternate=parseStatement()}else{alternate=null}return astNodeFactory.createIfStatement(test,consequent,alternate)}function parseDoWhileStatement(){var body,test,oldInIteration;expectKeyword("do");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");if(match(";")){lex()}return astNodeFactory.createDoWhileStatement(test,body)}function parseWhileStatement(){var test,body,oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;return astNodeFactory.createWhileStatement(test,body)}function parseForVariableDeclaration(){var token,declarations,marker=markerCreate();token=lex();declarations=parseVariableDeclarationList();return markerApply(marker,astNodeFactory.createVariableDeclaration(declarations,token.value))}function parseForStatement(opts){var init,test,update,left,right,body,operator,oldInIteration;var allowForOf=extra.ecmaFeatures.forOf,allowBlockBindings=extra.ecmaFeatures.blockBindings;init=test=update=null;expectKeyword("for");expect("(");if(match(";")){lex()}else{if(matchKeyword("var")||allowBlockBindings&&(matchKeyword("let")||matchKeyword("const"))){state.allowIn=false;init=parseForVariableDeclaration();state.allowIn=true;if(init.declarations.length===1){if(matchKeyword("in")||allowForOf&&matchContextualKeyword("of")){operator=lookahead;if(!((operator.value==="in"||init.kind!=="var")&&init.declarations[0].init)){lex();left=init;right=parseExpression();init=null}}}}else{state.allowIn=false;init=parseExpression();state.allowIn=true;if(allowForOf&&matchContextualKeyword("of")){operator=lex();left=init;right=parseExpression();init=null}else if(matchKeyword("in")){if(!isLeftHandSide(init)){throwErrorTolerant({},Messages.InvalidLHSInForIn)}operator=lex();left=init;right=parseExpression();init=null}}if(typeof left==="undefined"){expect(";")}}if(typeof left==="undefined"){if(!match(";")){test=parseExpression()}expect(";");if(!match(")")){update=parseExpression()}}expect(")");oldInIteration=state.inIteration;state.inIteration=true;if(!(opts!==undefined&&opts.ignoreBody)){body=parseStatement()}state.inIteration=oldInIteration;if(typeof left==="undefined"){return astNodeFactory.createForStatement(init,test,update,body)}if(extra.ecmaFeatures.forOf&&operator.value==="of"){return astNodeFactory.createForOfStatement(left,right,body)}return astNodeFactory.createForInStatement(left,right,body)}function parseContinueStatement(){var label=null;expectKeyword("continue");if(source.charCodeAt(index)===59){lex();if(!state.inIteration){throwError({},Messages.IllegalContinue)}return astNodeFactory.createContinueStatement(null)}if(peekLineTerminator()){if(!state.inIteration){throwError({},Messages.IllegalContinue)}return astNodeFactory.createContinueStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();if(!state.labelSet.has(label.name)){throwError({},Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!state.inIteration){throwError({},Messages.IllegalContinue)}return astNodeFactory.createContinueStatement(label)}function parseBreakStatement(){var label=null;expectKeyword("break");if(source.charCodeAt(index)===59){lex();if(!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return astNodeFactory.createBreakStatement(null)}if(peekLineTerminator()){if(!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return astNodeFactory.createBreakStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();if(!state.labelSet.has(label.name)){throwError({},Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return astNodeFactory.createBreakStatement(label)}function parseReturnStatement(){var argument=null;expectKeyword("return");if(!state.inFunctionBody&&!extra.ecmaFeatures.globalReturn){throwErrorTolerant({},Messages.IllegalReturn)}if(source.charCodeAt(index)===32){if(syntax.isIdentifierStart(source.charCodeAt(index+1))){argument=parseExpression();consumeSemicolon();return astNodeFactory.createReturnStatement(argument)}}if(peekLineTerminator()){return astNodeFactory.createReturnStatement(null)}if(!match(";")){if(!match("}")&&lookahead.type!==Token.EOF){argument=parseExpression()}}consumeSemicolon();return astNodeFactory.createReturnStatement(argument)}function parseWithStatement(){var object,body;if(strict){skipComment();throwErrorTolerant({},Messages.StrictModeWith)}expectKeyword("with");expect("(");object=parseExpression();expect(")");body=parseStatement();return astNodeFactory.createWithStatement(object,body)}function parseSwitchCase(){var test,consequent=[],statement,marker=markerCreate();if(matchKeyword("default")){lex();test=null}else{expectKeyword("case");test=parseExpression()}expect(":");while(index<length){if(match("}")||matchKeyword("default")||matchKeyword("case")){break}statement=parseSourceElement();if(typeof statement==="undefined"){break}consequent.push(statement)}return markerApply(marker,astNodeFactory.createSwitchCase(test,consequent))}function parseSwitchStatement(){var discriminant,cases,clause,oldInSwitch,defaultFound;expectKeyword("switch");expect("(");discriminant=parseExpression();expect(")");expect("{");cases=[];if(match("}")){lex();return astNodeFactory.createSwitchStatement(discriminant,cases)}oldInSwitch=state.inSwitch;state.inSwitch=true;defaultFound=false;while(index<length){if(match("}")){break}clause=parseSwitchCase();if(clause.test===null){if(defaultFound){throwError({},Messages.MultipleDefaultsInSwitch)}defaultFound=true}cases.push(clause)}state.inSwitch=oldInSwitch;expect("}");return astNodeFactory.createSwitchStatement(discriminant,cases)}function parseThrowStatement(){var argument;expectKeyword("throw");if(peekLineTerminator()){throwError({},Messages.NewlineAfterThrow)}argument=parseExpression();consumeSemicolon();return astNodeFactory.createThrowStatement(argument)}function parseCatchClause(){var param,body,marker=markerCreate(),allowDestructuring=extra.ecmaFeatures.destructuring,options={paramSet:new StringMap};expectKeyword("catch");expect("(");if(match(")")){throwUnexpected(lookahead)}if(match("[")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseArrayInitialiser();reinterpretAsDestructuredParameter(options,param)}else if(match("{")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseObjectInitialiser();reinterpretAsDestructuredParameter(options,param)}else{param=parseVariableIdentifier()}if(strict&&param.name&&syntax.isRestrictedWord(param.name)){throwErrorTolerant({},Messages.StrictCatchVariable)}expect(")");body=parseBlock();return markerApply(marker,astNodeFactory.createCatchClause(param,body))}function parseTryStatement(){var block,handler=null,finalizer=null;expectKeyword("try");block=parseBlock();if(matchKeyword("catch")){handler=parseCatchClause()}if(matchKeyword("finally")){lex();finalizer=parseBlock()}if(!handler&&!finalizer){throwError({},Messages.NoCatchOrFinally)}return astNodeFactory.createTryStatement(block,handler,finalizer)}function parseDebuggerStatement(){expectKeyword("debugger");consumeSemicolon();return astNodeFactory.createDebuggerStatement()}function parseStatement(){var type=lookahead.type,expr,labeledBody,marker;if(type===Token.EOF){throwUnexpected(lookahead)}if(type===Token.Punctuator&&lookahead.value==="{"){return parseBlock()}marker=markerCreate();if(type===Token.Punctuator){switch(lookahead.value){case";":return markerApply(marker,parseEmptyStatement());case"{":return parseBlock();case"(":return markerApply(marker,parseExpressionStatement());default:break}}marker=markerCreate();if(type===Token.Keyword){switch(lookahead.value){case"break":return markerApply(marker,parseBreakStatement());case"continue":return markerApply(marker,parseContinueStatement());case"debugger":return markerApply(marker,parseDebuggerStatement());case"do":return markerApply(marker,parseDoWhileStatement());case"for":return markerApply(marker,parseForStatement());case"function":return markerApply(marker,parseFunctionDeclaration());case"if":return markerApply(marker,parseIfStatement());case"return":return markerApply(marker,parseReturnStatement());case"switch":return markerApply(marker,parseSwitchStatement());case"throw":return markerApply(marker,parseThrowStatement());case"try":return markerApply(marker,parseTryStatement());case"var":return markerApply(marker,parseVariableStatement());case"while":return markerApply(marker,parseWhileStatement());case"with":return markerApply(marker,parseWithStatement());default:break}}marker=markerCreate();expr=parseExpression();if(expr.type===astNodeTypes.Identifier&&match(":")){lex();if(state.labelSet.has(expr.name)){throwError({},Messages.Redeclaration,"Label",expr.name)}state.labelSet.set(expr.name,true);labeledBody=parseStatement();state.labelSet.delete(expr.name);return markerApply(marker,astNodeFactory.createLabeledStatement(expr,labeledBody))}consumeSemicolon();return markerApply(marker,astNodeFactory.createExpressionStatement(expr))}function parseFunctionSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody,oldParenthesisCount,marker=markerCreate();expect("{");while(index<length){if(lookahead.type!==Token.StringLiteral){break}token=lookahead;sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==astNodeTypes.Literal){break}directive=source.slice(token.range[0]+1,token.range[1]-1);if(directive==="use strict"){strict=true;if(firstRestricted){throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}oldLabelSet=state.labelSet;oldInIteration=state.inIteration;oldInSwitch=state.inSwitch;oldInFunctionBody=state.inFunctionBody;oldParenthesisCount=state.parenthesizedCount;state.labelSet=new StringMap;state.inIteration=false;state.inSwitch=false;state.inFunctionBody=true;while(index<length){if(match("}")){break}sourceElement=parseSourceElement();if(typeof sourceElement==="undefined"){break}sourceElements.push(sourceElement)}expect("}");state.labelSet=oldLabelSet;state.inIteration=oldInIteration;state.inSwitch=oldInSwitch;state.inFunctionBody=oldInFunctionBody;state.parenthesizedCount=oldParenthesisCount;return markerApply(marker,astNodeFactory.createBlockStatement(sourceElements))}function validateParam(options,param,name){if(strict){if(syntax.isRestrictedWord(name)){options.stricted=param;options.message=Messages.StrictParamName}if(options.paramSet.has(name)){options.stricted=param;options.message=Messages.StrictParamDupe}}else if(!options.firstRestricted){if(syntax.isRestrictedWord(name)){options.firstRestricted=param;options.message=Messages.StrictParamName}else if(syntax.isStrictModeReservedWord(name,extra.ecmaFeatures)){options.firstRestricted=param;options.message=Messages.StrictReservedWord}else if(options.paramSet.has(name)){options.firstRestricted=param;options.message=Messages.StrictParamDupe}}options.paramSet.set(name,true)}function parseParam(options){var token,param,def,allowRestParams=extra.ecmaFeatures.restParams,allowDestructuring=extra.ecmaFeatures.destructuring,allowDefaultParams=extra.ecmaFeatures.defaultParams,marker=markerCreate();token=lookahead;if(token.value==="..."){if(!allowRestParams){throwUnexpected(lookahead);
}param=parseRestElement();validateParam(options,param.argument,param.argument.name);options.params.push(param);return false}if(match("[")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseArrayInitialiser();reinterpretAsDestructuredParameter(options,param)}else if(match("{")){if(!allowDestructuring){throwUnexpected(lookahead)}param=parseObjectInitialiser();reinterpretAsDestructuredParameter(options,param)}else{param=parseVariableIdentifier();validateParam(options,token,token.value)}if(match("=")){if(allowDefaultParams||allowDestructuring){lex();def=parseAssignmentExpression();++options.defaultCount}else{throwUnexpected(lookahead)}}if(def){options.params.push(markerApply(marker,astNodeFactory.createAssignmentPattern(param,def)))}else{options.params.push(param)}return!match(")")}function parseParams(firstRestricted){var options;options={params:[],defaultCount:0,firstRestricted:firstRestricted};expect("(");if(!match(")")){options.paramSet=new StringMap;while(index<length){if(!parseParam(options)){break}expect(",")}}expect(")");return{params:options.params,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseFunctionDeclaration(identifierIsOptional){var id=null,body,token,tmp,firstRestricted,message,previousStrict,previousYieldAllowed,generator,marker=markerCreate(),allowGenerators=extra.ecmaFeatures.generators;expectKeyword("function");generator=false;if(allowGenerators&&match("*")){lex();generator=true}if(!identifierIsOptional||!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(syntax.isRestrictedWord(token.value)){throwErrorTolerant(token,Messages.StrictFunctionName)}}else{if(syntax.isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(syntax.isStrictModeReservedWord(token.value,extra.ecmaFeatures)){firstRestricted=token;message=Messages.StrictReservedWord}}}tmp=parseParams(firstRestricted);firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousStrict=strict;previousYieldAllowed=state.yieldAllowed;state.yieldAllowed=generator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwError(firstRestricted,message)}if(strict&&tmp.stricted){throwErrorTolerant(tmp.stricted,message)}strict=previousStrict;state.yieldAllowed=previousYieldAllowed;return markerApply(marker,astNodeFactory.createFunctionDeclaration(id,tmp.params,body,generator,false))}function parseFunctionExpression(){var token,id=null,firstRestricted,message,tmp,body,previousStrict,previousYieldAllowed,generator,marker=markerCreate(),allowGenerators=extra.ecmaFeatures.generators;expectKeyword("function");generator=false;if(allowGenerators&&match("*")){lex();generator=true}if(!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(syntax.isRestrictedWord(token.value)){throwErrorTolerant(token,Messages.StrictFunctionName)}}else{if(syntax.isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(syntax.isStrictModeReservedWord(token.value,extra.ecmaFeatures)){firstRestricted=token;message=Messages.StrictReservedWord}}}tmp=parseParams(firstRestricted);firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousStrict=strict;previousYieldAllowed=state.yieldAllowed;state.yieldAllowed=generator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwError(firstRestricted,message)}if(strict&&tmp.stricted){throwErrorTolerant(tmp.stricted,message)}strict=previousStrict;state.yieldAllowed=previousYieldAllowed;return markerApply(marker,astNodeFactory.createFunctionExpression(id,tmp.params,body,generator,false))}function parseYieldExpression(){var yieldToken,delegateFlag,expr,marker=markerCreate();yieldToken=lex();assert(yieldToken.value==="yield","Called parseYieldExpression with non-yield lookahead.");if(!state.yieldAllowed){throwErrorTolerant({},Messages.IllegalYield)}delegateFlag=false;if(match("*")){lex();delegateFlag=true}if(peekLineTerminator()){return markerApply(marker,astNodeFactory.createYieldExpression(null,delegateFlag))}if(!match(";")&&!match(")")){if(!match("}")&&lookahead.type!==Token.EOF){expr=parseAssignmentExpression()}}return markerApply(marker,astNodeFactory.createYieldExpression(expr,delegateFlag))}function parseModuleSpecifier(){var marker=markerCreate(),specifier;if(lookahead.type!==Token.StringLiteral){throwError({},Messages.InvalidModuleSpecifier)}specifier=astNodeFactory.createLiteralFromSource(lex(),source);return markerApply(marker,specifier)}function parseExportSpecifier(){var exported,local,marker=markerCreate();if(matchKeyword("default")){lex();local=markerApply(marker,astNodeFactory.createIdentifier("default"))}else{local=parseVariableIdentifier()}if(matchContextualKeyword("as")){lex();exported=parseNonComputedProperty()}return markerApply(marker,astNodeFactory.createExportSpecifier(local,exported))}function parseExportNamedDeclaration(){var declaration=null,isExportFromIdentifier,src=null,specifiers=[],marker=markerCreate();expectKeyword("export");if(lookahead.type===Token.Keyword){switch(lookahead.value){case"let":case"const":case"var":case"class":case"function":declaration=parseSourceElement();return markerApply(marker,astNodeFactory.createExportNamedDeclaration(declaration,specifiers,null));default:break}}expect("{");if(!match("}")){do{isExportFromIdentifier=isExportFromIdentifier||matchKeyword("default");specifiers.push(parseExportSpecifier())}while(match(",")&&lex())}expect("}");if(matchContextualKeyword("from")){lex();src=parseModuleSpecifier();consumeSemicolon()}else if(isExportFromIdentifier){throwError({},lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}else{consumeSemicolon()}return markerApply(marker,astNodeFactory.createExportNamedDeclaration(declaration,specifiers,src))}function parseExportDefaultDeclaration(){var declaration=null,expression=null,possibleIdentifierToken,allowClasses=extra.ecmaFeatures.classes,marker=markerCreate();expectKeyword("export");expectKeyword("default");if(matchKeyword("function")||matchKeyword("class")){possibleIdentifierToken=lookahead2();if(possibleIdentifierToken.type===Token.Identifier){declaration=parseSourceElement();return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(declaration))}if(lookahead.value==="function"){declaration=parseFunctionDeclaration(true);return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(declaration))}else if(allowClasses&&lookahead.value==="class"){declaration=parseClassDeclaration(true);return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(declaration))}}if(matchContextualKeyword("from")){throwError({},Messages.UnexpectedToken,lookahead.value)}if(match("{")){expression=parseObjectInitialiser()}else if(match("[")){expression=parseArrayInitialiser()}else{expression=parseAssignmentExpression()}consumeSemicolon();return markerApply(marker,astNodeFactory.createExportDefaultDeclaration(expression))}function parseExportAllDeclaration(){var src,marker=markerCreate();expectKeyword("export");expect("*");if(!matchContextualKeyword("from")){throwError({},lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return markerApply(marker,astNodeFactory.createExportAllDeclaration(src))}function parseExportDeclaration(){if(state.inFunctionBody){throwError({},Messages.IllegalExportDeclaration)}var declarationType=lookahead2().value;if(declarationType==="default"){return parseExportDefaultDeclaration()}else if(declarationType==="*"){return parseExportAllDeclaration()}else{return parseExportNamedDeclaration()}}function parseImportSpecifier(){var local,imported,marker=markerCreate();imported=parseNonComputedProperty();if(matchContextualKeyword("as")){lex();local=parseVariableIdentifier()}return markerApply(marker,astNodeFactory.createImportSpecifier(local,imported))}function parseNamedImports(){var specifiers=[];expect("{");if(!match("}")){do{specifiers.push(parseImportSpecifier())}while(match(",")&&lex())}expect("}");return specifiers}function parseImportDefaultSpecifier(){var local,marker=markerCreate();local=parseNonComputedProperty();return markerApply(marker,astNodeFactory.createImportDefaultSpecifier(local))}function parseImportNamespaceSpecifier(){var local,marker=markerCreate();expect("*");if(!matchContextualKeyword("as")){throwError({},Messages.NoAsAfterImportNamespace)}lex();local=parseNonComputedProperty();return markerApply(marker,astNodeFactory.createImportNamespaceSpecifier(local))}function parseImportDeclaration(){var specifiers,src,marker=markerCreate();if(state.inFunctionBody){throwError({},Messages.IllegalImportDeclaration)}expectKeyword("import");specifiers=[];if(lookahead.type===Token.StringLiteral){src=parseModuleSpecifier();consumeSemicolon();return markerApply(marker,astNodeFactory.createImportDeclaration(specifiers,src))}if(!matchKeyword("default")&&isIdentifierName(lookahead)){specifiers.push(parseImportDefaultSpecifier());if(match(",")){lex()}}if(match("*")){specifiers.push(parseImportNamespaceSpecifier())}else if(match("{")){specifiers=specifiers.concat(parseNamedImports())}if(!matchContextualKeyword("from")){throwError({},lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return markerApply(marker,astNodeFactory.createImportDeclaration(specifiers,src))}function parseClassBody(){var hasConstructor=false,generator=false,allowGenerators=extra.ecmaFeatures.generators,token,isStatic,body=[],method,computed,key;var existingProps={},topMarker=markerCreate(),marker;existingProps.static=new StringMap;existingProps.prototype=new StringMap;expect("{");while(!match("}")){if(match(";")){lex();continue}token=lookahead;isStatic=false;generator=match("*");computed=match("[");marker=markerCreate();if(generator){if(!allowGenerators){throwUnexpected(lookahead)}lex()}key=parseObjectPropertyKey();if(key.name==="static"&&match("*")){if(!allowGenerators){throwUnexpected(lookahead)}generator=true;lex()}if(key.name==="static"&&lookaheadPropertyName()){token=lookahead;isStatic=true;computed=match("[");key=parseObjectPropertyKey()}if(generator){method=parseGeneratorProperty(key,marker)}else{method=tryParseMethodDefinition(token,key,computed,marker,generator)}if(method){method.static=isStatic;if(method.kind==="init"){method.kind="method"}if(!isStatic){if(!method.computed&&(method.key.name||method.key.value&&method.key.value.toString())==="constructor"){if(method.kind!=="method"||!method.method||method.value.generator){throwUnexpected(token,Messages.ConstructorSpecialMethod)}if(hasConstructor){throwUnexpected(token,Messages.DuplicateConstructor)}else{hasConstructor=true}method.kind="constructor"}}else{if(!method.computed&&(method.key.name||method.key.value.toString())==="prototype"){throwUnexpected(token,Messages.StaticPrototype)}}method.type=astNodeTypes.MethodDefinition;delete method.method;delete method.shorthand;body.push(method)}else{throwUnexpected(lookahead)}}lex();return markerApply(topMarker,astNodeFactory.createClassBody(body))}function parseClassExpression(){var id=null,superClass=null,marker=markerCreate(),previousStrict=strict,classBody;strict=true;expectKeyword("class");if(lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=parseLeftHandSideExpressionAllowCall()}classBody=parseClassBody();strict=previousStrict;return markerApply(marker,astNodeFactory.createClassExpression(id,superClass,classBody))}function parseClassDeclaration(identifierIsOptional){var id=null,superClass=null,marker=markerCreate(),previousStrict=strict,classBody;strict=true;expectKeyword("class");if(!identifierIsOptional||lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=parseLeftHandSideExpressionAllowCall()}classBody=parseClassBody();strict=previousStrict;return markerApply(marker,astNodeFactory.createClassDeclaration(id,superClass,classBody))}function parseSourceElement(){var allowClasses=extra.ecmaFeatures.classes,allowModules=extra.ecmaFeatures.modules,allowBlockBindings=extra.ecmaFeatures.blockBindings;if(lookahead.type===Token.Keyword){switch(lookahead.value){case"export":if(!allowModules){throwErrorTolerant({},Messages.IllegalExportDeclaration)}return parseExportDeclaration();case"import":if(!allowModules){throwErrorTolerant({},Messages.IllegalImportDeclaration)}return parseImportDeclaration();case"function":return parseFunctionDeclaration();case"class":if(allowClasses){return parseClassDeclaration()}break;case"const":case"let":if(allowBlockBindings){return parseConstLetDeclaration(lookahead.value)}default:return parseStatement()}}if(lookahead.type!==Token.EOF){return parseStatement()}}function parseSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted;while(index<length){token=lookahead;if(token.type!==Token.StringLiteral){break}sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==astNodeTypes.Literal){break}directive=source.slice(token.range[0]+1,token.range[1]-1);if(directive==="use strict"){strict=true;if(firstRestricted){throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}while(index<length){sourceElement=parseSourceElement();if(typeof sourceElement==="undefined"){break}sourceElements.push(sourceElement)}return sourceElements}function parseProgram(){var body,marker,isModule=!!extra.ecmaFeatures.modules;skipComment();peek();marker=markerCreate();strict=isModule;body=parseSourceElements();return markerApply(marker,astNodeFactory.createProgram(body,isModule?"module":"script"))}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=0;i<extra.tokens.length;++i){entry=extra.tokens[i];token={type:entry.type,value:entry.value};if(entry.regex){token.regex={pattern:entry.regex.pattern,flags:entry.regex.flags}}if(extra.range){token.range=entry.range}if(extra.loc){token.loc=entry.loc}tokens.push(token)}extra.tokens=tokens}function tokenize(code,options){var toString,tokens;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;lookahead=null;state={allowIn:true,labelSet:{},parenthesisCount:0,inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,yieldAllowed:false,curlyStack:[],curlyLastIndex:0,inJSXSpreadAttribute:false,inJSXChild:false,inJSXTag:false};extra={ecmaFeatures:defaultFeatures};options=options||{};options.tokens=true;extra.tokens=[];extra.tokenize=true;extra.openParenToken=-1;extra.openCurlyToken=-1;extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}if(options.ecmaFeatures&&typeof options.ecmaFeatures==="object"){extra.ecmaFeatures=options.ecmaFeatures}try{peek();if(lookahead.type===Token.EOF){return extra.tokens}lex();while(lookahead.type!==Token.EOF){try{lex()}catch(lexError){if(extra.errors){extra.errors.push(lexError);break}else{throw lexError}}}filterTokenLocation();tokens=extra.tokens;if(typeof extra.comments!=="undefined"){tokens.comments=extra.comments}if(typeof extra.errors!=="undefined"){tokens.errors=extra.errors}}catch(e){throw e}finally{extra={}}return tokens}function parse(code,options){var program,toString;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;lookahead=null;state={allowIn:true,labelSet:new StringMap,parenthesisCount:0,inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,yieldAllowed:false,curlyStack:[],curlyLastIndex:0,inJSXSpreadAttribute:false,inJSXChild:false,inJSXTag:false};extra={ecmaFeatures:Object.create(defaultFeatures)};state.curlyStack=[];if(typeof options!=="undefined"){extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;extra.attachComment=typeof options.attachComment==="boolean"&&options.attachComment;if(extra.loc&&options.source!==null&&options.source!==undefined){extra.source=toString(options.source)}if(typeof options.tokens==="boolean"&&options.tokens){extra.tokens=[]}if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}if(extra.attachComment){extra.range=true;extra.comments=[];commentAttachment.reset()}if(options.sourceType==="module"){extra.ecmaFeatures={arrowFunctions:true,blockBindings:true,regexUFlag:true,regexYFlag:true,templateStrings:true,binaryLiterals:true,octalLiterals:true,unicodeCodePointEscapes:true,superInFunctions:true,defaultParams:true,restParams:true,forOf:true,objectLiteralComputedProperties:true,objectLiteralShorthandMethods:true,objectLiteralShorthandProperties:true,objectLiteralDuplicateProperties:true,generators:true,destructuring:true,classes:true,modules:true}}if(options.ecmaFeatures&&typeof options.ecmaFeatures==="object"){if(options.sourceType==="module"){Object.keys(options.ecmaFeatures).forEach(function(key){extra.ecmaFeatures[key]=options.ecmaFeatures[key]})}else{extra.ecmaFeatures=options.ecmaFeatures}}}try{program=parseProgram();if(typeof extra.comments!=="undefined"){program.comments=extra.comments}if(typeof extra.tokens!=="undefined"){filterTokenLocation();program.tokens=extra.tokens}if(typeof extra.errors!=="undefined"){program.errors=extra.errors}}catch(e){throw e}finally{extra={}}return program}exports.version=require("./package.json").version;exports.tokenize=tokenize;exports.parse=parse;exports.Syntax=function(){var name,types={};if(typeof Object.create==="function"){types=Object.create(null)}for(name in astNodeTypes){if(astNodeTypes.hasOwnProperty(name)){types[name]=astNodeTypes[name]}}if(typeof Object.freeze==="function"){Object.freeze(types)}return types}()},{"./lib/ast-node-factory":4,"./lib/ast-node-types":5,"./lib/comment-attachment":6,"./lib/features":7,"./lib/messages":8,"./lib/string-map":9,"./lib/syntax":10,"./lib/token-info":11,"./lib/xhtml-entities":12,"./package.json":13}],4:[function(require,module,exports){"use strict";var astNodeTypes=require("./ast-node-types");module.exports={createArrayExpression:function(elements){return{type:astNodeTypes.ArrayExpression,elements:elements}},createArrowFunctionExpression:function(params,body,expression){return{type:astNodeTypes.ArrowFunctionExpression,id:null,params:params,body:body,generator:false,expression:expression}},createAssignmentExpression:function(operator,left,right){return{type:astNodeTypes.AssignmentExpression,operator:operator,left:left,right:right}},createAssignmentPattern:function(left,right){return{type:astNodeTypes.AssignmentPattern,left:left,right:right}},createBinaryExpression:function(operator,left,right){var type=operator==="||"||operator==="&&"?astNodeTypes.LogicalExpression:astNodeTypes.BinaryExpression;return{type:type,operator:operator,left:left,right:right}},createBlockStatement:function(body){return{type:astNodeTypes.BlockStatement,body:body}},createBreakStatement:function(label){return{type:astNodeTypes.BreakStatement,label:label}},createCallExpression:function(callee,args){return{type:astNodeTypes.CallExpression,callee:callee,arguments:args}},createCatchClause:function(param,body){return{type:astNodeTypes.CatchClause,param:param,body:body}},createClassBody:function(body){return{type:astNodeTypes.ClassBody,body:body}},createClassExpression:function(id,superClass,body){return{type:astNodeTypes.ClassExpression,id:id,superClass:superClass,body:body}},createClassDeclaration:function(id,superClass,body){return{type:astNodeTypes.ClassDeclaration,id:id,superClass:superClass,body:body}},createMethodDefinition:function(propertyType,kind,key,value,computed){return{type:astNodeTypes.MethodDefinition,key:key,value:value,kind:kind,"static":propertyType==="static",computed:computed}},createConditionalExpression:function(test,consequent,alternate){return{type:astNodeTypes.ConditionalExpression,test:test,consequent:consequent,alternate:alternate}},createContinueStatement:function(label){return{type:astNodeTypes.ContinueStatement,label:label}},createDebuggerStatement:function(){return{type:astNodeTypes.DebuggerStatement}},createEmptyStatement:function(){return{type:astNodeTypes.EmptyStatement}},createExpressionStatement:function(expression){return{type:astNodeTypes.ExpressionStatement,expression:expression}},createWhileStatement:function(test,body){return{type:astNodeTypes.WhileStatement,test:test,body:body}},createDoWhileStatement:function(test,body){return{type:astNodeTypes.DoWhileStatement,body:body,test:test}},createForStatement:function(init,test,update,body){return{type:astNodeTypes.ForStatement,init:init,test:test,update:update,body:body}},createForInStatement:function(left,right,body){return{type:astNodeTypes.ForInStatement,left:left,right:right,body:body,each:false}},createForOfStatement:function(left,right,body){return{type:astNodeTypes.ForOfStatement,left:left,right:right,body:body}},createFunctionDeclaration:function(id,params,body,generator,expression){return{type:astNodeTypes.FunctionDeclaration,id:id,params:params||[],body:body,generator:!!generator,expression:!!expression}},createFunctionExpression:function(id,params,body,generator,expression){return{type:astNodeTypes.FunctionExpression,id:id,params:params||[],body:body,generator:!!generator,expression:!!expression}},createIdentifier:function(name){return{type:astNodeTypes.Identifier,name:name}},createIfStatement:function(test,consequent,alternate){return{type:astNodeTypes.IfStatement,test:test,consequent:consequent,alternate:alternate}},createLabeledStatement:function(label,body){return{type:astNodeTypes.LabeledStatement,label:label,body:body}},createLiteralFromSource:function(token,source){var node={type:astNodeTypes.Literal,value:token.value,raw:source.slice(token.range[0],token.range[1])};if(token.regex){node.regex=token.regex}return node},createTemplateElement:function(value,tail){return{type:astNodeTypes.TemplateElement,value:value,tail:tail}},createTemplateLiteral:function(quasis,expressions){return{type:astNodeTypes.TemplateLiteral,quasis:quasis,expressions:expressions}},createSpreadElement:function(argument){return{type:astNodeTypes.SpreadElement,argument:argument}},createTaggedTemplateExpression:function(tag,quasi){return{type:astNodeTypes.TaggedTemplateExpression,tag:tag,quasi:quasi}},createMemberExpression:function(accessor,object,property){return{type:astNodeTypes.MemberExpression,computed:accessor==="[",object:object,property:property}},createNewExpression:function(callee,args){return{type:astNodeTypes.NewExpression,callee:callee,arguments:args}},createObjectExpression:function(properties){return{type:astNodeTypes.ObjectExpression,properties:properties}},createPostfixExpression:function(operator,argument){return{type:astNodeTypes.UpdateExpression,operator:operator,argument:argument,prefix:false}},createProgram:function(body,sourceType){return{type:astNodeTypes.Program,body:body,sourceType:sourceType}},createProperty:function(kind,key,value,method,shorthand,computed){return{type:astNodeTypes.Property,key:key,value:value,kind:kind,method:method,shorthand:shorthand,computed:computed}},createRestElement:function(argument){return{type:astNodeTypes.RestElement,argument:argument}},createReturnStatement:function(argument){return{type:astNodeTypes.ReturnStatement,argument:argument}},createSequenceExpression:function(expressions){return{type:astNodeTypes.SequenceExpression,expressions:expressions}},createSuper:function(){return{type:astNodeTypes.Super}},createSwitchCase:function(test,consequent){return{type:astNodeTypes.SwitchCase,test:test,consequent:consequent}},createSwitchStatement:function(discriminant,cases){return{type:astNodeTypes.SwitchStatement,discriminant:discriminant,cases:cases}},createThisExpression:function(){return{type:astNodeTypes.ThisExpression}},createThrowStatement:function(argument){return{type:astNodeTypes.ThrowStatement,argument:argument}},createTryStatement:function(block,handler,finalizer){return{type:astNodeTypes.TryStatement,block:block,handler:handler,finalizer:finalizer}},createUnaryExpression:function(operator,argument){if(operator==="++"||operator==="--"){return{type:astNodeTypes.UpdateExpression,operator:operator,argument:argument,prefix:true}}return{type:astNodeTypes.UnaryExpression,operator:operator,argument:argument,prefix:true}},createVariableDeclaration:function(declarations,kind){return{type:astNodeTypes.VariableDeclaration,declarations:declarations,kind:kind}},createVariableDeclarator:function(id,init){return{type:astNodeTypes.VariableDeclarator,id:id,init:init}},createWithStatement:function(object,body){return{type:astNodeTypes.WithStatement,object:object,body:body}},createYieldExpression:function(argument,delegate){return{type:astNodeTypes.YieldExpression,argument:argument||null,delegate:delegate}},createJSXAttribute:function(name,value){return{type:astNodeTypes.JSXAttribute,name:name,value:value||null}},createJSXSpreadAttribute:function(argument){return{type:astNodeTypes.JSXSpreadAttribute,argument:argument}},createJSXIdentifier:function(name){return{type:astNodeTypes.JSXIdentifier,name:name}},createJSXNamespacedName:function(namespace,name){return{type:astNodeTypes.JSXNamespacedName,namespace:namespace,name:name}},createJSXMemberExpression:function(object,property){return{type:astNodeTypes.JSXMemberExpression,object:object,property:property}},createJSXElement:function(openingElement,closingElement,children){return{type:astNodeTypes.JSXElement,openingElement:openingElement,closingElement:closingElement,children:children}},createJSXEmptyExpression:function(){return{type:astNodeTypes.JSXEmptyExpression}},createJSXExpressionContainer:function(expression){return{type:astNodeTypes.JSXExpressionContainer,expression:expression}},createJSXOpeningElement:function(name,attributes,selfClosing){return{type:astNodeTypes.JSXOpeningElement,name:name,selfClosing:selfClosing,attributes:attributes}},createJSXClosingElement:function(name){return{type:astNodeTypes.JSXClosingElement,name:name}},createExportSpecifier:function(local,exported){return{type:astNodeTypes.ExportSpecifier,exported:exported||local,local:local}},createImportDefaultSpecifier:function(local){return{type:astNodeTypes.ImportDefaultSpecifier,local:local}},createImportNamespaceSpecifier:function(local){return{type:astNodeTypes.ImportNamespaceSpecifier,local:local}},createExportNamedDeclaration:function(declaration,specifiers,source){return{type:astNodeTypes.ExportNamedDeclaration,declaration:declaration,specifiers:specifiers,source:source}},createExportDefaultDeclaration:function(declaration){return{type:astNodeTypes.ExportDefaultDeclaration,declaration:declaration}},createExportAllDeclaration:function(source){return{type:astNodeTypes.ExportAllDeclaration,source:source}},createImportSpecifier:function(local,imported){return{type:astNodeTypes.ImportSpecifier,local:local||imported,imported:imported}},createImportDeclaration:function(specifiers,source){return{type:astNodeTypes.ImportDeclaration,specifiers:specifiers,source:source}}}},{"./ast-node-types":5}],5:[function(require,module,exports){"use strict";module.exports={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression",JSXIdentifier:"JSXIdentifier",JSXNamespacedName:"JSXNamespacedName",JSXMemberExpression:"JSXMemberExpression",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXElement:"JSXElement",JSXClosingElement:"JSXClosingElement",JSXOpeningElement:"JSXOpeningElement",JSXAttribute:"JSXAttribute",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportAllDeclaration:"ExportAllDeclaration",ExportSpecifier:"ExportSpecifier",ImportDeclaration:"ImportDeclaration",ImportSpecifier:"ImportSpecifier",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier"}},{}],6:[function(require,module,exports){"use strict";var astNodeTypes=require("./ast-node-types");var extra={trailingComments:[],leadingComments:[],bottomRightStack:[]};module.exports={reset:function(){extra.trailingComments=[];extra.leadingComments=[];extra.bottomRightStack=[]},addComment:function(comment){extra.trailingComments.push(comment);extra.leadingComments.push(comment)},processComment:function(node){var lastChild,trailingComments,i;if(node.type===astNodeTypes.Program){if(node.body.length>0){return}}if(extra.trailingComments.length>0){if(extra.trailingComments[0].range[0]>=node.range[1]){trailingComments=extra.trailingComments;extra.trailingComments=[]}else{extra.trailingComments.length=0}}else{if(extra.bottomRightStack.length>0&&extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments&&extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments[0].range[0]>=node.range[1]){trailingComments=extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments;delete extra.bottomRightStack[extra.bottomRightStack.length-1].trailingComments}}while(extra.bottomRightStack.length>0&&extra.bottomRightStack[extra.bottomRightStack.length-1].range[0]>=node.range[0]){lastChild=extra.bottomRightStack.pop()}if(lastChild){if(lastChild.leadingComments&&lastChild.leadingComments[lastChild.leadingComments.length-1].range[1]<=node.range[0]){node.leadingComments=lastChild.leadingComments;delete lastChild.leadingComments}}else if(extra.leadingComments.length>0){if(extra.leadingComments[extra.leadingComments.length-1].range[1]<=node.range[0]){node.leadingComments=extra.leadingComments;extra.leadingComments=[]}else{for(i=0;i<extra.leadingComments.length;i++){if(extra.leadingComments[i].range[1]>node.range[0]){break}}node.leadingComments=extra.leadingComments.slice(0,i);
if(node.leadingComments.length===0){delete node.leadingComments}trailingComments=extra.leadingComments.slice(i);if(trailingComments.length===0){trailingComments=null}}}if(trailingComments){node.trailingComments=trailingComments}extra.bottomRightStack.push(node)}}},{"./ast-node-types":5}],7:[function(require,module,exports){"use strict";module.exports={arrowFunctions:false,blockBindings:true,destructuring:false,regexUFlag:false,regexYFlag:false,templateStrings:false,binaryLiterals:false,octalLiterals:false,unicodeCodePointEscapes:true,defaultParams:false,restParams:false,forOf:false,objectLiteralComputedProperties:false,objectLiteralShorthandMethods:false,objectLiteralShorthandProperties:false,objectLiteralDuplicateProperties:false,generators:false,spread:false,superInFunctions:false,classes:false,modules:false,jsx:false,globalReturn:false}},{}],8:[function(require,module,exports){"use strict";module.exports={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",InvalidRegExpFlag:"Invalid regular expression flag",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInFormalsList:"Invalid left-hand side in formals list",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",NoUnintializedConst:"Const must be initialized",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",IllegalYield:"Illegal yield expression",IllegalSpread:"Illegal spread element",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Rest parameter can not have a default value",ElementAfterSpreadElement:"Spread must be the final element of an element list",ObjectPatternAsRestParameter:"Invalid rest parameter",ObjectPatternAsSpread:"Invalid spread argument",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",DuplicatePrototypeProperty:"Duplicate '__proto__' property in object literal are not allowed",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",InvalidJSXAttributeValue:"JSX value should be either an expression or a quoted JSX text",ExpectedJSXClosingTag:"Expected corresponding JSX closing tag for %0",AdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag",MissingFromClause:"Missing from clause",NoAsAfterImportNamespace:"Missing as after import *",InvalidModuleSpecifier:"Invalid module specifier",IllegalImportDeclaration:"Illegal import declaration",IllegalExportDeclaration:"Illegal export declaration"}},{}],9:[function(require,module,exports){"use strict";function StringMap(){this.$data={}}StringMap.prototype.get=function(key){key="$"+key;return this.$data[key]};StringMap.prototype.set=function(key,value){key="$"+key;this.$data[key]=value;return this};StringMap.prototype.has=function(key){key="$"+key;return Object.prototype.hasOwnProperty.call(this.$data,key)};StringMap.prototype.delete=function(key){key="$"+key;return delete this.$data[key]};module.exports=StringMap},{}],10:[function(require,module,exports){"use strict";var Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),LeadingZeros:new RegExp("^0+(?!$)")};module.exports={Regex:Regex,isDecimalDigit:function(ch){return ch>=48&&ch<=57},isHexDigit:function(ch){return"0123456789abcdefABCDEF".indexOf(ch)>=0},isOctalDigit:function(ch){return"01234567".indexOf(ch)>=0},isWhiteSpace:function(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(ch)>=0},isLineTerminator:function(ch){return ch===10||ch===13||ch===8232||ch===8233},isIdentifierStart:function(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))},isIdentifierPart:function(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))},isFutureReservedWord:function(id){switch(id){case"class":case"enum":case"export":case"extends":case"import":case"super":return true;default:return false}},isStrictModeReservedWord:function(id,ecmaFeatures){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;case"await":return ecmaFeatures.modules;default:return false}},isRestrictedWord:function(id){return id==="eval"||id==="arguments"},isKeyword:function(id,strict,ecmaFeatures){if(strict&&this.isStrictModeReservedWord(id,ecmaFeatures)){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"||id==="let";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||!ecmaFeatures.generators&&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}},isJSXIdentifierStart:function(ch){return ch!==92&&this.isIdentifierStart(ch)},isJSXIdentifierPart:function(ch){return ch!==92&&(ch===45||this.isIdentifierPart(ch))}}},{}],11:[function(require,module,exports){"use strict";var Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10,JSXIdentifier:11,JSXText:12};var TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="<end>";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";TokenName[Token.RegularExpression]="RegularExpression";TokenName[Token.Template]="Template";TokenName[Token.JSXIdentifier]="JSXIdentifier";TokenName[Token.JSXText]="JSXText";var FnExprTokens=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];module.exports={Token:Token,TokenName:TokenName,FnExprTokens:FnExprTokens}},{}],12:[function(require,module,exports){"use strict";module.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],13:[function(require,module,exports){module.exports={name:"espree",description:"An actively-maintained fork of Esprima, the ECMAScript parsing infrastructure for multipurpose analysis",author:{name:"Nicholas C. Zakas",email:"[email protected]"},homepage:"https://github.com/eslint/espree",main:"espree.js",bin:{esparse:"./bin/esparse.js",esvalidate:"./bin/esvalidate.js"},version:"2.0.4",files:["bin","lib","test/run.js","test/runner.js","test/test.js","test/compat.js","test/reflect.js","espree.js"],engines:{node:">=0.10.0"},repository:{type:"git",url:"http://github.com/eslint/espree.git"},bugs:{url:"http://github.com/eslint/espree.git"},licenses:[{type:"BSD",url:"http://github.com/nzakas/espree/raw/master/LICENSE"}],devDependencies:{browserify:"^7.0.0",chai:"^1.10.0","complexity-report":"~0.6.1",dateformat:"^1.0.11",eslint:"^0.9.2",esprima:"git://github.com/jquery/esprima","esprima-fb":"^8001.2001.0-dev-harmony-fb",istanbul:"~0.2.6","json-diff":"~0.3.1",leche:"^1.0.1",mocha:"^2.0.1","npm-license":"^0.2.3",optimist:"~0.6.0",regenerate:"~0.5.4",semver:"^4.1.1",shelljs:"^0.3.0","shelljs-nodecli":"^0.1.1","unicode-6.3.0":"~0.1.0"},keywords:["ast","ecmascript","javascript","parser","syntax"],scripts:{"generate-regex":"node tools/generate-identifier-regex.js",test:"npm run-script lint && node Makefile.js test && node test/run.js",lint:"node Makefile.js lint",patch:"node Makefile.js patch",minor:"node Makefile.js minor",major:"node Makefile.js major",browserify:"node Makefile.js browserify",coverage:"npm run-script analyze-coverage && npm run-script check-coverage","analyze-coverage":"node node_modules/istanbul/lib/cli.js cover test/runner.js","check-coverage":"node node_modules/istanbul/lib/cli.js check-coverage --statement 99 --branch 99 --function 99",complexity:"npm run-script analyze-complexity && npm run-script check-complexity","analyze-complexity":"node tools/list-complexity.js","check-complexity":"node node_modules/complexity-report/src/cli.js --maxcc 14 --silent -l -w espree.js",benchmark:"node test/benchmarks.js","benchmark-quick":"node test/benchmarks.js quick"},dependencies:{},readme:"# Espree\n\nEspree is an actively-maintained fork Esprima, a high performance,\nstandard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nparser written in ECMAScript (also popularly known as\n[JavaScript](http://en.wikipedia.org/wiki/JavaScript)).\n\n## Features\n\n- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm))\n- Implements [ESTree](https://github.com/estree/estree) (both ES5 and ES6 specs) as the AST format.\n- Optional tracking of syntax node location (index-based and line-column)\n- Heavily tested and battle-hardened by inclusion in [ESLint](http://eslint.org)\n\n## Usage\n\nInstall:\n\n```\nnpm i espree --save\n```\n\nAnd in your Node.js code:\n\n```javascript\nvar espree = require(\"espree\");\n\nvar ast = espree.parse(code);\n```\n\nThere is a second argument to `parse()` that allows you to specify various options:\n\n```javascript\nvar espree = require(\"espree\");\n\nvar ast = espree.parse(code, {\n\n // attach range information to each node\n range: true,\n\n // attach line/column location information to each node\n loc: true,\n\n // create a top-level comments array containing all comments\n comments: true,\n\n // attach comments to the closest relevant node as leadingComments and\n // trailingComments\n attachComment: true,\n\n // create a top-level tokens array containing all tokens\n tokens: true,\n\n // try to continue parsing if an error is encountered, store errors in a\n // top-level errors array\n tolerant: true,\n\n // specify parsing features (default only has blockBindings: true)\n // setting this option replaces the default values\n ecmaFeatures: {\n\n // enable parsing of arrow functions\n arrowFunctions: true,\n\n // enable parsing of let/const\n blockBindings: true,\n\n // enable parsing of destructured arrays and objects\n destructuring: true,\n\n // enable parsing of regular expression y flag\n regexYFlag: true,\n\n // enable parsing of regular expression u flag\n regexUFlag: true,\n\n // enable parsing of template strings\n templateStrings: true,\n\n // enable parsing of binary literals\n binaryLiterals: true,\n\n // enable parsing of ES6 octal literals\n octalLiterals: true,\n\n // enable parsing unicode code point escape sequences\n unicodeCodePointEscapes: true,\n\n // enable parsing of default parameters\n defaultParams: true,\n\n // enable parsing of rest parameters\n restParams: true,\n\n // enable parsing of for-of statement\n forOf: true,\n\n // enable parsing computed object literal properties\n objectLiteralComputedProperties: true,\n\n // enable parsing of shorthand object literal methods\n objectLiteralShorthandMethods: true,\n\n // enable parsing of shorthand object literal properties\n objectLiteralShorthandProperties: true,\n\n // Allow duplicate object literal properties (except '__proto__')\n objectLiteralDuplicateProperties: true,\n\n // enable parsing of generators/yield\n generators: true,\n\n // enable parsing spread operator\n spread: true,\n\n // enable super in functions\n superInFunctions: true,\n\n // enable parsing classes\n classes: true,\n\n // enable parsing of modules\n modules: true,\n\n // enable React JSX parsing\n jsx: true,\n\n // enable return in global scope\n globalReturn: true\n }\n});\n```\n\n## Plans\n\nEspree starts as a fork of Esprima v1.2.2, the last stable published released of Esprima before work on ECMAScript 6 began. Espree's first version is therefore v1.2.2 and is 100% compatible with Esprima v1.2.2 as a drop-in replacement. The version number will be incremented based on [semantic versioning](http://semver.org/) as features and bug fixes are added.\n\nThe immediate plans are:\n\n1. Move away from giant files and move towards small, modular files that are easier to manage.\n1. Move towards CommonJS for all files and use browserify to create browser bundles.\n1. Support ECMAScript version filtering, allowing users to specify which version the parser should work in (similar to Acorn's `ecmaVersion` property).\n1. Add tests to track comment attachment.\n1. Add well-thought-out features that are useful for tools developers.\n1. Add full support for ECMAScript 6.\n1. Add optional parsing of JSX.\n\n## Esprima Compatibility Going Forward\n\nThe primary goal is to produce the exact same AST structure as Esprima and Acorn, and that takes precedence over anything else. (The AST structure being the ESTree API with JSX extensions.) Separate from that, Espree may deviate from what Esprima outputs in terms of where and how comments are attached, as well as what additional information is available on AST nodes. That is to say, Espree may add more things to the AST nodes than Esprima does but the overall AST structure produced will be the same.\n\nEspree may also deviate from Esprima in the interface it exposes.\n\n## Frequent and Incremental Releases\n\nEspree will not do giant releases. Releases will happen periodically as changes are made and incremental releases will be made towards larger goals. For instance, we will not have one big release for ECMAScript 6 support. Instead, we will implement ECMAScript 6, piece-by-piece, hiding those pieces behind an `ecmaFeatures` property that allows you to opt-in to use those features.\n\n## Contributing\n\nIssues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing.html), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/espree/issues).\n\nEspree is licensed under a permissive BSD 2-clause license.\n\n## Build Commands\n\n* `npm test` - run all linting and tests\n* `npm run lint` - run all linting\n* `npm run browserify` - creates a version of Espree that is usable in a browser\n\n## Known Incompatibilities\n\nIn an effort to help those wanting to transition from other parsers to Espree, the following is a list of noteworthy incompatibilities with other parsers. These are known differences that we do not intend to change.\n\n### Esprima 1.2.2\n\n* None.\n\n### Esprima/Harmony Branch\n\n* Esprima/Harmony uses a different comment attachment algorithm that results in some comments being added in different places than Espree. The algorithm Espree uses is the same one used in Esprima 1.2.2.\n* Espree uses ESTree format for the AST nodes whereas Esprima/Harmony uses a nonstandard format.\n\n### Esprima-FB\n\n* All Esprima/Harmony incompatibilities.\n\n## Frequently Asked Questions\n\n### Why are you forking Esprima?\n\n[ESLint](http://eslint.org) has been relying on Esprima as its parser from the beginning. While that was fine when the JavaScript language was evolving slowly, the pace of development has increased dramatically and Esprima has fallen behind. ESLint, like many other tools reliant on Esprima, has been stuck in using new JavaScript language features until Esprima updates, and that has caused our users frustration.\n\nWe decided the only way for us to move forward was to create our own parser, bringing us inline with JSHint and JSLint, and allowing us to keep implementing new features as we need them. We chose to fork Esprima instead of starting from scratch in order to move as quickly as possible with a compatible API.\n\n### Have you tried working with Esprima?\n\nYes. Since the start of ESLint, we've regularly filed bugs and feature requests with Esprima. Unfortunately, we've been unable to make much progress towards getting our needs addressed.\n\nWe are actively working with Esprima as part of its adoption by the jQuery Foundation. We are hoping to reconcile Espree with Esprima at some point in the future, but there are some different philosophies around how the projects work that need to be worked through. We're committed to a goal of merging Espree back into Esprima, or at the very least, to have Espree track Esprima as an upstream target so there's no duplication of effort. In the meantime, we will continue to update and maintain Espree.\n\n### Why don't you just use Facebook's Esprima fork?\n\n`esprima-fb` is Facebook's Esprima fork that features JSX and Flow type annotations. We tried working with `esprima-fb` in our evaluation of how to support ECMAScript 6 and JSX in ESLint. Unfortunately, we were hampered by bugs that were part of Esprima (not necessarily Facebook's code). Since `esprima-fb` tracks the Esprima Harmony branch, that means we still were unable to get fixes or features we needed in a timely manner.\n\n### Why don't you just use Acorn?\n\nAcorn is a great JavaScript parser that produces an AST that is compatible with Esprima. Unfortunately, ESLint relies on more than just the AST to do its job. It relies on Esprima's tokens and comment attachment features to get a complete picture of the source code. We investigated switching to Acorn, but the inconsistencies between Esprima and Acorn created too much work for a project like ESLint.\n\nWe expect there are other tools like ESLint that rely on more than just the AST produced by Esprima, and so a drop-in replacement will help those projects as well as ESLint.\n\n### What ECMAScript 6 features do you support?\n\nAll of them.\n\n### Why use Espree instead of Esprima?\n\n* Faster turnaround time on bug fixes\n* More frequent releases\n* Better communication and responsiveness to issues\n* Ongoing development\n\n### Why use Espree instead of Esprima-FB?\n\n* Opt-in to just the ECMAScript 6 features you want\n* JSX support is off by default, so you're not forced to use it to use ECMAScript 6\n* Stricter ECMAScript 6 support\n",readmeFilename:"README.md",_id:"[email protected]",dist:{shasum:"50bd05893070a0d5385290b2299a519d578efc90"},_from:"espree@^2.0.3",_resolved:"https://registry.npmjs.org/espree/-/espree-2.0.4.tgz"}},{}],14:[function(require,module,exports){function get_beautify(js_beautify,css_beautify,html_beautify){var beautify=function(src,config){return js_beautify.js_beautify(src,config)};beautify.js=js_beautify.js_beautify;beautify.css=css_beautify.css_beautify;beautify.html=html_beautify.html_beautify;beautify.js_beautify=js_beautify.js_beautify;beautify.css_beautify=css_beautify.css_beautify;beautify.html_beautify=html_beautify.html_beautify;return beautify}if(typeof define==="function"&&define.amd){define(["./lib/beautify","./lib/beautify-css","./lib/beautify-html"],function(js_beautify,css_beautify,html_beautify){return get_beautify(js_beautify,css_beautify,html_beautify)})}else{(function(mod){var js_beautify=require("./lib/beautify");var css_beautify=require("./lib/beautify-css");var html_beautify=require("./lib/beautify-html");mod.exports=get_beautify(js_beautify,css_beautify,html_beautify)})(module)}},{"./lib/beautify":17,"./lib/beautify-css":15,"./lib/beautify-html":16}],15:[function(require,module,exports){(function(global){(function(){function css_beautify(source_text,options){options=options||{};source_text=source_text||"";source_text=source_text.replace(/\r\n|[\r\u2028\u2029]/g,"\n");var indentSize=options.indent_size||4;var indentCharacter=options.indent_char||" ";var selectorSeparatorNewline=options.selector_separator_newline===undefined?true:options.selector_separator_newline;var end_with_newline=options.end_with_newline===undefined?false:options.end_with_newline;var newline_between_rules=options.newline_between_rules===undefined?true:options.newline_between_rules;var eol=options.eol?options.eol:"\n";if(typeof indentSize==="string"){indentSize=parseInt(indentSize,10)}if(options.indent_with_tabs){indentCharacter=" ";indentSize=1}eol=eol.replace(/\\r/,"\r").replace(/\\n/,"\n");var whiteRe=/^\s+$/;var wordRe=/[\w$\-_]/;var pos=-1,ch;var parenLevel=0;function next(){ch=source_text.charAt(++pos);return ch||""}function peek(skipWhitespace){var result="";var prev_pos=pos;if(skipWhitespace){eatWhitespace()}result=source_text.charAt(pos+1)||"";pos=prev_pos-1;next();return result}function eatString(endChars){var start=pos;while(next()){if(ch==="\\"){next()}else if(endChars.indexOf(ch)!==-1){break}else if(ch==="\n"){break}}return source_text.substring(start,pos+1)}function peekString(endChar){var prev_pos=pos;var str=eatString(endChar);pos=prev_pos-1;next();return str}function eatWhitespace(){var result="";while(whiteRe.test(peek())){next();result+=ch}return result}function skipWhitespace(){var result="";if(ch&&whiteRe.test(ch)){result=ch}while(whiteRe.test(next())){result+=ch}return result}function eatComment(singleLine){var start=pos;singleLine=peek()==="/";next();while(next()){if(!singleLine&&ch==="*"&&peek()==="/"){next();break}else if(singleLine&&ch==="\n"){return source_text.substring(start,pos)}}return source_text.substring(start,pos)+ch}function lookBack(str){return source_text.substring(pos-str.length,pos).toLowerCase()===str}function foundNestedPseudoClass(){var openParen=0;for(var i=pos+1;i<source_text.length;i++){var ch=source_text.charAt(i);if(ch==="{"){return true}else if(ch==="("){openParen+=1}else if(ch===")"){if(openParen==0){return false}openParen-=1}else if(ch===";"||ch==="}"){return false}}return false}var basebaseIndentString=source_text.match(/^[\t ]*/)[0];var singleIndent=new Array(indentSize+1).join(indentCharacter);var indentLevel=0;var nestedLevel=0;function indent(){indentLevel++;basebaseIndentString+=singleIndent}function outdent(){indentLevel--;basebaseIndentString=basebaseIndentString.slice(0,-indentSize)}var print={};print["{"]=function(ch){print.singleSpace();output.push(ch);print.newLine()};print["}"]=function(ch){print.newLine();output.push(ch);print.newLine()};print._lastCharWhitespace=function(){return whiteRe.test(output[output.length-1])};print.newLine=function(keepWhitespace){if(output.length){if(!keepWhitespace&&output[output.length-1]!=="\n"){print.trim()}output.push("\n");if(basebaseIndentString){output.push(basebaseIndentString)}}};print.singleSpace=function(){if(output.length&&!print._lastCharWhitespace()){output.push(" ")}};print.preserveSingleSpace=function(){if(isAfterSpace){print.singleSpace()}};print.trim=function(){while(print._lastCharWhitespace()){output.pop()}};var output=[];var insideRule=false;var insidePropertyValue=false;var enteringConditionalGroup=false;var top_ch="";var last_top_ch="";while(true){var whitespace=skipWhitespace();var isAfterSpace=whitespace!=="";var isAfterNewline=whitespace.indexOf("\n")!==-1;last_top_ch=top_ch;top_ch=ch;if(!ch){break}else if(ch==="/"&&peek()==="*"){var header=indentLevel===0;if(isAfterNewline||header){print.newLine()}output.push(eatComment());print.newLine();if(header){print.newLine(true)}}else if(ch==="/"&&peek()==="/"){if(!isAfterNewline&&last_top_ch!=="{"){print.trim()}print.singleSpace();output.push(eatComment());print.newLine()}else if(ch==="@"){print.preserveSingleSpace();output.push(ch);var variableOrRule=peekString(": ,;{}()[]/='\"");if(variableOrRule.match(/[ :]$/)){next();variableOrRule=eatString(": ").replace(/\s$/,"");output.push(variableOrRule);print.singleSpace()}variableOrRule=variableOrRule.replace(/\s$/,"");if(variableOrRule in css_beautify.NESTED_AT_RULE){nestedLevel+=1;if(variableOrRule in css_beautify.CONDITIONAL_GROUP_RULE){enteringConditionalGroup=true}}}else if(ch==="#"&&peek()==="{"){print.preserveSingleSpace();output.push(eatString("}"))}else if(ch==="{"){if(peek(true)==="}"){eatWhitespace();next();print.singleSpace();output.push("{}");print.newLine();if(newline_between_rules&&indentLevel===0){print.newLine(true)}}else{indent();print["{"](ch);if(enteringConditionalGroup){enteringConditionalGroup=false;insideRule=indentLevel>nestedLevel}else{insideRule=indentLevel>=nestedLevel}}}else if(ch==="}"){outdent();print["}"](ch);insideRule=false;insidePropertyValue=false;if(nestedLevel){nestedLevel--}if(newline_between_rules&&indentLevel===0){print.newLine(true)}}else if(ch===":"){eatWhitespace();if((insideRule||enteringConditionalGroup)&&!(lookBack("&")||foundNestedPseudoClass())){insidePropertyValue=true;output.push(":");print.singleSpace()}else{if(peek()===":"){next();output.push("::")}else{output.push(":")}}}else if(ch==='"'||ch==="'"){print.preserveSingleSpace();output.push(eatString(ch))}else if(ch===";"){insidePropertyValue=false;output.push(ch);print.newLine()}else if(ch==="("){if(lookBack("url")){output.push(ch);eatWhitespace();if(next()){if(ch!==")"&&ch!=='"'&&ch!=="'"){output.push(eatString(")"))}else{pos--}}}else{parenLevel++;
print.preserveSingleSpace();output.push(ch);eatWhitespace()}}else if(ch===")"){output.push(ch);parenLevel--}else if(ch===","){output.push(ch);eatWhitespace();if(selectorSeparatorNewline&&!insidePropertyValue&&parenLevel<1){print.newLine()}else{print.singleSpace()}}else if(ch==="]"){output.push(ch)}else if(ch==="["){print.preserveSingleSpace();output.push(ch)}else if(ch==="="){eatWhitespace();ch="=";output.push(ch)}else{print.preserveSingleSpace();output.push(ch)}}var sweetCode="";if(basebaseIndentString){sweetCode+=basebaseIndentString}sweetCode+=output.join("").replace(/[\r\n\t ]+$/,"");if(end_with_newline){sweetCode+="\n"}if(eol!="\n"){sweetCode=sweetCode.replace(/[\n]/g,eol)}return sweetCode}css_beautify.NESTED_AT_RULE={"@page":true,"@font-face":true,"@keyframes":true,"@media":true,"@supports":true,"@document":true};css_beautify.CONDITIONAL_GROUP_RULE={"@media":true,"@supports":true,"@document":true};if(typeof define==="function"&&define.amd){define([],function(){return{css_beautify:css_beautify}})}else if(typeof exports!=="undefined"){exports.css_beautify=css_beautify}else if(typeof window!=="undefined"){window.css_beautify=css_beautify}else if(typeof global!=="undefined"){global.css_beautify=css_beautify}})()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],16:[function(require,module,exports){(function(global){(function(){function trim(s){return s.replace(/^\s+|\s+$/g,"")}function ltrim(s){return s.replace(/^\s+/g,"")}function rtrim(s){return s.replace(/\s+$/g,"")}function style_html(html_source,options,js_beautify,css_beautify){var multi_parser,indent_inner_html,indent_size,indent_character,wrap_line_length,brace_style,unformatted,preserve_newlines,max_preserve_newlines,indent_handlebars,wrap_attributes,wrap_attributes_indent_size,end_with_newline,extra_liners,eol;options=options||{};if((options.wrap_line_length===undefined||parseInt(options.wrap_line_length,10)===0)&&(options.max_char!==undefined&&parseInt(options.max_char,10)!==0)){options.wrap_line_length=options.max_char}indent_inner_html=options.indent_inner_html===undefined?false:options.indent_inner_html;indent_size=options.indent_size===undefined?4:parseInt(options.indent_size,10);indent_character=options.indent_char===undefined?" ":options.indent_char;brace_style=options.brace_style===undefined?"collapse":options.brace_style;wrap_line_length=parseInt(options.wrap_line_length,10)===0?32786:parseInt(options.wrap_line_length||250,10);unformatted=options.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];preserve_newlines=options.preserve_newlines===undefined?true:options.preserve_newlines;max_preserve_newlines=preserve_newlines?isNaN(parseInt(options.max_preserve_newlines,10))?32786:parseInt(options.max_preserve_newlines,10):0;indent_handlebars=options.indent_handlebars===undefined?false:options.indent_handlebars;wrap_attributes=options.wrap_attributes===undefined?"auto":options.wrap_attributes;wrap_attributes_indent_size=options.wrap_attributes_indent_size===undefined?indent_size:parseInt(options.wrap_attributes_indent_size,10)||indent_size;end_with_newline=options.end_with_newline===undefined?false:options.end_with_newline;extra_liners=typeof options.extra_liners=="object"&&options.extra_liners?options.extra_liners.concat():typeof options.extra_liners==="string"?options.extra_liners.split(","):"head,body,/html".split(",");eol=options.eol?options.eol:"\n";if(options.indent_with_tabs){indent_character=" ";indent_size=1}eol=eol.replace(/\\r/,"\r").replace(/\\n/,"\n");function Parser(){this.pos=0;this.token="";this.current_mode="CONTENT";this.tags={parent:"parent1",parentcount:1,parent1:""};this.tag_type="";this.token_text=this.last_token=this.last_text=this.token_type="";this.newlines=0;this.indent_content=indent_inner_html;this.Utils={whitespace:"\n\r ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:extra_liners,in_array:function(what,arr){for(var i=0;i<arr.length;i++){if(what===arr[i]){return true}}return false}};this.is_whitespace=function(text){for(var n=0;n<text.length;text++){if(!this.Utils.in_array(text.charAt(n),this.Utils.whitespace)){return false}}return true};this.traverse_whitespace=function(){var input_char="";input_char=this.input.charAt(this.pos);if(this.Utils.in_array(input_char,this.Utils.whitespace)){this.newlines=0;while(this.Utils.in_array(input_char,this.Utils.whitespace)){if(preserve_newlines&&input_char==="\n"&&this.newlines<=max_preserve_newlines){this.newlines+=1}this.pos++;input_char=this.input.charAt(this.pos)}return true}return false};this.space_or_wrap=function(content){if(this.line_char_count>=this.wrap_line_length){this.print_newline(false,content);this.print_indentation(content)}else{this.line_char_count++;content.push(" ")}};this.get_content=function(){var input_char="",content=[],space=false;while(this.input.charAt(this.pos)!=="<"){if(this.pos>=this.input.length){return content.length?content.join(""):["","TK_EOF"]}if(this.traverse_whitespace()){this.space_or_wrap(content);continue}if(indent_handlebars){var peek3=this.input.substr(this.pos,3);if(peek3==="{{#"||peek3==="{{/"){break}else if(peek3==="{{!"){return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"]}else if(this.input.substr(this.pos,2)==="{{"){if(this.get_tag(true)==="{{else}}"){break}}}input_char=this.input.charAt(this.pos);this.pos++;this.line_char_count++;content.push(input_char)}return content.length?content.join(""):""};this.get_contents_to=function(name){if(this.pos===this.input.length){return["","TK_EOF"]}var input_char="";var content="";var reg_match=new RegExp("</"+name+"\\s*>","igm");reg_match.lastIndex=this.pos;var reg_array=reg_match.exec(this.input);var end_script=reg_array?reg_array.index:this.input.length;if(this.pos<end_script){content=this.input.substring(this.pos,end_script);this.pos=end_script}return content};this.record_tag=function(tag){if(this.tags[tag+"count"]){this.tags[tag+"count"]++;this.tags[tag+this.tags[tag+"count"]]=this.indent_level}else{this.tags[tag+"count"]=1;this.tags[tag+this.tags[tag+"count"]]=this.indent_level}this.tags[tag+this.tags[tag+"count"]+"parent"]=this.tags.parent;this.tags.parent=tag+this.tags[tag+"count"]};this.retrieve_tag=function(tag){if(this.tags[tag+"count"]){var temp_parent=this.tags.parent;while(temp_parent){if(tag+this.tags[tag+"count"]===temp_parent){break}temp_parent=this.tags[temp_parent+"parent"]}if(temp_parent){this.indent_level=this.tags[tag+this.tags[tag+"count"]];this.tags.parent=this.tags[temp_parent+"parent"]}delete this.tags[tag+this.tags[tag+"count"]+"parent"];delete this.tags[tag+this.tags[tag+"count"]];if(this.tags[tag+"count"]===1){delete this.tags[tag+"count"]}else{this.tags[tag+"count"]--}}};this.indent_to_tag=function(tag){if(!this.tags[tag+"count"]){return}var temp_parent=this.tags.parent;while(temp_parent){if(tag+this.tags[tag+"count"]===temp_parent){break}temp_parent=this.tags[temp_parent+"parent"]}if(temp_parent){this.indent_level=this.tags[tag+this.tags[tag+"count"]]}};this.get_tag=function(peek){var input_char="",content=[],comment="",space=false,first_attr=true,tag_start,tag_end,tag_start_char,orig_pos=this.pos,orig_line_char_count=this.line_char_count;peek=peek!==undefined?peek:false;do{if(this.pos>=this.input.length){if(peek){this.pos=orig_pos;this.line_char_count=orig_line_char_count}return content.length?content.join(""):["","TK_EOF"]}input_char=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(input_char,this.Utils.whitespace)){space=true;continue}if(input_char==="'"||input_char==='"'){input_char+=this.get_unformatted(input_char);space=true}if(input_char==="="){space=false}if(content.length&&content[content.length-1]!=="="&&input_char!==">"&&space){this.space_or_wrap(content);space=false;if(!first_attr&&wrap_attributes==="force"&&input_char!=="/"){this.print_newline(true,content);this.print_indentation(content);for(var count=0;count<wrap_attributes_indent_size;count++){content.push(indent_character)}}for(var i=0;i<content.length;i++){if(content[i]===" "){first_attr=false;break}}}if(indent_handlebars&&tag_start_char==="<"){if(input_char+this.input.charAt(this.pos)==="{{"){input_char+=this.get_unformatted("}}");if(content.length&&content[content.length-1]!==" "&&content[content.length-1]!=="<"){input_char=" "+input_char}space=true}}if(input_char==="<"&&!tag_start_char){tag_start=this.pos-1;tag_start_char="<"}if(indent_handlebars&&!tag_start_char){if(content.length>=2&&content[content.length-1]==="{"&&content[content.length-2]==="{"){if(input_char==="#"||input_char==="/"||input_char==="!"){tag_start=this.pos-3}else{tag_start=this.pos-2}tag_start_char="{"}}this.line_char_count++;content.push(input_char);if(content[1]&&(content[1]==="!"||content[1]==="?"||content[1]==="%")){content=[this.get_comment(tag_start)];break}if(indent_handlebars&&content[1]&&content[1]==="{"&&content[2]&&content[2]==="!"){content=[this.get_comment(tag_start)];break}if(indent_handlebars&&tag_start_char==="{"&&content.length>2&&content[content.length-2]==="}"&&content[content.length-1]==="}"){break}}while(input_char!==">");var tag_complete=content.join("");var tag_index;var tag_offset;if(tag_complete.indexOf(" ")!==-1){tag_index=tag_complete.indexOf(" ")}else if(tag_complete.charAt(0)==="{"){tag_index=tag_complete.indexOf("}")}else{tag_index=tag_complete.indexOf(">")}if(tag_complete.charAt(0)==="<"||!indent_handlebars){tag_offset=1}else{tag_offset=tag_complete.charAt(2)==="#"?3:2}var tag_check=tag_complete.substring(tag_offset,tag_index).toLowerCase();if(tag_complete.charAt(tag_complete.length-2)==="/"||this.Utils.in_array(tag_check,this.Utils.single_token)){if(!peek){this.tag_type="SINGLE"}}else if(indent_handlebars&&tag_complete.charAt(0)==="{"&&tag_check==="else"){if(!peek){this.indent_to_tag("if");this.tag_type="HANDLEBARS_ELSE";this.indent_content=true;this.traverse_whitespace()}}else if(this.is_unformatted(tag_check,unformatted)){comment=this.get_unformatted("</"+tag_check+">",tag_complete);content.push(comment);tag_end=this.pos-1;this.tag_type="SINGLE"}else if(tag_check==="script"&&(tag_complete.search("type")===-1||tag_complete.search("type")>-1&&tag_complete.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)>-1)){if(!peek){this.record_tag(tag_check);this.tag_type="SCRIPT"}}else if(tag_check==="style"&&(tag_complete.search("type")===-1||tag_complete.search("type")>-1&&tag_complete.search("text/css")>-1)){if(!peek){this.record_tag(tag_check);this.tag_type="STYLE"}}else if(tag_check.charAt(0)==="!"){if(!peek){this.tag_type="SINGLE";this.traverse_whitespace()}}else if(!peek){if(tag_check.charAt(0)==="/"){this.retrieve_tag(tag_check.substring(1));this.tag_type="END"}else{this.record_tag(tag_check);if(tag_check.toLowerCase()!=="html"){this.indent_content=true}this.tag_type="START"}if(this.traverse_whitespace()){this.space_or_wrap(content)}if(this.Utils.in_array(tag_check,this.Utils.extra_liners)){this.print_newline(false,this.output);if(this.output.length&&this.output[this.output.length-2]!=="\n"){this.print_newline(true,this.output)}}}if(peek){this.pos=orig_pos;this.line_char_count=orig_line_char_count}return content.join("")};this.get_comment=function(start_pos){var comment="",delimiter=">",matched=false;this.pos=start_pos;input_char=this.input.charAt(this.pos);this.pos++;while(this.pos<=this.input.length){comment+=input_char;if(comment.charAt(comment.length-1)===delimiter.charAt(delimiter.length-1)&&comment.indexOf(delimiter)!==-1){break}if(!matched&&comment.length<10){if(comment.indexOf("<![if")===0){delimiter="<![endif]>";matched=true}else if(comment.indexOf("<![cdata[")===0){delimiter="]]>";matched=true}else if(comment.indexOf("<![")===0){delimiter="]>";matched=true}else if(comment.indexOf("<!--")===0){delimiter="-->";matched=true}else if(comment.indexOf("{{!")===0){delimiter="}}";matched=true}else if(comment.indexOf("<?")===0){delimiter="?>";matched=true}else if(comment.indexOf("<%")===0){delimiter="%>";matched=true}}input_char=this.input.charAt(this.pos);this.pos++}return comment};this.get_unformatted=function(delimiter,orig_tag){if(orig_tag&&orig_tag.toLowerCase().indexOf(delimiter)!==-1){return""}var input_char="";var content="";var min_index=0;var space=true;do{if(this.pos>=this.input.length){return content}input_char=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(input_char,this.Utils.whitespace)){if(!space){this.line_char_count--;continue}if(input_char==="\n"||input_char==="\r"){content+="\n";this.line_char_count=0;continue}}content+=input_char;this.line_char_count++;space=true;if(indent_handlebars&&input_char==="{"&&content.length&&content.charAt(content.length-2)==="{"){content+=this.get_unformatted("}}");min_index=content.length}}while(content.toLowerCase().indexOf(delimiter,min_index)===-1);return content};this.get_token=function(){var token;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var type=this.last_token.substr(7);token=this.get_contents_to(type);if(typeof token!=="string"){return token}return[token,"TK_"+type]}if(this.current_mode==="CONTENT"){token=this.get_content();if(typeof token!=="string"){return token}else{return[token,"TK_CONTENT"]}}if(this.current_mode==="TAG"){token=this.get_tag();if(typeof token!=="string"){return token}else{var tag_name_type="TK_TAG_"+this.tag_type;return[token,tag_name_type]}}};this.get_full_indent=function(level){level=this.indent_level+level||0;if(level<1){return""}return Array(level+1).join(this.indent_string)};this.is_unformatted=function(tag_check,unformatted){if(!this.Utils.in_array(tag_check,unformatted)){return false}if(tag_check.toLowerCase()!=="a"||!this.Utils.in_array("a",unformatted)){return true}var next_tag=this.get_tag(true);var tag=(next_tag||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);if(!tag||this.Utils.in_array(tag,unformatted)){return true}else{return false}};this.printer=function(js_source,indent_character,indent_size,wrap_line_length,brace_style){this.input=js_source||"";this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n");this.output=[];this.indent_character=indent_character;this.indent_string="";this.indent_size=indent_size;this.brace_style=brace_style;this.indent_level=0;this.wrap_line_length=wrap_line_length;this.line_char_count=0;for(var i=0;i<this.indent_size;i++){this.indent_string+=this.indent_character}this.print_newline=function(force,arr){this.line_char_count=0;if(!arr||!arr.length){return}if(force||arr[arr.length-1]!=="\n"){if(arr[arr.length-1]!=="\n"){arr[arr.length-1]=rtrim(arr[arr.length-1])}arr.push("\n")}};this.print_indentation=function(arr){for(var i=0;i<this.indent_level;i++){arr.push(this.indent_string);this.line_char_count+=this.indent_string.length}};this.print_token=function(text){if(this.is_whitespace(text)&&!this.output.length){return}if(text||text!==""){if(this.output.length&&this.output[this.output.length-1]==="\n"){this.print_indentation(this.output);text=ltrim(text)}}this.print_token_raw(text)};this.print_token_raw=function(text){if(this.newlines>0){text=rtrim(text)}if(text&&text!==""){if(text.length>1&&text.charAt(text.length-1)==="\n"){this.output.push(text.slice(0,-1));this.print_newline(false,this.output)}else{this.output.push(text)}}for(var n=0;n<this.newlines;n++){this.print_newline(n>0,this.output)}this.newlines=0};this.indent=function(){this.indent_level++};this.unindent=function(){if(this.indent_level>0){this.indent_level--}}};return this}multi_parser=new Parser;multi_parser.printer(html_source,indent_character,indent_size,wrap_line_length,brace_style);while(true){var t=multi_parser.get_token();multi_parser.token_text=t[0];multi_parser.token_type=t[1];if(multi_parser.token_type==="TK_EOF"){break}switch(multi_parser.token_type){case"TK_TAG_START":multi_parser.print_newline(false,multi_parser.output);multi_parser.print_token(multi_parser.token_text);if(multi_parser.indent_content){multi_parser.indent();multi_parser.indent_content=false}multi_parser.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":multi_parser.print_newline(false,multi_parser.output);multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="CONTENT";break;case"TK_TAG_END":if(multi_parser.last_token==="TK_CONTENT"&&multi_parser.last_text===""){var tag_name=multi_parser.token_text.match(/\w+/)[0];var tag_extracted_from_last_output=null;if(multi_parser.output.length){tag_extracted_from_last_output=multi_parser.output[multi_parser.output.length-1].match(/(?:<|{{#)\s*(\w+)/)}if(tag_extracted_from_last_output===null||tag_extracted_from_last_output[1]!==tag_name&&!multi_parser.Utils.in_array(tag_extracted_from_last_output[1],unformatted)){multi_parser.print_newline(false,multi_parser.output)}}multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var tag_check=multi_parser.token_text.match(/^\s*<([a-z-]+)/i);if(!tag_check||!multi_parser.Utils.in_array(tag_check[1],unformatted)){multi_parser.print_newline(false,multi_parser.output)}multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":multi_parser.print_token(multi_parser.token_text);if(multi_parser.indent_content){multi_parser.indent();multi_parser.indent_content=false}multi_parser.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="TAG";break;case"TK_CONTENT":multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(multi_parser.token_text!==""){multi_parser.print_newline(false,multi_parser.output);var text=multi_parser.token_text,_beautifier,script_indent_level=1;if(multi_parser.token_type==="TK_SCRIPT"){_beautifier=typeof js_beautify==="function"&&js_beautify}else if(multi_parser.token_type==="TK_STYLE"){_beautifier=typeof css_beautify==="function"&&css_beautify}if(options.indent_scripts==="keep"){script_indent_level=0}else if(options.indent_scripts==="separate"){script_indent_level=-multi_parser.indent_level}var indentation=multi_parser.get_full_indent(script_indent_level);if(_beautifier){var Child_options=function(){this.eol="\n"};Child_options.prototype=options;var child_options=new Child_options;text=_beautifier(text.replace(/^\s*/,indentation),child_options)}else{var white=text.match(/^\s*/)[0];var _level=white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length-1;var reindent=multi_parser.get_full_indent(script_indent_level-_level);text=text.replace(/^\s*/,indentation).replace(/\r\n|\r|\n/g,"\n"+reindent).replace(/\s+$/,"")}if(text){multi_parser.print_token_raw(text);multi_parser.print_newline(true,multi_parser.output)}}multi_parser.current_mode="TAG";break;default:if(multi_parser.token_text!==""){multi_parser.print_token(multi_parser.token_text)}break}multi_parser.last_token=multi_parser.token_type;multi_parser.last_text=multi_parser.token_text}var sweet_code=multi_parser.output.join("").replace(/[\r\n\t ]+$/,"");if(end_with_newline){sweet_code+="\n"}if(eol!="\n"){sweet_code=sweet_code.replace(/[\n]/g,eol)}return sweet_code}if(typeof define==="function"&&define.amd){define(["require","./beautify","./beautify-css"],function(requireamd){var js_beautify=requireamd("./beautify");var css_beautify=requireamd("./beautify-css");return{html_beautify:function(html_source,options){return style_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify)}}})}else if(typeof exports!=="undefined"){var js_beautify=require("./beautify.js");var css_beautify=require("./beautify-css.js");exports.html_beautify=function(html_source,options){return style_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify)}}else if(typeof window!=="undefined"){window.html_beautify=function(html_source,options){return style_html(html_source,options,window.js_beautify,window.css_beautify)}}else if(typeof global!=="undefined"){global.html_beautify=function(html_source,options){return style_html(html_source,options,global.js_beautify,global.css_beautify)}}})()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./beautify-css.js":15,"./beautify.js":17}],17:[function(require,module,exports){(function(global){(function(){var acorn={};(function(exports){var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");var newline=exports.newline=/[\n\r\u2028\u2029]/;var lineBreak=exports.lineBreak=/\r\n|[\n\r\u2028\u2029]/g;var isIdentifierStart=exports.isIdentifierStart=function(code){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code))};var isIdentifierChar=exports.isIdentifierChar=function(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code))}})(acorn);function in_array(what,arr){for(var i=0;i<arr.length;i+=1){if(arr[i]===what){return true}}return false}function trim(s){return s.replace(/^\s+|\s+$/g,"")}function ltrim(s){return s.replace(/^\s+/g,"")}function rtrim(s){return s.replace(/\s+$/g,"")}function js_beautify(js_source_text,options){"use strict";var beautifier=new Beautifier(js_source_text,options);return beautifier.beautify()}var MODE={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Beautifier(js_source_text,options){"use strict";var output;var tokens=[],token_pos;var Tokenizer;var current_token;var last_type,last_last_text,indent_string;var flags,previous_flags,flag_store;var prefix;var handlers,opt;var baseIndentString="";handlers={TK_START_EXPR:handle_start_expr,TK_END_EXPR:handle_end_expr,TK_START_BLOCK:handle_start_block,TK_END_BLOCK:handle_end_block,TK_WORD:handle_word,TK_RESERVED:handle_word,TK_SEMICOLON:handle_semicolon,TK_STRING:handle_string,TK_EQUALS:handle_equals,TK_OPERATOR:handle_operator,TK_COMMA:handle_comma,TK_BLOCK_COMMENT:handle_block_comment,TK_COMMENT:handle_comment,TK_DOT:handle_dot,TK_UNKNOWN:handle_unknown,TK_EOF:handle_eof};function create_flags(flags_base,mode){var next_indent_level=0;if(flags_base){next_indent_level=flags_base.indentation_level;if(!output.just_added_newline()&&flags_base.line_indent_level>next_indent_level){next_indent_level=flags_base.line_indent_level}}var next_flags={mode:mode,parent:flags_base,last_text:flags_base?flags_base.last_text:"",last_word:flags_base?flags_base.last_word:"",declaration_statement:false,declaration_assignment:false,multiline_frame:false,if_block:false,else_block:false,do_block:false,do_while:false,in_case_statement:false,in_case:false,case_body:false,indentation_level:next_indent_level,line_indent_level:flags_base?flags_base.line_indent_level:next_indent_level,start_line_index:output.get_line_number(),ternary_depth:0};return next_flags}options=options?options:{};opt={};if(options.braces_on_own_line!==undefined){opt.brace_style=options.braces_on_own_line?"expand":"collapse"}opt.brace_style=options.brace_style?options.brace_style:opt.brace_style?opt.brace_style:"collapse";if(opt.brace_style==="expand-strict"){opt.brace_style="expand"}opt.indent_size=options.indent_size?parseInt(options.indent_size,10):4;opt.indent_char=options.indent_char?options.indent_char:" ";opt.eol=options.eol?options.eol:"\n";opt.preserve_newlines=options.preserve_newlines===undefined?true:options.preserve_newlines;opt.break_chained_methods=options.break_chained_methods===undefined?false:options.break_chained_methods;opt.max_preserve_newlines=options.max_preserve_newlines===undefined?0:parseInt(options.max_preserve_newlines,10);opt.space_in_paren=options.space_in_paren===undefined?false:options.space_in_paren;opt.space_in_empty_paren=options.space_in_empty_paren===undefined?false:options.space_in_empty_paren;opt.jslint_happy=options.jslint_happy===undefined?false:options.jslint_happy;opt.space_after_anon_function=options.space_after_anon_function===undefined?false:options.space_after_anon_function;opt.keep_array_indentation=options.keep_array_indentation===undefined?false:options.keep_array_indentation;opt.space_before_conditional=options.space_before_conditional===undefined?true:options.space_before_conditional;opt.unescape_strings=options.unescape_strings===undefined?false:options.unescape_strings;opt.wrap_line_length=options.wrap_line_length===undefined?0:parseInt(options.wrap_line_length,10);opt.e4x=options.e4x===undefined?false:options.e4x;opt.end_with_newline=options.end_with_newline===undefined?false:options.end_with_newline;opt.comma_first=options.comma_first===undefined?false:options.comma_first;opt.test_output_raw=options.test_output_raw===undefined?false:options.test_output_raw;if(opt.jslint_happy){opt.space_after_anon_function=true}if(options.indent_with_tabs){opt.indent_char=" ";opt.indent_size=1}opt.eol=opt.eol.replace(/\\r/,"\r").replace(/\\n/,"\n");indent_string="";while(opt.indent_size>0){indent_string+=opt.indent_char;opt.indent_size-=1}var preindent_index=0;if(js_source_text&&js_source_text.length){while(js_source_text.charAt(preindent_index)===" "||js_source_text.charAt(preindent_index)===" "){baseIndentString+=js_source_text.charAt(preindent_index);preindent_index+=1}js_source_text=js_source_text.substring(preindent_index)}last_type="TK_START_BLOCK";last_last_text="";output=new Output(indent_string,baseIndentString);output.raw=opt.test_output_raw;flag_store=[];set_mode(MODE.BlockStatement);this.beautify=function(){var local_token,sweet_code;Tokenizer=new tokenizer(js_source_text,opt,indent_string);tokens=Tokenizer.tokenize();token_pos=0;while(local_token=get_token()){for(var i=0;i<local_token.comments_before.length;i++){handle_token(local_token.comments_before[i])}handle_token(local_token);last_last_text=flags.last_text;last_type=local_token.type;flags.last_text=local_token.text;token_pos+=1}sweet_code=output.get_code();if(opt.end_with_newline){sweet_code+="\n"}if(opt.eol!="\n"){sweet_code=sweet_code.replace(/[\n]/g,opt.eol)}return sweet_code};function handle_token(local_token){var newlines=local_token.newlines;var keep_whitespace=opt.keep_array_indentation&&is_array(flags.mode);if(keep_whitespace){for(i=0;i<newlines;i+=1){print_newline(i>0)}}else{if(opt.max_preserve_newlines&&newlines>opt.max_preserve_newlines){newlines=opt.max_preserve_newlines}if(opt.preserve_newlines){if(local_token.newlines>1){print_newline();for(var i=1;i<newlines;i+=1){print_newline(true)}}}}current_token=local_token;handlers[current_token.type]()}function split_newlines(s){s=s.replace(/\x0d/g,"");var out=[],idx=s.indexOf("\n");while(idx!==-1){out.push(s.substring(0,idx));s=s.substring(idx+1);idx=s.indexOf("\n")}if(s.length){out.push(s)}return out}function allow_wrap_or_preserved_newline(force_linewrap){force_linewrap=force_linewrap===undefined?false:force_linewrap;if(output.just_added_newline()){return}if(opt.preserve_newlines&&current_token.wanted_newline||force_linewrap){print_newline(false,true)}else if(opt.wrap_line_length){var proposed_line_length=output.current_line.get_character_count()+current_token.text.length+(output.space_before_token?1:0);if(proposed_line_length>=opt.wrap_line_length){print_newline(false,true)}}}function print_newline(force_newline,preserve_statement_flags){if(!preserve_statement_flags){if(flags.last_text!==";"&&flags.last_text!==","&&flags.last_text!=="="&&last_type!=="TK_OPERATOR"){while(flags.mode===MODE.Statement&&!flags.if_block&&!flags.do_block){restore_mode()}}}if(output.add_new_line(force_newline)){flags.multiline_frame=true}}function print_token_line_indentation(){if(output.just_added_newline()){if(opt.keep_array_indentation&&is_array(flags.mode)&&current_token.wanted_newline){output.current_line.push(current_token.whitespace_before);output.space_before_token=false}else if(output.set_indent(flags.indentation_level)){flags.line_indent_level=flags.indentation_level}}}function print_token(printable_token){if(output.raw){output.add_raw_token(current_token);return}if(opt.comma_first&&last_type==="TK_COMMA"&&output.just_added_newline()){if(output.previous_line.last()===","){output.previous_line.pop();print_token_line_indentation();output.add_token(",");output.space_before_token=true}}printable_token=printable_token||current_token.text;print_token_line_indentation();output.add_token(printable_token)}function indent(){flags.indentation_level+=1}function deindent(){if(flags.indentation_level>0&&(!flags.parent||flags.indentation_level>flags.parent.indentation_level))flags.indentation_level-=1}function set_mode(mode){if(flags){flag_store.push(flags);previous_flags=flags}else{previous_flags=create_flags(null,mode)}flags=create_flags(previous_flags,mode)}function is_array(mode){return mode===MODE.ArrayLiteral}function is_expression(mode){return in_array(mode,[MODE.Expression,MODE.ForInitializer,MODE.Conditional])}function restore_mode(){if(flag_store.length>0){previous_flags=flags;flags=flag_store.pop();if(previous_flags.mode===MODE.Statement){output.remove_redundant_indentation(previous_flags)}}}function start_of_object_property(){return flags.parent.mode===MODE.ObjectLiteral&&flags.mode===MODE.Statement&&(flags.last_text===":"&&flags.ternary_depth===0||last_type==="TK_RESERVED"&&in_array(flags.last_text,["get","set"]))}function start_of_statement(){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["var","let","const"])&&current_token.type==="TK_WORD"||last_type==="TK_RESERVED"&&flags.last_text==="do"||last_type==="TK_RESERVED"&&flags.last_text==="return"&&!current_token.wanted_newline||last_type==="TK_RESERVED"&&flags.last_text==="else"&&!(current_token.type==="TK_RESERVED"&&current_token.text==="if")||last_type==="TK_END_EXPR"&&(previous_flags.mode===MODE.ForInitializer||previous_flags.mode===MODE.Conditional)||last_type==="TK_WORD"&&flags.mode===MODE.BlockStatement&&!flags.in_case&&!(current_token.text==="--"||current_token.text==="++")&&last_last_text!=="function"&&current_token.type!=="TK_WORD"&&current_token.type!=="TK_RESERVED"||flags.mode===MODE.ObjectLiteral&&(flags.last_text===":"&&flags.ternary_depth===0||last_type==="TK_RESERVED"&&in_array(flags.last_text,["get","set"]))){
set_mode(MODE.Statement);indent();if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["var","let","const"])&&current_token.type==="TK_WORD"){flags.declaration_statement=true}if(!start_of_object_property()){allow_wrap_or_preserved_newline(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["do","for","if","while"]))}return true}return false}function all_lines_start_with(lines,c){for(var i=0;i<lines.length;i++){var line=trim(lines[i]);if(line.charAt(0)!==c){return false}}return true}function each_line_matches_indent(lines,indent){var i=0,len=lines.length,line;for(;i<len;i++){line=lines[i];if(line&&line.indexOf(indent)!==0){return false}}return true}function is_special_word(word){return in_array(word,["case","return","do","if","throw","else"])}function get_token(offset){var index=token_pos+(offset||0);return index<0||index>=tokens.length?null:tokens[index]}function handle_start_expr(){if(start_of_statement()){}var next_mode=MODE.Expression;if(current_token.text==="["){if(last_type==="TK_WORD"||flags.last_text===")"){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,Tokenizer.line_starters)){output.space_before_token=true}set_mode(next_mode);print_token();indent();if(opt.space_in_paren){output.space_before_token=true}return}next_mode=MODE.ArrayLiteral;if(is_array(flags.mode)){if(flags.last_text==="["||flags.last_text===","&&(last_last_text==="]"||last_last_text==="}")){if(!opt.keep_array_indentation){print_newline()}}}}else{if(last_type==="TK_RESERVED"&&flags.last_text==="for"){next_mode=MODE.ForInitializer}else if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["if","while"])){next_mode=MODE.Conditional}else{}}if(flags.last_text===";"||last_type==="TK_START_BLOCK"){print_newline()}else if(last_type==="TK_END_EXPR"||last_type==="TK_START_EXPR"||last_type==="TK_END_BLOCK"||flags.last_text==="."){allow_wrap_or_preserved_newline(current_token.wanted_newline)}else if(!(last_type==="TK_RESERVED"&&current_token.text==="(")&&last_type!=="TK_WORD"&&last_type!=="TK_OPERATOR"){output.space_before_token=true}else if(last_type==="TK_RESERVED"&&(flags.last_word==="function"||flags.last_word==="typeof")||flags.last_text==="*"&&last_last_text==="function"){if(opt.space_after_anon_function){output.space_before_token=true}}else if(last_type==="TK_RESERVED"&&(in_array(flags.last_text,Tokenizer.line_starters)||flags.last_text==="catch")){if(opt.space_before_conditional){output.space_before_token=true}}if(current_token.text==="("&&last_type==="TK_RESERVED"&&flags.last_word==="await"){output.space_before_token=true}if(current_token.text==="("){if(last_type==="TK_EQUALS"||last_type==="TK_OPERATOR"){if(!start_of_object_property()){allow_wrap_or_preserved_newline()}}}set_mode(next_mode);print_token();if(opt.space_in_paren){output.space_before_token=true}indent()}function handle_end_expr(){while(flags.mode===MODE.Statement){restore_mode()}if(flags.multiline_frame){allow_wrap_or_preserved_newline(current_token.text==="]"&&is_array(flags.mode)&&!opt.keep_array_indentation)}if(opt.space_in_paren){if(last_type==="TK_START_EXPR"&&!opt.space_in_empty_paren){output.trim();output.space_before_token=false}else{output.space_before_token=true}}if(current_token.text==="]"&&opt.keep_array_indentation){print_token();restore_mode()}else{restore_mode();print_token()}output.remove_redundant_indentation(previous_flags);if(flags.do_while&&previous_flags.mode===MODE.Conditional){previous_flags.mode=MODE.Expression;flags.do_block=false;flags.do_while=false}}function handle_start_block(){var next_token=get_token(1);var second_token=get_token(2);if(second_token&&(second_token.text===":"&&in_array(next_token.type,["TK_STRING","TK_WORD","TK_RESERVED"])||in_array(next_token.text,["get","set"])&&in_array(second_token.type,["TK_WORD","TK_RESERVED"]))){if(!in_array(last_last_text,["class","interface"])){set_mode(MODE.ObjectLiteral)}else{set_mode(MODE.BlockStatement)}}else{set_mode(MODE.BlockStatement)}var empty_braces=!next_token.comments_before.length&&next_token.text==="}";var empty_anonymous_function=empty_braces&&flags.last_word==="function"&&last_type==="TK_END_EXPR";if(opt.brace_style==="expand"||opt.brace_style==="none"&&current_token.wanted_newline){if(last_type!=="TK_OPERATOR"&&(empty_anonymous_function||last_type==="TK_EQUALS"||last_type==="TK_RESERVED"&&is_special_word(flags.last_text)&&flags.last_text!=="else")){output.space_before_token=true}else{print_newline(false,true)}}else{if(last_type!=="TK_OPERATOR"&&last_type!=="TK_START_EXPR"){if(last_type==="TK_START_BLOCK"){print_newline()}else{output.space_before_token=true}}else{if(is_array(previous_flags.mode)&&flags.last_text===","){if(last_last_text==="}"){output.space_before_token=true}else{print_newline()}}}}print_token();indent()}function handle_end_block(){while(flags.mode===MODE.Statement){restore_mode()}var empty_braces=last_type==="TK_START_BLOCK";if(opt.brace_style==="expand"){if(!empty_braces){print_newline()}}else{if(!empty_braces){if(is_array(flags.mode)&&opt.keep_array_indentation){opt.keep_array_indentation=false;print_newline();opt.keep_array_indentation=true}else{print_newline()}}}restore_mode();print_token()}function handle_word(){if(current_token.type==="TK_RESERVED"&&flags.mode!==MODE.ObjectLiteral&&in_array(current_token.text,["set","get"])){current_token.type="TK_WORD"}if(current_token.type==="TK_RESERVED"&&flags.mode===MODE.ObjectLiteral){var next_token=get_token(1);if(next_token.text==":"){current_token.type="TK_WORD"}}if(start_of_statement()){}else if(current_token.wanted_newline&&!is_expression(flags.mode)&&(last_type!=="TK_OPERATOR"||(flags.last_text==="--"||flags.last_text==="++"))&&last_type!=="TK_EQUALS"&&(opt.preserve_newlines||!(last_type==="TK_RESERVED"&&in_array(flags.last_text,["var","let","const","set","get"])))){print_newline()}if(flags.do_block&&!flags.do_while){if(current_token.type==="TK_RESERVED"&&current_token.text==="while"){output.space_before_token=true;print_token();output.space_before_token=true;flags.do_while=true;return}else{print_newline();flags.do_block=false}}if(flags.if_block){if(!flags.else_block&&(current_token.type==="TK_RESERVED"&&current_token.text==="else")){flags.else_block=true}else{while(flags.mode===MODE.Statement){restore_mode()}flags.if_block=false;flags.else_block=false}}if(current_token.type==="TK_RESERVED"&&(current_token.text==="case"||current_token.text==="default"&&flags.in_case_statement)){print_newline();if(flags.case_body||opt.jslint_happy){deindent();flags.case_body=false}print_token();flags.in_case=true;flags.in_case_statement=true;return}if(current_token.type==="TK_RESERVED"&&current_token.text==="function"){if(in_array(flags.last_text,["}",";"])||output.just_added_newline()&&!in_array(flags.last_text,["[","{",":","=",","])){if(!output.just_added_blankline()&&!current_token.comments_before.length){print_newline();print_newline(true)}}if(last_type==="TK_RESERVED"||last_type==="TK_WORD"){if(last_type==="TK_RESERVED"&&in_array(flags.last_text,["get","set","new","return","export","async"])){output.space_before_token=true}else if(last_type==="TK_RESERVED"&&flags.last_text==="default"&&last_last_text==="export"){output.space_before_token=true}else{print_newline()}}else if(last_type==="TK_OPERATOR"||flags.last_text==="="){output.space_before_token=true}else if(!flags.multiline_frame&&(is_expression(flags.mode)||is_array(flags.mode))){}else{print_newline()}}if(last_type==="TK_COMMA"||last_type==="TK_START_EXPR"||last_type==="TK_EQUALS"||last_type==="TK_OPERATOR"){if(!start_of_object_property()){allow_wrap_or_preserved_newline()}}if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["function","get","set"])){print_token();flags.last_word=current_token.text;return}prefix="NONE";if(last_type==="TK_END_BLOCK"){if(!(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["else","catch","finally"]))){prefix="NEWLINE"}else{if(opt.brace_style==="expand"||opt.brace_style==="end-expand"||opt.brace_style==="none"&&current_token.wanted_newline){prefix="NEWLINE"}else{prefix="SPACE";output.space_before_token=true}}}else if(last_type==="TK_SEMICOLON"&&flags.mode===MODE.BlockStatement){prefix="NEWLINE"}else if(last_type==="TK_SEMICOLON"&&is_expression(flags.mode)){prefix="SPACE"}else if(last_type==="TK_STRING"){prefix="NEWLINE"}else if(last_type==="TK_RESERVED"||last_type==="TK_WORD"||flags.last_text==="*"&&last_last_text==="function"){prefix="SPACE"}else if(last_type==="TK_START_BLOCK"){prefix="NEWLINE"}else if(last_type==="TK_END_EXPR"){output.space_before_token=true;prefix="NEWLINE"}if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,Tokenizer.line_starters)&&flags.last_text!==")"){if(flags.last_text==="else"||flags.last_text==="export"){prefix="SPACE"}else{prefix="NEWLINE"}}if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["else","catch","finally"])){if(last_type!=="TK_END_BLOCK"||opt.brace_style==="expand"||opt.brace_style==="end-expand"||opt.brace_style==="none"&&current_token.wanted_newline){print_newline()}else{output.trim(true);var line=output.current_line;if(line.last()!=="}"){print_newline()}output.space_before_token=true}}else if(prefix==="NEWLINE"){if(last_type==="TK_RESERVED"&&is_special_word(flags.last_text)){output.space_before_token=true}else if(last_type!=="TK_END_EXPR"){if((last_type!=="TK_START_EXPR"||!(current_token.type==="TK_RESERVED"&&in_array(current_token.text,["var","let","const"])))&&flags.last_text!==":"){if(current_token.type==="TK_RESERVED"&&current_token.text==="if"&&flags.last_text==="else"){output.space_before_token=true}else{print_newline()}}}else if(current_token.type==="TK_RESERVED"&&in_array(current_token.text,Tokenizer.line_starters)&&flags.last_text!==")"){print_newline()}}else if(flags.multiline_frame&&is_array(flags.mode)&&flags.last_text===","&&last_last_text==="}"){print_newline()}else if(prefix==="SPACE"){output.space_before_token=true}print_token();flags.last_word=current_token.text;if(current_token.type==="TK_RESERVED"&&current_token.text==="do"){flags.do_block=true}if(current_token.type==="TK_RESERVED"&&current_token.text==="if"){flags.if_block=true}}function handle_semicolon(){if(start_of_statement()){output.space_before_token=false}while(flags.mode===MODE.Statement&&!flags.if_block&&!flags.do_block){restore_mode()}print_token()}function handle_string(){if(start_of_statement()){output.space_before_token=true}else if(last_type==="TK_RESERVED"||last_type==="TK_WORD"){output.space_before_token=true}else if(last_type==="TK_COMMA"||last_type==="TK_START_EXPR"||last_type==="TK_EQUALS"||last_type==="TK_OPERATOR"){if(!start_of_object_property()){allow_wrap_or_preserved_newline()}}else{print_newline()}print_token()}function handle_equals(){if(start_of_statement()){}if(flags.declaration_statement){flags.declaration_assignment=true}output.space_before_token=true;print_token();output.space_before_token=true}function handle_comma(){if(flags.declaration_statement){if(is_expression(flags.parent.mode)){flags.declaration_assignment=false}print_token();if(flags.declaration_assignment){flags.declaration_assignment=false;print_newline(false,true)}else{output.space_before_token=true;if(opt.comma_first){allow_wrap_or_preserved_newline()}}return}print_token();if(flags.mode===MODE.ObjectLiteral||flags.mode===MODE.Statement&&flags.parent.mode===MODE.ObjectLiteral){if(flags.mode===MODE.Statement){restore_mode()}print_newline()}else{output.space_before_token=true;if(opt.comma_first){allow_wrap_or_preserved_newline()}}}function handle_operator(){if(start_of_statement()){}if(last_type==="TK_RESERVED"&&is_special_word(flags.last_text)){output.space_before_token=true;print_token();return}if(current_token.text==="*"&&last_type==="TK_DOT"){print_token();return}if(current_token.text===":"&&flags.in_case){flags.case_body=true;indent();print_token();print_newline();flags.in_case=false;return}if(current_token.text==="::"){print_token();return}if(last_type==="TK_OPERATOR"){allow_wrap_or_preserved_newline()}var space_before=true;var space_after=true;if(in_array(current_token.text,["--","++","!","~"])||in_array(current_token.text,["-","+"])&&(in_array(last_type,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||in_array(flags.last_text,Tokenizer.line_starters)||flags.last_text===",")){space_before=false;space_after=false;if(current_token.wanted_newline&&(current_token.text==="--"||current_token.text==="++")){print_newline(false,true)}if(flags.last_text===";"&&is_expression(flags.mode)){space_before=true}if(last_type==="TK_RESERVED"){space_before=true}else if(last_type==="TK_END_EXPR"){space_before=!(flags.last_text==="]"&&(current_token.text==="--"||current_token.text==="++"))}else if(last_type==="TK_OPERATOR"){space_before=in_array(current_token.text,["--","-","++","+"])&&in_array(flags.last_text,["--","-","++","+"]);if(in_array(current_token.text,["+","-"])&&in_array(flags.last_text,["--","++"])){space_after=true}}if((flags.mode===MODE.BlockStatement||flags.mode===MODE.Statement)&&(flags.last_text==="{"||flags.last_text===";")){print_newline()}}else if(current_token.text===":"){if(flags.ternary_depth===0){space_before=false}else{flags.ternary_depth-=1}}else if(current_token.text==="?"){flags.ternary_depth+=1}else if(current_token.text==="*"&&last_type==="TK_RESERVED"&&flags.last_text==="function"){space_before=false;space_after=false}output.space_before_token=output.space_before_token||space_before;print_token();output.space_before_token=space_after}function handle_block_comment(){if(output.raw){output.add_raw_token(current_token);if(current_token.directives&&current_token.directives["preserve"]==="end"){if(!opt.test_output_raw){output.raw=false}}return}if(current_token.directives){print_newline(false,true);print_token();if(current_token.directives["preserve"]==="start"){output.raw=true}print_newline(false,true);return}if(!acorn.newline.test(current_token.text)&&!current_token.wanted_newline){output.space_before_token=true;print_token();output.space_before_token=true;return}var lines=split_newlines(current_token.text);var j;var javadoc=false;var starless=false;var lastIndent=current_token.whitespace_before;var lastIndentLength=lastIndent.length;print_newline(false,true);if(lines.length>1){if(all_lines_start_with(lines.slice(1),"*")){javadoc=true}else if(each_line_matches_indent(lines.slice(1),lastIndent)){starless=true}}print_token(lines[0]);for(j=1;j<lines.length;j++){print_newline(false,true);if(javadoc){print_token(" "+ltrim(lines[j]))}else if(starless&&lines[j].length>lastIndentLength){print_token(lines[j].substring(lastIndentLength))}else{output.add_token(lines[j])}}print_newline(false,true)}function handle_comment(){if(current_token.wanted_newline){print_newline(false,true)}else{output.trim(true)}output.space_before_token=true;print_token();print_newline(false,true)}function handle_dot(){if(start_of_statement()){}if(last_type==="TK_RESERVED"&&is_special_word(flags.last_text)){output.space_before_token=true}else{allow_wrap_or_preserved_newline(flags.last_text===")"&&opt.break_chained_methods)}print_token()}function handle_unknown(){print_token();if(current_token.text[current_token.text.length-1]==="\n"){print_newline()}}function handle_eof(){while(flags.mode===MODE.Statement){restore_mode()}}}function OutputLine(parent){var _character_count=0;var _indent_count=-1;var _items=[];var _empty=true;this.set_indent=function(level){_character_count=parent.baseIndentLength+level*parent.indent_length;_indent_count=level};this.get_character_count=function(){return _character_count};this.is_empty=function(){return _empty};this.last=function(){if(!this._empty){return _items[_items.length-1]}else{return null}};this.push=function(input){_items.push(input);_character_count+=input.length;_empty=false};this.pop=function(){var item=null;if(!_empty){item=_items.pop();_character_count-=item.length;_empty=_items.length===0}return item};this.remove_indent=function(){if(_indent_count>0){_indent_count-=1;_character_count-=parent.indent_length}};this.trim=function(){while(this.last()===" "){var item=_items.pop();_character_count-=1}_empty=_items.length===0};this.toString=function(){var result="";if(!this._empty){if(_indent_count>=0){result=parent.indent_cache[_indent_count]}result+=_items.join("")}return result}}function Output(indent_string,baseIndentString){baseIndentString=baseIndentString||"";this.indent_cache=[baseIndentString];this.baseIndentLength=baseIndentString.length;this.indent_length=indent_string.length;this.raw=false;var lines=[];this.baseIndentString=baseIndentString;this.indent_string=indent_string;this.previous_line=null;this.current_line=null;this.space_before_token=false;this.add_outputline=function(){this.previous_line=this.current_line;this.current_line=new OutputLine(this);lines.push(this.current_line)};this.add_outputline();this.get_line_number=function(){return lines.length};this.add_new_line=function(force_newline){if(this.get_line_number()===1&&this.just_added_newline()){return false}if(force_newline||!this.just_added_newline()){if(!this.raw){this.add_outputline()}return true}return false};this.get_code=function(){var sweet_code=lines.join("\n").replace(/[\r\n\t ]+$/,"");return sweet_code};this.set_indent=function(level){if(lines.length>1){while(level>=this.indent_cache.length){this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string)}this.current_line.set_indent(level);return true}this.current_line.set_indent(0);return false};this.add_raw_token=function(token){for(var x=0;x<token.newlines;x++){this.add_outputline()}this.current_line.push(token.whitespace_before);this.current_line.push(token.text);this.space_before_token=false};this.add_token=function(printable_token){this.add_space_before_token();this.current_line.push(printable_token)};this.add_space_before_token=function(){if(this.space_before_token&&!this.just_added_newline()){this.current_line.push(" ")}this.space_before_token=false};this.remove_redundant_indentation=function(frame){if(frame.multiline_frame||frame.mode===MODE.ForInitializer||frame.mode===MODE.Conditional){return}var index=frame.start_line_index;var line;var output_length=lines.length;while(index<output_length){lines[index].remove_indent();index++}};this.trim=function(eat_newlines){eat_newlines=eat_newlines===undefined?false:eat_newlines;this.current_line.trim(indent_string,baseIndentString);while(eat_newlines&&lines.length>1&&this.current_line.is_empty()){lines.pop();this.current_line=lines[lines.length-1];this.current_line.trim()}this.previous_line=lines.length>1?lines[lines.length-2]:null};this.just_added_newline=function(){return this.current_line.is_empty()};this.just_added_blankline=function(){if(this.just_added_newline()){if(lines.length===1){return true}var line=lines[lines.length-2];return line.is_empty()}return false}}var Token=function(type,text,newlines,whitespace_before,mode,parent){this.type=type;this.text=text;this.comments_before=[];this.newlines=newlines||0;this.wanted_newline=newlines>0;this.whitespace_before=whitespace_before||"";this.parent=null;this.directives=null};function tokenizer(input,opts,indent_string){var whitespace="\n\r ".split("");var digit=/[0-9]/;var digit_hex=/[0123456789abcdefABCDEF]/;var punct=("+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>"+" <%= <% %> <?= <? ?>").split(" ");this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var reserved_words=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]);var block_comment_pattern=/([\s\S]*?)((?:\*\/)|$)/g;var comment_pattern=/([^\n\r\u2028\u2029]*)/g;var directives_block_pattern=/\/\* beautify( \w+[:]\w+)+ \*\//g;var directive_pattern=/ (\w+)[:](\w+)/g;var directives_end_ignore_pattern=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g;var template_pattern=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;var n_newlines,whitespace_before_token,in_html_comment,tokens,parser_pos;var input_length;this.tokenize=function(){input_length=input.length;parser_pos=0;in_html_comment=false;tokens=[];var next,last;var token_values;var open=null;var open_stack=[];var comments=[];while(!(last&&last.type==="TK_EOF")){token_values=tokenize_next();next=new Token(token_values[1],token_values[0],n_newlines,whitespace_before_token);while(next.type==="TK_COMMENT"||next.type==="TK_BLOCK_COMMENT"||next.type==="TK_UNKNOWN"){if(next.type==="TK_BLOCK_COMMENT"){next.directives=token_values[2]}comments.push(next);token_values=tokenize_next();next=new Token(token_values[1],token_values[0],n_newlines,whitespace_before_token)}if(comments.length){next.comments_before=comments;comments=[]}if(next.type==="TK_START_BLOCK"||next.type==="TK_START_EXPR"){next.parent=last;open_stack.push(open);open=next}else if((next.type==="TK_END_BLOCK"||next.type==="TK_END_EXPR")&&(open&&(next.text==="]"&&open.text==="["||next.text===")"&&open.text==="("||next.text==="}"&&open.text==="{"))){next.parent=open.parent;open=open_stack.pop()}tokens.push(next);last=next}return tokens};function get_directives(text){if(!text.match(directives_block_pattern)){return null}var directives={};directive_pattern.lastIndex=0;var directive_match=directive_pattern.exec(text);while(directive_match){directives[directive_match[1]]=directive_match[2];directive_match=directive_pattern.exec(text)}return directives}function tokenize_next(){var i,resulting_string;var whitespace_on_this_line=[];n_newlines=0;whitespace_before_token="";if(parser_pos>=input_length){return["","TK_EOF"]}var last_token;if(tokens.length){last_token=tokens[tokens.length-1]}else{last_token=new Token("TK_START_BLOCK","{")}var c=input.charAt(parser_pos);parser_pos+=1;while(in_array(c,whitespace)){if(acorn.newline.test(c)){if(!(c==="\n"&&input.charAt(parser_pos-2)==="\r")){n_newlines+=1;whitespace_on_this_line=[]}}else{whitespace_on_this_line.push(c)}if(parser_pos>=input_length){return["","TK_EOF"]}c=input.charAt(parser_pos);parser_pos+=1}if(whitespace_on_this_line.length){whitespace_before_token=whitespace_on_this_line.join("")}if(digit.test(c)){var allow_decimal=true;var allow_e=true;var local_digit=digit;if(c==="0"&&parser_pos<input_length&&/[Xx]/.test(input.charAt(parser_pos))){allow_decimal=false;allow_e=false;c+=input.charAt(parser_pos);parser_pos+=1;local_digit=digit_hex}else{c="";parser_pos-=1}while(parser_pos<input_length&&local_digit.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(allow_decimal&&parser_pos<input_length&&input.charAt(parser_pos)==="."){c+=input.charAt(parser_pos);parser_pos+=1;allow_decimal=false}if(allow_e&&parser_pos<input_length&&/[Ee]/.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos<input_length&&/[+-]/.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1}allow_e=false;allow_decimal=false}}return[c,"TK_WORD"]}if(acorn.isIdentifierStart(input.charCodeAt(parser_pos-1))){if(parser_pos<input_length){while(acorn.isIdentifierChar(input.charCodeAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos===input_length){break}}}if(!(last_token.type==="TK_DOT"||last_token.type==="TK_RESERVED"&&in_array(last_token.text,["set","get"]))&&in_array(c,reserved_words)){if(c==="in"){return[c,"TK_OPERATOR"]}return[c,"TK_RESERVED"]}return[c,"TK_WORD"]}if(c==="("||c==="["){return[c,"TK_START_EXPR"]}if(c===")"||c==="]"){return[c,"TK_END_EXPR"]}if(c==="{"){return[c,"TK_START_BLOCK"]}if(c==="}"){return[c,"TK_END_BLOCK"]}if(c===";"){return[c,"TK_SEMICOLON"]}if(c==="/"){var comment="";if(input.charAt(parser_pos)==="*"){parser_pos+=1;block_comment_pattern.lastIndex=parser_pos;var comment_match=block_comment_pattern.exec(input);comment="/*"+comment_match[0];parser_pos+=comment_match[0].length;var directives=get_directives(comment);if(directives&&directives["ignore"]==="start"){directives_end_ignore_pattern.lastIndex=parser_pos;comment_match=directives_end_ignore_pattern.exec(input);comment+=comment_match[0];parser_pos+=comment_match[0].length}comment=comment.replace(acorn.lineBreak,"\n");return[comment,"TK_BLOCK_COMMENT",directives]}if(input.charAt(parser_pos)==="/"){parser_pos+=1;comment_pattern.lastIndex=parser_pos;var comment_match=comment_pattern.exec(input);comment="//"+comment_match[0];parser_pos+=comment_match[0].length;return[comment,"TK_COMMENT"]}}if(c==="`"||c==="'"||c==='"'||(c==="/"||opts.e4x&&c==="<"&&input.slice(parser_pos-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&(last_token.type==="TK_RESERVED"&&in_array(last_token.text,["return","case","throw","else","do","typeof","yield"])||last_token.type==="TK_END_EXPR"&&last_token.text===")"&&last_token.parent&&last_token.parent.type==="TK_RESERVED"&&in_array(last_token.parent.text,["if","while","for"])||in_array(last_token.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var sep=c,esc=false,has_char_escapes=false;resulting_string=c;if(sep==="/"){var in_char_class=false;while(parser_pos<input_length&&((esc||in_char_class||input.charAt(parser_pos)!==sep)&&!acorn.newline.test(input.charAt(parser_pos)))){resulting_string+=input.charAt(parser_pos);if(!esc){esc=input.charAt(parser_pos)==="\\";if(input.charAt(parser_pos)==="["){in_char_class=true}else if(input.charAt(parser_pos)==="]"){in_char_class=false}}else{esc=false}parser_pos+=1}}else if(opts.e4x&&sep==="<"){var xmlRegExp=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g;var xmlStr=input.slice(parser_pos-1);var match=xmlRegExp.exec(xmlStr);if(match&&match.index===0){var rootTag=match[2];var depth=0;while(match){var isEndTag=!!match[1];var tagName=match[2];var isSingletonTag=!!match[match.length-1]||tagName.slice(0,8)==="![CDATA[";if(tagName===rootTag&&!isSingletonTag){if(isEndTag){--depth}else{++depth}}if(depth<=0){break}match=xmlRegExp.exec(xmlStr)}var xmlLength=match?match.index+match[0].length:xmlStr.length;xmlStr=xmlStr.slice(0,xmlLength);parser_pos+=xmlLength-1;xmlStr=xmlStr.replace(acorn.lineBreak,"\n");return[xmlStr,"TK_STRING"]}}else{while(parser_pos<input_length&&(esc||input.charAt(parser_pos)!==sep&&(sep==="`"||!acorn.newline.test(input.charAt(parser_pos))))){if((esc||sep==="`")&&acorn.newline.test(input.charAt(parser_pos))){if(input.charAt(parser_pos)==="\r"&&input.charAt(parser_pos+1)==="\n"){parser_pos+=1}resulting_string+="\n"}else{resulting_string+=input.charAt(parser_pos)}if(esc){if(input.charAt(parser_pos)==="x"||input.charAt(parser_pos)==="u"){has_char_escapes=true}esc=false}else{esc=input.charAt(parser_pos)==="\\"}parser_pos+=1}}if(has_char_escapes&&opts.unescape_strings){resulting_string=unescape_string(resulting_string)}if(parser_pos<input_length&&input.charAt(parser_pos)===sep){resulting_string+=sep;parser_pos+=1;if(sep==="/"){while(parser_pos<input_length&&acorn.isIdentifierStart(input.charCodeAt(parser_pos))){resulting_string+=input.charAt(parser_pos);parser_pos+=1}}}return[resulting_string,"TK_STRING"]}if(c==="#"){if(tokens.length===0&&input.charAt(parser_pos)==="!"){resulting_string=c;while(parser_pos<input_length&&c!=="\n"){c=input.charAt(parser_pos);resulting_string+=c;parser_pos+=1}return[trim(resulting_string)+"\n","TK_UNKNOWN"]}var sharp="#";if(parser_pos<input_length&&digit.test(input.charAt(parser_pos))){do{c=input.charAt(parser_pos);sharp+=c;parser_pos+=1}while(parser_pos<input_length&&c!=="#"&&c!=="=");if(c==="#"){}else if(input.charAt(parser_pos)==="["&&input.charAt(parser_pos+1)==="]"){sharp+="[]";parser_pos+=2}else if(input.charAt(parser_pos)==="{"&&input.charAt(parser_pos+1)==="}"){sharp+="{}";parser_pos+=2}return[sharp,"TK_WORD"]}}if(c==="<"&&(input.charAt(parser_pos)==="?"||input.charAt(parser_pos)==="%")){template_pattern.lastIndex=parser_pos-1;var template_match=template_pattern.exec(input);if(template_match){c=template_match[0];parser_pos+=c.length-1;c=c.replace(acorn.lineBreak,"\n");return[c,"TK_STRING"]}}if(c==="<"&&input.substring(parser_pos-1,parser_pos+3)==="<!--"){parser_pos+=3;c="<!--";while(!acorn.newline.test(input.charAt(parser_pos))&&parser_pos<input_length){c+=input.charAt(parser_pos);parser_pos++}in_html_comment=true;return[c,"TK_COMMENT"]}if(c==="-"&&in_html_comment&&input.substring(parser_pos-1,parser_pos+2)==="-->"){in_html_comment=false;parser_pos+=2;return["-->","TK_COMMENT"]}if(c==="."){return[c,"TK_DOT"]}if(in_array(c,punct)){while(parser_pos<input_length&&in_array(c+input.charAt(parser_pos),punct)){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos>=input_length){break}}if(c===","){return[c,"TK_COMMA"]}else if(c==="="){return[c,"TK_EQUALS"]}else{return[c,"TK_OPERATOR"]}}return[c,"TK_UNKNOWN"]}function unescape_string(s){var esc=false,out="",pos=0,s_hex="",escaped=0,c;while(esc||pos<s.length){c=s.charAt(pos);pos++;if(esc){esc=false;if(c==="x"){s_hex=s.substr(pos,2);pos+=2}else if(c==="u"){s_hex=s.substr(pos,4);pos+=4}else{out+="\\"+c;continue}if(!s_hex.match(/^[0123456789abcdefABCDEF]+$/)){return s}escaped=parseInt(s_hex,16);if(escaped>=0&&escaped<32){if(c==="x"){out+="\\x"+s_hex}else{out+="\\u"+s_hex}continue}else if(escaped===34||escaped===39||escaped===92){out+="\\"+String.fromCharCode(escaped)}else if(c==="x"&&escaped>126&&escaped<=255){return s}else{out+=String.fromCharCode(escaped)}}else if(c==="\\"){esc=true}else{out+=c}}return out}}if(typeof define==="function"&&define.amd){define([],function(){return{js_beautify:js_beautify}})}else if(typeof exports!=="undefined"){exports.js_beautify=js_beautify}else if(typeof window!=="undefined"){window.js_beautify=js_beautify}else if(typeof global!=="undefined"){global.js_beautify=js_beautify}})()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],"esformatter-jsx":[function(require,module,exports){var falafel=require("falafel-espree");var extend=require("extend");var parserOpts={range:true,loc:true,comments:true,attachComment:true,tokens:true,tolerant:true,ecmaFeatures:{arrowFunctions:true,blockBindings:true,destructuring:true,regexYFlag:true,regexUFlag:true,templateStrings:true,binaryLiterals:true,octalLiterals:true,unicodeCodePointEscapes:true,defaultParams:true,restParams:true,forOf:true,objectLiteralComputedProperties:true,objectLiteralShorthandMethods:true,objectLiteralShorthandProperties:true,objectLiteralDuplicateProperties:true,generators:true,spread:true,classes:true,modules:true,jsx:true,globalReturn:true}};function hasXJSElementAsParent(node){while(node.parent){if(node.parent.type==="JSXElement"){return true}node=node.parent}return false}module.exports={setOptions:function(opts){var me=this;opts=opts||{};var jsxOptions=opts.jsx||{};me.jsxOptions=extend(true,{formatJSX:true,attrsOnSameLineAsTag:true,maxAttrsOnTag:null,firstAttributeOnSameLine:false,alignWithFirstAttribute:true},jsxOptions);if(me.jsxOptions.maxAttrsOnTag<1){me.jsxOptions.maxAttrsOnTag=1}var htmlOptions=jsxOptions.htmlOptions||{};me.htmlOptions=extend(true,{brace_style:"collapse",indent_char:" ",indent_size:2,max_preserve_newlines:2,preserve_newlines:true,unformatted:["a","span","img","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"]},htmlOptions)},_keepUnformatted:function(tag){var me=this;var unformatted=me.htmlOptions.unformatted||[];return unformatted.indexOf(tag)>-1},_prepareToProcessTags:function(source){var me=this;var code=falafel(source,parserOpts,function(node){if(node.type==="JSXElement"&&!node.selfClosing){if(node.children&&node.children.length>0){if(!me._keepUnformatted(node.openingElement.name.name)){node.openingElement.update(node.openingElement.source()+"\n");node.closingElement.update("\n"+node.closingElement.source());
}else{var childrenSource=node.children.map(function(n,idx){var src=n.source().replace(/\n/g," ").replace(/\s+/g," ");var prev=node.children[idx-1]||{};var next=node.children[idx+1]||{};if(src.trim()===""&&prev.type==="JSXExpressionContainer"&&next.type==="JSXExpressionContainer"){src=""}return src}).join("").trim();var openTag=node.openingElement.source().replace(/\n/g," ").replace(/\s+/g," ").trim();var closeTag=node.closingElement.source().replace(/\n/g," ").replace(/\s+/g," ").trim();var nSource=openTag+childrenSource+closeTag;node.update(nSource)}}}});return this._removeEmptyLines(code.toString())},_removeEmptyLines:function(code){return code.split("\n").filter(function(line){return line.trim()!==""}).join("\n")},_operateOnOpenTags:function(source){var me=this;var code=falafel(source,parserOpts,function(node){if(node.type==="JSXOpeningElement"){if(node.attributes&&node.attributes.length>(me.jsxOptions.maxAttrsOnTag||0)){var first=node.attributes[0];var firstAttributeInSameLine=me.jsxOptions.firstAttributeOnSameLine;var alignWith=me.jsxOptions.alignWithFirstAttribute?first.loc.start.column+1:node.loc.start.column+3;var tabPrefix=new Array(alignWith).join(" ");var index=0;node.attributes.forEach(function(cNode){index++;if(firstAttributeInSameLine&&index===1){return cNode}cNode.update("\n"+tabPrefix+cNode.source())})}}});return code.toString()},stringAfter:function(code){var me=this;return falafel(code,parserOpts,function(node){if(node.type==="JSXElement"&&!hasXJSElementAsParent(node)){var source=node.source();var jsxOptions=me.jsxOptions;if(jsxOptions.formatJSX){var beautifier=require("js-beautify");var first=false;if(!jsxOptions.attrsOnSameLineAsTag){source=me._prepareToProcessTags(source)}source=beautifier.html(source,me.htmlOptions);if(!jsxOptions.attrsOnSameLineAsTag){source=me._operateOnOpenTags(source)}source=me._removeEmptyLines(source).split("\n").map(function(line){line=line.replace(/\s+$/g,"");if(!first){first=true;return line}var alingWith=node.loc.start.column+1;return new Array(alingWith).join(" ")+line}).join("\n");if(node.parent&&node.parent.type==="ConditionalExpression"){source=source.split("\n").map(function(line){return line.trim()}).join("")}}node.update(source)}}).toString()}}},{extend:1,"falafel-espree":2,"js-beautify":14}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var isObject=require("is-plain-object");var forOwn=require("for-own");function defaultsDeep(o,objects){if(!isObject(o))return{};if(!isObject(objects))return o;function copy(o,current){forOwn(current,function(value,key){var val=o[key];if(val==null){o[key]=value}else if(isObject(val)&&isObject(value)){defaultsDeep(val,value)}})}var len=arguments.length,i=0;while(i<len){var obj=arguments[i++];if(obj){copy(o,obj)}}return o}module.exports=defaultsDeep},{"for-own":2,"is-plain-object":4}],2:[function(require,module,exports){"use strict";var forIn=require("for-in");var hasOwn=Object.prototype.hasOwnProperty;module.exports=function forOwn(o,fn,thisArg){forIn(o,function(val,key){if(hasOwn.call(o,key)){return fn.call(thisArg,o[key],key,o)}})}},{"for-in":3}],3:[function(require,module,exports){"use strict";module.exports=function forIn(o,fn,thisArg){for(var key in o){if(fn.call(thisArg,o[key],key,o)===false){break}}}},{}],4:[function(require,module,exports){"use strict";var isObject=require("isobject");function isObjectObject(o){return isObject(o)===true&&Object.prototype.toString.call(o)==="[object Object]"}module.exports=function isPlainObject(o){var ctor,prot;if(isObjectObject(o)===false)return false;ctor=o.constructor;if(typeof ctor!=="function")return false;prot=ctor.prototype;if(isObjectObject(prot)===false)return false;if(prot.hasOwnProperty("isPrototypeOf")===false){return false}return true}},{isobject:5}],5:[function(require,module,exports){"use strict";module.exports=function isObject(val){return Object.prototype.toString.call(val)==="[object Object]"&&typeof val==="object"}},{}],6:[function(require,module,exports){"use strict";var makeCheck=require("./makeCheck");var isNotEmpty=require("./is").isNotEmpty;exports.findInBetween=findInBetween;function findInBetween(startToken,endToken,check){check=makeCheck(check);var found;var last=endToken&&endToken.next;while(startToken&&startToken!==last&&!found){if(check(startToken)){found=startToken}startToken=startToken.next}return found}exports.findInBetweenFromEnd=findInBetweenFromEnd;function findInBetweenFromEnd(startToken,endToken,check){check=makeCheck(check);var found;var last=startToken&&startToken.prev;while(endToken&&endToken!==last&&!found){if(check(endToken)){found=endToken}endToken=endToken.prev}return found}exports.findNext=findNext;function findNext(startToken,check){check=makeCheck(check);startToken=startToken&&startToken.next;while(startToken){if(check(startToken)){return startToken}startToken=startToken.next}}exports.findPrev=findPrev;function findPrev(endToken,check){check=makeCheck(check);endToken=endToken&&endToken.prev;while(endToken){if(check(endToken)){return endToken}endToken=endToken.prev}}exports.findNextNonEmpty=findNextNonEmpty;function findNextNonEmpty(startToken){return findNext(startToken,isNotEmpty)}exports.findPrevNonEmpty=findPrevNonEmpty;function findPrevNonEmpty(endToken){return findPrev(endToken,isNotEmpty)}},{"./is":9,"./makeCheck":10}],7:[function(require,module,exports){"use strict";function mixIn(target,source){Object.keys(source).forEach(function(key){target[key]=source[key]});return target}exports.eachInBetween=eachInBetween;function eachInBetween(startToken,endToken,iterator){var last=endToken&&endToken.next;while(startToken&&startToken!==last){iterator(startToken);startToken=startToken.next}}mixIn(exports,require("./find"));mixIn(exports,require("./insert"));mixIn(exports,require("./is"));mixIn(exports,require("./remove"))},{"./find":6,"./insert":8,"./is":9,"./remove":11}],8:[function(require,module,exports){"use strict";exports.before=before;function before(target,newToken){newToken.prev=target.prev;newToken.next=target;if(target.prev){target.prev.next=newToken}else if(target.root){target.root.startToken=newToken}target.prev=newToken;newToken.root=target.root;return newToken}exports.after=after;function after(target,newToken){if(target.next){target.next.prev=newToken}else if(target.root){target.root.endToken=newToken}newToken.prev=target;newToken.next=target.next;target.next=newToken;newToken.root=target.root;return newToken}},{}],9:[function(require,module,exports){"use strict";exports.isWs=isWs;function isWs(token){return token&&token.type==="WhiteSpace"}exports.isBr=isBr;function isBr(token){return token&&token.type==="LineBreak"}exports.isEmpty=isEmpty;function isEmpty(token){return token&&(token.type==="WhiteSpace"||token.type==="LineBreak"||token.type==="Indent")}exports.isNotEmpty=isNotEmpty;function isNotEmpty(token){return!isEmpty(token)}exports.isCode=isCode;function isCode(token){return!isEmpty(token)&&!isComment(token)}exports.isSemiColon=isSemiColon;function isSemiColon(token){return token&&(token.type==="Punctuator"&&token.value===";")}exports.isComma=isComma;function isComma(token){return token&&(token.type==="Punctuator"&&token.value===",")}exports.isIndent=isIndent;function isIndent(token){return token&&token.type==="Indent"}exports.isComment=isComment;function isComment(token){return token&&(token.type==="LineComment"||token.type==="BlockComment")}},{}],10:[function(require,module,exports){"use strict";module.exports=makeCheck;function makeCheck(orig){if(typeof orig==="string"){return makeStringCheck(orig)}else if(Array.isArray(orig)){return makeArrayCheck(orig)}return orig}function makeArrayCheck(arr){return function checkTypeAndValueByIndex(token){return token&&(arr.indexOf(token.type)!==-1||arr.indexOf(token.value)!==-1)}}function makeStringCheck(str){return function checkTypeAndValueByString(token){return token&&(token.type===str||token.value===str)}}},{}],11:[function(require,module,exports){"use strict";var makeCheck=require("./makeCheck");var isEmpty=require("./is").isEmpty;exports.remove=remove;function remove(target){if(target.next){target.next.prev=target.prev}else if(target.root){target.root.endToken=target.prev}if(target.prev){target.prev.next=target.next}else if(target.root){target.root.startToken=target.next}}exports.removeInBetween=removeInBetween;function removeInBetween(startToken,endToken,check){check=makeCheck(check);var last=endToken&&endToken.next;while(startToken&&startToken!==last){if(check(startToken)){remove(startToken)}startToken=startToken.next}}exports.removeAdjacent=removeAdjacent;function removeAdjacent(token,check){removeAdjacentBefore(token,check);removeAdjacentAfter(token,check)}exports.removeAdjacentBefore=removeAdjacentBefore;function removeAdjacentBefore(token,check){check=makeCheck(check);var prev=token.prev;while(prev&&check(prev)){remove(prev);prev=prev.prev}}exports.removeAdjacentAfter=removeAdjacentAfter;function removeAdjacentAfter(token,check){check=makeCheck(check);var next=token.next;while(next&&check(next)){remove(next);next=next.next}}exports.removeEmptyAdjacentBefore=removeEmptyAdjacentBefore;function removeEmptyAdjacentBefore(startToken){removeAdjacentBefore(startToken,isEmpty)}exports.removeEmptyAdjacentAfter=removeEmptyAdjacentAfter;function removeEmptyAdjacentAfter(startToken){removeAdjacentAfter(startToken,isEmpty)}exports.removeEmptyInBetween=removeEmptyInBetween;function removeEmptyInBetween(startToken,endToken){removeInBetween(startToken,endToken,isEmpty)}},{"./is":9,"./makeCheck":10}],12:[function(require,module,exports){exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}exports.formatters.j=function(v){return JSON.stringify(v)};function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return args;var c="color: "+this.color;args=[args[0],c,"color: inherit"].concat(Array.prototype.slice.call(args,1));var index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c);return args}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}},{"./debug":13}],13:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs){args=exports.formatArgs.apply(self,args)}var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{exports.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++){if(exports.skips[i].test(name)){return false}}for(i=0,len=exports.names.length;i<len;i++){if(exports.names[i].test(name)){return true}}return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{ms:14}],14:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){str=""+str;if(str.length>1e4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],15:[function(require,module,exports){"use strict";module.exports=repeat;function repeat(str,num){if(typeof str!=="string"){throw new TypeError("repeat-string expects a string.")}if(num===1)return str;if(num===2)return str+str;var max=str.length*num;if(cache!==str||typeof cache==="undefined"){cache=str;res=""}while(max>res.length&&num>0){if(num&1){res+=str}num>>=1;if(!num)break;str+=str}return res.substr(0,max)}var res="";var cache},{}],16:[function(require,module,exports){"use strict";var _tk=require("rocambole-token");var repeat=require("repeat-string");var debug=require("debug");var debugBefore=debug("rocambole:ws:before");var debugAfter=debug("rocambole:ws:after");var _curOpts={value:" ",before:{},after:{}};exports.setOptions=setOptions;function setOptions(opts){_curOpts=opts}exports.limit=limit;function limit(token,typeOrValue){limitBefore(token,typeOrValue);limitAfter(token,typeOrValue)}exports.limitBefore=limitBefore;function limitBefore(token,typeOrValue){var amount=expectedBefore(typeOrValue);debugBefore("typeOrValue: %s, amount: %s, token: %s",typeOrValue,amount,token.value);if(amount<0)return;update("before",token,amount)}exports.limitAfter=limitAfter;function limitAfter(token,typeOrValue){var amount=expectedAfter(typeOrValue);debugAfter("typeOrValue: %s, amount: %s, token: %s",typeOrValue,amount,token.value);if(amount<0)return;update("after",token,amount)}exports.expectedAfter=expectedAfter;function expectedAfter(typeOrValue){return getAmount("after",typeOrValue)}exports.expectedBefore=expectedBefore;function expectedBefore(typeOrValue){return getAmount("before",typeOrValue)}function getAmount(position,typeOrValue){if(typeof typeOrValue==="number"){return typeOrValue}var amount=_curOpts[position][typeOrValue];return amount==null?-1:amount}function update(position,target,amount){var adjacent=position==="before"?target.prev:target.next;var adjacentIsWs=_tk.isWs(adjacent);if(!adjacent||_tk.isBr(adjacent))return;if(amount===0&&adjacentIsWs){_tk.remove(adjacent);return}var ws;if(adjacentIsWs){ws=adjacent}else{ws={type:"WhiteSpace"}}ws.value=repeat(_curOpts.value||" ",amount);if(!adjacentIsWs){_tk[position](target,ws)}}},{debug:12,"repeat-string":15,"rocambole-token":7}],17:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.esprima={})}})(this,function(exports){"use strict";var Token,TokenName,FnExprTokens,Syntax,PlaceHolders,Messages,Regex,source,strict,sourceType,index,lineNumber,lineStart,hasLineTerminator,lastIndex,lastLineNumber,lastLineStart,startIndex,startLineNumber,startLineStart,scanning,length,lookahead,state,extra,isBindingElement,isAssignmentTarget,firstCoverInitializedNameError;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10};TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="<end>";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";TokenName[Token.RegularExpression]="RegularExpression";TokenName[Token.Template]="Template";FnExprTokens=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"};PlaceHolders={ArrowParameterPlaceHolder:"ArrowParameterPlaceHolder"};Messages={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",IllegalYield:"Unexpected token yield",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",DefaultRestParameter:"Unexpected token =",ObjectPatternAsRestParameter:"Unexpected token {",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ConstructorSpecialMethod:"Class constructor may not be an accessor",DuplicateConstructor:"A class may only have one constructor",StaticPrototype:"Classes may not have static property named prototype",MissingFromClause:"Unexpected token",NoAsAfterImportNamespace:"Unexpected token",InvalidModuleSpecifier:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalExportDeclaration:"Unexpected token",DuplicateBinding:"Duplicate binding %0"};Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function assert(condition,message){if(!condition){throw new Error("ASSERT: "+message)}}function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return"0123456789abcdefABCDEF".indexOf(ch)>=0}function isOctalDigit(ch){return"01234567".indexOf(ch)>=0}function octalToDecimal(ch){var octal=ch!=="0",code="01234567".indexOf(ch);if(index<length&&isOctalDigit(source[index])){octal=true;code=code*8+"01234567".indexOf(source[index++]);if("0123".indexOf(ch)>=0&&index<length&&isOctalDigit(source[index])){code=code*8+"01234567".indexOf(source[index++])}}return{code:code,octal:octal}}function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function isFutureReservedWord(id){switch(id){case"enum":case"export":case"import":case"super":return true;default:return false}}function isStrictModeReservedWord(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isKeyword(id){switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try"||id==="let";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}function addComment(type,value,start,end,loc){var comment;assert(typeof start==="number","Comment must have valid position");state.lastCommentStart=start;comment={type:type,value:value};if(extra.range){comment.range=[start,end]}if(extra.loc){comment.loc=loc}extra.comments.push(comment);if(extra.attachComment){extra.leadingComments.push(comment);extra.trailingComments.push(comment)}}function skipSingleLineComment(offset){var start,loc,ch,comment;start=index-offset;loc={start:{line:lineNumber,column:index-lineStart-offset}};while(index<length){ch=source.charCodeAt(index);++index;if(isLineTerminator(ch)){hasLineTerminator=true;if(extra.comments){comment=source.slice(start+offset,index-1);loc.end={line:lineNumber,column:index-lineStart-1};addComment("Line",comment,start,index-1,loc)}if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;return}}if(extra.comments){comment=source.slice(start+offset,index);loc.end={line:lineNumber,column:index-lineStart};addComment("Line",comment,start,index,loc)}}function skipMultiLineComment(){var start,loc,ch,comment;if(extra.comments){start=index-2;loc={start:{line:lineNumber,column:index-lineStart-2}}}while(index<length){ch=source.charCodeAt(index);if(isLineTerminator(ch)){if(ch===13&&source.charCodeAt(index+1)===10){++index}hasLineTerminator=true;++lineNumber;++index;lineStart=index}else if(ch===42){if(source.charCodeAt(index+1)===47){++index;++index;if(extra.comments){comment=source.slice(start+2,index-2);loc.end={line:lineNumber,column:index-lineStart};addComment("Block",comment,start,index,loc)}return}++index}else{++index}}if(extra.comments){loc.end={line:lineNumber,column:index-lineStart};comment=source.slice(start+2,index);addComment("Block",comment,start,index,loc)}tolerateUnexpectedToken()}function skipComment(){var ch,start;hasLineTerminator=false;start=index===0;while(index<length){ch=source.charCodeAt(index);if(isWhiteSpace(ch)){++index}else if(isLineTerminator(ch)){hasLineTerminator=true;++index;if(ch===13&&source.charCodeAt(index)===10){++index}++lineNumber;lineStart=index;start=true}else if(ch===47){ch=source.charCodeAt(index+1);if(ch===47){++index;++index;skipSingleLineComment(2);start=true}else if(ch===42){++index;++index;skipMultiLineComment()}else{break}}else if(start&&ch===45){if(source.charCodeAt(index+1)===45&&source.charCodeAt(index+2)===62){index+=3;skipSingleLineComment(3)}else{break}}else if(ch===60){if(source.slice(index+1,index+4)==="!--"){++index;++index;++index;++index;skipSingleLineComment(4)}else{break}}else{break}}}function scanHexEscape(prefix){var i,len,ch,code=0;len=prefix==="u"?4:2;for(i=0;i<len;++i){if(index<length&&isHexDigit(source[index])){ch=source[index++];code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}else{return""}}return String.fromCharCode(code)}function scanUnicodeCodePointEscape(){var ch,code,cu1,cu2;ch=source[index];code=0;if(ch==="}"){throwUnexpectedToken()}while(index<length){ch=source[index++];if(!isHexDigit(ch)){break}code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}if(code>1114111||ch!=="}"){throwUnexpectedToken()}if(code<=65535){return String.fromCharCode(code)}cu1=(code-65536>>10)+55296;cu2=(code-65536&1023)+56320;return String.fromCharCode(cu1,cu2)}function getEscapedIdentifier(){var ch,id;ch=source.charCodeAt(index++);id=String.fromCharCode(ch);if(ch===92){if(source.charCodeAt(index)!==117){throwUnexpectedToken()}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!isIdentifierStart(ch.charCodeAt(0))){throwUnexpectedToken()}id=ch}while(index<length){ch=source.charCodeAt(index);if(!isIdentifierPart(ch)){break}++index;id+=String.fromCharCode(ch);if(ch===92){id=id.substr(0,id.length-1);if(source.charCodeAt(index)!==117){throwUnexpectedToken()}++index;ch=scanHexEscape("u");if(!ch||ch==="\\"||!isIdentifierPart(ch.charCodeAt(0))){throwUnexpectedToken()}id+=ch}}return id}function getIdentifier(){var start,ch;start=index++;while(index<length){
ch=source.charCodeAt(index);if(ch===92){index=start;return getEscapedIdentifier()}if(isIdentifierPart(ch)){++index}else{break}}return source.slice(start,index)}function scanIdentifier(){var start,id,type;start=index;id=source.charCodeAt(index)===92?getEscapedIdentifier():getIdentifier();if(id.length===1){type=Token.Identifier}else if(isKeyword(id)){type=Token.Keyword}else if(id==="null"){type=Token.NullLiteral}else if(id==="true"||id==="false"){type=Token.BooleanLiteral}else{type=Token.Identifier}return{type:type,value:id,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanPunctuator(){var token,str;token={type:Token.Punctuator,value:"",lineNumber:lineNumber,lineStart:lineStart,start:index,end:index};str=source[index];switch(str){case"(":if(extra.tokenize){extra.openParenToken=extra.tokens.length}++index;break;case"{":if(extra.tokenize){extra.openCurlyToken=extra.tokens.length}state.curlyStack.push("{");++index;break;case".":++index;if(source[index]==="."&&source[index+1]==="."){index+=2;str="..."}break;case"}":++index;state.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++index;break;default:str=source.substr(index,4);if(str===">>>="){index+=4}else{str=str.substr(0,3);if(str==="==="||str==="!=="||str===">>>"||str==="<<="||str===">>="){index+=3}else{str=str.substr(0,2);if(str==="&&"||str==="||"||str==="=="||str==="!="||str==="+="||str==="-="||str==="*="||str==="/="||str==="++"||str==="--"||str==="<<"||str===">>"||str==="&="||str==="|="||str==="^="||str==="%="||str==="<="||str===">="||str==="=>"){index+=2}else{str=source[index];if("<>=!+-*%&|^/".indexOf(str)>=0){++index}}}}}if(index===token.start){throwUnexpectedToken()}token.end=index;token.value=str;return token}function scanHexLiteral(start){var number="";while(index<length){if(!isHexDigit(source[index])){break}number+=source[index++]}if(number.length===0){throwUnexpectedToken()}if(isIdentifierStart(source.charCodeAt(index))){throwUnexpectedToken()}return{type:Token.NumericLiteral,value:parseInt("0x"+number,16),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanBinaryLiteral(start){var ch,number;number="";while(index<length){ch=source[index];if(ch!=="0"&&ch!=="1"){break}number+=source[index++]}if(number.length===0){throwUnexpectedToken()}if(index<length){ch=source.charCodeAt(index);if(isIdentifierStart(ch)||isDecimalDigit(ch)){throwUnexpectedToken()}}return{type:Token.NumericLiteral,value:parseInt(number,2),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanOctalLiteral(prefix,start){var number,octal;if(isOctalDigit(prefix)){octal=true;number="0"+source[index++]}else{octal=false;++index;number=""}while(index<length){if(!isOctalDigit(source[index])){break}number+=source[index++]}if(!octal&&number.length===0){throwUnexpectedToken()}if(isIdentifierStart(source.charCodeAt(index))||isDecimalDigit(source.charCodeAt(index))){throwUnexpectedToken()}return{type:Token.NumericLiteral,value:parseInt(number,8),octal:octal,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function isImplicitOctalLiteral(){var i,ch;for(i=index+1;i<length;++i){ch=source[i];if(ch==="8"||ch==="9"){return false}if(!isOctalDigit(ch)){return true}}return true}function scanNumericLiteral(){var number,start,ch;ch=source[index];assert(isDecimalDigit(ch.charCodeAt(0))||ch===".","Numeric literal must start with a decimal digit or a decimal point");start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch==="x"||ch==="X"){++index;return scanHexLiteral(start)}if(ch==="b"||ch==="B"){++index;return scanBinaryLiteral(start)}if(ch==="o"||ch==="O"){return scanOctalLiteral(ch,start)}if(isOctalDigit(ch)){if(isImplicitOctalLiteral()){return scanOctalLiteral(ch,start)}}}while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="."){number+=source[index++];while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-"){number+=source[index++]}if(isDecimalDigit(source.charCodeAt(index))){while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}}else{throwUnexpectedToken()}}if(isIdentifierStart(source.charCodeAt(index))){throwUnexpectedToken()}return{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function scanStringLiteral(){var str="",quote,start,ch,unescaped,octToDec,octal=false;quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");start=index;++index;while(index<length){ch=source[index++];if(ch===quote){quote="";break}else if(ch==="\\"){ch=source[index++];if(!ch||!isLineTerminator(ch.charCodeAt(0))){switch(ch){case"u":case"x":if(source[index]==="{"){++index;str+=scanUnicodeCodePointEscape()}else{unescaped=scanHexEscape(ch);if(!unescaped){throw throwUnexpectedToken()}str+=unescaped}break;case"n":str+="\n";break;case"r":str+="\r";break;case"t":str+=" ";break;case"b":str+="\b";break;case"f":str+="\f";break;case"v":str+=" ";break;case"8":case"9":throw throwUnexpectedToken();default:if(isOctalDigit(ch)){octToDec=octalToDecimal(ch);octal=octToDec.octal||octal;str+=String.fromCharCode(octToDec.code)}else{str+=ch}break}}else{++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index}}else if(isLineTerminator(ch.charCodeAt(0))){break}else{str+=ch}}if(quote!==""){throwUnexpectedToken()}return{type:Token.StringLiteral,value:str,octal:octal,lineNumber:startLineNumber,lineStart:startLineStart,start:start,end:index}}function scanTemplate(){var cooked="",ch,start,rawOffset,terminated,head,tail,restore,unescaped;terminated=false;tail=false;start=index;head=source[index]==="`";rawOffset=2;++index;while(index<length){ch=source[index++];if(ch==="`"){rawOffset=1;tail=true;terminated=true;break}else if(ch==="$"){if(source[index]==="{"){state.curlyStack.push("${");++index;terminated=true;break}cooked+=ch}else if(ch==="\\"){ch=source[index++];if(!isLineTerminator(ch.charCodeAt(0))){switch(ch){case"n":cooked+="\n";break;case"r":cooked+="\r";break;case"t":cooked+=" ";break;case"u":case"x":if(source[index]==="{"){++index;cooked+=scanUnicodeCodePointEscape()}else{restore=index;unescaped=scanHexEscape(ch);if(unescaped){cooked+=unescaped}else{index=restore;cooked+=ch}}break;case"b":cooked+="\b";break;case"f":cooked+="\f";break;case"v":cooked+=" ";break;default:if(ch==="0"){if(isDecimalDigit(source.charCodeAt(index))){throwError(Messages.TemplateOctalLiteral)}cooked+="\x00"}else if(isOctalDigit(ch)){throwError(Messages.TemplateOctalLiteral)}else{cooked+=ch}break}}else{++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index}}else if(isLineTerminator(ch.charCodeAt(0))){++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}lineStart=index;cooked+="\n"}else{cooked+=ch}}if(!terminated){throwUnexpectedToken()}if(!head){state.curlyStack.pop()}return{type:Token.Template,value:{cooked:cooked,raw:source.slice(start+1,index-rawOffset)},head:head,tail:tail,lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}function testRegExp(pattern,flags){var astralSubstitute="￿",tmp=pattern;if(flags.indexOf("u")>=0){tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function($0,$1,$2){var codePoint=parseInt($1||$2,16);if(codePoint>1114111){throwUnexpectedToken(null,Messages.InvalidRegExp)}if(codePoint<=65535){return String.fromCharCode(codePoint)}return astralSubstitute}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,astralSubstitute)}try{RegExp(tmp)}catch(e){throwUnexpectedToken(null,Messages.InvalidRegExp)}try{return new RegExp(pattern,flags)}catch(exception){return null}}function scanRegExpBody(){var ch,str,classMarker,terminated,body;ch=source[index];assert(ch==="/","Regular expression literal must start with a slash");str=source[index++];classMarker=false;terminated=false;while(index<length){ch=source[index++];str+=ch;if(ch==="\\"){ch=source[index++];if(isLineTerminator(ch.charCodeAt(0))){throwUnexpectedToken(null,Messages.UnterminatedRegExp)}str+=ch}else if(isLineTerminator(ch.charCodeAt(0))){throwUnexpectedToken(null,Messages.UnterminatedRegExp)}else if(classMarker){if(ch==="]"){classMarker=false}}else{if(ch==="/"){terminated=true;break}else if(ch==="["){classMarker=true}}}if(!terminated){throwUnexpectedToken(null,Messages.UnterminatedRegExp)}body=str.substr(1,str.length-2);return{value:body,literal:str}}function scanRegExpFlags(){var ch,str,flags,restore;str="";flags="";while(index<length){ch=source[index];if(!isIdentifierPart(ch.charCodeAt(0))){break}++index;if(ch==="\\"&&index<length){ch=source[index];if(ch==="u"){++index;restore=index;ch=scanHexEscape("u");if(ch){flags+=ch;for(str+="\\u";restore<index;++restore){str+=source[restore]}}else{index=restore;flags+="u";str+="\\u"}tolerateUnexpectedToken()}else{str+="\\";tolerateUnexpectedToken()}}else{flags+=ch;str+=ch}}return{value:flags,literal:str}}function scanRegExp(){scanning=true;var start,body,flags,value;lookahead=null;skipComment();start=index;body=scanRegExpBody();flags=scanRegExpFlags();value=testRegExp(body.value,flags.value);scanning=false;if(extra.tokenize){return{type:Token.RegularExpression,value:value,regex:{pattern:body.value,flags:flags.value},lineNumber:lineNumber,lineStart:lineStart,start:start,end:index}}return{literal:body.literal+flags.literal,value:value,regex:{pattern:body.value,flags:flags.value},start:start,end:index}}function collectRegex(){var pos,loc,regex,token;skipComment();pos=index;loc={start:{line:lineNumber,column:index-lineStart}};regex=scanRegExp();loc.end={line:lineNumber,column:index-lineStart};if(!extra.tokenize){if(extra.tokens.length>0){token=extra.tokens[extra.tokens.length-1];if(token.range[0]===pos&&token.type==="Punctuator"){if(token.value==="/"||token.value==="/="){extra.tokens.pop()}}}extra.tokens.push({type:"RegularExpression",value:regex.literal,regex:regex.regex,range:[pos,index],loc:loc})}return regex}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advanceSlash(){var prevToken,checkToken;prevToken=extra.tokens[extra.tokens.length-1];if(!prevToken){return collectRegex()}if(prevToken.type==="Punctuator"){if(prevToken.value==="]"){return scanPunctuator()}if(prevToken.value===")"){checkToken=extra.tokens[extra.openParenToken-1];if(checkToken&&checkToken.type==="Keyword"&&(checkToken.value==="if"||checkToken.value==="while"||checkToken.value==="for"||checkToken.value==="with")){return collectRegex()}return scanPunctuator()}if(prevToken.value==="}"){if(extra.tokens[extra.openCurlyToken-3]&&extra.tokens[extra.openCurlyToken-3].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-4];if(!checkToken){return scanPunctuator()}}else if(extra.tokens[extra.openCurlyToken-4]&&extra.tokens[extra.openCurlyToken-4].type==="Keyword"){checkToken=extra.tokens[extra.openCurlyToken-5];if(!checkToken){return collectRegex()}}else{return scanPunctuator()}if(FnExprTokens.indexOf(checkToken.value)>=0){return scanPunctuator()}return collectRegex()}return collectRegex()}if(prevToken.type==="Keyword"&&prevToken.value!=="this"){return collectRegex()}return scanPunctuator()}function advance(){var ch,token;if(index>=length){return{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,start:index,end:index}}ch=source.charCodeAt(index);if(isIdentifierStart(ch)){token=scanIdentifier();if(strict&&isStrictModeReservedWord(token.value)){token.type=Token.Keyword}return token}if(ch===40||ch===41||ch===59){return scanPunctuator()}if(ch===39||ch===34){return scanStringLiteral()}if(ch===46){if(isDecimalDigit(source.charCodeAt(index+1))){return scanNumericLiteral()}return scanPunctuator()}if(isDecimalDigit(ch)){return scanNumericLiteral()}if(extra.tokenize&&ch===47){return advanceSlash()}if(ch===96||ch===125&&state.curlyStack[state.curlyStack.length-1]==="${"){return scanTemplate()}return scanPunctuator()}function collectToken(){var loc,token,value,entry;loc={start:{line:lineNumber,column:index-lineStart}};token=advance();loc.end={line:lineNumber,column:index-lineStart};if(token.type!==Token.EOF){value=source.slice(token.start,token.end);entry={type:TokenName[token.type],value:value,range:[token.start,token.end],loc:loc};if(token.regex){entry.regex={pattern:token.regex.pattern,flags:token.regex.flags}}extra.tokens.push(entry)}return token}function lex(){var token;scanning=true;lastIndex=index;lastLineNumber=lineNumber;lastLineStart=lineStart;skipComment();token=lookahead;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();scanning=false;return token}function peek(){scanning=true;skipComment();lastIndex=index;lastLineNumber=lineNumber;lastLineStart=lineStart;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;lookahead=typeof extra.tokens!=="undefined"?collectToken():advance();scanning=false}function Position(){this.line=startLineNumber;this.column=startIndex-startLineStart}function SourceLocation(){this.start=new Position;this.end=null}function WrappingSourceLocation(startToken){this.start={line:startToken.lineNumber,column:startToken.start-startToken.lineStart};this.end=null}function Node(){if(extra.range){this.range=[startIndex,0]}if(extra.loc){this.loc=new SourceLocation}}function WrappingNode(startToken){if(extra.range){this.range=[startToken.start,0]}if(extra.loc){this.loc=new WrappingSourceLocation(startToken)}}WrappingNode.prototype=Node.prototype={processComment:function(){var lastChild,leadingComments,trailingComments,bottomRight=extra.bottomRightStack,i,comment,last=bottomRight[bottomRight.length-1];if(this.type===Syntax.Program){if(this.body.length>0){return}}if(extra.trailingComments.length>0){trailingComments=[];for(i=extra.trailingComments.length-1;i>=0;--i){comment=extra.trailingComments[i];if(comment.range[0]>=this.range[1]){trailingComments.unshift(comment);extra.trailingComments.splice(i,1)}}extra.trailingComments=[]}else{if(last&&last.trailingComments&&last.trailingComments[0].range[0]>=this.range[1]){trailingComments=last.trailingComments;delete last.trailingComments}}while(last&&last.range[0]>=this.range[0]){lastChild=bottomRight.pop();last=bottomRight[bottomRight.length-1]}if(lastChild){if(lastChild.leadingComments){leadingComments=[];for(i=lastChild.leadingComments.length-1;i>=0;--i){comment=lastChild.leadingComments[i];if(comment.range[1]<=this.range[0]){leadingComments.unshift(comment);lastChild.leadingComments.splice(i,1)}}if(!lastChild.leadingComments.length){lastChild.leadingComments=undefined}}}else if(extra.leadingComments.length>0){leadingComments=[];for(i=extra.leadingComments.length-1;i>=0;--i){comment=extra.leadingComments[i];if(comment.range[1]<=this.range[0]){leadingComments.unshift(comment);extra.leadingComments.splice(i,1)}}}if(leadingComments&&leadingComments.length>0){this.leadingComments=leadingComments}if(trailingComments&&trailingComments.length>0){this.trailingComments=trailingComments}bottomRight.push(this)},finish:function(){if(extra.range){this.range[1]=lastIndex}if(extra.loc){this.loc.end={line:lastLineNumber,column:lastIndex-lastLineStart};if(extra.source){this.loc.source=extra.source}}if(extra.attachComment){this.processComment()}},finishArrayExpression:function(elements){this.type=Syntax.ArrayExpression;this.elements=elements;this.finish();return this},finishArrayPattern:function(elements){this.type=Syntax.ArrayPattern;this.elements=elements;this.finish();return this},finishArrowFunctionExpression:function(params,defaults,body,expression){this.type=Syntax.ArrowFunctionExpression;this.id=null;this.params=params;this.defaults=defaults;this.body=body;this.generator=false;this.expression=expression;this.finish();return this},finishAssignmentExpression:function(operator,left,right){this.type=Syntax.AssignmentExpression;this.operator=operator;this.left=left;this.right=right;this.finish();return this},finishAssignmentPattern:function(left,right){this.type=Syntax.AssignmentPattern;this.left=left;this.right=right;this.finish();return this},finishBinaryExpression:function(operator,left,right){this.type=operator==="||"||operator==="&&"?Syntax.LogicalExpression:Syntax.BinaryExpression;this.operator=operator;this.left=left;this.right=right;this.finish();return this},finishBlockStatement:function(body){this.type=Syntax.BlockStatement;this.body=body;this.finish();return this},finishBreakStatement:function(label){this.type=Syntax.BreakStatement;this.label=label;this.finish();return this},finishCallExpression:function(callee,args){this.type=Syntax.CallExpression;this.callee=callee;this.arguments=args;this.finish();return this},finishCatchClause:function(param,body){this.type=Syntax.CatchClause;this.param=param;this.body=body;this.finish();return this},finishClassBody:function(body){this.type=Syntax.ClassBody;this.body=body;this.finish();return this},finishClassDeclaration:function(id,superClass,body){this.type=Syntax.ClassDeclaration;this.id=id;this.superClass=superClass;this.body=body;this.finish();return this},finishClassExpression:function(id,superClass,body){this.type=Syntax.ClassExpression;this.id=id;this.superClass=superClass;this.body=body;this.finish();return this},finishConditionalExpression:function(test,consequent,alternate){this.type=Syntax.ConditionalExpression;this.test=test;this.consequent=consequent;this.alternate=alternate;this.finish();return this},finishContinueStatement:function(label){this.type=Syntax.ContinueStatement;this.label=label;this.finish();return this},finishDebuggerStatement:function(){this.type=Syntax.DebuggerStatement;this.finish();return this},finishDoWhileStatement:function(body,test){this.type=Syntax.DoWhileStatement;this.body=body;this.test=test;this.finish();return this},finishEmptyStatement:function(){this.type=Syntax.EmptyStatement;this.finish();return this},finishExpressionStatement:function(expression){this.type=Syntax.ExpressionStatement;this.expression=expression;this.finish();return this},finishForStatement:function(init,test,update,body){this.type=Syntax.ForStatement;this.init=init;this.test=test;this.update=update;this.body=body;this.finish();return this},finishForOfStatement:function(left,right,body){this.type=Syntax.ForOfStatement;this.left=left;this.right=right;this.body=body;this.finish();return this},finishForInStatement:function(left,right,body){this.type=Syntax.ForInStatement;this.left=left;this.right=right;this.body=body;this.each=false;this.finish();return this},finishFunctionDeclaration:function(id,params,defaults,body,generator){this.type=Syntax.FunctionDeclaration;this.id=id;this.params=params;this.defaults=defaults;this.body=body;this.generator=generator;this.expression=false;this.finish();return this},finishFunctionExpression:function(id,params,defaults,body,generator){this.type=Syntax.FunctionExpression;this.id=id;this.params=params;this.defaults=defaults;this.body=body;this.generator=generator;this.expression=false;this.finish();return this},finishIdentifier:function(name){this.type=Syntax.Identifier;this.name=name;this.finish();return this},finishIfStatement:function(test,consequent,alternate){this.type=Syntax.IfStatement;this.test=test;this.consequent=consequent;this.alternate=alternate;this.finish();return this},finishLabeledStatement:function(label,body){this.type=Syntax.LabeledStatement;this.label=label;this.body=body;this.finish();return this},finishLiteral:function(token){this.type=Syntax.Literal;this.value=token.value;this.raw=source.slice(token.start,token.end);if(token.regex){this.regex=token.regex}this.finish();return this},finishMemberExpression:function(accessor,object,property){this.type=Syntax.MemberExpression;this.computed=accessor==="[";this.object=object;this.property=property;this.finish();return this},finishNewExpression:function(callee,args){this.type=Syntax.NewExpression;this.callee=callee;this.arguments=args;this.finish();return this},finishObjectExpression:function(properties){this.type=Syntax.ObjectExpression;this.properties=properties;this.finish();return this},finishObjectPattern:function(properties){this.type=Syntax.ObjectPattern;this.properties=properties;this.finish();return this},finishPostfixExpression:function(operator,argument){this.type=Syntax.UpdateExpression;this.operator=operator;this.argument=argument;this.prefix=false;this.finish();return this},finishProgram:function(body){this.type=Syntax.Program;this.body=body;if(sourceType==="module"){this.sourceType=sourceType}this.finish();return this},finishProperty:function(kind,key,computed,value,method,shorthand){this.type=Syntax.Property;this.key=key;this.computed=computed;this.value=value;this.kind=kind;this.method=method;this.shorthand=shorthand;this.finish();return this},finishRestElement:function(argument){this.type=Syntax.RestElement;this.argument=argument;this.finish();return this},finishReturnStatement:function(argument){this.type=Syntax.ReturnStatement;this.argument=argument;this.finish();return this},finishSequenceExpression:function(expressions){this.type=Syntax.SequenceExpression;this.expressions=expressions;this.finish();return this},finishSpreadElement:function(argument){this.type=Syntax.SpreadElement;this.argument=argument;this.finish();return this},finishSwitchCase:function(test,consequent){this.type=Syntax.SwitchCase;this.test=test;this.consequent=consequent;this.finish();return this},finishSuper:function(){this.type=Syntax.Super;this.finish();return this},finishSwitchStatement:function(discriminant,cases){this.type=Syntax.SwitchStatement;this.discriminant=discriminant;this.cases=cases;this.finish();return this},finishTaggedTemplateExpression:function(tag,quasi){this.type=Syntax.TaggedTemplateExpression;this.tag=tag;this.quasi=quasi;this.finish();return this},finishTemplateElement:function(value,tail){this.type=Syntax.TemplateElement;this.value=value;this.tail=tail;this.finish();return this},finishTemplateLiteral:function(quasis,expressions){this.type=Syntax.TemplateLiteral;this.quasis=quasis;this.expressions=expressions;this.finish();return this},finishThisExpression:function(){this.type=Syntax.ThisExpression;this.finish();return this},finishThrowStatement:function(argument){this.type=Syntax.ThrowStatement;this.argument=argument;this.finish();return this},finishTryStatement:function(block,handler,finalizer){this.type=Syntax.TryStatement;this.block=block;this.guardedHandlers=[];this.handlers=handler?[handler]:[];this.handler=handler;this.finalizer=finalizer;this.finish();return this},finishUnaryExpression:function(operator,argument){this.type=operator==="++"||operator==="--"?Syntax.UpdateExpression:Syntax.UnaryExpression;this.operator=operator;this.argument=argument;this.prefix=true;this.finish();return this},finishVariableDeclaration:function(declarations){this.type=Syntax.VariableDeclaration;this.declarations=declarations;this.kind="var";this.finish();return this},finishLexicalDeclaration:function(declarations,kind){this.type=Syntax.VariableDeclaration;this.declarations=declarations;this.kind=kind;this.finish();return this},finishVariableDeclarator:function(id,init){this.type=Syntax.VariableDeclarator;this.id=id;this.init=init;this.finish();return this},finishWhileStatement:function(test,body){this.type=Syntax.WhileStatement;this.test=test;this.body=body;this.finish();return this},finishWithStatement:function(object,body){this.type=Syntax.WithStatement;this.object=object;this.body=body;this.finish();return this},finishExportSpecifier:function(local,exported){this.type=Syntax.ExportSpecifier;this.exported=exported||local;this.local=local;this.finish();return this},finishImportDefaultSpecifier:function(local){this.type=Syntax.ImportDefaultSpecifier;this.local=local;this.finish();return this},finishImportNamespaceSpecifier:function(local){this.type=Syntax.ImportNamespaceSpecifier;this.local=local;this.finish();return this},finishExportNamedDeclaration:function(declaration,specifiers,src){this.type=Syntax.ExportNamedDeclaration;this.declaration=declaration;this.specifiers=specifiers;this.source=src;this.finish();return this},finishExportDefaultDeclaration:function(declaration){this.type=Syntax.ExportDefaultDeclaration;this.declaration=declaration;this.finish();return this},finishExportAllDeclaration:function(src){this.type=Syntax.ExportAllDeclaration;this.source=src;this.finish();return this},finishImportSpecifier:function(local,imported){this.type=Syntax.ImportSpecifier;this.local=local||imported;this.imported=imported;this.finish();return this},finishImportDeclaration:function(specifiers,src){this.type=Syntax.ImportDeclaration;this.specifiers=specifiers;this.source=src;this.finish();return this},finishYieldExpression:function(argument,delegate){this.type=Syntax.YieldExpression;this.argument=argument;this.delegate=delegate;this.finish();return this}};function recordError(error){var e,existing;for(e=0;e<extra.errors.length;e++){existing=extra.errors[e];if(existing.index===error.index&&existing.message===error.message){return}}extra.errors.push(error)}function createError(line,pos,description){var error=new Error("Line "+line+": "+description);error.index=pos;error.lineNumber=line;error.column=pos-(scanning?lineStart:lastLineStart)+1;error.description=description;return error}function throwError(messageFormat){var args,msg;args=Array.prototype.slice.call(arguments,1);msg=messageFormat.replace(/%(\d)/g,function(whole,idx){assert(idx<args.length,"Message reference must be in range");return args[idx]});throw createError(lastLineNumber,lastIndex,msg)}function tolerateError(messageFormat){var args,msg,error;args=Array.prototype.slice.call(arguments,1);msg=messageFormat.replace(/%(\d)/g,function(whole,idx){assert(idx<args.length,"Message reference must be in range");return args[idx]});error=createError(lineNumber,lastIndex,msg);if(extra.errors){recordError(error)}else{throw error}}function unexpectedTokenError(token,message){var value,msg=message||Messages.UnexpectedToken;if(token){if(!message){msg=token.type===Token.EOF?Messages.UnexpectedEOS:token.type===Token.Identifier?Messages.UnexpectedIdentifier:token.type===Token.NumericLiteral?Messages.UnexpectedNumber:token.type===Token.StringLiteral?Messages.UnexpectedString:token.type===Token.Template?Messages.UnexpectedTemplate:Messages.UnexpectedToken;if(token.type===Token.Keyword){if(isFutureReservedWord(token.value)){msg=Messages.UnexpectedReserved}else if(strict&&isStrictModeReservedWord(token.value)){msg=Messages.StrictReservedWord}}}value=token.type===Token.Template?token.value.raw:token.value}else{value="ILLEGAL"}msg=msg.replace("%0",value);return token&&typeof token.lineNumber==="number"?createError(token.lineNumber,token.start,msg):createError(scanning?lineNumber:lastLineNumber,scanning?index:lastIndex,msg)}function throwUnexpectedToken(token,message){throw unexpectedTokenError(token,message)}function tolerateUnexpectedToken(token,message){var error=unexpectedTokenError(token,message);if(extra.errors){recordError(error)}else{throw error}}function expect(value){var token=lex();if(token.type!==Token.Punctuator||token.value!==value){throwUnexpectedToken(token)}}function expectCommaSeparator(){var token;if(extra.errors){token=lookahead;if(token.type===Token.Punctuator&&token.value===","){lex()}else if(token.type===Token.Punctuator&&token.value===";"){lex();tolerateUnexpectedToken(token)}else{tolerateUnexpectedToken(token,Messages.UnexpectedToken)}}else{expect(",")}}function expectKeyword(keyword){var token=lex();if(token.type!==Token.Keyword||token.value!==keyword){throwUnexpectedToken(token)}}function match(value){return lookahead.type===Token.Punctuator&&lookahead.value===value}function matchKeyword(keyword){return lookahead.type===Token.Keyword&&lookahead.value===keyword}function matchContextualKeyword(keyword){return lookahead.type===Token.Identifier&&lookahead.value===keyword}function matchAssign(){var op;if(lookahead.type!==Token.Punctuator){return false}op=lookahead.value;return op==="="||op==="*="||op==="/="||op==="%="||op==="+="||op==="-="||op==="<<="||op===">>="||op===">>>="||op==="&="||op==="^="||op==="|="}function consumeSemicolon(){if(source.charCodeAt(startIndex)===59||match(";")){lex();return}if(hasLineTerminator){return}lastIndex=startIndex;lastLineNumber=startLineNumber;lastLineStart=startLineStart;if(lookahead.type!==Token.EOF&&!match("}")){throwUnexpectedToken(lookahead)}}function isolateCoverGrammar(parser){var oldIsBindingElement=isBindingElement,oldIsAssignmentTarget=isAssignmentTarget,oldFirstCoverInitializedNameError=firstCoverInitializedNameError,result;isBindingElement=true;isAssignmentTarget=true;firstCoverInitializedNameError=null;result=parser();if(firstCoverInitializedNameError!==null){throwUnexpectedToken(firstCoverInitializedNameError)}isBindingElement=oldIsBindingElement;isAssignmentTarget=oldIsAssignmentTarget;firstCoverInitializedNameError=oldFirstCoverInitializedNameError;return result}function inheritCoverGrammar(parser){var oldIsBindingElement=isBindingElement,oldIsAssignmentTarget=isAssignmentTarget,oldFirstCoverInitializedNameError=firstCoverInitializedNameError,result;isBindingElement=true;isAssignmentTarget=true;firstCoverInitializedNameError=null;result=parser();isBindingElement=isBindingElement&&oldIsBindingElement;isAssignmentTarget=isAssignmentTarget&&oldIsAssignmentTarget;firstCoverInitializedNameError=oldFirstCoverInitializedNameError||firstCoverInitializedNameError;return result}function parseArrayPattern(params){var node=new Node,elements=[],rest,restNode;expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else{if(match("...")){restNode=new Node;lex();params.push(lookahead);rest=parseVariableIdentifier(params);elements.push(restNode.finishRestElement(rest));break}else{elements.push(parsePatternWithDefault(params))}if(!match("]")){expect(",")}}}expect("]");return node.finishArrayPattern(elements)}function parsePropertyPattern(params){var node=new Node,key,keyToken,computed=match("["),init;if(lookahead.type===Token.Identifier){keyToken=lookahead;key=parseVariableIdentifier();if(match("=")){params.push(keyToken);lex();init=parseAssignmentExpression();return node.finishProperty("init",key,false,new WrappingNode(keyToken).finishAssignmentPattern(key,init),false,false)}else if(!match(":")){params.push(keyToken);return node.finishProperty("init",key,false,key,false,true)}}else{key=parseObjectPropertyKey(params)}expect(":");init=parsePatternWithDefault(params);return node.finishProperty("init",key,computed,init,false,false)}function parseObjectPattern(params){var node=new Node,properties=[];expect("{");while(!match("}")){properties.push(parsePropertyPattern(params));if(!match("}")){expect(",")}}lex();return node.finishObjectPattern(properties)}function parsePattern(params){var identifier;if(lookahead.type===Token.Identifier){params.push(lookahead);identifier=parseVariableIdentifier();return identifier}else if(match("[")){return parseArrayPattern(params)}else if(match("{")){return parseObjectPattern(params)}throwUnexpectedToken(lookahead)}function parsePatternWithDefault(params){var startToken=lookahead,pattern,right;pattern=parsePattern(params);if(match("=")){lex();right=isolateCoverGrammar(parseAssignmentExpression);pattern=new WrappingNode(startToken).finishAssignmentPattern(pattern,right)}return pattern}function parseArrayInitialiser(){var elements=[],node=new Node,restSpread;expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else if(match("...")){restSpread=new Node;lex();restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression));if(!match("]")){isAssignmentTarget=isBindingElement=false;expect(",")}elements.push(restSpread)}else{elements.push(inheritCoverGrammar(parseAssignmentExpression));if(!match("]")){expect(",")}}}lex();return node.finishArrayExpression(elements)}function parsePropertyFunction(node,paramInfo,isGenerator){
var previousStrict,body;isAssignmentTarget=isBindingElement=false;previousStrict=strict;body=isolateCoverGrammar(parseFunctionSourceElements);if(strict&&paramInfo.firstRestricted){tolerateUnexpectedToken(paramInfo.firstRestricted,paramInfo.message)}if(strict&&paramInfo.stricted){tolerateUnexpectedToken(paramInfo.stricted,paramInfo.message)}strict=previousStrict;return node.finishFunctionExpression(null,paramInfo.params,paramInfo.defaults,body,isGenerator)}function parsePropertyMethodFunction(){var params,method,node=new Node,previousAllowYield=state.allowYield;state.allowYield=false;params=parseParams();state.allowYield=previousAllowYield;state.allowYield=false;method=parsePropertyFunction(node,params,false);state.allowYield=previousAllowYield;return method}function parseObjectPropertyKey(){var token,node=new Node,expr;token=lex();switch(token.type){case Token.StringLiteral:case Token.NumericLiteral:if(strict&&token.octal){tolerateUnexpectedToken(token,Messages.StrictOctalLiteral)}return node.finishLiteral(token);case Token.Identifier:case Token.BooleanLiteral:case Token.NullLiteral:case Token.Keyword:return node.finishIdentifier(token.value);case Token.Punctuator:if(token.value==="["){expr=isolateCoverGrammar(parseAssignmentExpression);expect("]");return expr}break}throwUnexpectedToken(token)}function lookaheadPropertyName(){switch(lookahead.type){case Token.Identifier:case Token.StringLiteral:case Token.BooleanLiteral:case Token.NullLiteral:case Token.NumericLiteral:case Token.Keyword:return true;case Token.Punctuator:return lookahead.value==="["}return false}function tryParseMethodDefinition(token,key,computed,node){var value,options,methodNode,params,previousAllowYield=state.allowYield;if(token.type===Token.Identifier){if(token.value==="get"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodNode=new Node;expect("(");expect(")");state.allowYield=false;value=parsePropertyFunction(methodNode,{params:[],defaults:[],stricted:null,firstRestricted:null,message:null},false);state.allowYield=previousAllowYield;return node.finishProperty("get",key,computed,value,false,false)}else if(token.value==="set"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodNode=new Node;expect("(");options={params:[],defaultCount:0,defaults:[],firstRestricted:null,paramSet:{}};if(match(")")){tolerateUnexpectedToken(lookahead)}else{state.allowYield=false;parseParam(options);state.allowYield=previousAllowYield;if(options.defaultCount===0){options.defaults=[]}}expect(")");state.allowYield=false;value=parsePropertyFunction(methodNode,options,false);state.allowYield=previousAllowYield;return node.finishProperty("set",key,computed,value,false,false)}}else if(token.type===Token.Punctuator&&token.value==="*"&&lookaheadPropertyName()){computed=match("[");key=parseObjectPropertyKey();methodNode=new Node;state.allowYield=false;params=parseParams();state.allowYield=previousAllowYield;state.allowYield=true;value=parsePropertyFunction(methodNode,params,true);state.allowYield=previousAllowYield;return node.finishProperty("init",key,computed,value,true,false)}if(key&&match("(")){value=parsePropertyMethodFunction();return node.finishProperty("init",key,computed,value,true,false)}return null}function checkProto(key,computed,hasProto){if(computed===false&&(key.type===Syntax.Identifier&&key.name==="__proto__"||key.type===Syntax.Literal&&key.value==="__proto__")){if(hasProto.value){tolerateError(Messages.DuplicateProtoProperty)}else{hasProto.value=true}}}function parseObjectProperty(hasProto){var token=lookahead,node=new Node,computed,key,maybeMethod,value;computed=match("[");if(match("*")){lex()}else{key=parseObjectPropertyKey()}maybeMethod=tryParseMethodDefinition(token,key,computed,node);if(maybeMethod){checkProto(maybeMethod.key,maybeMethod.computed,hasProto);return maybeMethod}if(!key){throwUnexpectedToken(lookahead)}checkProto(key,computed,hasProto);if(match(":")){lex();value=inheritCoverGrammar(parseAssignmentExpression);return node.finishProperty("init",key,computed,value,false,false)}if(token.type===Token.Identifier){if(match("=")){firstCoverInitializedNameError=lookahead;lex();value=isolateCoverGrammar(parseAssignmentExpression);return node.finishProperty("init",key,computed,new WrappingNode(token).finishAssignmentPattern(key,value),false,true)}return node.finishProperty("init",key,computed,key,false,true)}throwUnexpectedToken(lookahead)}function parseObjectInitialiser(){var properties=[],hasProto={value:false},node=new Node;expect("{");while(!match("}")){properties.push(parseObjectProperty(hasProto));if(!match("}")){expectCommaSeparator()}}expect("}");return node.finishObjectExpression(properties)}function reinterpretExpressionAsPattern(expr){var i;switch(expr.type){case Syntax.Identifier:case Syntax.MemberExpression:case Syntax.RestElement:case Syntax.AssignmentPattern:break;case Syntax.SpreadElement:expr.type=Syntax.RestElement;reinterpretExpressionAsPattern(expr.argument);break;case Syntax.ArrayExpression:expr.type=Syntax.ArrayPattern;for(i=0;i<expr.elements.length;i++){if(expr.elements[i]!==null){reinterpretExpressionAsPattern(expr.elements[i])}}break;case Syntax.ObjectExpression:expr.type=Syntax.ObjectPattern;for(i=0;i<expr.properties.length;i++){reinterpretExpressionAsPattern(expr.properties[i].value)}break;case Syntax.AssignmentExpression:expr.type=Syntax.AssignmentPattern;reinterpretExpressionAsPattern(expr.left);break;default:break}}function parseTemplateElement(option){var node,token;if(lookahead.type!==Token.Template||option.head&&!lookahead.head){throwUnexpectedToken()}node=new Node;token=lex();return node.finishTemplateElement({raw:token.value.raw,cooked:token.value.cooked},token.tail)}function parseTemplateLiteral(){var quasi,quasis,expressions,node=new Node;quasi=parseTemplateElement({head:true});quasis=[quasi];expressions=[];while(!quasi.tail){expressions.push(parseExpression());quasi=parseTemplateElement({head:false});quasis.push(quasi)}return node.finishTemplateLiteral(quasis,expressions)}function parseGroupExpression(){var expr,expressions,startToken,i,params=[];expect("(");if(match(")")){lex();if(!match("=>")){expect("=>")}return{type:PlaceHolders.ArrowParameterPlaceHolder,params:[],rawParams:[]}}startToken=lookahead;if(match("...")){expr=parseRestElement(params);expect(")");if(!match("=>")){expect("=>")}return{type:PlaceHolders.ArrowParameterPlaceHolder,params:[expr]}}isBindingElement=true;expr=inheritCoverGrammar(parseAssignmentExpression);if(match(",")){isAssignmentTarget=false;expressions=[expr];while(startIndex<length){if(!match(",")){break}lex();if(match("...")){if(!isBindingElement){throwUnexpectedToken(lookahead)}expressions.push(parseRestElement(params));expect(")");if(!match("=>")){expect("=>")}isBindingElement=false;for(i=0;i<expressions.length;i++){reinterpretExpressionAsPattern(expressions[i])}return{type:PlaceHolders.ArrowParameterPlaceHolder,params:expressions}}expressions.push(inheritCoverGrammar(parseAssignmentExpression))}expr=new WrappingNode(startToken).finishSequenceExpression(expressions)}expect(")");if(match("=>")){if(!isBindingElement){throwUnexpectedToken(lookahead)}if(expr.type===Syntax.SequenceExpression){for(i=0;i<expr.expressions.length;i++){reinterpretExpressionAsPattern(expr.expressions[i])}}else{reinterpretExpressionAsPattern(expr)}expr={type:PlaceHolders.ArrowParameterPlaceHolder,params:expr.type===Syntax.SequenceExpression?expr.expressions:[expr]}}isBindingElement=false;return expr}function parsePrimaryExpression(){var type,token,expr,node;if(match("(")){isBindingElement=false;return inheritCoverGrammar(parseGroupExpression)}if(match("[")){return inheritCoverGrammar(parseArrayInitialiser)}if(match("{")){return inheritCoverGrammar(parseObjectInitialiser)}type=lookahead.type;node=new Node;if(type===Token.Identifier){expr=node.finishIdentifier(lex().value)}else if(type===Token.StringLiteral||type===Token.NumericLiteral){isAssignmentTarget=isBindingElement=false;if(strict&&lookahead.octal){tolerateUnexpectedToken(lookahead,Messages.StrictOctalLiteral)}expr=node.finishLiteral(lex())}else if(type===Token.Keyword){isAssignmentTarget=isBindingElement=false;if(matchKeyword("function")){return parseFunctionExpression()}if(matchKeyword("this")){lex();return node.finishThisExpression()}if(matchKeyword("class")){return parseClassExpression()}throwUnexpectedToken(lex())}else if(type===Token.BooleanLiteral){isAssignmentTarget=isBindingElement=false;token=lex();token.value=token.value==="true";expr=node.finishLiteral(token)}else if(type===Token.NullLiteral){isAssignmentTarget=isBindingElement=false;token=lex();token.value=null;expr=node.finishLiteral(token)}else if(match("/")||match("/=")){isAssignmentTarget=isBindingElement=false;index=startIndex;if(typeof extra.tokens!=="undefined"){token=collectRegex()}else{token=scanRegExp()}lex();expr=node.finishLiteral(token)}else if(type===Token.Template){expr=parseTemplateLiteral()}else{throwUnexpectedToken(lex())}return expr}function parseArguments(){var args=[],expr;expect("(");if(!match(")")){while(startIndex<length){if(match("...")){expr=new Node;lex();expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression))}else{expr=isolateCoverGrammar(parseAssignmentExpression)}args.push(expr);if(match(")")){break}expectCommaSeparator()}}expect(")");return args}function parseNonComputedProperty(){var token,node=new Node;token=lex();if(!isIdentifierName(token)){throwUnexpectedToken(token)}return node.finishIdentifier(token.value)}function parseNonComputedMember(){expect(".");return parseNonComputedProperty()}function parseComputedMember(){var expr;expect("[");expr=isolateCoverGrammar(parseExpression);expect("]");return expr}function parseNewExpression(){var callee,args,node=new Node;expectKeyword("new");callee=isolateCoverGrammar(parseLeftHandSideExpression);args=match("(")?parseArguments():[];isAssignmentTarget=isBindingElement=false;return node.finishNewExpression(callee,args)}function parseLeftHandSideExpressionAllowCall(){var quasi,expr,args,property,startToken,previousAllowIn=state.allowIn;startToken=lookahead;state.allowIn=true;if(matchKeyword("super")&&state.inFunctionBody){expr=new Node;lex();expr=expr.finishSuper();if(!match("(")&&!match(".")&&!match("[")){throwUnexpectedToken(lookahead)}}else{expr=inheritCoverGrammar(matchKeyword("new")?parseNewExpression:parsePrimaryExpression)}for(;;){if(match(".")){isBindingElement=false;isAssignmentTarget=true;property=parseNonComputedMember();expr=new WrappingNode(startToken).finishMemberExpression(".",expr,property)}else if(match("(")){isBindingElement=false;isAssignmentTarget=false;args=parseArguments();expr=new WrappingNode(startToken).finishCallExpression(expr,args)}else if(match("[")){isBindingElement=false;isAssignmentTarget=true;property=parseComputedMember();expr=new WrappingNode(startToken).finishMemberExpression("[",expr,property)}else if(lookahead.type===Token.Template&&lookahead.head){quasi=parseTemplateLiteral();expr=new WrappingNode(startToken).finishTaggedTemplateExpression(expr,quasi)}else{break}}state.allowIn=previousAllowIn;return expr}function parseLeftHandSideExpression(){var quasi,expr,property,startToken;assert(state.allowIn,"callee of new expression always allow in keyword.");startToken=lookahead;if(matchKeyword("super")&&state.inFunctionBody){expr=new Node;lex();expr=expr.finishSuper();if(!match("[")&&!match(".")){throwUnexpectedToken(lookahead)}}else{expr=inheritCoverGrammar(matchKeyword("new")?parseNewExpression:parsePrimaryExpression)}for(;;){if(match("[")){isBindingElement=false;isAssignmentTarget=true;property=parseComputedMember();expr=new WrappingNode(startToken).finishMemberExpression("[",expr,property)}else if(match(".")){isBindingElement=false;isAssignmentTarget=true;property=parseNonComputedMember();expr=new WrappingNode(startToken).finishMemberExpression(".",expr,property)}else if(lookahead.type===Token.Template&&lookahead.head){quasi=parseTemplateLiteral();expr=new WrappingNode(startToken).finishTaggedTemplateExpression(expr,quasi)}else{break}}return expr}function parsePostfixExpression(){var expr,token,startToken=lookahead;expr=inheritCoverGrammar(parseLeftHandSideExpressionAllowCall);if(!hasLineTerminator&&lookahead.type===Token.Punctuator){if(match("++")||match("--")){if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){tolerateError(Messages.StrictLHSPostfix)}if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInAssignment)}isAssignmentTarget=isBindingElement=false;token=lex();expr=new WrappingNode(startToken).finishPostfixExpression(token.value,expr)}}return expr}function parseUnaryExpression(){var token,expr,startToken;if(lookahead.type!==Token.Punctuator&&lookahead.type!==Token.Keyword){expr=parsePostfixExpression()}else if(match("++")||match("--")){startToken=lookahead;token=lex();expr=inheritCoverGrammar(parseUnaryExpression);if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){tolerateError(Messages.StrictLHSPrefix)}if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInAssignment)}expr=new WrappingNode(startToken).finishUnaryExpression(token.value,expr);isAssignmentTarget=isBindingElement=false}else if(match("+")||match("-")||match("~")||match("!")){startToken=lookahead;token=lex();expr=inheritCoverGrammar(parseUnaryExpression);expr=new WrappingNode(startToken).finishUnaryExpression(token.value,expr);isAssignmentTarget=isBindingElement=false}else if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof")){startToken=lookahead;token=lex();expr=inheritCoverGrammar(parseUnaryExpression);expr=new WrappingNode(startToken).finishUnaryExpression(token.value,expr);if(strict&&expr.operator==="delete"&&expr.argument.type===Syntax.Identifier){tolerateError(Messages.StrictDelete)}isAssignmentTarget=isBindingElement=false}else{expr=parsePostfixExpression()}return expr}function binaryPrecedence(token,allowIn){var prec=0;if(token.type!==Token.Punctuator&&token.type!==Token.Keyword){return 0}switch(token.value){case"||":prec=1;break;case"&&":prec=2;break;case"|":prec=3;break;case"^":prec=4;break;case"&":prec=5;break;case"==":case"!=":case"===":case"!==":prec=6;break;case"<":case">":case"<=":case">=":case"instanceof":prec=7;break;case"in":prec=allowIn?7:0;break;case"<<":case">>":case">>>":prec=8;break;case"+":case"-":prec=9;break;case"*":case"/":case"%":prec=11;break;default:break}return prec}function parseBinaryExpression(){var marker,markers,expr,token,prec,stack,right,operator,left,i;marker=lookahead;left=inheritCoverGrammar(parseUnaryExpression);token=lookahead;prec=binaryPrecedence(token,state.allowIn);if(prec===0){return left}isAssignmentTarget=isBindingElement=false;token.prec=prec;lex();markers=[marker,lookahead];right=isolateCoverGrammar(parseUnaryExpression);stack=[left,token,right];while((prec=binaryPrecedence(lookahead,state.allowIn))>0){while(stack.length>2&&prec<=stack[stack.length-2].prec){right=stack.pop();operator=stack.pop().value;left=stack.pop();markers.pop();expr=new WrappingNode(markers[markers.length-1]).finishBinaryExpression(operator,left,right);stack.push(expr)}token=lex();token.prec=prec;stack.push(token);markers.push(lookahead);expr=isolateCoverGrammar(parseUnaryExpression);stack.push(expr)}i=stack.length-1;expr=stack[i];markers.pop();while(i>1){expr=new WrappingNode(markers.pop()).finishBinaryExpression(stack[i-1].value,stack[i-2],expr);i-=2}return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent,alternate,startToken;startToken=lookahead;expr=inheritCoverGrammar(parseBinaryExpression);if(match("?")){lex();previousAllowIn=state.allowIn;state.allowIn=true;consequent=isolateCoverGrammar(parseAssignmentExpression);state.allowIn=previousAllowIn;expect(":");alternate=isolateCoverGrammar(parseAssignmentExpression);expr=new WrappingNode(startToken).finishConditionalExpression(expr,consequent,alternate);isAssignmentTarget=isBindingElement=false}return expr}function parseConciseBody(){if(match("{")){return parseFunctionSourceElements()}return isolateCoverGrammar(parseAssignmentExpression)}function checkPatternParam(options,param){var i;switch(param.type){case Syntax.Identifier:validateParam(options,param,param.name);break;case Syntax.RestElement:checkPatternParam(options,param.argument);break;case Syntax.AssignmentPattern:checkPatternParam(options,param.left);break;case Syntax.ArrayPattern:for(i=0;i<param.elements.length;i++){if(param.elements[i]!==null){checkPatternParam(options,param.elements[i])}}break;default:assert(param.type===Syntax.ObjectPattern,"Invalid type");for(i=0;i<param.properties.length;i++){checkPatternParam(options,param.properties[i].value)}break}}function reinterpretAsCoverFormalsList(expr){var i,len,param,params,defaults,defaultCount,options,token;defaults=[];defaultCount=0;params=[expr];switch(expr.type){case Syntax.Identifier:break;case PlaceHolders.ArrowParameterPlaceHolder:params=expr.params;break;default:return null}options={paramSet:{}};for(i=0,len=params.length;i<len;i+=1){param=params[i];switch(param.type){case Syntax.AssignmentPattern:params[i]=param.left;defaults.push(param.right);++defaultCount;checkPatternParam(options,param.left);break;default:checkPatternParam(options,param);params[i]=param;defaults.push(null);break}}if(options.message===Messages.StrictParamDupe){token=strict?options.stricted:options.firstRestricted;throwUnexpectedToken(token,options.message)}if(defaultCount===0){defaults=[]}return{params:params,defaults:defaults,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseArrowFunctionExpression(options,node){var previousStrict,body;if(hasLineTerminator){tolerateUnexpectedToken(lookahead)}expect("=>");previousStrict=strict;body=parseConciseBody();if(strict&&options.firstRestricted){throwUnexpectedToken(options.firstRestricted,options.message)}if(strict&&options.stricted){tolerateUnexpectedToken(options.stricted,options.message)}strict=previousStrict;return node.finishArrowFunctionExpression(options.params,options.defaults,body,body.type!==Syntax.BlockStatement)}function parseYieldExpression(){var argument,expr,delegate;expr=new Node;if(!state.allowYield){tolerateUnexpectedToken(lookahead,Messages.IllegalYield)}expectKeyword("yield");if(!hasLineTerminator){delegate=match("*");if(delegate){lex();argument=parseExpression()}else{if(!match(";")&&!match("}")&&lookahead.type!==Token.EOF){argument=parseExpression()}}}return expr.finishYieldExpression(argument,delegate)}function parseAssignmentExpression(){var token,expr,right,list,startToken;startToken=lookahead;token=lookahead;if(matchKeyword("yield")){return parseYieldExpression()}expr=parseConditionalExpression();if(expr.type===PlaceHolders.ArrowParameterPlaceHolder||match("=>")){isAssignmentTarget=isBindingElement=false;list=reinterpretAsCoverFormalsList(expr);if(list){firstCoverInitializedNameError=null;return parseArrowFunctionExpression(list,new WrappingNode(startToken))}return expr}if(matchAssign()){if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInAssignment)}if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){tolerateUnexpectedToken(token,Messages.StrictLHSAssignment)}if(!match("=")){isAssignmentTarget=isBindingElement=false}else{reinterpretExpressionAsPattern(expr)}token=lex();right=isolateCoverGrammar(parseAssignmentExpression);expr=new WrappingNode(startToken).finishAssignmentExpression(token.value,expr,right);firstCoverInitializedNameError=null}return expr}function parseExpression(){var expr,startToken=lookahead,expressions;expr=isolateCoverGrammar(parseAssignmentExpression);if(match(",")){expressions=[expr];while(startIndex<length){if(!match(",")){break}lex();expressions.push(isolateCoverGrammar(parseAssignmentExpression))}expr=new WrappingNode(startToken).finishSequenceExpression(expressions)}return expr}function parseStatementListItem(){if(lookahead.type===Token.Keyword){switch(lookahead.value){case"export":if(sourceType!=="module"){tolerateUnexpectedToken(lookahead,Messages.IllegalExportDeclaration)}return parseExportDeclaration();case"import":if(sourceType!=="module"){tolerateUnexpectedToken(lookahead,Messages.IllegalImportDeclaration)}return parseImportDeclaration();case"const":case"let":return parseLexicalDeclaration({inFor:false});case"function":return parseFunctionDeclaration(new Node);case"class":return parseClassDeclaration()}}return parseStatement()}function parseStatementList(){var list=[];while(startIndex<length){if(match("}")){break}list.push(parseStatementListItem())}return list}function parseBlock(){var block,node=new Node;expect("{");block=parseStatementList();expect("}");return node.finishBlockStatement(block)}function parseVariableIdentifier(){var token,node=new Node;token=lex();if(token.type!==Token.Identifier){if(strict&&token.type===Token.Keyword&&isStrictModeReservedWord(token.value)){tolerateUnexpectedToken(token,Messages.StrictReservedWord)}else{throwUnexpectedToken(token)}}return node.finishIdentifier(token.value)}function parseVariableDeclaration(){var init=null,id,node=new Node,params=[];id=parsePattern(params);if(strict&&isRestrictedWord(id.name)){tolerateError(Messages.StrictVarName)}if(match("=")){lex();init=isolateCoverGrammar(parseAssignmentExpression)}else if(id.type!==Syntax.Identifier){expect("=")}return node.finishVariableDeclarator(id,init)}function parseVariableDeclarationList(){var list=[];do{list.push(parseVariableDeclaration());if(!match(",")){break}lex()}while(startIndex<length);return list}function parseVariableStatement(node){var declarations;expectKeyword("var");declarations=parseVariableDeclarationList();consumeSemicolon();return node.finishVariableDeclaration(declarations)}function parseLexicalBinding(kind,options){var init=null,id,node=new Node,params=[];id=parsePattern(params);if(strict&&id.type===Syntax.Identifier&&isRestrictedWord(id.name)){tolerateError(Messages.StrictVarName)}if(kind==="const"){if(!matchKeyword("in")&&!matchContextualKeyword("of")){expect("=");init=isolateCoverGrammar(parseAssignmentExpression)}}else if(!options.inFor&&id.type!==Syntax.Identifier||match("=")){expect("=");init=isolateCoverGrammar(parseAssignmentExpression)}return node.finishVariableDeclarator(id,init)}function parseBindingList(kind,options){var list=[];do{list.push(parseLexicalBinding(kind,options));if(!match(",")){break}lex()}while(startIndex<length);return list}function parseLexicalDeclaration(options){var kind,declarations,node=new Node;kind=lex().value;assert(kind==="let"||kind==="const","Lexical declaration must be either let or const");declarations=parseBindingList(kind,options);consumeSemicolon();return node.finishLexicalDeclaration(declarations,kind)}function parseRestElement(params){var param,node=new Node;lex();if(match("{")){throwError(Messages.ObjectPatternAsRestParameter)}params.push(lookahead);param=parseVariableIdentifier();if(match("=")){throwError(Messages.DefaultRestParameter)}if(!match(")")){throwError(Messages.ParameterAfterRestParameter)}return node.finishRestElement(param)}function parseEmptyStatement(node){expect(";");return node.finishEmptyStatement()}function parseExpressionStatement(node){var expr=parseExpression();consumeSemicolon();return node.finishExpressionStatement(expr)}function parseIfStatement(node){var test,consequent,alternate;expectKeyword("if");expect("(");test=parseExpression();expect(")");consequent=parseStatement();if(matchKeyword("else")){lex();alternate=parseStatement()}else{alternate=null}return node.finishIfStatement(test,consequent,alternate)}function parseDoWhileStatement(node){var body,test,oldInIteration;expectKeyword("do");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");if(match(";")){lex()}return node.finishDoWhileStatement(body,test)}function parseWhileStatement(node){var test,body,oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;return node.finishWhileStatement(test,body)}function parseForStatement(node){var init,forIn,initSeq,initStartToken,test,update,left,right,kind,declarations,body,oldInIteration,previousAllowIn=state.allowIn;init=test=update=null;forIn=true;expectKeyword("for");expect("(");if(match(";")){lex()}else{if(matchKeyword("var")){init=new Node;lex();state.allowIn=false;init=init.finishVariableDeclaration(parseVariableDeclarationList());state.allowIn=previousAllowIn;if(init.declarations.length===1&&matchKeyword("in")){lex();left=init;right=parseExpression();init=null}else if(init.declarations.length===1&&init.declarations[0].init===null&&matchContextualKeyword("of")){lex();left=init;right=parseAssignmentExpression();init=null;forIn=false}else{expect(";")}}else if(matchKeyword("const")||matchKeyword("let")){init=new Node;kind=lex().value;state.allowIn=false;declarations=parseBindingList(kind,{inFor:true});state.allowIn=previousAllowIn;if(declarations.length===1&&declarations[0].init===null&&matchKeyword("in")){init=init.finishLexicalDeclaration(declarations,kind);lex();left=init;right=parseExpression();init=null}else if(declarations.length===1&&declarations[0].init===null&&matchContextualKeyword("of")){init=init.finishLexicalDeclaration(declarations,kind);lex();left=init;right=parseAssignmentExpression();init=null;forIn=false}else{consumeSemicolon();init=init.finishLexicalDeclaration(declarations,kind)}}else{initStartToken=lookahead;state.allowIn=false;init=inheritCoverGrammar(parseAssignmentExpression);state.allowIn=previousAllowIn;if(matchKeyword("in")){if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInForIn)}lex();reinterpretExpressionAsPattern(init);left=init;right=parseExpression();init=null}else if(matchContextualKeyword("of")){if(!isAssignmentTarget){tolerateError(Messages.InvalidLHSInForLoop)}lex();reinterpretExpressionAsPattern(init);left=init;right=parseAssignmentExpression();init=null;forIn=false}else{if(match(",")){initSeq=[init];while(match(",")){lex();initSeq.push(isolateCoverGrammar(parseAssignmentExpression))}init=new WrappingNode(initStartToken).finishSequenceExpression(initSeq)}expect(";")}}}if(typeof left==="undefined"){if(!match(";")){test=parseExpression()}expect(";");if(!match(")")){update=parseExpression()}}expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=isolateCoverGrammar(parseStatement);state.inIteration=oldInIteration;return typeof left==="undefined"?node.finishForStatement(init,test,update,body):forIn?node.finishForInStatement(left,right,body):node.finishForOfStatement(left,right,body)}function parseContinueStatement(node){var label=null,key;expectKeyword("continue");if(source.charCodeAt(startIndex)===59){lex();if(!state.inIteration){throwError(Messages.IllegalContinue)}return node.finishContinueStatement(null)}if(hasLineTerminator){if(!state.inIteration){throwError(Messages.IllegalContinue)}return node.finishContinueStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();key="$"+label.name;if(!Object.prototype.hasOwnProperty.call(state.labelSet,key)){throwError(Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!state.inIteration){throwError(Messages.IllegalContinue)}return node.finishContinueStatement(label)}function parseBreakStatement(node){var label=null,key;expectKeyword("break");if(source.charCodeAt(lastIndex)===59){lex();if(!(state.inIteration||state.inSwitch)){throwError(Messages.IllegalBreak)}return node.finishBreakStatement(null)}if(hasLineTerminator){if(!(state.inIteration||state.inSwitch)){throwError(Messages.IllegalBreak)}return node.finishBreakStatement(null)}if(lookahead.type===Token.Identifier){label=parseVariableIdentifier();key="$"+label.name;if(!Object.prototype.hasOwnProperty.call(state.labelSet,key)){throwError(Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!(state.inIteration||state.inSwitch)){throwError(Messages.IllegalBreak)}return node.finishBreakStatement(label)}function parseReturnStatement(node){var argument=null;expectKeyword("return");if(!state.inFunctionBody){tolerateError(Messages.IllegalReturn)}if(source.charCodeAt(lastIndex)===32){if(isIdentifierStart(source.charCodeAt(lastIndex+1))){argument=parseExpression();consumeSemicolon();return node.finishReturnStatement(argument)}}if(hasLineTerminator){return node.finishReturnStatement(null)}if(!match(";")){if(!match("}")&&lookahead.type!==Token.EOF){argument=parseExpression()}}consumeSemicolon();return node.finishReturnStatement(argument)}function parseWithStatement(node){var object,body;if(strict){tolerateError(Messages.StrictModeWith)}expectKeyword("with");expect("(");object=parseExpression();expect(")");body=parseStatement();return node.finishWithStatement(object,body)}function parseSwitchCase(){var test,consequent=[],statement,node=new Node;if(matchKeyword("default")){lex();test=null}else{expectKeyword("case");test=parseExpression()}expect(":");while(startIndex<length){if(match("}")||matchKeyword("default")||matchKeyword("case")){break}statement=parseStatementListItem();consequent.push(statement)}return node.finishSwitchCase(test,consequent)}function parseSwitchStatement(node){var discriminant,cases,clause,oldInSwitch,defaultFound;expectKeyword("switch");expect("(");discriminant=parseExpression();expect(")");expect("{");cases=[];if(match("}")){lex();return node.finishSwitchStatement(discriminant,cases)}oldInSwitch=state.inSwitch;state.inSwitch=true;defaultFound=false;while(startIndex<length){if(match("}")){break}clause=parseSwitchCase();if(clause.test===null){if(defaultFound){throwError(Messages.MultipleDefaultsInSwitch)}defaultFound=true}cases.push(clause)}state.inSwitch=oldInSwitch;expect("}");return node.finishSwitchStatement(discriminant,cases)}function parseThrowStatement(node){var argument;expectKeyword("throw");if(hasLineTerminator){throwError(Messages.NewlineAfterThrow)}argument=parseExpression();consumeSemicolon();return node.finishThrowStatement(argument)}function parseCatchClause(){var param,params=[],paramMap={},key,i,body,node=new Node;expectKeyword("catch");expect("(");if(match(")")){throwUnexpectedToken(lookahead)}param=parsePattern(params);for(i=0;i<params.length;i++){key="$"+params[i].value;if(Object.prototype.hasOwnProperty.call(paramMap,key)){tolerateError(Messages.DuplicateBinding,params[i].value)}paramMap[key]=true}if(strict&&isRestrictedWord(param.name)){tolerateError(Messages.StrictCatchVariable)}expect(")");body=parseBlock();return node.finishCatchClause(param,body)}function parseTryStatement(node){var block,handler=null,finalizer=null;expectKeyword("try");block=parseBlock();if(matchKeyword("catch")){handler=parseCatchClause()}if(matchKeyword("finally")){lex();finalizer=parseBlock()}if(!handler&&!finalizer){throwError(Messages.NoCatchOrFinally)}return node.finishTryStatement(block,handler,finalizer)}function parseDebuggerStatement(node){expectKeyword("debugger");consumeSemicolon();return node.finishDebuggerStatement()}function parseStatement(){var type=lookahead.type,expr,labeledBody,key,node;if(type===Token.EOF){throwUnexpectedToken(lookahead)}if(type===Token.Punctuator&&lookahead.value==="{"){return parseBlock()}isAssignmentTarget=isBindingElement=true;node=new Node;if(type===Token.Punctuator){switch(lookahead.value){case";":return parseEmptyStatement(node);case"(":return parseExpressionStatement(node);default:break}}else if(type===Token.Keyword){switch(lookahead.value){case"break":return parseBreakStatement(node);case"continue":return parseContinueStatement(node);case"debugger":return parseDebuggerStatement(node);case"do":return parseDoWhileStatement(node);case"for":return parseForStatement(node);case"function":return parseFunctionDeclaration(node);case"if":return parseIfStatement(node);case"return":return parseReturnStatement(node);case"switch":return parseSwitchStatement(node);case"throw":return parseThrowStatement(node);
case"try":return parseTryStatement(node);case"var":return parseVariableStatement(node);case"while":return parseWhileStatement(node);case"with":return parseWithStatement(node);default:break}}expr=parseExpression();if(expr.type===Syntax.Identifier&&match(":")){lex();key="$"+expr.name;if(Object.prototype.hasOwnProperty.call(state.labelSet,key)){throwError(Messages.Redeclaration,"Label",expr.name)}state.labelSet[key]=true;labeledBody=parseStatement();delete state.labelSet[key];return node.finishLabeledStatement(expr,labeledBody)}consumeSemicolon();return node.finishExpressionStatement(expr)}function parseFunctionSourceElements(){var statement,body=[],token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody,oldParenthesisCount,node=new Node;expect("{");while(startIndex<length){if(lookahead.type!==Token.StringLiteral){break}token=lookahead;statement=parseStatementListItem();body.push(statement);if(statement.expression.type!==Syntax.Literal){break}directive=source.slice(token.start+1,token.end-1);if(directive==="use strict"){strict=true;if(firstRestricted){tolerateUnexpectedToken(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}oldLabelSet=state.labelSet;oldInIteration=state.inIteration;oldInSwitch=state.inSwitch;oldInFunctionBody=state.inFunctionBody;oldParenthesisCount=state.parenthesizedCount;state.labelSet={};state.inIteration=false;state.inSwitch=false;state.inFunctionBody=true;state.parenthesizedCount=0;while(startIndex<length){if(match("}")){break}body.push(parseStatementListItem())}expect("}");state.labelSet=oldLabelSet;state.inIteration=oldInIteration;state.inSwitch=oldInSwitch;state.inFunctionBody=oldInFunctionBody;state.parenthesizedCount=oldParenthesisCount;return node.finishBlockStatement(body)}function validateParam(options,param,name){var key="$"+name;if(strict){if(isRestrictedWord(name)){options.stricted=param;options.message=Messages.StrictParamName}if(Object.prototype.hasOwnProperty.call(options.paramSet,key)){options.stricted=param;options.message=Messages.StrictParamDupe}}else if(!options.firstRestricted){if(isRestrictedWord(name)){options.firstRestricted=param;options.message=Messages.StrictParamName}else if(isStrictModeReservedWord(name)){options.firstRestricted=param;options.message=Messages.StrictReservedWord}else if(Object.prototype.hasOwnProperty.call(options.paramSet,key)){options.stricted=param;options.message=Messages.StrictParamDupe}}options.paramSet[key]=true}function parseParam(options){var token,param,params=[],i,def;token=lookahead;if(token.value==="..."){param=parseRestElement(params);validateParam(options,param.argument,param.argument.name);options.params.push(param);options.defaults.push(null);return false}param=parsePatternWithDefault(params);for(i=0;i<params.length;i++){validateParam(options,params[i],params[i].value)}if(param.type===Syntax.AssignmentPattern){def=param.right;param=param.left;++options.defaultCount}options.params.push(param);options.defaults.push(def);return!match(")")}function parseParams(firstRestricted){var options;options={params:[],defaultCount:0,defaults:[],firstRestricted:firstRestricted};expect("(");if(!match(")")){options.paramSet={};while(startIndex<length){if(!parseParam(options)){break}expect(",")}}expect(")");if(options.defaultCount===0){options.defaults=[]}return{params:options.params,defaults:options.defaults,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}}function parseFunctionDeclaration(node,identifierIsOptional){var id=null,params=[],defaults=[],body,token,stricted,tmp,firstRestricted,message,previousStrict,isGenerator,previousAllowYield;expectKeyword("function");isGenerator=match("*");if(isGenerator){lex()}if(!identifierIsOptional||!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){tolerateUnexpectedToken(token,Messages.StrictFunctionName)}}else{if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}previousAllowYield=state.allowYield;state.allowYield=false;tmp=parseParams(firstRestricted);state.allowYield=previousAllowYield;params=tmp.params;defaults=tmp.defaults;stricted=tmp.stricted;firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousAllowYield=state.allowYield;previousStrict=strict;state.allowYield=isGenerator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwUnexpectedToken(firstRestricted,message)}if(strict&&stricted){tolerateUnexpectedToken(stricted,message)}strict=previousStrict;state.allowYield=previousAllowYield;return node.finishFunctionDeclaration(id,params,defaults,body,isGenerator)}function parseFunctionExpression(){var token,id=null,stricted,firstRestricted,message,tmp,params=[],defaults=[],body,previousStrict,node=new Node,isGenerator,previousAllowYield;expectKeyword("function");isGenerator=match("*");if(isGenerator){lex()}if(!match("(")){token=lookahead;id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){tolerateUnexpectedToken(token,Messages.StrictFunctionName)}}else{if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}previousAllowYield=state.allowYield;state.allowYield=false;tmp=parseParams(firstRestricted);state.allowYield=previousAllowYield;params=tmp.params;defaults=tmp.defaults;stricted=tmp.stricted;firstRestricted=tmp.firstRestricted;if(tmp.message){message=tmp.message}previousStrict=strict;previousAllowYield=state.allowYield;state.allowYield=isGenerator;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwUnexpectedToken(firstRestricted,message)}if(strict&&stricted){tolerateUnexpectedToken(stricted,message)}strict=previousStrict;state.allowYield=previousAllowYield;return node.finishFunctionExpression(id,params,defaults,body,isGenerator)}function parseClassBody(){var classBody,token,isStatic,hasConstructor=false,body,method,computed,key;classBody=new Node;expect("{");body=[];while(!match("}")){if(match(";")){lex()}else{method=new Node;token=lookahead;isStatic=false;computed=match("[");if(match("*")){lex()}else{key=parseObjectPropertyKey();if(key.name==="static"&&(lookaheadPropertyName()||match("*"))){token=lookahead;isStatic=true;computed=match("[");if(match("*")){lex()}else{key=parseObjectPropertyKey()}}}method=tryParseMethodDefinition(token,key,computed,method);if(method){method["static"]=isStatic;if(method.kind==="init"){method.kind="method"}if(!isStatic){if(!method.computed&&(method.key.name||method.key.value.toString())==="constructor"){if(method.kind!=="method"||!method.method||method.value.generator){throwUnexpectedToken(token,Messages.ConstructorSpecialMethod)}if(hasConstructor){throwUnexpectedToken(token,Messages.DuplicateConstructor)}else{hasConstructor=true}method.kind="constructor"}}else{if(!method.computed&&(method.key.name||method.key.value.toString())==="prototype"){throwUnexpectedToken(token,Messages.StaticPrototype)}}method.type=Syntax.MethodDefinition;delete method.method;delete method.shorthand;body.push(method)}else{throwUnexpectedToken(lookahead)}}}lex();return classBody.finishClassBody(body)}function parseClassDeclaration(identifierIsOptional){var id=null,superClass=null,classNode=new Node,classBody,previousStrict=strict;strict=true;expectKeyword("class");if(!identifierIsOptional||lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=isolateCoverGrammar(parseLeftHandSideExpressionAllowCall)}classBody=parseClassBody();strict=previousStrict;return classNode.finishClassDeclaration(id,superClass,classBody)}function parseClassExpression(){var id=null,superClass=null,classNode=new Node,classBody,previousStrict=strict;strict=true;expectKeyword("class");if(lookahead.type===Token.Identifier){id=parseVariableIdentifier()}if(matchKeyword("extends")){lex();superClass=isolateCoverGrammar(parseLeftHandSideExpressionAllowCall)}classBody=parseClassBody();strict=previousStrict;return classNode.finishClassExpression(id,superClass,classBody)}function parseModuleSpecifier(){var node=new Node;if(lookahead.type!==Token.StringLiteral){throwError(Messages.InvalidModuleSpecifier)}return node.finishLiteral(lex())}function parseExportSpecifier(){var exported,local,node=new Node,def;if(matchKeyword("default")){def=new Node;lex();local=def.finishIdentifier("default")}else{local=parseVariableIdentifier()}if(matchContextualKeyword("as")){lex();exported=parseNonComputedProperty()}return node.finishExportSpecifier(local,exported)}function parseExportNamedDeclaration(node){var declaration=null,isExportFromIdentifier,src=null,specifiers=[];if(lookahead.type===Token.Keyword){switch(lookahead.value){case"let":case"const":case"var":case"class":case"function":declaration=parseStatementListItem();return node.finishExportNamedDeclaration(declaration,specifiers,null)}}expect("{");if(!match("}")){do{isExportFromIdentifier=isExportFromIdentifier||matchKeyword("default");specifiers.push(parseExportSpecifier())}while(match(",")&&lex())}expect("}");if(matchContextualKeyword("from")){lex();src=parseModuleSpecifier();consumeSemicolon()}else if(isExportFromIdentifier){throwError(lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}else{consumeSemicolon()}return node.finishExportNamedDeclaration(declaration,specifiers,src)}function parseExportDefaultDeclaration(node){var declaration=null,expression=null;expectKeyword("default");if(matchKeyword("function")){declaration=parseFunctionDeclaration(new Node,true);return node.finishExportDefaultDeclaration(declaration)}if(matchKeyword("class")){declaration=parseClassDeclaration(true);return node.finishExportDefaultDeclaration(declaration)}if(matchContextualKeyword("from")){throwError(Messages.UnexpectedToken,lookahead.value)}if(match("{")){expression=parseObjectInitialiser()}else if(match("[")){expression=parseArrayInitialiser()}else{expression=parseAssignmentExpression()}consumeSemicolon();return node.finishExportDefaultDeclaration(expression)}function parseExportAllDeclaration(node){var src;expect("*");if(!matchContextualKeyword("from")){throwError(lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return node.finishExportAllDeclaration(src)}function parseExportDeclaration(){var node=new Node;if(state.inFunctionBody){throwError(Messages.IllegalExportDeclaration)}expectKeyword("export");if(matchKeyword("default")){return parseExportDefaultDeclaration(node)}if(match("*")){return parseExportAllDeclaration(node)}return parseExportNamedDeclaration(node)}function parseImportSpecifier(){var local,imported,node=new Node;imported=parseNonComputedProperty();if(matchContextualKeyword("as")){lex();local=parseVariableIdentifier()}return node.finishImportSpecifier(local,imported)}function parseNamedImports(){var specifiers=[];expect("{");if(!match("}")){do{specifiers.push(parseImportSpecifier())}while(match(",")&&lex())}expect("}");return specifiers}function parseImportDefaultSpecifier(){var local,node=new Node;local=parseNonComputedProperty();return node.finishImportDefaultSpecifier(local)}function parseImportNamespaceSpecifier(){var local,node=new Node;expect("*");if(!matchContextualKeyword("as")){throwError(Messages.NoAsAfterImportNamespace)}lex();local=parseNonComputedProperty();return node.finishImportNamespaceSpecifier(local)}function parseImportDeclaration(){var specifiers,src,node=new Node;if(state.inFunctionBody){throwError(Messages.IllegalImportDeclaration)}expectKeyword("import");specifiers=[];if(lookahead.type===Token.StringLiteral){src=parseModuleSpecifier();consumeSemicolon();return node.finishImportDeclaration(specifiers,src)}if(!matchKeyword("default")&&isIdentifierName(lookahead)){specifiers.push(parseImportDefaultSpecifier());if(match(",")){lex()}}if(match("*")){specifiers.push(parseImportNamespaceSpecifier())}else if(match("{")){specifiers=specifiers.concat(parseNamedImports())}if(!matchContextualKeyword("from")){throwError(lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause,lookahead.value)}lex();src=parseModuleSpecifier();consumeSemicolon();return node.finishImportDeclaration(specifiers,src)}function parseScriptBody(){var statement,body=[],token,directive,firstRestricted;while(startIndex<length){token=lookahead;if(token.type!==Token.StringLiteral){break}statement=parseStatementListItem();body.push(statement);if(statement.expression.type!==Syntax.Literal){break}directive=source.slice(token.start+1,token.end-1);if(directive==="use strict"){strict=true;if(firstRestricted){tolerateUnexpectedToken(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}while(startIndex<length){statement=parseStatementListItem();if(typeof statement==="undefined"){break}body.push(statement)}return body}function parseProgram(){var body,node;peek();node=new Node;body=parseScriptBody();return node.finishProgram(body)}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=0;i<extra.tokens.length;++i){entry=extra.tokens[i];token={type:entry.type,value:entry.value};if(entry.regex){token.regex={pattern:entry.regex.pattern,flags:entry.regex.flags}}if(extra.range){token.range=entry.range}if(extra.loc){token.loc=entry.loc}tokens.push(token)}extra.tokens=tokens}function tokenize(code,options){var toString,tokens;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;length=source.length;lookahead=null;state={allowIn:true,allowYield:false,labelSet:{},inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,curlyStack:[]};extra={};options=options||{};options.tokens=true;extra.tokens=[];extra.tokenize=true;extra.openParenToken=-1;extra.openCurlyToken=-1;extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}try{peek();if(lookahead.type===Token.EOF){return extra.tokens}lex();while(lookahead.type!==Token.EOF){try{lex()}catch(lexError){if(extra.errors){recordError(lexError);break}else{throw lexError}}}filterTokenLocation();tokens=extra.tokens;if(typeof extra.comments!=="undefined"){tokens.comments=extra.comments}if(typeof extra.errors!=="undefined"){tokens.errors=extra.errors}}catch(e){throw e}finally{extra={}}return tokens}function parse(code,options){var program,toString;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;startIndex=index;startLineNumber=lineNumber;startLineStart=lineStart;length=source.length;lookahead=null;state={allowIn:true,allowYield:false,labelSet:{},inFunctionBody:false,inIteration:false,inSwitch:false,lastCommentStart:-1,curlyStack:[]};sourceType="script";strict=false;extra={};if(typeof options!=="undefined"){extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;extra.attachComment=typeof options.attachComment==="boolean"&&options.attachComment;if(extra.loc&&options.source!==null&&options.source!==undefined){extra.source=toString(options.source)}if(typeof options.tokens==="boolean"&&options.tokens){extra.tokens=[]}if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}if(extra.attachComment){extra.range=true;extra.comments=[];extra.bottomRightStack=[];extra.trailingComments=[];extra.leadingComments=[]}if(options.sourceType==="module"){sourceType=options.sourceType;strict=true}}try{program=parseProgram();if(typeof extra.comments!=="undefined"){program.comments=extra.comments}if(typeof extra.tokens!=="undefined"){filterTokenLocation();program.tokens=extra.tokens}if(typeof extra.errors!=="undefined"){program.errors=extra.errors}}catch(e){throw e}finally{extra={}}return program}exports.version="2.4.1";exports.tokenize=tokenize;exports.parse=parse;exports.Syntax=function(){var name,types={};if(typeof Object.create==="function"){types=Object.create(null)}for(name in Syntax){if(Syntax.hasOwnProperty(name)){types[name]=Syntax[name]}}if(typeof Object.freeze==="function"){Object.freeze(types)}return types}()})},{}],18:[function(require,module,exports){"use strict";var esprima=require("esprima");exports.BYPASS_RECURSION={root:true,comments:true,tokens:true,loc:true,range:true,parent:true,next:true,prev:true,handler:true,type:true,raw:true,startToken:true,endToken:true};var _addLocInfo;exports.parse=function parse(source,opts){_addLocInfo=opts&&opts.loc;source=source.toString();var ast=esprima.parse(source,{loc:_addLocInfo,range:true,tokens:true,comment:true});if(!ast.tokens.length&&!ast.comments.length){ast.depth=0;ast.startToken=ast.endToken=null;ast.toString=_nodeProto.toString;return ast}instrumentTokens(ast,source);var lastToken=ast.tokens[ast.tokens.length-1];ast.range[0]=ast.tokens[0].range[0];ast.range[1]=lastToken.range[1];if(_addLocInfo){ast.loc.start.line=0;ast.loc.start.column=0;ast.loc.end.line=lastToken.loc.end.line;ast.loc.end.column=lastToken.loc.end.column}var toString=_nodeProto.toString;var instrumentNodes=function(node,parent,prev,next){node.parent=parent;node.prev=prev;node.next=next;node.depth=parent?parent.depth+1:0;node.toString=toString;var prevToken=prev?prev.endToken:parent?parent.startToken:null;var nextToken=parent?parent.endToken:null;node.startToken=prevToken?getNodeStartToken(prevToken,node.range):ast.tokens[0];node.endToken=nextToken?getNodeEndToken(nextToken,node.range):ast.tokens[ast.tokens.length-1]};recursiveWalk(ast,instrumentNodes);return ast};var _nodeProto={};_nodeProto.toString=function(){var str="";var token=this.startToken;if(!token)return str;do{str+="raw"in token?token.raw:token.value;token=token.next}while(token&&token!==this.endToken.next);return str};function getNodeStartToken(token,range){var startRange=range[0];while(token){if(token.range[0]>=startRange){return token}token=token.next}}function getNodeEndToken(token,range){var endRange=range[1];while(token){if(token.range[1]<=endRange){return token}token=token.prev}}function getPrevToken(tokens,range){var result,token,startRange=range[0],n=tokens.length;while(n--){token=tokens[n];if(token.range[1]<=startRange){result=token;break}}return result}function instrumentTokens(ast,source){var tokens=ast.tokens;var comments=ast.comments;var comment,q=-1,nComments=comments.length;while(++q<nComments){comment=comments[q];comment.raw=comment.type==="Block"?"/*"+comment.value+"*/":"//"+comment.value;comment.type+="Comment";var prevToken=getPrevToken(tokens,comment.range);var prevIndex=prevToken?tokens.indexOf(prevToken):-1;tokens.splice(prevIndex+1,0,comment)}var result=[];var wsTokens;var firstToken=ast.tokens[0];var raw;if(firstToken.range[0]){raw=source.substring(0,firstToken.range[0]);result=result.concat(getWhiteSpaceTokens(raw,null))}var i=-1,nTokens=tokens.length,token,prev;var k,nWs;while(++i<nTokens){token=tokens[i];if(i){if(prev.range[1]<token.range[0]){wsTokens=getWhiteSpaceTokens(source.substring(prev.range[1],token.range[0]),prev);k=-1;nWs=wsTokens.length;while(++k<nWs){result.push(wsTokens[k])}}}result.push(token);prev=token}var lastToken=ast.tokens[ast.tokens.length-1];if(lastToken.range[1]<source.length){wsTokens=getWhiteSpaceTokens(source.substring(lastToken.range[1],source.length),lastToken);k=-1;nWs=wsTokens.length;while(++k<nWs){result.push(wsTokens[k])}}var n;for(i=0,n=result.length,token;i<n;i++){token=result[i];token.prev=i?result[i-1]:undefined;token.next=result[i+1];token.root=ast;if(token.type==="BlockComment"&&token.prev&&token.prev.type==="WhiteSpace"&&(!token.prev.prev||token.prev.prev.type==="LineBreak")){token.originalIndent=token.prev.value}}ast.tokens=result}function getWhiteSpaceTokens(raw,prev){var whiteSpaces=getWhiteSpaces(raw);var startRange=prev?prev.range[1]:0;var startLine,startColumn;if(_addLocInfo){startLine=prev?prev.loc.end.line:1;startColumn=prev?prev.loc.end.column:0}var tokens=[];for(var i=0,n=whiteSpaces.length,value;i<n;i++){value=whiteSpaces[i];var wsToken={value:value};var isBr="\r\n".indexOf(value)>=0;wsToken.type=isBr?"LineBreak":"WhiteSpace";wsToken.range=[startRange,startRange+value.length];if(_addLocInfo){wsToken.loc={start:{line:startLine,column:startColumn},end:{line:startLine,column:startColumn+value.length}};if(isBr){startLine=wsToken.loc.end.line+1;startColumn=0}else{startLine=wsToken.loc.end.line;startColumn=wsToken.loc.end.column}}startRange+=value.length;tokens.push(wsToken)}return tokens}function getWhiteSpaces(source){var result=[];var whiteSpaces=source.split("");var buf="";for(var value,i=0,nSpaces=whiteSpaces.length;i<nSpaces;i++){value=whiteSpaces[i];switch(value){case"\n":if(buf==="\r"){result.push(buf+value)}else{if(buf){result.push(buf)}result.push(value)}buf="";break;case"\r":if(buf){result.push(buf)}buf=value;break;default:if(buf==="\r"){result.push(buf);buf=value}else{buf+=value}}}if(buf){result.push(buf)}return result}exports.walk=exports.recursive=recursiveWalk;function recursiveWalk(node,fn,parent,prev,next){if(!node||fn(node,parent,prev,next)===false){return}var keys=Object.keys(node),child,key;for(var i=0,nKeys=keys.length;i<nKeys;i++){key=keys[i];child=node[key];if(!child||typeof child!=="object"||exports.BYPASS_RECURSION[key]){continue}if(typeof child.type==="string"){recursiveWalk(child,fn,node)}else if(typeof child.length==="number"){for(var k=0,nChilds=child.length;k<nChilds;k++){recursiveWalk(child[k],fn,node,k?child[k-1]:undefined,child[k+1])}}}}exports.moonwalk=function moonwalk(ast,fn){if(typeof ast==="string"){ast=exports.parse(ast)}var swap=[];recursiveWalk(ast,function(node){if(!swap[node.depth]){swap[node.depth]=[]}swap[node.depth].push(node)});var nodes=[];var nDepths=swap.length,cur;while(cur=swap[--nDepths]){for(var i=0,n=cur.length;i<n;i++){nodes.push(cur[i])}}nodes.forEach(fn);return ast}},{esprima:17}],"esformatter-collapse-objects":[function(require,module,exports){var defaults=require("defaults-deep");var rocambole=require("rocambole");var _tk=require("rocambole-token");var _ws=require("rocambole-whitespace");var MAX_DEPTH=3;var options;var defaultOptions={maxLineLength:80,maxKeys:3,maxDepth:2,forbidden:["FunctionExpression"]};module.exports={setOptions:function(opts){options=defaults(opts.collapseObjects||{},{ObjectExpression:defaultOptions,ArrayExpression:defaultOptions});_ws.setOptions(opts&&opts.whiteSpace)},transformAfter:function(ast){rocambole.recursive(ast,transform)}};function transform(node){if(!~Object.keys(options).indexOf(node.type))return;var nodeOptions=options[node.type];var parentType=node.parent.type;if(parentType==="Property"||parentType==="ArrayExpression"){return}if(nodeOptions.maxLineLength>=0){var length=expectedLength(node);if(length===0||length>nodeOptions.maxLineLength){return}}if(nodeOptions.maxKeys>=0){if(getProperties(node).length>nodeOptions.maxKeys){return}}if(nodeOptions.maxDepth>=0){if(exceedsDepth(node,nodeOptions.maxDepth)){return}}for(var i=0;i<getProperties(node).length;i++){if(~nodeOptions.forbidden.indexOf(getValueAt(node,i).type)){return}}collapse(node);limitSpaces(node)}function exceedsDepth(root,max){var depth=0;var depths={};rocambole.moonwalk(root,function(node){if(isComposite(node)&&!depths[node.depth]){depths[node.depth]=true;depth++}});return depth>max}function isComposite(node){return node.type==="ObjectExpression"||node.type==="ArrayExpression"}function getProperties(node){return node.properties||node.elements}function getValueAt(node,key){if(node.properties){return node.properties[key].value}else if(node.elements){return node.elements[key]}}function collapse(node){_tk.eachInBetween(node.startToken,node.endToken,function(token){if(_tk.isBr(token)){var next=token.next;while(_tk.isEmpty(next)){_tk.remove(next);next=next.next}_tk.remove(token)}})}function expectedLength(node){var length=0;var startOfTheLine=_tk.findPrev(node.startToken,"LineBreak");if(!startOfTheLine){startOfTheLine=_tk.findPrev(node.startToken,function(token){return!token.prev})}var firstChar=_tk.findNextNonEmpty(startOfTheLine);_tk.eachInBetween(startOfTheLine,firstChar,function(token){length+=String(token.raw||token.value).length});var prev;_tk.eachInBetween(firstChar,node.endToken,function(token){if(_tk.isEmpty(token)){length+=_tk.isEmpty(prev)?0:1;prev=token;return}if(token.type==="LineComment"){length+=1e3}length+=String(token.raw||token.value).length;prev=token});if(length===0){throw new Error("Failed to measure length of object expression: "+node.toString())}return length}function limitSpaces(node){if(node.type==="ArrayExpression"){limitArraySpaces(node)}else{limitObjectSpaces(node)}}function limitArraySpaces(node){node.elements.forEach(function(el){if(!el)return;var prev=_tk.findPrevNonEmpty(el.startToken);if(prev.value===","){_ws.limit(prev,"ArrayExpressionComma")}});_ws.limitAfter(node.startToken,"ArrayExpressionOpening");_ws.limitBefore(node.endToken,"ArrayExpressionClosing")}function limitObjectSpaces(node){node.properties.forEach(function(prop){_ws.limitBefore(prop.key.startToken,"PropertyName");_ws.limitAfter(prop.key.endToken,"PropertyName");_ws.limitBefore(getValueStart(prop),"PropertyValue");_ws.limitAfter(getValueEnd(prop),"PropertyValue")});_ws.limitAfter(node.startToken,"ObjectExpressionOpeningBrace");_ws.limitBefore(node.endToken,"ObjectExpressionClosingBrace")}function getValueStart(prop){var start=prop.value.startToken;return prop.kind==="get"||prop.kind==="set"?start:_tk.findNext(_tk.findPrev(start,":"),_tk.isCode)}function getValueEnd(prop){var end=_tk.findNext(prop.value.endToken,[",","}"]);return _tk.findPrev(end,_tk.isCode)}},{"defaults-deep":1,rocambole:18,"rocambole-token":7,"rocambole-whitespace":16}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var getNative=require("lodash._getnative");var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeNow=getNative(Date,"now");var now=nativeNow||function(){return(new Date).getTime()};function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=wait<0?0:+wait||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait);trailing="trailing"in options?options.trailing:trailing}function cancel(){if(timeoutId){clearTimeout(timeoutId)}if(maxTimeoutId){clearTimeout(maxTimeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}}function maxDelayed(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}function debounced(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}debounced.cancel=cancel;return debounced}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}module.exports=debounce},{"lodash._getnative":2}],2:[function(require,module,exports){var funcTag="[object Function]";var reRegExpChars=/[.*+?^${}()|[\]\/\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source);var reIsHostCtor=/^\[object .+?Constructor\]$/;function baseToString(value){if(typeof value=="string"){return value}return value==null?"":value+""}function isObjectLike(value){return!!value&&typeof value=="object"}var objectProto=Object.prototype;var fnToString=Function.prototype.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;var reIsNative=RegExp("^"+escapeRegExp(fnToString.call(hasOwnProperty)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function getNative(object,key){var value=object==null?undefined:object[key];return isNative(value)?value:undefined}function isNative(value){if(value==null){return false}if(objToString.call(value)==funcTag){return reIsNative.test(fnToString.call(value))}return isObjectLike(value)&&reIsHostCtor.test(value)}function escapeRegExp(string){string=baseToString(string);return string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}module.exports=getNative},{}],"lodash.throttle":[function(require,module,exports){var debounce=require("lodash.debounce");var FUNC_ERROR_TEXT="Expected a function";var debounceOptions={leading:false,maxWait:0,trailing:false};function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=+wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function isObject(value){var type=typeof value;return type=="function"||value&&type=="object"||false}module.exports=throttle},{"lodash.debounce":1}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({jquery:[function(require,module,exports){(function(global,factory){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document")}return factory(w)}}else{factory(global)}})(typeof window!=="undefined"?window:this,function(window,noGlobal){var arr=[];var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;
var hasOwn=class2type.hasOwnProperty;var support={};var document=window.document,version="2.1.4",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?num<0?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&jQuery.isArray(src)?src:[]}else{clone=src&&jQuery.isPlainObject(src)?src:{}}target[name]=jQuery.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function"},isArray:Array.isArray,isWindow:function(obj){return obj!=null&&obj===obj.window},isNumeric:function(obj){return!jQuery.isArray(obj)&&obj-parseFloat(obj)+1>=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i<length;i++){value=callback.apply(obj[i],args);if(value===false){break}}}else{for(i in obj){value=callback.apply(obj[i],args);if(value===false){break}}}}else{if(isArray){for(;i<length;i++){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}else{for(i in obj){value=callback.call(obj[i],i,obj[i]);if(value===false){break}}}}return obj},trim:function(text){return text==null?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArraylike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray){for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}return concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp}if(!jQuery.isFunction(fn)){return undefined}args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy},now:Date.now,support:support});jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});function isArraylike(obj){var length="length"in obj&&obj.length,type=jQuery.type(obj);if(type==="function"||jQuery.isWindow(obj)){return false}if(obj.nodeType===1&&length){return true}return type==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i}}return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;results=results||[];nodeType=context.nodeType;if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed&&documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType!==1&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if(old=context.getAttribute("id")){nid=old.replace(rescape,"\\$&")}else{context.setAttribute("id",nid)}nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i])}newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(!old){context.removeAttribute("id")}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+" "]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=doc.documentElement;parent=doc.defaultView;if(parent&&parent!==parent.top){if(parent.addEventListener){parent.addEventListener("unload",unloadHandler,false)}else if(parent.attachEvent){parent.attachEvent("onunload",unloadHandler)}}documentIsHTML=!isXML(doc);support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(doc.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!doc.getElementsByName||!doc.getElementsByName(expando).length});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(doc.querySelectorAll)){assert(function(div){docElem.appendChild(div).innerHTML="<a id='"+expando+"'></a>"+"<select id='"+expando+"-\f]' msallowcapture=''>"+"<option selected=''></option></select>";if(div.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}if(!div.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return doc};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns){diff=cache[1]}else{while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){(node[expando]||(node[expando]={}))[type]=[dirruns,diff]}if(node===elem){break}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos["empty"](elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i)}return matchIndexes})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i)}for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push(tokens=[])}matched=false;if(match=rcombinators.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length)}for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value}return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&dir==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});if((oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return newCache[2]=oldCache[2]}else{outerCache[dir]=newCache;if(newCache[2]=matcher(elem,context,xml)){return true}}}}}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i)}}}}return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml)}if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){temp.push(matcherIn[i]=elem)}}postFinder(null,matcherOut=[],temp,xml)}i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;
if(outermost){outermostContext=context!==document&&context}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while(matcher=elementMatchers[j++]){if(matcher(elem,context,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="<a href='#'></a>";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="<input/>";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>=0!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true}}}))}for(i=0;i<len;i++){jQuery.find(selector,self[i],ret)}ret=this.pushStack(len>1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector){return this}if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else if(!context||context.jquery){return(context||rootjQuery).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery)}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched},sibling:function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched}});jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true}}})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(pos?pos.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.unique(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnotwhite=/\S+/g;var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex<firingLength;firingIndex++){if(list[firingIndex].apply(data[0],data[1])===false&&options.stopOnFalse){memory=false;break}}firing=false;if(list){if(stack){if(stack.length){fire(stack.shift())}}else if(memory){list=[]}else{self.disable()}}},self={add:function(){if(list){var start=list.length;(function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);if(type==="function"){if(!options.unique||!self.has(arg)){list.push(arg)}}else if(arg&&arg.length&&type!=="string"){add(arg)}})})(arguments);if(firing){firingLength=list.length}else if(memory){firingStart=start;fire(memory)}}return this},remove:function(){if(list){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(firing){if(index<=firingLength){firingLength--}if(index<=firingIndex){firingIndex--}}}})}return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){list=[];firingLength=0;return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return!list},lock:function(){stack=undefined;if(!memory){self.disable()}return this},locked:function(){return!stack},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing){stack.push(args)}else{fire(args)}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else if(!--remaining){deferred.resolveWith(contexts,values)}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i<length;i++){if(resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)){resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues))}else{--remaining}}}if(!remaining){deferred.resolveWith(resolveContexts,resolveValues)}return deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){jQuery.ready.promise().done(fn);return this};jQuery.extend({isReady:false,readyWait:1,holdReady:function(hold){if(hold){jQuery.readyWait++}else{jQuery.ready(true)}},ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return}jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function completed(){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false);jQuery.ready()}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"){setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed,false);window.addEventListener("load",completed,false)}}return readyList.promise(obj)};jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){jQuery.access(elems,fn,i,key[i],true,emptyGet,raw)}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)))}}}return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key):emptyGet};jQuery.acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType};function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}});this.expando=jQuery.expando+Data.uid++}Data.uid=1;Data.accepts=jQuery.acceptData;Data.prototype={key:function(owner){if(!Data.accepts(owner)){return 0}var descriptor={},unlock=owner[this.expando];if(!unlock){unlock=Data.uid++;try{descriptor[this.expando]={value:unlock};Object.defineProperties(owner,descriptor)}catch(e){descriptor[this.expando]=unlock;jQuery.extend(owner,descriptor)}}if(!this.cache[unlock]){this.cache[unlock]={}}return unlock},set:function(owner,data,value){var prop,unlock=this.key(owner),cache=this.cache[unlock];if(typeof data==="string"){cache[data]=value}else{if(jQuery.isEmptyObject(cache)){jQuery.extend(this.cache[unlock],data)}else{for(prop in data){cache[prop]=data[prop]}}}return cache},get:function(owner,key){var cache=this.cache[this.key(owner)];return key===undefined?cache:cache[key]},access:function(owner,key,value){var stored;if(key===undefined||key&&typeof key==="string"&&value===undefined){stored=this.get(owner,key);return stored!==undefined?stored:this.get(owner,jQuery.camelCase(key))}this.set(owner,key,value);return value!==undefined?value:key},remove:function(owner,key){var i,name,camel,unlock=this.key(owner),cache=this.cache[unlock];if(key===undefined){this.cache[unlock]={}}else{if(jQuery.isArray(key)){name=key.concat(key.map(jQuery.camelCase))}else{camel=jQuery.camelCase(key);if(key in cache){name=[key,camel]}else{name=camel;name=name in cache?[name]:name.match(rnotwhite)||[]}}i=name.length;while(i--){delete cache[name[i]]}}},hasData:function(owner){return!jQuery.isEmptyObject(this.cache[owner[this.expando]]||{})},discard:function(owner){if(owner[this.expando]){delete this.cache[owner[this.expando]]}}};var data_priv=new Data;var data_user=new Data;var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}data_user.set(elem,key,data)}else{data=undefined}}return data}jQuery.extend({hasData:function(elem){return data_user.hasData(elem)||data_priv.hasData(elem)},data:function(elem,name,data){return data_user.access(elem,name,data)},removeData:function(elem,name){data_user.remove(elem,name)},_data:function(elem,name,data){return data_priv.access(elem,name,data)},_removeData:function(elem,name){data_priv.remove(elem,name)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=data_user.get(elem);if(elem.nodeType===1&&!data_priv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}data_priv.set(elem,"hasDataAttrs",true)}}return data}if(typeof key==="object"){return this.each(function(){data_user.set(this,key)})}return access(this,function(value){var data,camelKey=jQuery.camelCase(key);if(elem&&value===undefined){data=data_user.get(elem,key);if(data!==undefined){return data}data=data_user.get(elem,camelKey);if(data!==undefined){return data}data=dataAttr(elem,camelKey,undefined);if(data!==undefined){return data}return}this.each(function(){var data=data_user.get(this,camelKey);data_user.set(this,camelKey,value);if(key.indexOf("-")!==-1&&data!==undefined){data_user.set(this,key,value)}})},null,value,arguments.length>1,null,true)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=data_priv.get(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=data_priv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem,key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.length<setter){return jQuery.queue(this[0],type)}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!--count){defer.resolveWith(elements,[elements])}};if(typeof type!=="string"){obj=type;type=undefined}type=type||"fx";while(i--){tmp=data_priv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var cssExpand=["Top","Right","Bottom","Left"];var isHidden=function(elem,el){elem=el||elem;return jQuery.css(elem,"display")==="none"||!jQuery.contains(elem.ownerDocument,elem)};var rcheckableType=/^(?:checkbox|radio)$/i;(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(data_priv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click")){for(;cur!==this;cur=cur.parentNode||this){if(cur.disabled!==true||event.type!=="click"){matches=[];for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matches[sel]===undefined){matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount<handlers.length){handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)})}return handlerQueue},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null){event.which=original.charCode!=null?original.charCode:original.keyCode}return event}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button;if(event.pageX==null&&original.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)}if(!event.which&&button!==undefined){event.which=button&1?1:button&2?3:button&4?2:0}return event}},fix:function(event){if(event[jQuery.expando]){return event}var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];if(!fixHook){this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}}copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=new jQuery.Event(originalEvent);i=copy.length;while(i--){prop=copy[i];event[prop]=originalEvent[prop]}if(!event.target){event.target=document}if(event.target.nodeType===3){event.target=event.target.parentNode}return fixHook.filter?fixHook.filter(event,originalEvent):event},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&jQuery.nodeName(this,"input")){this.click();return false}},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result}}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:true,originalEvent:{}});if(bubble){jQuery.event.trigger(e,null,elem)}else{jQuery.event.dispatch.call(elem,e)}if(e.isDefaultPrevented()){event.preventDefault()}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false)}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){
return new jQuery.Event(src,props)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse}else{this.type=src}if(props){jQuery.extend(this,props)}this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true};jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&e.preventDefault){e.preventDefault()}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&e.stopPropagation){e.stopPropagation()}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&e.stopImmediatePropagation){e.stopImmediatePropagation()}this.stopPropagation()}};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});if(!support.focusinBubbles){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),true)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=data_priv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true)}data_priv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=data_priv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);data_priv.remove(doc,fix)}else{data_priv.access(doc,fix,attaches)}}}})}jQuery.fn.extend({on:function(types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined}for(type in types){this.on(type,selector,data,types[type],one)}return this}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}if(fn===false){fn=returnFalse}else if(!fn){return this}if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types==="object"){for(type in types){this.off(type,selector,types[type])}return this}if(selector===false||typeof selector==="function"){fn=selector;selector=undefined}if(fn===false){fn=returnFalse}return this.each(function(){jQuery.event.remove(this,types,fn,selector)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true)}}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute("type")}return elem}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){data_priv.set(elems[i],"globalEval",!refElements||data_priv.get(refElements[i],"globalEval"))}}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(data_priv.hasData(src)){pdataOld=data_priv.access(src);pdataCur=data_priv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i])}}}}if(data_user.hasData(src)){udataOld=data_user.access(src);udataCur=jQuery.extend({},udataOld);data_user.set(dest,udataCur)}}function getAll(context,tag){var ret=context.getElementsByTagName?context.getElementsByTagName(tag||"*"):context.querySelectorAll?context.querySelectorAll(tag||"*"):[];return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue}}jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i])}}else{cloneCopyEvent(elem,clone)}}destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},buildFragment:function(elems,context,scripts,selection){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem)}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}fragment.textContent="";i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)!==-1){continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment},cleanData:function(elems){var data,elem,type,key,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(jQuery.acceptData(elem)){key=elem[data_priv.expando];if(key&&(data=data_priv.cache[key])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}if(data_priv.cache[key]){delete data_priv.cache[key]}}}delete data_user.cache[elem[data_user.expando]]}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType===1){jQuery.cleanData(getAll(elem))}if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"))}elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem){this.empty().append(value)}},null,value,arguments.length)},replaceWith:function(){var arg=arguments[0];this.domManip(arguments,function(elem){arg=this.parentNode;jQuery.cleanData(getAll(this));if(arg){arg.replaceChild(elem,this)}});return arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,true)},domManip:function(args,callback){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}self.domManip(args,callback)})}if(l){fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"))}}callback.call(this[i],node,i)}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!data_priv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src)}}else{jQuery.globalEval(node.textContent.replace(rcleanScript,""))}}}}}}return this}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var iframe,elemdisplay={};function actualDisplay(name,doc){var style,elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle&&(style=window.getDefaultComputedStyle(elem[0]))?style.display:jQuery.css(elem[0],"display");elem.detach();return display}function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName,doc);if(display==="none"||!display){iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display}var rmargin=/^margin/;var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){if(elem.ownerDocument.defaultView.opener){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)}return window.getComputedStyle(elem,null)};function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name]}if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}(function(){var pixelPositionVal,boxSizingReliableVal,docElem=document.documentElement,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;"+"position:absolute";container.appendChild(div);function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;"+"box-sizing:border-box;display:block;margin-top:1%;top:1%;"+"border:1px;padding:1px;width:4px;position:absolute";div.innerHTML="";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal=divStyle.top!=="1%";boxSizingReliableVal=divStyle.width==="4px";docElem.removeChild(container)}if(window.getComputedStyle){jQuery.extend(support,{pixelPosition:function(){computePixelPositionAndBoxSizingReliable();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null){computePixelPositionAndBoxSizingReliable()}return boxSizingReliableVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;"+"box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";docElem.appendChild(container);ret=!parseFloat(window.getComputedStyle(marginDiv,null).marginRight);docElem.removeChild(container);div.removeChild(marginDiv);return ret}})}})();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style){return name}var capName=name[0].toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name}}return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name]}if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue}values[index]=data_priv.get(elem,"olddisplay");display=elem.style.display;if(show){if(!values[index]&&display==="none"){elem.style.display=""}if(elem.style.display===""&&isHidden(elem)){values[index]=data_priv.access(elem,"olddisplay",defaultDisplay(elem.nodeName))}}else{hidden=isHidden(elem);if(display!=="none"||!hidden){data_priv.set(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))}}}for(index=0;index<length;index++){elem=elements[index];if(!elem.style){continue}if(!show||elem.style.display==="none"||elem.style.display===""){elem.style.display=show?values[index]||"":"none"}}return elements}jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name));type="number"}if(value==null||value!==value){return}if(type==="number"&&!jQuery.cssNumber[origName]){value+="px"}if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit"}if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){style[name]=value}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret}return style[name]}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name);name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName));hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra)}if(val===undefined){val=curCSS(elem,name,styles)}if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name]}if(extra===""||extra){num=parseFloat(val);return extra===true||jQuery.isNumeric(num)?num||0:val}return val}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&elem.offsetWidth===0?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)}},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,"boxSizing",false,styles)==="border-box",styles):0)}}});jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){if(computed){return jQuery.swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"])}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0]}return expanded}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles)}return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHidden(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start=start/scale;jQuery.style(tween.elem,prop,start+unit)}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]}return tween}]};function createFxNow(){setTimeout(function(){fxNow=undefined});return fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){return tween}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,checkDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=data_priv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire()}})})}if(elem.nodeType===1&&("height"in props||"width"in props)){opts.overflow=[style.overflow,style.overflowX,style.overflowY];display=jQuery.css(elem,"display");checkDisplay=display==="none"?data_priv.get(elem,"olddisplay")||defaultDisplay(elem.nodeName):display;if(checkDisplay==="inline"&&jQuery.css(elem,"float")==="none"){style.display="inline-block"}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}for(prop in props){value=props[prop];if(rfxtypes.exec(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}else{display=undefined}}if(!jQuery.isEmptyObject(orig)){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden}}else{dataShow=data_priv.access(elem,"fxshow",{})}if(toggle){dataShow.hidden=!hidden}if(hidden){jQuery(elem).show()}else{anim.done(function(){jQuery(elem).hide()})}anim.done(function(){var prop;data_priv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop])}});for(prop in orig){tween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=tween.start;if(hidden){tween.end=tween.start;tween.start=prop==="width"||prop==="height"?1:0}}}}else if((display==="none"?defaultDisplay(elem.nodeName):display)==="inline"){style.display=display}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(jQuery.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining}else{deferred.resolveWith(elem,[animation]);return false}},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index<length;index++){animation.tweens[index].run(1)}if(gotoEnd){deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=animationPrefilters[index].call(animation,elem,props,animation.opts);if(result){return result}}jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=["*"]}else{props=props.split(" ")}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];tweeners[prop]=tweeners[prop]||[];tweeners[prop].unshift(callback)}},prefilter:function(callback,prepend){if(prepend){animationPrefilters.unshift(callback)}else{animationPrefilters.push(callback)}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true){opt.queue="fx"}opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery.dequeue(this,opt.queue)}};return opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||data_priv.get(this,"finish")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue&&type!==false){this.queue(type||"fx",[])}return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=data_priv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index])}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){
stopQueue(data[index])}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}}if(dequeue||!gotoEnd){jQuery.dequeue(this,type)}})},finish:function(type){if(type!==false){type=type||"fx"}return this.each(function(){var index,data=data_priv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}}for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this)}}delete data.finish})}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1)}}if(!timers.length){jQuery.fx.stop()}fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);if(timer()){jQuery.fx.start()}else{jQuery.timers.pop()}};jQuery.fx.interval=13;jQuery.fx.start=function(){if(!timerId){timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval)}};jQuery.fx.stop=function(){clearInterval(timerId);timerId=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;select.disabled=true;support.optDisabled=!opt.disabled;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t"})();var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===strundefined){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name)}else if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}else{elem.setAttribute(name,value+"");return value}}else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){elem[propName]=false}elem.removeAttribute(name)}}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value}else{return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]}},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex:-1}}}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i<len;i++){elem=this[i];cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ");if(cur){j=0;while(clazz=classes[j++]){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" "}}finalValue=jQuery.trim(cur);if(elem.className!==finalValue){elem.className=finalValue}}}}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=arguments.length===0||typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i<len;i++){elem=this[i];cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"");if(cur){j=0;while(clazz=classes[j++]){while(cur.indexOf(" "+clazz+" ")>=0){cur=cur.replace(" "+clazz+" "," ")}}finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue){elem.className=finalValue}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)})}return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];while(className=classNames[i++]){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else if(type===strundefined||type==="boolean"){if(this.className){data_priv.set(this,"__className__",this.className)}this.className=this.className||value===false?"":data_priv.get(this,"__className__")||""}})},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i<l;i++){if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0){return true}}return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else if(typeof val==="number"){val+=""}else if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i<max;i++){option=options[i];if((option.selected||i===index)&&(support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value}values.push(value)}}return values},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(option.value,values)>=0){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now();var rquery=/\?/;jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!=="string"){return null}try{tmp=new DOMParser;xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data)}return xml};var rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*"),ajaxLocation=window.location.href,ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while(dataType=dataTypes[i++]){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s["throws"]){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]]}}else{jqXHR.always(map[jqXHR.status])}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data}if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++}}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort()}strAbort="abort";for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i])}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2){done(-1,e)}else{throw e}}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return}state=2;if(timeoutTimer){clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))})}if(this[0]){wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes)}}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add)}})}else if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value==null?"":value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional}if(jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();if(window.attachEvent){window.attachEvent("onunload",function(){for(var key in xhrCallbacks){xhrCallbacks[key]()}})}support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){delete xhrCallbacks[id];callback=xhr.onload=xhr.onerror=null;if(type==="abort"){xhr.abort()}else if(type==="error"){complete(xhr.status,xhr.statusText)}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,typeof xhr.responseText==="string"?{text:xhr.responseText}:undefined,xhr.getAllResponseHeaders())}}}};xhr.onload=callback();xhr.onerror=callback("error");callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({async:true,charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type)}});document.head.appendChild(script[0])},abort:function(){if(callback){callback()}}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;this[callback]=true;return callback}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName)}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName}s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called")}return responseContainer[0]};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){window[callbackName]=overwritten;if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=undefined});return"script"}});jQuery.parseHTML=function(data,context,keepScripts){if(!data||typeof data!=="string"){return null}if(typeof context==="boolean"){keepScripts=context;context=false}context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=jQuery.buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove()}return jQuery.merge([],parsed.childNodes)};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments)}var selector,type,response,self=this,off=url.indexOf(" ");if(off>=0){selector=jQuery.trim(url.slice(off));url=url.slice(0,off)}if(jQuery.isFunction(params)){callback=params;params=undefined}else if(params&&typeof params==="object"){type="POST"}if(self.length>0){jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])})}return this};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};var docElem=window.document.documentElement;function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9&&elem.defaultView}jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative"}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset)}if(options.top!=null){props.top=options.top-curOffset.top+curTop}if(options.left!=null){props.left=options.left-curOffset.left+curLeft}if("using"in options){options.using.call(elem,props)}else{curElem.css(props)}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)})}var docElem,win,elem=this[0],box={top:0,left:0},doc=elem&&elem.ownerDocument;if(!doc){return}docElem=doc.documentElement;if(!jQuery.contains(docElem,elem)){return box}if(typeof elem.getBoundingClientRect!==strundefined){box=elem.getBoundingClientRect()}win=getWindow(doc);return{top:box.top+win.pageYOffset-docElem.clientTop,left:box.left+win.pageXOffset-docElem.clientLeft}},position:function(){if(!this[0]){return}var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect()}else{offsetParent=this.offsetParent();offset=this.offset();if(!jQuery.nodeName(offsetParent[0],"html")){parentOffset=offsetParent.offset()}parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",true)}return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||docElem;
while(offsetParent&&(!jQuery.nodeName(offsetParent,"html")&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent}return offsetParent||docElem})}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?win[prop]:elem[method]}if(win){win.scrollTo(!top?val:window.pageXOffset,top?val:window.pageYOffset)}else{elem[method]=val}},method,val,arguments.length,null)}});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed}})});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return elem.document.documentElement["client"+name]}if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable,null)}})});jQuery.fn.size=function(){return this.length};jQuery.fn.andSelf=jQuery.fn.addBack;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery})}var _jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery}return jQuery};if(typeof noGlobal===strundefined){window.jQuery=window.$=jQuery}return jQuery})},{}]},{},[]);var esformatter=require("esformatter");var esformatterJSX=require("esformatter-jsx");var collapser=require("esformatter-collapse-objects");var throttle=require("lodash.throttle");var testCode="/*\nHere are three es6 related issues with standard-format.\nOne can be solved by a setting I suppose. The others probably require a \nfix in esformatter\n*/\n"+"class Foo extends React.Component {\n"+" classFun (a, b, c) {}"+"}\n\n//this can be fixed with whitespace.before.ObjectPatternComma -1 / 0\nconst {foo, bar} = baz\n\n"+"function regularFun(a,b,c){}\n";var esformatterConfig={collapseObjects:{ObjectExpression:{maxLineLength:80,maxKeys:4,maxDepth:1,forbidden:["FunctionExpression"]},ArrayExpression:{maxLineLength:80,maxKeys:4,maxDepth:1,forbidden:["FunctionExpression"]}},jsx:{attrsOnSameLineAsTag:false,maxAttrsOnTag:2},indent:{value:" ",ArrayExpression:1,AssignmentExpression:1,BinaryExpression:1,ConditionalExpression:1,CallExpression:1,CatchClause:1,DoWhileStatement:1,ForInStatement:1,ForStatement:1,FunctionDeclaration:1,FunctionExpression:1,IfStatement:1,MemberExpression:1,MultipleVariableDeclaration:1,ObjectExpression:1,ReturnStatement:">=1",SwitchCase:1,SwitchStatement:1,TopLevelFunctionBlock:1,TryStatement:1,"VariableDeclaration.LogicalExpression":1,WhileStatement:1},lineBreak:{before:{AssignmentExpression:">=0",AssignmentOperator:0,BlockStatement:1,CallExpression:-1,ConditionalExpression:">=1",CatchOpeningBrace:0,CatchClosingBrace:">=1",CatchKeyword:0,DeleteOperator:">=1",DoWhileStatement:">=1",DoWhileStatementOpeningBrace:0,DoWhileStatementClosingBrace:">=1",EndOfFile:1,EmptyStatement:-1,FinallyKeyword:-1,FinallyOpeningBrace:0,FinallyClosingBrace:">=1",ForInStatement:">=1",ForInStatementExpressionOpening:0,ForInStatementExpressionClosing:0,ForInStatementOpeningBrace:0,ForInStatementClosingBrace:">=1",ForStatement:">=1",ForStatementExpressionOpening:0,ForStatementExpressionClosing:"<2",ForStatementOpeningBrace:0,ForStatementClosingBrace:">=1",FunctionExpression:0,FunctionExpressionOpeningBrace:0,FunctionExpressionClosingBrace:">=1",FunctionDeclaration:">=1",FunctionDeclarationOpeningBrace:0,FunctionDeclarationClosingBrace:">=1",IfStatement:">=1",IfStatementOpeningBrace:0,IfStatementClosingBrace:">=1",ElseIfStatement:0,ElseIfStatementOpeningBrace:0,ElseIfStatementClosingBrace:">=1",ElseStatement:0,ElseStatementOpeningBrace:0,ElseStatementClosingBrace:">=1",LogicalExpression:-1,ObjectExpressionOpeningBrace:0,ObjectExpressionClosingBrace:1,Property:1,ReturnStatement:">=1",SwitchOpeningBrace:0,SwitchClosingBrace:">=1",ThisExpression:-1,ThrowStatement:">=1",TryKeyword:-1,TryOpeningBrace:0,TryClosingBrace:">=1",VariableName:">=1",VariableValue:0,VariableDeclaration:">=1",VariableDeclarationWithoutInit:">=1",WhileStatement:">=1",WhileStatementOpeningBrace:0,WhileStatementClosingBrace:">=1",ArrayExpressionClosing:1},after:{AssignmentExpression:">=1",AssignmentOperator:0,BlockStatement:0,CallExpression:-1,CatchOpeningBrace:">=1",CatchClosingBrace:">=0",CatchKeyword:0,ConditionalExpression:">=1",DeleteOperator:">=1",DoWhileStatement:">=1",DoWhileStatementOpeningBrace:">=1",DoWhileStatementClosingBrace:0,EmptyStatement:-1,FinallyKeyword:-1,FinallyOpeningBrace:">=1",FinallyClosingBrace:">=1",ForInStatement:">=1",ForInStatementExpressionOpening:"<2",ForInStatementExpressionClosing:-1,ForInStatementOpeningBrace:">=1",ForInStatementClosingBrace:">=1",ForStatement:">=1",ForStatementExpressionOpening:"<2",ForStatementExpressionClosing:-1,ForStatementOpeningBrace:">=1",ForStatementClosingBrace:">=1",FunctionExpression:">=1",FunctionExpressionOpeningBrace:">=1",FunctionExpressionClosingBrace:-1,FunctionDeclaration:">=1",FunctionDeclarationOpeningBrace:">=1",FunctionDeclarationClosingBrace:">=1",IfStatement:">=1",IfStatementOpeningBrace:">=1",IfStatementClosingBrace:">=1",ElseIfStatement:">=1",ElseIfStatementOpeningBrace:">=1",ElseIfStatementClosingBrace:">=1",ElseStatement:">=1",ElseStatementOpeningBrace:">=1",ElseStatementClosingBrace:">=1",LogicalExpression:-1,ObjectExpressionClosingBrace:0,ObjectExpressionOpeningBrace:1,PropertyValue:0,Property:0,ReturnStatement:1,SwitchOpeningBrace:">=1",SwitchClosingBrace:">=1",ThisExpression:0,ThrowStatement:">=1",TryKeyword:-1,TryOpeningBrace:">=1",TryClosingBrace:0,VariableDeclaration:">=1",WhileStatement:">=1",WhileStatementOpeningBrace:">=1",WhileStatementClosingBrace:">=1",ArrayExpressionOpening:1,ArrayExpressionComma:1}},whiteSpace:{value:" ",removeTrailing:1,before:{ArrayExpressionOpening:-1,ArrayExpressionClosing:-1,ArrayExpressionComma:-1,ArgumentComma:-1,ArgumentList:0,AssignmentOperator:1,BinaryExpression:-1,ForStatementClosingBrace:-1,ForStatementSemicolon:0,FunctionDeclarationOpeningBrace:1,FunctionDeclarationClosingBrace:-1,FunctionExpressionOpeningBrace:1,FunctionExpressionClosingBrace:-1,IfStatementConditionalOpening:1,IfStatementConditionalClosing:-1,IfStatementOpeningBrace:1,IfStatementClosingBrace:-1,ElseStatementOpeningBrace:1,ElseStatementClosingBrace:-1,ElseIfStatementOpeningBrace:1,ElseIfStatementClosingBrace:-1,MemberExpressionClosing:-1,ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:-1,ObjectPatternOpeningBrace:-1,ObjectPatternClosingBrace:-1,ObjectPatternComma:1,LineComment:-1,LogicalExpressionOperator:1,Property:-1,PropertyValue:1,ParameterComma:-1,ParameterList:-1,SwitchDiscriminantOpening:1,SwitchDiscriminantClosing:-1,ThrowKeyword:-1,TryKeyword:-1,TryOpeningBrace:1,TryClosingBrace:-1,UnaryExpressionOperator:-1,VariableName:-1,VariableValue:1,WhileStatementConditionalOpening:-1,WhileStatementConditionalClosing:-1,WhileStatementOpeningBrace:-1,WhileStatementClosingBrace:-1},after:{ArrayExpressionOpening:-1,ArrayExpressionClosing:-1,ArrayExpressionComma:1,ArgumentComma:1,ArgumentList:0,AssignmentOperator:1,BinaryExpression:-1,BinaryExpressionOperator:1,BlockComment:-1,CallExpression:-1,CatchParameterList:-1,CatchOpeningBrace:-1,CatchClosingBrace:-1,CatchKeyword:-1,CommaOperator:1,ConditionalExpressionConsequent:-1,ConditionalExpressionTest:-1,DoWhileStatementOpeningBrace:-1,DoWhileStatementClosingBrace:-1,DoWhileStatementBody:-1,EmptyStatement:-1,ExpressionOpeningParentheses:-1,FinallyKeyword:-1,FinallyOpeningBrace:-1,FinallyClosingBrace:-1,ForInStatement:-1,ForInStatementExpressionOpening:-1,ForInStatementExpressionClosing:-1,ForInStatementOpeningBrace:-1,ForInStatementClosingBrace:-1,ForStatement:-1,ForStatementExpressionOpening:-1,ForStatementExpressionClosing:-1,ForStatementClosingBrace:-1,ForStatementOpeningBrace:-1,ForStatementSemicolon:-1,FunctionReservedWord:1,FunctionName:1,FunctionExpressionOpeningBrace:-1,FunctionExpressionClosingBrace:-1,FunctionDeclarationOpeningBrace:-1,FunctionDeclarationClosingBrace:-1,IfStatementConditionalOpening:-1,IfStatementConditionalClosing:-1,IfStatementOpeningBrace:-1,IfStatementClosingBrace:-1,ElseStatementOpeningBrace:-1,ElseStatementClosingBrace:-1,ElseIfStatementOpeningBrace:-1,ElseIfStatementClosingBrace:-1,MemberExpressionOpening:-1,LogicalExpressionOperator:1,ObjectExpressionOpeningBrace:-1,ObjectExpressionClosingBrace:-1,ObjectPatternOpeningBrace:-1,ObjectPatternClosingBrace:-1,ObjectPatternComma:1,PropertyName:0,PropertyValue:-1,ParameterComma:1,ParameterList:-1,SwitchDiscriminantOpening:-1,SwitchDiscriminantClosing:1,ThrowKeyword:-1,TryKeyword:-1,TryOpeningBrace:-1,TryClosingBrace:-1,UnaryExpressionOperator:-1,VariableName:1,WhileStatementConditionalOpening:-1,WhileStatementConditionalClosing:-1,WhileStatementOpeningBrace:-1,WhileStatementClosingBrace:-1}}};var supportStorage=true;try{testCode=window.localStorage.__code__||testCode}catch(ex){supportStorage=false}esformatter.register(esformatterJSX);esformatter.register(collapser);function fnStart(){var source=document.getElementById("source-area");var pre=document.getElementById("result-area");source.value=testCode;var cdmIn=CodeMirror.fromTextArea(source,{lineNumbers:true,mode:"javascript"});var cdmOut=CodeMirror.fromTextArea(pre,{lineNumbers:true,mode:"javascript"});var formatCode=function(){try{var code=cdmIn.getValue();if(supportStorage){window.localStorage.__code__=code}cdmOut.setValue(esformatter.format(code,esformatterConfig))}catch(ex){cdmOut.setValue("//==> Error: "+ex.message);if(supportStorage){window.localStorage.__code__=testCode}}};var fCode=throttle(formatCode,500);fCode();cdmIn.on("change",function(){fCode()})}var $=require("jquery");$.getScript("https://cdn.jsdelivr.net/codemirror/4.5.0/codemirror.js").then(function(){$.getScript("https://cdn.jsdelivr.net/codemirror/4.5.0/mode/javascript/javascript.js").then(function(){$(fnStart)})});
{
"name": "esformatter-jsx-demo",
"version": "1.0.2",
"dependencies": {
"esformatter": "0.7.1",
"esformatter-jsx": "1.3.0",
"esformatter-collapse-objects": "0.4.1",
"lodash.throttle": "3.0.1",
"jquery": "2.1.4"
}
}
<!-- contents of this file will be placed inside the <body> -->
<h1><a target="_blank" href="https://www.npmjs.com/package/esformatter-jsx">Esformatter + JSX (Beautify React JSX files)</a></h1>
<div class="main-container">
<textarea id="source-area"></textarea>
<textarea id="result-area"></textarea>
<div id="source">Javascript + JSX, code to beautify:</div>
<div id="result">Output, beautified code:</div>
</div>
<div class="credits">r3m</div>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="royriojas" data-size="large" data-hashtags="esformatterjsx">Tweet</a><a href="https://twitter.com/royriojas" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @royriojas</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs')
</script>
<style type="text/css">
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
}
.CodeMirror-scroll {
/* Set scrolling behaviour here */
overflow: auto;
}
/* PADDING */
.CodeMirror-lines {
padding: 14px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 14px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
}
/* CURSOR */
.CodeMirror div.CodeMirror-cursor {
border-left: 1px solid black;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
width: auto;
border: 0;
background: transparent;
background: rgba(0, 200, 0, .4);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
}
/* Kludge to turn off filter in ie9+, which also accepts rgba */
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id) {
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
/* DEFAULT THEME */
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable {color: black;}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-property {color: black;}
.cm-s-default .cm-operator {color: black;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-error {color: #f00;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-emstrong {font-style: italic; font-weight: bold;}
.cm-link {text-decoration: underline;}
.cm-invalidchar {color: #f00;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
line-height: 1;
position: relative;
overflow: hidden;
}
.CodeMirror-scroll {
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px; padding-right: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actuall scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
z-index: 6;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
height: 100%;
display: inline-block;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-lines {
cursor: text;
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
}
.CodeMirror-wrap .CodeMirror-scroll {
overflow-x: hidden;
}
.CodeMirror-measure {
position: absolute;
width: 100%; height: 0px;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor {
position: absolute;
visibility: hidden;
border-right: none;
width: 0;
}
.CodeMirror-focused div.CodeMirror-cursor {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursor {
visibility: hidden;
}
}
body {padding: 20px; box-sizing:border-box; }
body, html {
height: 100%;
}
.main-container {
position:relative; height: calc(100% - 150px) ;
width: 100%;
display: flex;
box-sizing:border-box; padding: 22px 0 0 0;
}
h1 { white-space:nowrap; text-overflow:ellipsis; margin:17px 0 33px; font-family: Consolas, Monaco, Monospace; font-size: 36px; } h1 a { background: rgb(56, 159, 203);padding: 10px 15px 7px;color: #fff;text-decoration: none; }
#source-area,
#result-area {
line-height: 1em;
font-family: Consolas, Monaco, Monospace;
font-size: 13px;
overflow: auto;
flex: 1;
min-height: 500px;
border: 1px solid #aaa;
margin: 0;
}
#source {
line-height: 1em;
font-family: Consolas, Monaco, Monospace;
font-size: 13px;
overflow: auto;
padding: 5px 10px;
background: rgb(203, 68, 68);
color: #fff;
display: block;
position: absolute;
top: 0;
left: 0;
}
#result {
line-height: 1em;
font-family: Consolas, Monaco, Monospace;
font-size: 13px;
padding: 5px 10px;
background: rgb(116, 178, 116);
color: #fff;
display: block;
position: absolute;
top: 0;
right: 0;
}
.CodeMirror.cm-s-default {
height:100%;
flex:1;
border: 1px solid #aaa;
}
.CodeMirror pre {
font-family: Consolas, Monaco, Monospace;
font-size: 13px;
}
.CodeMirror.cm-s-default .cm-string-2 {
color: #2A2523;
} .credits { font-family: Consolas, Monaco, Monospace; font-size: 14px; padding: 10px 7px 6px; }
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment