diff --git a/README.md b/README.md index a66a877..3982bda 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,13 @@ This will start serving the _repl_ at [localhost:8080/example](http://localhost: To build the JavaScript bundle: ``` -npm run build +npm run build-js +``` + +To build the CSS bundle: + +``` +npm run build-css ``` #### Watch modes diff --git a/dist/bundle.js b/dist/bundle.js index c9b4717..53415a6 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,58 +1,55 @@ -(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;o1&&arguments[1]!==undefined?arguments[1]:{};targetEl.style.display="none";targetEl.parentNode.insertBefore(_replDOM2.default,targetEl);if(!config.initialValue){config.initialValue=targetEl.value||targetEl.textContent}(0,_loadScripts2.default)(config).fork(onLoadError(_replDOM2.default),onLoadSuccess(_replDOM2.default,config))}},{"./clear":1,"./dom/replDOM":4,"./expose-globals":5,"./googl":6,"./input-panel":7,"./load-scripts":8,"./logger":9,"./output-panel":11,"./pretty":12,"./reset":14,ramda:902,"ramda-fantasy":890}],14:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=bindResetButton;function bindResetButton(options){options.btnReset.addEventListener("click",function(){options.window.location="."})}},{}],15:[function(require,module,exports){"use strict";module.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],16:[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})},{}],17:[function(require,module,exports){var util=require("util/");var pSlice=Array.prototype.slice;var hasOwn=Object.prototype.hasOwnProperty;var assert=module.exports=ok;assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;if(options.message){this.message=options.message;this.generatedMessage=false}else{this.message=getMessage(this);this.generatedMessage=true}var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace){Error.captureStackTrace(this,stackStartFunction)}else{var err=new Error;if(err.stack){var out=err.stack;var fn_name=stackStartFunction.name;var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value)){return""+value}if(util.isNumber(value)&&!isFinite(value)){return value.toString()}if(util.isFunction(value)||util.isRegExp(value)){return value.toString()}return value}function truncate(s,n){if(util.isString(s)){return s.length=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}},{"util/":987}],18:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(rawLines,lineNumber,colNumber){var opts=arguments.length<=3||arguments[3]===undefined?{}:arguments[3];colNumber=Math.max(colNumber,0);var highlighted=opts.highlightCode&&_chalk2.default.supportsColor;var maybeHighlight=function maybeHighlight(chalkFn,string){return highlighted?chalkFn(string):string};if(highlighted)rawLines=highlight(rawLines);var linesAbove=opts.linesAbove||2;var linesBelow=opts.linesBelow||3;var lines=rawLines.split(NEWLINE);var start=Math.max(lineNumber-(linesAbove+1),0);var end=Math.min(lines.length,lineNumber+linesBelow);if(!lineNumber&&!colNumber){start=0;end=lines.length}var numberMaxWidth=String(end).length;var frame=lines.slice(start,end).map(function(line,index){var number=start+1+index;var paddedNumber=(" "+number).slice(-numberMaxWidth);var gutter=" "+paddedNumber+" | ";if(number===lineNumber){var markerLine="";if(colNumber){var markerSpacing=line.slice(0,colNumber-1).replace(/[^\t]/g," ");markerLine=["\n ",maybeHighlight(defs.gutter,gutter.replace(/\d/g," ")),markerSpacing,maybeHighlight(defs.marker,"^")].join("")}return[maybeHighlight(defs.marker,">"),maybeHighlight(defs.gutter,gutter),line,markerLine].join("")}else{return" "+maybeHighlight(defs.gutter,gutter)+line}}).join("\n");if(highlighted){return _chalk2.default.reset(frame)}else{return frame}};var _jsTokens=require("js-tokens");var _jsTokens2=_interopRequireDefault(_jsTokens);var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _chalk=require("chalk");var _chalk2=_interopRequireDefault(_chalk);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var defs={keyword:_chalk2.default.cyan,capitalized:_chalk2.default.yellow,jsx_tag:_chalk2.default.yellow,punctuator:_chalk2.default.yellow,number:_chalk2.default.magenta,string:_chalk2.default.green,regex:_chalk2.default.magenta,comment:_chalk2.default.grey,invalid:_chalk2.default.white.bgRed.bold,gutter:_chalk2.default.grey,marker:_chalk2.default.red.bold};var NEWLINE=/\r\n|[\n\r\u2028\u2029]/;var JSX_TAG=/^[a-z][\w-]*$/i;var BRACKET=/^[()\[\]{}]$/;function getTokenType(match){var _match$slice=match.slice(-2);var offset=_match$slice[0];var text=_match$slice[1];var token=_jsTokens2.default.matchToToken(match);if(token.type==="name"){if(_esutils2.default.keyword.isReservedWordES6(token.value)){return"keyword"}if(JSX_TAG.test(token.value)&&(text[offset-1]==="<"||text.substr(offset-2,2)=="=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var item=_ref;if(newArray.indexOf(item)<0){newArray.push(item)}}return newArray}})};var _mergeWith=require("lodash/mergeWith");var _mergeWith2=_interopRequireDefault(_mergeWith);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"lodash/mergeWith":863}],22:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(ast,comments,tokens){if(ast){if(ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else if(ast.type==="File"){return ast}}throw new Error("Not a valid ast?")};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}module.exports=exports["default"]},{"babel-types":194}],23:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);exports.default=function(loc){var relative=arguments.length<=1||arguments[1]===undefined?process.cwd():arguments[1];if((typeof _module2.default==="undefined"?"undefined":(0,_typeof3.default)(_module2.default))==="object")return null;var relativeMod=relativeModules[relative];if(!relativeMod){relativeMod=new _module2.default;var filename=_path2.default.join(relative,".babelrc");relativeMod.id=filename;relativeMod.filename=filename;relativeMod.paths=_module2.default._nodeModulePaths(relative);relativeModules[relative]=relativeMod}try{return _module2.default._resolveFilename(loc,relativeMod); -}catch(err){return null}};var _module=require("module");var _module2=_interopRequireDefault(_module);var _path=require("path");var _path2=_interopRequireDefault(_path);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var relativeModules={};module.exports=exports["default"]}).call(this,require("_process"))},{_process:889,"babel-runtime/helpers/typeof":156,module:221,path:884}],24:[function(require,module,exports){"use strict";exports.__esModule=true;var _map=require("babel-runtime/core-js/map");var _map2=_interopRequireDefault(_map);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn");var _possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2);var _inherits2=require("babel-runtime/helpers/inherits");var _inherits3=_interopRequireDefault(_inherits2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var Store=function(_Map){(0,_inherits3.default)(Store,_Map);function Store(){(0,_classCallCheck3.default)(this,Store);var _this=(0,_possibleConstructorReturn3.default)(this,_Map.call(this));_this.dynamicData={};return _this}Store.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};Store.prototype.get=function get(key){if(this.has(key)){return _Map.prototype.get.call(this,key)}else{if(Object.prototype.hasOwnProperty.call(this.dynamicData,key)){var val=this.dynamicData[key]();this.set(key,val);return val}}};return Store}(_map2.default);exports.default=Store;module.exports=exports["default"]},{"babel-runtime/core-js/map":141,"babel-runtime/helpers/classCallCheck":153,"babel-runtime/helpers/inherits":154,"babel-runtime/helpers/possibleConstructorReturn":155}],25:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(whitelist){var outputType=arguments.length<=1||arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree=void 0;var build={global:buildGlobal,umd:buildUmd,var:buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return(0,_babelGenerator2.default)(tree).code};var _babelHelpers=require("babel-helpers");var helpers=_interopRequireWildcard(_babelHelpers);var _babelGenerator=require("babel-generator");var _babelGenerator2=_interopRequireDefault(_babelGenerator);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _each=require("lodash/each");var _each2=_interopRequireDefault(_each);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}var buildUmdWrapper=(0,_babelTemplate2.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[helpers.get("selfGlobal")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);return t.program([buildUmdWrapper({FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression([])),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.stringLiteral("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")})])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression([]))]));builder(body);body.push(t.expressionStatement(namespace));return t.program(body)}function buildHelpers(body,namespace,whitelist){(0,_each2.default)(helpers.list,function(name){if(whitelist&&whitelist.indexOf(name)<0)return;var key=t.identifier(name);body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),helpers.get(name))))})}module.exports=exports["default"]},{"babel-generator":53,"babel-helpers":75,"babel-messages":76,"babel-template":157,"babel-types":194,"lodash/each":828}],26:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;exports.File=undefined;var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);var _assign=require("babel-runtime/core-js/object/assign");var _assign2=_interopRequireDefault(_assign);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn");var _possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2);var _inherits2=require("babel-runtime/helpers/inherits");var _inherits3=_interopRequireDefault(_inherits2);var _babelHelpers=require("babel-helpers");var _babelHelpers2=_interopRequireDefault(_babelHelpers);var _metadata=require("./metadata");var metadataVisitor=_interopRequireWildcard(_metadata);var _convertSourceMap=require("convert-source-map");var _convertSourceMap2=_interopRequireDefault(_convertSourceMap);var _optionManager=require("./options/option-manager");var _optionManager2=_interopRequireDefault(_optionManager);var _pluginPass=require("../plugin-pass");var _pluginPass2=_interopRequireDefault(_pluginPass);var _shebangRegex=require("shebang-regex");var _shebangRegex2=_interopRequireDefault(_shebangRegex);var _babelTraverse=require("babel-traverse");var _babelTraverse2=_interopRequireDefault(_babelTraverse);var _sourceMap=require("source-map");var _sourceMap2=_interopRequireDefault(_sourceMap);var _babelGenerator=require("babel-generator");var _babelGenerator2=_interopRequireDefault(_babelGenerator);var _babelCodeFrame=require("babel-code-frame");var _babelCodeFrame2=_interopRequireDefault(_babelCodeFrame);var _defaults=require("lodash/defaults");var _defaults2=_interopRequireDefault(_defaults);var _logger=require("./logger");var _logger2=_interopRequireDefault(_logger);var _store=require("../../store");var _store2=_interopRequireDefault(_store);var _babylon=require("babylon");var _util=require("../../util");var util=_interopRequireWildcard(_util);var _path=require("path");var _path2=_interopRequireDefault(_path);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _resolve=require("../../helpers/resolve");var _resolve2=_interopRequireDefault(_resolve);var _blockHoist=require("../internal-plugins/block-hoist");var _blockHoist2=_interopRequireDefault(_blockHoist);var _shadowFunctions=require("../internal-plugins/shadow-functions");var _shadowFunctions2=_interopRequireDefault(_shadowFunctions);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var INTERNAL_PLUGINS=[[_blockHoist2.default],[_shadowFunctions2.default]];var errorVisitor={enter:function enter(path,state){var loc=path.node.loc;if(loc){state.loc=loc;path.stop()}}};var File=function(_Store){(0,_inherits3.default)(File,_Store);function File(){var opts=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var pipeline=arguments[1];(0,_classCallCheck3.default)(this,File);var _this=(0,_possibleConstructorReturn3.default)(this,_Store.call(this));_this.pipeline=pipeline;_this.log=new _logger2.default(_this,opts.filename||"unknown");_this.opts=_this.initOptions(opts);_this.parserOpts={highlightCode:_this.opts.highlightCode,nonStandard:_this.opts.nonStandard,sourceType:_this.opts.sourceType,filename:_this.opts.filename,sourceFileName:_this.opts.filename,plugins:[]};_this.pluginVisitors=[];_this.pluginPasses=[];_this.buildPluginsForOptions(_this.opts);if(_this.opts.passPerPreset){_this.perPresetOpts=[];_this.opts.presets.forEach(function(presetOpts){var perPresetOpts=(0,_assign2.default)((0,_create2.default)(_this.opts),presetOpts);_this.perPresetOpts.push(perPresetOpts);_this.buildPluginsForOptions(perPresetOpts)})}_this.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}};_this.dynamicImportTypes={};_this.dynamicImportIds={};_this.dynamicImports=[];_this.declarations={};_this.usedHelpers={};_this.path=null;_this.ast={};_this.code="";_this.shebang="";_this.hub=new _babelTraverse.Hub(_this);return _this}File.prototype.getMetadata=function getMetadata(){var has=false;for(var _iterator=this.ast.program.body,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var node=_ref;if(t.isModuleDeclaration(node)){has=true;break}}if(has){this.path.traverse(metadataVisitor,this)}};File.prototype.initOptions=function initOptions(opts){opts=new _optionManager2.default(this.log,this.pipeline).init(opts);if(opts.inputSourceMap){opts.sourceMaps=true}if(opts.moduleId){opts.moduleIds=true}opts.basename=_path2.default.basename(opts.filename,_path2.default.extname(opts.filename));opts.ignore=util.arrayify(opts.ignore,util.regexify);if(opts.only)opts.only=util.arrayify(opts.only,util.regexify);(0,_defaults2.default)(opts,{moduleRoot:opts.sourceRoot});(0,_defaults2.default)(opts,{sourceRoot:opts.moduleRoot});(0,_defaults2.default)(opts,{filenameRelative:opts.filename});var basenameRelative=_path2.default.basename(opts.filenameRelative);(0,_defaults2.default)(opts,{sourceFileName:basenameRelative,sourceMapTarget:basenameRelative});return opts};File.prototype.buildPluginsForOptions=function buildPluginsForOptions(opts){if(!Array.isArray(opts.plugins)){return}var plugins=opts.plugins.concat(INTERNAL_PLUGINS);var currentPluginVisitors=[];var currentPluginPasses=[];for(var _iterator2=plugins,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var ref=_ref2;var plugin=ref[0];var pluginOpts=ref[1];currentPluginVisitors.push(plugin.visitor);currentPluginPasses.push(new _pluginPass2.default(this,plugin,pluginOpts));if(plugin.manipulateOptions){plugin.manipulateOptions(opts,this.parserOpts,this)}}this.pluginVisitors.push(currentPluginVisitors);this.pluginPasses.push(currentPluginPasses)};File.prototype.getModuleName=function getModuleName(){var opts=this.opts;if(!opts.moduleIds){return null}if(opts.moduleId!=null&&!opts.getModuleId){return opts.moduleId}var filenameRelative=opts.filenameRelative;var moduleName="";if(opts.moduleRoot!=null){moduleName=opts.moduleRoot+"/"}if(!opts.filenameRelative){return moduleName+opts.filename.replace(/^\//,"")}if(opts.sourceRoot!=null){var sourceRootRegEx=new RegExp("^"+opts.sourceRoot+"/?");filenameRelative=filenameRelative.replace(sourceRootRegEx,"")}filenameRelative=filenameRelative.replace(/\.(\w*?)$/,"");moduleName+=filenameRelative;moduleName=moduleName.replace(/\\/g,"/");if(opts.getModuleId){return opts.getModuleId(moduleName)||moduleName}else{return moduleName}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,imported){var name=arguments.length<=2||arguments[2]===undefined?imported:arguments[2];var alias=source+":"+imported;var id=this.dynamicImportIds[alias];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[alias]=this.scope.generateUidIdentifier(name);var specifiers=[];if(imported==="*"){specifiers.push(t.importNamespaceSpecifier(id))}else if(imported==="default"){specifiers.push(t.importDefaultSpecifier(id))}else{specifiers.push(t.importSpecifier(id,t.identifier(imported)))}var declar=t.importDeclaration(specifiers,t.stringLiteral(source));declar._blockHoist=3;this.path.unshiftContainer("body",declar)}return id};File.prototype.addHelper=function addHelper(name){var declar=this.declarations[name];if(declar)return declar;if(!this.usedHelpers[name]){this.metadata.usedHelpers.push(name);this.usedHelpers[name]=true}var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){var res=generator(name);if(res)return res}else if(runtime){return t.memberExpression(runtime,t.identifier(name))}var ref=(0,_babelHelpers2.default)(name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.addTemplateObject=function addTemplateObject(helperName,strings,raw){var stringIds=raw.elements.map(function(string){return string.value});var name=helperName+"_"+raw.elements.length+"_"+stringIds.join(",");var declar=this.declarations[name];if(declar)return declar;var uid=this.declarations[name]=this.scope.generateUidIdentifier("templateObject");var helperId=this.addHelper(helperName);var init=t.callExpression(helperId,[strings,raw]);init._compact=true;this.scope.push({id:uid,init:init,_blockHoist:1.9});return uid};File.prototype.buildCodeFrameError=function buildCodeFrameError(node,msg){var Error=arguments.length<=2||arguments[2]===undefined?SyntaxError:arguments[2];var loc=node&&(node.loc||node._loc);var err=new Error(msg);if(loc){err.loc=loc.start}else{(0,_babelTraverse2.default)(node,errorVisitor,this.scope,err);err.message+=" (This is an error on an internal node. Probably an internal error";if(err.loc){err.message+=". Location has been estimated."}err.message+=")"}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var inputMap=this.opts.inputSourceMap;if(inputMap){var _ret=function(){var inputMapConsumer=new _sourceMap2.default.SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2.default.SourceMapConsumer(map);var mergedGenerator=new _sourceMap2.default.SourceMapGenerator({file:inputMapConsumer.file,sourceRoot:inputMapConsumer.sourceRoot});var source=outputMapConsumer.sources[0];inputMapConsumer.eachMapping(function(mapping){var generatedPosition=outputMapConsumer.generatedPositionFor({line:mapping.generatedLine,column:mapping.generatedColumn,source:source});if(generatedPosition.column!=null){mergedGenerator.addMapping({source:mapping.source,original:mapping.source==null?null:{line:mapping.originalLine,column:mapping.originalColumn},generated:generatedPosition})}});var mergedMap=mergedGenerator.toJSON();inputMap.mappings=mergedMap.mappings;return{v:inputMap}}();if((typeof _ret==="undefined"?"undefined":(0,_typeof3.default)(_ret))==="object")return _ret.v}else{return map}};File.prototype.parse=function parse(code){var parseCode=_babylon.parse;var parserOpts=this.opts.parserOpts;if(parserOpts){parserOpts=(0,_assign2.default)({},this.parserOpts,parserOpts);if(parserOpts.parser){if(typeof parserOpts.parser==="string"){var dirname=_path2.default.dirname(this.opts.filename)||process.cwd();var parser=(0,_resolve2.default)(parserOpts.parser,dirname);if(parser){parseCode=require(parser).parse}else{throw new Error("Couldn't find parser "+parserOpts.parser+' with "parse" method relative to directory '+dirname)}}else{parseCode=parserOpts.parser}parserOpts.parser={parse:function parse(source){return(0,_babylon.parse)(source,parserOpts)}}}}this.log.debug("Parse start");var ast=parseCode(code,parserOpts||this.parserOpts);this.log.debug("Parse stop");return ast};File.prototype._addAst=function _addAst(ast){this.path=_babelTraverse.NodePath.get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast;this.getMetadata()};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST")};File.prototype.transform=function transform(){for(var i=0;i=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var pass=_ref3;var plugin=pass.plugin;var fn=plugin[key];if(fn)fn.call(pass,this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2.default.fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2.default.removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2.default.exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2.default,"")}};File.prototype.makeResult=function makeResult(_ref4){var code=_ref4.code;var map=_ref4.map;var ast=_ref4.ast;var ignored=_ref4.ignored;var result={metadata:null,options:this.opts,ignored:!!ignored,code:null,ast:null,map:map||null};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);var gen=_babelGenerator2.default;if(opts.generatorOpts.generator){gen=opts.generatorOpts.generator;if(typeof gen==="string"){var dirname=_path2.default.dirname(this.opts.filename)||process.cwd();var generator=(0,_resolve2.default)(gen,dirname);if(generator){gen=require(generator).print}else{throw new Error("Couldn't find generator "+gen+' with "print" method relative to directory '+dirname)}}}this.log.debug("Generation start");var _result=gen(ast,opts.generatorOpts?(0,_assign2.default)(opts,opts.generatorOpts):opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2.default.fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};return File}(_store2.default);exports.default=File;exports.File=File}).call(this,require("_process"))},{"../../helpers/resolve":23,"../../store":24,"../../util":40,"../internal-plugins/block-hoist":35,"../internal-plugins/shadow-functions":36,"../plugin-pass":38,"./logger":27,"./metadata":28,"./options/option-manager":32,_process:889,"babel-code-frame":18,"babel-generator":53,"babel-helpers":75,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/object/assign":143,"babel-runtime/core-js/object/create":144,"babel-runtime/helpers/classCallCheck":153,"babel-runtime/helpers/inherits":154,"babel-runtime/helpers/possibleConstructorReturn":155,"babel-runtime/helpers/typeof":156,"babel-traverse":161,"babel-types":194,babylon:198,"convert-source-map":232,"lodash/defaults":827,path:884,"shebang-regex":968,"source-map":980}],27:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _node=require("debug/node");var _node2=_interopRequireDefault(_node);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var verboseDebug=(0,_node2.default)("babel:verbose");var generalDebug=(0,_node2.default)("babel");var seenDeprecatedMessages=[];var Logger=function(){function Logger(file,filename){(0,_classCallCheck3.default)(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments.length<=1||arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(this.file.opts&&this.file.opts.suppressDeprecationMessages)return;msg=this._buildMessage(msg);if(seenDeprecatedMessages.indexOf(msg)>=0)return;seenDeprecatedMessages.push(msg);console.error(msg)};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports.default=Logger;module.exports=exports["default"]},{"babel-runtime/helpers/classCallCheck":153,"debug/node":637}],28:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportDeclaration=exports.ModuleDeclaration=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.ExportDeclaration=ExportDeclaration;exports.Scope=Scope;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var ModuleDeclaration=exports.ModuleDeclaration={enter:function enter(path,file){var node=path.node;if(node.source){node.source.value=file.resolveModuleSource(node.source.value)}}};var ImportDeclaration=exports.ImportDeclaration={exit:function exit(path,file){var node=path.node;var specifiers=[];var imported=[];file.metadata.modules.imports.push({source:node.source.value,imported:imported,specifiers:specifiers});for(var _iterator=path.get("specifiers"),_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var specifier=_ref;var local=specifier.node.local.name;if(specifier.isImportDefaultSpecifier()){imported.push("default");specifiers.push({kind:"named",imported:"default",local:local})}if(specifier.isImportSpecifier()){var importedName=specifier.node.imported.name;imported.push(importedName);specifiers.push({kind:"named",imported:importedName,local:local})}if(specifier.isImportNamespaceSpecifier()){imported.push("*");specifiers.push({kind:"namespace",local:local})}}}};function ExportDeclaration(path,file){var node=path.node;var source=node.source?node.source.value:null;var exports=file.metadata.modules.exports;var declar=path.get("declaration");if(declar.isStatement()){var bindings=declar.getBindingIdentifiers();for(var name in bindings){exports.exported.push(name);exports.specifiers.push({kind:"local",local:name,exported:path.isExportDefaultDeclaration()?"default":name})}}if(path.isExportNamedDeclaration()&&node.specifiers){for(var _iterator2=node.specifiers,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var specifier=_ref2;var exported=specifier.exported.name;exports.exported.push(exported);if(t.isExportDefaultSpecifier(specifier)){exports.specifiers.push({kind:"external",local:exported,exported:exported,source:source})}if(t.isExportNamespaceSpecifier(specifier)){exports.specifiers.push({kind:"external-namespace",exported:exported,source:source})}var local=specifier.local;if(!local)continue;if(source){exports.specifiers.push({kind:"external",local:local.name,exported:exported,source:source})}if(!source){exports.specifiers.push({kind:"local",local:local.name,exported:exported})}}}if(path.isExportAllDeclaration()){exports.specifiers.push({kind:"external-all",source:source})}}function Scope(path){path.skip()}},{"babel-runtime/core-js/get-iterator":139,"babel-types":194}],29:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _assign=require("babel-runtime/core-js/object/assign");var _assign2=_interopRequireDefault(_assign);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);exports.default=buildConfigChain;var _resolve=require("../../../helpers/resolve");var _resolve2=_interopRequireDefault(_resolve);var _json=require("json5");var _json2=_interopRequireDefault(_json);var _pathIsAbsolute=require("path-is-absolute");var _pathIsAbsolute2=_interopRequireDefault(_pathIsAbsolute);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var existsCache={};var jsonCache={};var BABELIGNORE_FILENAME=".babelignore";var BABELRC_FILENAME=".babelrc";var PACKAGE_FILENAME="package.json";function exists(filename){var cached=existsCache[filename];if(cached==null){return existsCache[filename]=_pathExists2.default.sync(filename)}else{return cached}}function buildConfigChain(){var opts=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];var log=arguments[1];var filename=opts.filename;var builder=new ConfigChainBuilder(log);if(opts.babelrc!==false){builder.findConfigs(filename)}builder.mergeConfig({options:opts,alias:"base",dirname:filename&&_path2.default.dirname(filename)});return builder.configs}var ConfigChainBuilder=function(){function ConfigChainBuilder(log){(0,_classCallCheck3.default)(this,ConfigChainBuilder);this.resolvedConfigs=[];this.configs=[];this.log=log}ConfigChainBuilder.prototype.findConfigs=function findConfigs(loc){if(!loc)return;if(!(0,_pathIsAbsolute2.default)(loc)){loc=_path2.default.join(process.cwd(),loc)}var foundConfig=false;var foundIgnore=false;while(loc!==(loc=_path2.default.dirname(loc))){if(!foundConfig){var configLoc=_path2.default.join(loc,BABELRC_FILENAME);if(exists(configLoc)){this.addConfig(configLoc);foundConfig=true}var pkgLoc=_path2.default.join(loc,PACKAGE_FILENAME);if(!foundConfig&&exists(pkgLoc)){foundConfig=this.addConfig(pkgLoc,"babel",JSON)}}if(!foundIgnore){var ignoreLoc=_path2.default.join(loc,BABELIGNORE_FILENAME);if(exists(ignoreLoc)){this.addIgnoreConfig(ignoreLoc);foundIgnore=true}}if(foundIgnore&&foundConfig)return}};ConfigChainBuilder.prototype.addIgnoreConfig=function addIgnoreConfig(loc){var file=_fs2.default.readFileSync(loc,"utf8");var lines=file.split("\n");lines=lines.map(function(line){return line.replace(/#(.*?)$/,"").trim()}).filter(function(line){return!!line});if(lines.length){this.mergeConfig({options:{ignore:lines},alias:loc,dirname:_path2.default.dirname(loc)})}};ConfigChainBuilder.prototype.addConfig=function addConfig(loc,key){var json=arguments.length<=2||arguments[2]===undefined?_json2.default:arguments[2];if(this.resolvedConfigs.indexOf(loc)>=0){return false}this.resolvedConfigs.push(loc);var content=_fs2.default.readFileSync(loc,"utf8");var options=void 0;try{options=jsonCache[content]=jsonCache[content]||json.parse(content);if(key)options=options[key]}catch(err){err.message=loc+": Error while parsing JSON - "+err.message;throw err}this.mergeConfig({options:options,alias:loc,dirname:_path2.default.dirname(loc)});return!!options};ConfigChainBuilder.prototype.mergeConfig=function mergeConfig(_ref){var options=_ref.options;var alias=_ref.alias;var loc=_ref.loc;var dirname=_ref.dirname;if(!options){return false}options=(0,_assign2.default)({},options);dirname=dirname||process.cwd();loc=loc||alias;if(options.extends){var extendsLoc=(0,_resolve2.default)(options.extends,dirname);if(extendsLoc){this.addConfig(extendsLoc)}else{if(this.log)this.log.error("Couldn't resolve extends clause of "+options.extends+" in "+alias)}delete options.extends}this.configs.push({options:options,alias:alias,loc:loc,dirname:dirname});var envOpts=void 0;var envKey=process.env.BABEL_ENV||process.env.NODE_ENV||"development";if(options.env){envOpts=options.env[envKey];delete options.env}this.mergeConfig({options:envOpts,alias:alias+".env."+envKey,dirname:dirname})};return ConfigChainBuilder}();module.exports=exports["default"]}).call(this,require("_process"))},{"../../../helpers/resolve":23,_process:889,"babel-runtime/core-js/object/assign":143,"babel-runtime/helpers/classCallCheck":153,fs:221,json5:653,path:884,"path-exists":885,"path-is-absolute":886}],30:[function(require,module,exports){"use strict";module.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc", -default:"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},env:{hidden:true,default:{}},mode:{description:"",hidden:true},retainLines:{type:"boolean",default:false,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:true},suppressDeprecationMessages:{type:"boolean",default:false,hidden:true},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,default:true,type:"boolean"},metadata:{hidden:true,default:true,type:"boolean"},ast:{hidden:true,default:true,type:"boolean"},extends:{type:"string",hidden:true},comments:{type:"boolean",default:true,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:true,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:true,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:false,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:false,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:true},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:true},getModuleId:{hidden:true},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:false,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:false,hidden:true},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:false},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:false}}},{}],31:[function(require,module,exports){"use strict";exports.__esModule=true;exports.config=undefined;exports.normaliseOptions=normaliseOptions;var _parsers=require("./parsers");var parsers=_interopRequireWildcard(_parsers);var _config=require("./config");var _config2=_interopRequireDefault(_config);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}exports.config=_config2.default;function normaliseOptions(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];for(var key in options){var val=options[key];if(val==null)continue;var opt=_config2.default[key];if(opt&&opt.alias)opt=_config2.default[opt.alias];if(!opt)continue;var parser=parsers[opt.type];if(parser)val=parser(val);options[key]=val}return options}},{"./config":30,"./parsers":33}],32:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _stringify=require("babel-runtime/core-js/json/stringify");var _stringify2=_interopRequireDefault(_stringify);var _assign=require("babel-runtime/core-js/object/assign");var _assign2=_interopRequireDefault(_assign);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _node=require("../../../api/node");var context=_interopRequireWildcard(_node);var _plugin2=require("../../plugin");var _plugin3=_interopRequireDefault(_plugin2);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _index=require("./index");var _resolve=require("../../../helpers/resolve");var _resolve2=_interopRequireDefault(_resolve);var _cloneDeepWith=require("lodash/cloneDeepWith");var _cloneDeepWith2=_interopRequireDefault(_cloneDeepWith);var _clone=require("lodash/clone");var _clone2=_interopRequireDefault(_clone);var _merge=require("../../../helpers/merge");var _merge2=_interopRequireDefault(_merge);var _config2=require("./config");var _config3=_interopRequireDefault(_config2);var _removed=require("./removed");var _removed2=_interopRequireDefault(_removed);var _buildConfigChain=require("./build-config-chain");var _buildConfigChain2=_interopRequireDefault(_buildConfigChain);var _path=require("path");var _path2=_interopRequireDefault(_path);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var OptionManager=function(){function OptionManager(log){(0,_classCallCheck3.default)(this,OptionManager);this.resolvedConfigs=[];this.options=OptionManager.createBareOptions();this.log=log}OptionManager.memoisePluginContainer=function memoisePluginContainer(fn,loc,i,alias){for(var _iterator=OptionManager.memoisedPlugins,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var cache=_ref;if(cache.container===fn)return cache.plugin}var obj=void 0;if(typeof fn==="function"){obj=fn(context)}else{obj=fn}if((typeof obj==="undefined"?"undefined":(0,_typeof3.default)(obj))==="object"){var _plugin=new _plugin3.default(obj,alias);OptionManager.memoisedPlugins.push({container:fn,plugin:_plugin});return _plugin}else{throw new TypeError(messages.get("pluginNotObject",loc,i,typeof obj==="undefined"?"undefined":(0,_typeof3.default)(obj))+loc+i)}};OptionManager.createBareOptions=function createBareOptions(){var opts={};for(var _key in _config3.default){var opt=_config3.default[_key];opts[_key]=(0,_clone2.default)(opt.default)}return opts};OptionManager.normalisePlugin=function normalisePlugin(plugin,loc,i,alias){plugin=plugin.__esModule?plugin.default:plugin;if(!(plugin instanceof _plugin3.default)){if(typeof plugin==="function"||(typeof plugin==="undefined"?"undefined":(0,_typeof3.default)(plugin))==="object"){plugin=OptionManager.memoisePluginContainer(plugin,loc,i,alias)}else{throw new TypeError(messages.get("pluginNotFunction",loc,i,typeof plugin==="undefined"?"undefined":(0,_typeof3.default)(plugin)))}}plugin.init(loc,i);return plugin};OptionManager.normalisePlugins=function normalisePlugins(loc,dirname,plugins){return plugins.map(function(val,i){var plugin=void 0,options=void 0;if(!val){throw new TypeError("Falsy value found in plugins")}if(Array.isArray(val)){plugin=val[0];options=val[1]}else{plugin=val}var alias=typeof plugin==="string"?plugin:loc+"$"+i;if(typeof plugin==="string"){var pluginLoc=(0,_resolve2.default)("babel-plugin-"+plugin,dirname)||(0,_resolve2.default)(plugin,dirname);if(pluginLoc){plugin=require(pluginLoc)}else{throw new ReferenceError(messages.get("pluginUnknown",plugin,loc,i,dirname))}}plugin=OptionManager.normalisePlugin(plugin,loc,i,alias);return[plugin,options]})};OptionManager.prototype.mergeOptions=function mergeOptions(_ref2){var _this=this;var rawOpts=_ref2.options;var extendingOpts=_ref2.extending;var alias=_ref2.alias;var loc=_ref2.loc;var dirname=_ref2.dirname;alias=alias||"foreign";if(!rawOpts)return;if((typeof rawOpts==="undefined"?"undefined":(0,_typeof3.default)(rawOpts))!=="object"||Array.isArray(rawOpts)){this.log.error("Invalid options type for "+alias,TypeError)}var opts=(0,_cloneDeepWith2.default)(rawOpts,function(val){if(val instanceof _plugin3.default){return val}});dirname=dirname||process.cwd();loc=loc||alias;for(var _key2 in opts){var option=_config3.default[_key2];if(!option&&this.log){var pluginOptsInfo="Check out http://babeljs.io/docs/usage/options/ for more info";if(_removed2.default[_key2]){this.log.error("Using removed Babel 5 option: "+alias+"."+_key2+" - "+_removed2.default[_key2].message,ReferenceError)}else{this.log.error("Unknown option: "+alias+"."+_key2+". "+pluginOptsInfo,ReferenceError)}}}(0,_index.normaliseOptions)(opts);if(opts.plugins){opts.plugins=OptionManager.normalisePlugins(loc,dirname,opts.plugins)}if(opts.presets){if(opts.passPerPreset){opts.presets=this.resolvePresets(opts.presets,dirname,function(preset,presetLoc){_this.mergeOptions({options:preset,extending:preset,alias:presetLoc,loc:presetLoc,dirname:dirname})})}else{this.mergePresets(opts.presets,dirname);delete opts.presets}}if(rawOpts===extendingOpts){(0,_assign2.default)(extendingOpts,opts)}else{(0,_merge2.default)(extendingOpts||this.options,opts)}};OptionManager.prototype.mergePresets=function mergePresets(presets,dirname){var _this2=this;this.resolvePresets(presets,dirname,function(presetOpts,presetLoc){_this2.mergeOptions({options:presetOpts,alias:presetLoc,loc:presetLoc,dirname:_path2.default.dirname(presetLoc||"")})})};OptionManager.prototype.resolvePresets=function resolvePresets(presets,dirname,onResolve){return presets.map(function(val){var options=void 0;if(Array.isArray(val)){if(val.length>2){throw new Error("Unexpected extra options "+(0,_stringify2.default)(val.slice(2))+" passed to preset.")}var _val=val;val=_val[0];options=_val[1]}var presetLoc=void 0;try{if(typeof val==="string"){presetLoc=(0,_resolve2.default)("babel-preset-"+val,dirname)||(0,_resolve2.default)(val,dirname);if(!presetLoc){var matches=val.match(/^(@[^\/]+)\/(.+)$/);if(matches){var orgName=matches[1];var presetPath=matches[2];val=orgName+"/babel-preset-"+presetPath;presetLoc=(0,_resolve2.default)(val,dirname)}}if(!presetLoc){throw new Error("Couldn't find preset "+(0,_stringify2.default)(val)+" relative to directory "+(0,_stringify2.default)(dirname))}val=require(presetLoc)}if((typeof val==="undefined"?"undefined":(0,_typeof3.default)(val))==="object"&&val.__esModule)val=val.default;if((typeof val==="undefined"?"undefined":(0,_typeof3.default)(val))==="object"&&val.buildPreset)val=val.buildPreset;if(typeof val!=="function"&&options!==undefined){throw new Error("Options "+(0,_stringify2.default)(options)+" passed to "+(presetLoc||"a preset")+" which does not accept options.")}if(typeof val==="function")val=val(context,options);if((typeof val==="undefined"?"undefined":(0,_typeof3.default)(val))!=="object"){throw new Error("Unsupported preset format: "+val+".")}onResolve&&onResolve(val,presetLoc)}catch(e){if(presetLoc){e.message+=" (While processing preset: "+(0,_stringify2.default)(presetLoc)+")"}throw e}return val})};OptionManager.prototype.normaliseOptions=function normaliseOptions(){var opts=this.options;for(var _key3 in _config3.default){var option=_config3.default[_key3];var val=opts[_key3];if(!val&&option.optional)continue;if(option.alias){opts[option.alias]=opts[option.alias]||val}else{opts[_key3]=val}}};OptionManager.prototype.init=function init(){var opts=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];for(var _iterator2=(0,_buildConfigChain2.default)(opts,this.log),_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var _config=_ref3;this.mergeOptions(_config)}this.normaliseOptions(opts);return this.options};return OptionManager}();exports.default=OptionManager;OptionManager.memoisedPlugins=[];module.exports=exports["default"]}).call(this,require("_process"))},{"../../../api/node":20,"../../../helpers/merge":21,"../../../helpers/resolve":23,"../../plugin":39,"./build-config-chain":29,"./config":30,"./index":31,"./removed":34,_process:889,"babel-messages":76,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/json/stringify":140,"babel-runtime/core-js/object/assign":143,"babel-runtime/helpers/classCallCheck":153,"babel-runtime/helpers/typeof":156,"lodash/clone":822,"lodash/cloneDeepWith":824,path:884}],33:[function(require,module,exports){"use strict";exports.__esModule=true;exports.filename=undefined;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _util=require("../../../util");var util=_interopRequireWildcard(_util);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var filename=exports.filename=_slash2.default;function boolean(val){return!!val}function booleanString(val){return util.booleanify(val)}function list(val){return util.list(val)}},{"../../../util":40,slash:969}],34:[function(require,module,exports){"use strict";module.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],35:[function(require,module,exports){"use strict";exports.__esModule=true;var _plugin=require("../plugin");var _plugin2=_interopRequireDefault(_plugin);var _sortBy=require("lodash/sortBy");var _sortBy2=_interopRequireDefault(_sortBy);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=new _plugin2.default({name:"internal.blockHoist",visitor:{Block:{exit:function exit(_ref){var node=_ref.node;var hasChange=false;for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var fn=_ref;if(fn){var ret=fn.apply(this,args);if(ret!=null)val=ret}}return val}};Plugin.prototype.maybeInherit=function maybeInherit(loc){var inherits=this.take("inherits");if(!inherits)return;inherits=_optionManager2.default.normalisePlugin(inherits,loc,"inherits");this.manipulateOptions=this.chain(inherits,"manipulateOptions");this.post=this.chain(inherits,"post");this.pre=this.chain(inherits,"pre");this.visitor=_babelTraverse2.default.visitors.merge([inherits.visitor,this.visitor])};Plugin.prototype.init=function init(loc,i){if(this.initialized)return;this.initialized=true;this.maybeInherit(loc);for(var key in this.raw){throw new Error(messages.get("pluginInvalidProperty",loc,i,key))}};Plugin.prototype.normaliseVisitor=function normaliseVisitor(visitor){for(var _iterator2=GLOBAL_VISITOR_PROPS,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var key=_ref2;if(visitor[key]){throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}}_babelTraverse2.default.explode(visitor);return visitor};return Plugin}(_store2.default);exports.default=Plugin;module.exports=exports["default"]},{"../store":24,"./file/options/option-manager":32,"babel-messages":76,"babel-runtime/core-js/get-iterator":139,"babel-runtime/helpers/classCallCheck":153,"babel-runtime/helpers/inherits":154,"babel-runtime/helpers/possibleConstructorReturn":155,"babel-traverse":161,"lodash/assign":819,"lodash/clone":822}],40:[function(require,module,exports){"use strict";exports.__esModule=true;exports.inspect=exports.inherits=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _util=require("util");Object.defineProperty(exports,"inherits",{enumerable:true,get:function get(){return _util.inherits}});Object.defineProperty(exports,"inspect",{enumerable:true,get:function get(){return _util.inspect}});exports.canCompile=canCompile;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;var _escapeRegExp=require("lodash/escapeRegExp");var _escapeRegExp2=_interopRequireDefault(_escapeRegExp);var _startsWith=require("lodash/startsWith");var _startsWith2=_interopRequireDefault(_startsWith);var _isBoolean=require("lodash/isBoolean");var _isBoolean2=_interopRequireDefault(_isBoolean);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _includes=require("lodash/includes");var _includes2=_interopRequireDefault(_includes);var _isString=require("lodash/isString");var _isString2=_interopRequireDefault(_isString);var _isRegExp=require("lodash/isRegExp");var _isRegExp2=_interopRequireDefault(_isRegExp);var _path=require("path");var _path2=_interopRequireDefault(_path);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2.default.extname(filename);return(0,_includes2.default)(exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val){return new RegExp(/.^/)}if(Array.isArray(val)){val=new RegExp(val.map(_escapeRegExp2.default).join("|"),"i")}if(typeof val==="string"){val=(0,_slash2.default)(val);if((0,_startsWith2.default)(val,"./")||(0,_startsWith2.default)(val,"*/"))val=val.slice(2);if((0,_startsWith2.default)(val,"**/"))val=val.slice(3);var regex=_minimatch2.default.makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if((0,_isRegExp2.default)(val)){return val}throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if((0,_isBoolean2.default)(val))return arrayify([val],mapFn);if((0,_isString2.default)(val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true"||val==1){return true}if(val==="false"||val==0||!val){return false}return val}function shouldIgnore(filename){var ignore=arguments.length<=1||arguments[1]===undefined?[]:arguments[1];var only=arguments[2];filename=(0,_slash2.default)(filename);if(only){for(var _iterator=only,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var pattern=_ref;if(_shouldIgnore(pattern,filename))return false}return true}else if(ignore.length){for(var _iterator2=ignore,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _pattern=_ref2;if(_shouldIgnore(_pattern,filename))return true}}return false}function _shouldIgnore(pattern,filename){if(typeof pattern==="function"){return pattern(filename)}else{return pattern.test(filename)}}},{"babel-runtime/core-js/get-iterator":139,"lodash/escapeRegExp":830,"lodash/includes":841,"lodash/isBoolean":846,"lodash/isRegExp":855,"lodash/isString":856,"lodash/startsWith":870,minimatch:881,path:884,slash:969,util:987}],41:[function(require,module,exports){module.exports={_args:[["babel-core@https://registry.npmjs.org/babel-core/-/babel-core-6.16.0.tgz","/Users/zliu/src/others/ramda-repl"]],_from:"babel-core@6.16.0",_id:"babel-core@6.16.0",_inCache:true,_location:"/babel-core",_phantomChildren:{},_requested:{name:"babel-core",raw:"babel-core@https://registry.npmjs.org/babel-core/-/babel-core-6.16.0.tgz",rawSpec:"https://registry.npmjs.org/babel-core/-/babel-core-6.16.0.tgz", -scope:null,spec:"https://registry.npmjs.org/babel-core/-/babel-core-6.16.0.tgz",type:"remote"},_requiredBy:["/","/babel-register","/babelify","/systemjs-builder"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.16.0.tgz",_shasum:"cf8bbfdf0097c4146195d80d9ec96d73acf387d5",_shrinkwrap:null,_spec:"babel-core@https://registry.npmjs.org/babel-core/-/babel-core-6.16.0.tgz",_where:"/Users/zliu/src/others/ramda-repl",author:{email:"sebmck@gmail.com",name:"Sebastian McKenzie"},dependencies:{"babel-code-frame":"^6.16.0","babel-generator":"^6.16.0","babel-helpers":"^6.16.0","babel-messages":"^6.8.0","babel-register":"^6.16.0","babel-runtime":"^6.9.1","babel-template":"^6.16.0","babel-traverse":"^6.16.0","babel-types":"^6.16.0",babylon:"^6.11.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.4.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-exists":"^1.0.0","path-is-absolute":"^1.0.0",private:"^0.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.9.0","babel-helper-transform-fixture-test-runner":"^6.16.0","babel-polyfill":"^6.16.0"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],license:"MIT",name:"babel-core",optionalDependencies:{},readme:"# babel-core\n\n> Babel compiler core.\n\n## Install\n\n```\n$ npm install babel-core\n```\n\n## Usage\n\n```js\nimport babel from 'babel-core';\n\nconst code = `class Example {}`;\nconst result = babel.transform(code, { /* options */ });\n\nresult.code; // Generated code\nresult.map; // Sourcemap\nresult.ast; // AST\n```\n\nFor more in depth documentation see: http://babeljs.io/docs/usage/api/\n",readmeFilename:"README.md",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.16.0"}},{}],42:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _trimEnd=require("lodash/trimEnd");var _trimEnd2=_interopRequireDefault(_trimEnd);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var SPACES_RE=/^[ \t]+$/;var Buffer=function(){function Buffer(map){(0,_classCallCheck3.default)(this,Buffer);this._map=null;this._buf=[];this._last="";this._queue=[];this._position={line:1,column:0};this._sourcePosition={identifierName:null,line:null,column:null,filename:null};this._map=map}Buffer.prototype.get=function get(){this._flush();return{code:(0,_trimEnd2.default)(this._buf.join("")),map:this._map?this._map.get():null}};Buffer.prototype.append=function append(str){this._flush();var _sourcePosition=this._sourcePosition;var line=_sourcePosition.line;var column=_sourcePosition.column;var filename=_sourcePosition.filename;var identifierName=_sourcePosition.identifierName;this._append(str,line,column,identifierName,filename)};Buffer.prototype.queue=function queue(str){if(str==="\n")while(this._queue.length>0&&SPACES_RE.test(this._queue[0][0])){this._queue.shift()}var _sourcePosition2=this._sourcePosition;var line=_sourcePosition2.line;var column=_sourcePosition2.column;var filename=_sourcePosition2.filename;var identifierName=_sourcePosition2.identifierName;this._queue.unshift([str,line,column,identifierName,filename])};Buffer.prototype._flush=function _flush(){var item=void 0;while(item=this._queue.pop()){this._append.apply(this,item)}};Buffer.prototype._append=function _append(str,line,column,identifierName,filename){if(this._map&&str[0]!=="\n"){this._map.mark(this._position.line,this._position.column,line,column,identifierName,filename)}this._buf.push(str);this._last=str[str.length-1];for(var i=0;i0&&this._queue[0][0]==="\n")this._queue.shift()};Buffer.prototype.removeLastSemicolon=function removeLastSemicolon(){if(this._queue.length>0&&this._queue[0][0]===";")this._queue.shift()};Buffer.prototype.endsWith=function endsWith(suffix){if(suffix.length===1){var last=void 0;if(this._queue.length>0){var str=this._queue[0][0];last=str[str.length-1]}else{last=this._last}return last===suffix}var end=this._last+this._queue.reduce(function(acc,item){return item[0]+acc},"");if(suffix.length<=end.length){return end.slice(-suffix.length)===suffix}return false};Buffer.prototype.hasContent=function hasContent(){return this._queue.length>0||!!this._last};Buffer.prototype.source=function source(prop,loc){if(prop&&!loc)return;var pos=loc?loc[prop]:null;this._sourcePosition.identifierName=loc&&loc.identifierName||null;this._sourcePosition.line=pos?pos.line:null;this._sourcePosition.column=pos?pos.column:null;this._sourcePosition.filename=loc&&loc.filename||null};Buffer.prototype.withSource=function withSource(prop,loc,cb){if(!this._map)return cb();var originalLine=this._sourcePosition.line;var originalColumn=this._sourcePosition.column;var originalFilename=this._sourcePosition.filename;var originalIdentifierName=this._sourcePosition.identifierName;this.source(prop,loc);cb();this._sourcePosition.line=originalLine;this._sourcePosition.column=originalColumn;this._sourcePosition.filename=originalFilename;this._sourcePosition.identifierName=originalIdentifierName};Buffer.prototype.getCurrentColumn=function getCurrentColumn(){var extra=this._queue.reduce(function(acc,item){return item[0]+acc},"");var lastIndex=extra.lastIndexOf("\n");return lastIndex===-1?this._position.column+extra.length:extra.length-1-lastIndex};Buffer.prototype.getCurrentLine=function getCurrentLine(){var extra=this._queue.reduce(function(acc,item){return item[0]+acc},"");var count=0;for(var i=0;i")}this.space();this.print(node.returnType,node)}function FunctionTypeParam(node){this.print(node.name,node);if(node.optional)this.token("?");this.token(":");this.space();this.print(node.typeAnnotation,node)}function InterfaceExtends(node){this.print(node.id,node);this.print(node.typeParameters,node)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node){this.print(node.id,node);this.print(node.typeParameters,node);if(node.extends.length){this.space();this.word("extends");this.space();this.printList(node.extends,node)}if(node.mixins&&node.mixins.length){this.space();this.word("mixins");this.space();this.printList(node.mixins,node)}this.space();this.print(node.body,node)}function InterfaceDeclaration(node){this.word("interface");this.space();this._interfaceish(node)}function andSeparator(){this.space();this.token("&");this.space()}function IntersectionTypeAnnotation(node){this.printJoin(node.types,node,{separator:andSeparator})}function MixedTypeAnnotation(){this.word("mixed")}function NullableTypeAnnotation(node){this.token("?");this.print(node.typeAnnotation,node)}function NumberTypeAnnotation(){this.word("number")}function StringTypeAnnotation(){this.word("string")}function ThisTypeAnnotation(){this.word("this")}function TupleTypeAnnotation(node){this.token("[");this.printList(node.types,node);this.token("]")}function TypeofTypeAnnotation(node){this.word("typeof");this.space();this.print(node.argument,node)}function TypeAlias(node){this.word("type");this.space();this.print(node.id,node);this.print(node.typeParameters,node);this.space();this.token("=");this.space();this.print(node.right,node);this.semicolon()}function TypeAnnotation(node){this.token(":");this.space();if(node.optional)this.token("?");this.print(node.typeAnnotation,node)}function TypeParameter(node){if(node.variance==="plus"){this.token("+")}else if(node.variance==="minus"){this.token("-")}this.word(node.name);if(node.bound){this.print(node.bound,node)}if(node.default){this.space();this.token("=");this.space();this.print(node.default,node)}}function TypeParameterInstantiation(node){this.token("<");this.printList(node.params,node,{});this.token(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node){var _this=this;if(node.exact){this.token("{|")}else{this.token("{")}var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();this.printJoin(props,node,{indent:true,statement:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}if(node.exact){this.token("|}")}else{this.token("}")}}function ObjectTypeCallProperty(node){if(node.static){this.word("static");this.space()}this.print(node.value,node)}function ObjectTypeIndexer(node){if(node.static){this.word("static");this.space()}this.token("[");this.print(node.id,node);this.token(":");this.space();this.print(node.key,node);this.token("]");this.token(":");this.space();this.print(node.value,node)}function ObjectTypeProperty(node){if(node.static){this.word("static");this.space()}this.print(node.key,node);if(node.optional)this.token("?");this.token(":");this.space();this.print(node.value,node)}function QualifiedTypeIdentifier(node){this.print(node.qualification,node);this.token(".");this.print(node.id,node)}function orSeparator(){this.space();this.token("|");this.space()}function UnionTypeAnnotation(node){this.printJoin(node.types,node,{separator:orSeparator})}function TypeCastExpression(node){this.token("(");this.print(node.expression,node);this.print(node.typeAnnotation,node);this.token(")")}function VoidTypeAnnotation(){this.word("void")}},{"./types":52}],47:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXText=JSXText;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function JSXAttribute(node){this.print(node.name,node);if(node.value){this.token("=");this.print(node.value,node)}}function JSXIdentifier(node){this.word(node.name)}function JSXNamespacedName(node){this.print(node.namespace,node);this.token(":");this.print(node.name,node)}function JSXMemberExpression(node){this.print(node.object,node);this.token(".");this.print(node.property,node)}function JSXSpreadAttribute(node){this.token("{");this.token("...");this.print(node.argument,node);this.token("}")}function JSXExpressionContainer(node){this.token("{");this.print(node.expression,node);this.token("}")}function JSXText(node){this.token(node.value)}function JSXElement(node){var open=node.openingElement;this.print(open,node);if(open.selfClosing)return;this.indent();for(var _iterator=node.children,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var child=_ref;this.print(child,node)}this.dedent();this.print(node.closingElement,node)}function spaceSeparator(){this.space()}function JSXOpeningElement(node){this.token("<");this.print(node.name,node);if(node.attributes.length>0){this.space();this.printJoin(node.attributes,node,{separator:spaceSeparator})}if(node.selfClosing){this.space();this.token("/>")}else{this.token(">")}}function JSXClosingElement(node){this.token("")}function JSXEmptyExpression(){}},{"babel-runtime/core-js/get-iterator":139}],48:[function(require,module,exports){"use strict";exports.__esModule=true;exports.FunctionDeclaration=undefined;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _params(node){var _this=this;this.print(node.typeParameters,node);this.token("(");this.printList(node.params,node,{iterator:function iterator(node){if(node.optional)_this.token("?");_this.print(node.typeAnnotation,node)}});this.token(")");if(node.returnType){this.print(node.returnType,node)}}function _method(node){var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(node.generator){this.token("*")}}if(kind==="get"||kind==="set"){this.word(kind);this.space()}if(node.async){this.word("async");this.space()}if(node.computed){this.token("[");this.print(key,node);this.token("]")}else{this.print(key,node)}this._params(node);this.space();this.print(node.body,node)}function FunctionExpression(node){if(node.async){this.word("async");this.space()}this.word("function");if(node.generator)this.token("*");if(node.id){this.space();this.print(node.id,node)}else{this.space()}this._params(node);this.space();this.print(node.body,node)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node){if(node.async){this.word("async");this.space()}var firstParam=node.params[0];if(node.params.length===1&&t.isIdentifier(firstParam)&&!hasTypes(node,firstParam)){this.print(firstParam,node)}else{this._params(node)}this.space();this.token("=>");this.space();this.print(node.body,node)}function hasTypes(node,param){return node.typeParameters||node.returnType||param.typeAnnotation||param.optional||param.trailingComments}},{"babel-types":194}],49:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function ImportSpecifier(node){this.print(node.imported,node);if(node.local&&node.local.name!==node.imported.name){this.space();this.word("as");this.space();this.print(node.local,node)}}function ImportDefaultSpecifier(node){this.print(node.local,node)}function ExportDefaultSpecifier(node){this.print(node.exported,node)}function ExportSpecifier(node){this.print(node.local,node);if(node.exported&&node.local.name!==node.exported.name){this.space();this.word("as");this.space();this.print(node.exported,node)}}function ExportNamespaceSpecifier(node){this.token("*");this.space();this.word("as");this.space();this.print(node.exported,node)}function ExportAllDeclaration(node){this.word("export");this.space();this.token("*");if(node.exported){this.space();this.word("as");this.space();this.print(node.exported,node)}this.space();this.word("from");this.space();this.print(node.source,node);this.semicolon()}function ExportNamedDeclaration(){this.word("export");this.space();ExportDeclaration.apply(this,arguments)}function ExportDefaultDeclaration(){this.word("export");this.space();this.word("default");this.space();ExportDeclaration.apply(this,arguments)}function ExportDeclaration(node){if(node.declaration){var declar=node.declaration;this.print(declar,node);if(!t.isStatement(declar))this.semicolon()}else{if(node.exportKind==="type"){this.word("type");this.space()}var specifiers=node.specifiers.slice(0);var hasSpecial=false;while(true){var first=specifiers[0];if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;this.print(specifiers.shift(),node);if(specifiers.length){this.token(",");this.space()}}else{break}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.token("{");if(specifiers.length){this.space();this.printList(specifiers,node);this.space()}this.token("}")}if(node.source){this.space();this.word("from");this.space();this.print(node.source,node)}this.semicolon()}}function ImportDeclaration(node){this.word("import");this.space();if(node.importKind==="type"||node.importKind==="typeof"){this.word(node.importKind);this.space()}var specifiers=node.specifiers.slice(0);if(specifiers&&specifiers.length){while(true){var first=specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){this.print(specifiers.shift(),node);if(specifiers.length){this.token(",");this.space()}}else{break}}if(specifiers.length){this.token("{");this.space();this.printList(specifiers,node);this.space();this.token("}")}this.space();this.word("from");this.space()}this.print(node.source,node);this.semicolon()}function ImportNamespaceSpecifier(node){this.token("*");this.space();this.word("as");this.space();this.print(node.local,node)}},{"babel-types":194}],50:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ThrowStatement=exports.BreakStatement=exports.ReturnStatement=exports.ContinueStatement=exports.ForAwaitStatement=exports.ForOfStatement=exports.ForInStatement=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function WithStatement(node){this.word("with");this.space();this.token("(");this.print(node.object,node);this.token(")");this.printBlock(node)}function IfStatement(node){this.word("if");this.space();this.token("(");this.print(node.test,node);this.token(")");this.space();var needsBlock=node.alternate&&t.isIfStatement(getLastStatement(node.consequent));if(needsBlock){this.token("{");this.newline();this.indent()}this.printAndIndentOnComments(node.consequent,node);if(needsBlock){this.dedent();this.newline();this.token("}")}if(node.alternate){if(this.endsWith("}"))this.space();this.word("else");this.space();this.printAndIndentOnComments(node.alternate,node)}}function getLastStatement(statement){if(!t.isStatement(statement.body))return statement;return getLastStatement(statement.body)}function ForStatement(node){this.word("for");this.space();this.token("(");this.inForStatementInitCounter++;this.print(node.init,node);this.inForStatementInitCounter--;this.token(";");if(node.test){this.space();this.print(node.test,node)}this.token(";");if(node.update){this.space();this.print(node.update,node)}this.token(")");this.printBlock(node)}function WhileStatement(node){this.word("while");this.space(); -this.token("(");this.print(node.test,node);this.token(")");this.printBlock(node)}var buildForXStatement=function buildForXStatement(op){return function(node){this.word("for");this.space();if(op==="await"){this.word("await");this.space();op="of"}this.token("(");this.print(node.left,node);this.space();this.word(op);this.space();this.print(node.right,node);this.token(")");this.printBlock(node)}};var ForInStatement=exports.ForInStatement=buildForXStatement("in");var ForOfStatement=exports.ForOfStatement=buildForXStatement("of");var ForAwaitStatement=exports.ForAwaitStatement=buildForXStatement("await");function DoWhileStatement(node){this.word("do");this.space();this.print(node.body,node);this.space();this.word("while");this.space();this.token("(");this.print(node.test,node);this.token(")");this.semicolon()}function buildLabelStatement(prefix){var key=arguments.length<=1||arguments[1]===undefined?"label":arguments[1];return function(node){this.word(prefix);var label=node[key];if(label){this.space();var terminatorState=this.startTerminatorless();this.print(label,node);this.endTerminatorless(terminatorState)}this.semicolon()}}var ContinueStatement=exports.ContinueStatement=buildLabelStatement("continue");var ReturnStatement=exports.ReturnStatement=buildLabelStatement("return","argument");var BreakStatement=exports.BreakStatement=buildLabelStatement("break");var ThrowStatement=exports.ThrowStatement=buildLabelStatement("throw","argument");function LabeledStatement(node){this.print(node.label,node);this.token(":");this.space();this.print(node.body,node)}function TryStatement(node){this.word("try");this.space();this.print(node.block,node);this.space();if(node.handlers){this.print(node.handlers[0],node)}else{this.print(node.handler,node)}if(node.finalizer){this.space();this.word("finally");this.space();this.print(node.finalizer,node)}}function CatchClause(node){this.word("catch");this.space();this.token("(");this.print(node.param,node);this.token(")");this.space();this.print(node.body,node)}function SwitchStatement(node){this.word("switch");this.space();this.token("(");this.print(node.discriminant,node);this.token(")");this.space();this.token("{");this.printSequence(node.cases,node,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.token("}")}function SwitchCase(node){if(node.test){this.word("case");this.space();this.print(node.test,node);this.token(":")}else{this.word("default");this.token(":")}if(node.consequent.length){this.newline();this.printSequence(node.consequent,node,{indent:true})}}function DebuggerStatement(){this.word("debugger");this.semicolon()}function variableDeclarationIdent(){this.token(",");this.newline();if(this.endsWith("\n"))for(var i=0;i<4;i++){this.space(true)}}function constDeclarationIdent(){this.token(",");this.newline();if(this.endsWith("\n"))for(var i=0;i<6;i++){this.space(true)}}function VariableDeclaration(node,parent){this.word(node.kind);this.space();var hasInits=false;if(!t.isFor(parent)){for(var _iterator=node.declarations,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var declar=_ref;if(declar.init){hasInits=true}}}var separator=void 0;if(hasInits){separator=node.kind==="const"?constDeclarationIdent:variableDeclarationIdent}this.printList(node.declarations,node,{separator:separator});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node){this.print(node.id,node);this.print(node.id.typeAnnotation,node);if(node.init){this.space();this.token("=");this.space();this.print(node.init,node)}}},{"babel-runtime/core-js/get-iterator":139,"babel-types":194}],51:[function(require,module,exports){"use strict";exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;function TaggedTemplateExpression(node){this.print(node.tag,node);this.print(node.quasi,node)}function TemplateElement(node,parent){var isFirst=parent.quasis[0]===node;var isLast=parent.quasis[parent.quasis.length-1]===node;var value=(isFirst?"`":"}")+node.value.raw+(isLast?"`":"${");if(!isFirst)this.space();this.token(value);if(!isLast)this.space()}function TemplateLiteral(node){var quasis=node.quasis;for(var i=0;i0)this.space();this.print(elem,node);if(i=0||value.indexOf("@preserve")>=0}}if(format.compact==="auto"){format.compact=code.length>1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}if(format.compact){format.indent.adjustMultilineComment=false}return format}function findCommonStringDelimiter(code,tokens){var DEFAULT_STRING_DELIMITER="double";if(!code){return DEFAULT_STRING_DELIMITER}var occurences={single:0,double:0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}}var CodeGenerator=exports.CodeGenerator=function(){function CodeGenerator(ast,opts,code){(0,_classCallCheck3.default)(this,CodeGenerator);this._generator=new Generator(ast,opts,code)}CodeGenerator.prototype.generate=function generate(){return this._generator.generate()};return CodeGenerator}()},{"./printer":57,"./source-map":58,"babel-messages":76,"babel-runtime/helpers/classCallCheck":153,"babel-runtime/helpers/inherits":154,"babel-runtime/helpers/possibleConstructorReturn":155,"detect-indent":638}],54:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);exports.needsWhitespace=needsWhitespace;exports.needsWhitespaceBefore=needsWhitespaceBefore;exports.needsWhitespaceAfter=needsWhitespaceAfter;exports.needsParens=needsParens;var _whitespace=require("./whitespace");var _whitespace2=_interopRequireDefault(_whitespace);var _parentheses=require("./parentheses");var parens=_interopRequireWildcard(_parentheses);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function expandAliases(obj){var newObj={};function add(type,func){var fn=newObj[type];newObj[type]=fn?function(node,parent,stack){var result=fn(node,parent,stack);return result==null?func(node,parent,stack):result}:func}for(var _iterator=(0,_keys2.default)(obj),_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var type=_ref;var aliases=t.FLIPPED_ALIAS_KEYS[type];if(aliases){for(var _iterator2=aliases,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var alias=_ref2;add(alias,obj[type])}}else{add(type,obj[type])}}return newObj}var expandedParens=expandAliases(parens);var expandedWhitespaceNodes=expandAliases(_whitespace2.default.nodes);var expandedWhitespaceList=expandAliases(_whitespace2.default.list);function find(obj,node,parent,printStack){var fn=obj[node.type];return fn?fn(node,parent,printStack):null}function isOrHasCallExpression(node){if(t.isCallExpression(node)){return true}if(t.isMemberExpression(node)){return isOrHasCallExpression(node.object)||!node.computed&&isOrHasCallExpression(node.property)}else{return false}}function needsWhitespace(node,parent,type){if(!node)return 0;if(t.isExpressionStatement(node)){node=node.expression}var linesInfo=find(expandedWhitespaceNodes,node,parent);if(!linesInfo){var items=find(expandedWhitespaceList,node,parent);if(items){for(var i=0;i":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function ObjectExpression(node,parent,printStack){return isFirstInStatement(printStack,{considerArrow:true})}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node&&!t.isLogicalExpression(parent)){return true}}return false}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}return false}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}if(t.isReturnStatement(parent)){return false}if(t.isThrowStatement(parent)){return false}if(t.isSwitchStatement(parent)&&parent.discriminant===node){return false}if(t.isWhileStatement(parent)&&parent.test===node){return false}if(t.isIfStatement(parent)&&parent.test===node){return false}if(t.isForInStatement(parent)&&parent.right===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)}exports.AwaitExpression=YieldExpression;function ClassExpression(node,parent,printStack){return isFirstInStatement(printStack,{considerDefaultExports:true})}function UnaryLike(node,parent){if(t.isMemberExpression(parent,{object:node})){return true}if(t.isCallExpression(parent,{callee:node})||t.isNewExpression(parent,{callee:node})){return true}return false}function FunctionExpression(node,parent,printStack){return isFirstInStatement(printStack,{considerDefaultExports:true})}function ArrowFunctionExpression(node,parent){if(t.isExportDeclaration(parent)){return true}if(t.isBinaryExpression(parent)||t.isLogicalExpression(parent)){return true}if(t.isUnaryExpression(parent)){return true}return UnaryLike(node,parent)}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isConditionalExpression(parent,{test:node})){return true}return UnaryLike(node,parent)}function AssignmentExpression(node){if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}function isFirstInStatement(printStack){var _ref=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var _ref$considerArrow=_ref.considerArrow;var considerArrow=_ref$considerArrow===undefined?false:_ref$considerArrow;var _ref$considerDefaultE=_ref.considerDefaultExports;var considerDefaultExports=_ref$considerDefaultE===undefined?false:_ref$considerDefaultE;var i=printStack.length-1;var node=printStack[i];i--;var parent=printStack[i];while(i>0){if(t.isExpressionStatement(parent,{expression:node})){return true}if(considerDefaultExports&&t.isExportDefaultDeclaration(parent,{declaration:node})){return true}if(considerArrow&&t.isArrowFunctionExpression(parent,{body:node})){return true}if(t.isCallExpression(parent,{callee:node})||t.isSequenceExpression(parent)&&parent.expressions[0]===node||t.isMemberExpression(parent,{object:node})||t.isConditional(parent,{test:node})||t.isBinary(parent,{left:node})||t.isAssignmentExpression(parent,{left:node})){node=parent;i--;parent=printStack[i]}else{return false}}return false}},{"babel-types":194}],56:[function(require,module,exports){"use strict";var _isBoolean=require("lodash/isBoolean");var _isBoolean2=_interopRequireDefault(_isBoolean);var _each=require("lodash/each");var _each2=_interopRequireDefault(_each);var _map=require("lodash/map");var _map2=_interopRequireDefault(_map);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function crawl(node){var state=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i0?new _whitespace2.default(tokens):null}Printer.prototype.generate=function generate(ast){this.print(ast);this._maybeAddAuxComment();return this._buf.get()};Printer.prototype.indent=function indent(){if(this.format.compact||this.format.concise)return;this._indent++};Printer.prototype.dedent=function dedent(){if(this.format.compact||this.format.concise)return;this._indent--};Printer.prototype.semicolon=function semicolon(){var force=arguments.length<=0||arguments[0]===undefined?false:arguments[0];this._maybeAddAuxComment();this._append(";",!force)};Printer.prototype.rightBrace=function rightBrace(){if(this.format.minified){this._buf.removeLastSemicolon()}this.token("}")};Printer.prototype.space=function space(){var force=arguments.length<=0||arguments[0]===undefined?false:arguments[0];if(this.format.compact)return;if(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||force){this._space()}};Printer.prototype.word=function word(str){if(this._endsWithWord)this._space();this._maybeAddAuxComment();this._append(str);this._endsWithWord=true};Printer.prototype.number=function number(str){this.word(str);this._endsWithInteger=(0,_isInteger2.default)(+str)&&!NON_DECIMAL_LITERAL.test(str)&&!SCIENTIFIC_NOTATION.test(str)&&!ZERO_DECIMAL_INTEGER.test(str)&&str[str.length-1]!=="."};Printer.prototype.token=function token(str){if(str==="--"&&this.endsWith("!")||str[0]==="+"&&this.endsWith("+")||str[0]==="-"&&this.endsWith("-")||str[0]==="."&&this._endsWithInteger){this._space()}this._maybeAddAuxComment();this._append(str)};Printer.prototype.newline=function newline(i){if(this.format.retainLines||this.format.compact)return;if(this.format.concise){this.space();return}if(this.endsWith("\n\n"))return;if(typeof i!=="number")i=1;i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;for(var j=0;j=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var _comment3=_ref;this._printComment(_comment3)}};return Printer}();exports.default=Printer;function commaSeparator(){this.token(",");this.space()}var _arr=[require("./generators/template-literals"),require("./generators/expressions"),require("./generators/statements"),require("./generators/classes"),require("./generators/methods"),require("./generators/modules"),require("./generators/types"),require("./generators/flow"),require("./generators/base"),require("./generators/jsx")];for(var _i2=0;_i2<_arr.length;_i2++){var generator=_arr[_i2];(0,_assign2.default)(Printer.prototype,generator)}module.exports=exports["default"]},{"./buffer":42,"./generators/base":43,"./generators/classes":44,"./generators/expressions":45,"./generators/flow":46,"./generators/jsx":47,"./generators/methods":48,"./generators/modules":49,"./generators/statements":50,"./generators/template-literals":51,"./generators/types":52,"./node":54,"./whitespace":59,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/json/stringify":140,"babel-runtime/core-js/object/assign":143,"babel-runtime/core-js/weak-set":152,"babel-runtime/helpers/classCallCheck":153,"babel-types":194,"lodash/find":832,"lodash/findLast":834,"lodash/isInteger":849,"lodash/repeat":868}],58:[function(require,module,exports){"use strict";exports.__esModule=true;var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _sourceMap=require("source-map");var _sourceMap2=_interopRequireDefault(_sourceMap);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var SourceMap=function(){function SourceMap(opts,code){var _this=this;(0,_classCallCheck3.default)(this,SourceMap);this._opts=opts;this._map=new _sourceMap2.default.SourceMapGenerator({file:opts.sourceMapTarget,sourceRoot:opts.sourceRoot});if(typeof code==="string"){this._map.setSourceContent(opts.sourceFileName,code)}else if((typeof code==="undefined"?"undefined":(0,_typeof3.default)(code))==="object"){(0,_keys2.default)(code).forEach(function(sourceFileName){_this._map.setSourceContent(sourceFileName,code[sourceFileName])})}}SourceMap.prototype.get=function get(){return this._map.toJSON()};SourceMap.prototype.mark=function mark(generatedLine,generatedColumn,line,column,identifierName,filename){if(this._lastGenLine!==generatedLine&&line===null)return;if(this._lastGenLine===generatedLine&&this._lastSourceLine===line&&this._lastSourceColumn===column){return}this._lastGenLine=generatedLine;this._lastSourceLine=line;this._lastSourceColumn=column;this._map.addMapping({name:identifierName,generated:{line:generatedLine,column:generatedColumn},source:line==null?null:filename||this._opts.sourceFileName,original:line==null?null:{line:line,column:column}})};return SourceMap}();exports.default=SourceMap;module.exports=exports["default"]},{"babel-runtime/core-js/object/keys":146,"babel-runtime/helpers/classCallCheck":153,"babel-runtime/helpers/typeof":156,"source-map":980}],59:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var Whitespace=function(){function Whitespace(tokens){(0,_classCallCheck3.default)(this,Whitespace);this.tokens=tokens;this.used={}}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken=void 0;var endToken=void 0;var tokens=this.tokens;var index=this._findToken(function(token){return token.start-node.start},0,tokens.length);if(index>=0){while(index&&node.start===tokens[index-1].start){--index}startToken=tokens[index-1];endToken=tokens[index]}return this._getNewlinesBetween(startToken,endToken)};Whitespace.prototype.getNewlinesAfter=function getNewlinesAfter(node){var startToken=void 0;var endToken=void 0;var tokens=this.tokens;var index=this._findToken(function(token){return token.end-node.end},0,tokens.length);if(index>=0){while(index&&node.end===tokens[index-1].end){--index}startToken=tokens[index];endToken=tokens[index+1];if(endToken.type.label===",")endToken=tokens[index+2]}if(endToken&&endToken.type.label==="eof"){return 1}else{return this._getNewlinesBetween(startToken,endToken)}};Whitespace.prototype._getNewlinesBetween=function _getNewlinesBetween(startToken,endToken){if(!endToken||!endToken.loc)return 0;var start=startToken?startToken.loc.end.line:1;var end=endToken.loc.start.line;var lines=0;for(var line=start;line=end)return-1;var middle=start+end>>>1;var match=test(this.tokens[middle]);if(match<0){return this._findToken(test,middle+1,end)}else if(match>0){return this._findToken(test,start,middle)}else if(match===0){return middle}return-1};return Whitespace}();exports.default=Whitespace;module.exports=exports["default"]},{"babel-runtime/helpers/classCallCheck":153}],60:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=bindifyDecorators;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function bindifyDecorators(decorators){for(var _iterator=decorators,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var decoratorPath=_ref;var decorator=decoratorPath.node;var expression=decorator.expression;if(!t.isMemberExpression(expression))continue;var temp=decoratorPath.scope.maybeGenerateMemoised(expression.object);var ref=void 0;var nodes=[];if(temp){ref=temp;nodes.push(t.assignmentExpression("=",temp,expression.object))}else{ref=expression.object}nodes.push(t.callExpression(t.memberExpression(t.memberExpression(ref,expression.property,expression.computed),t.identifier("bind")),[ref]));if(nodes.length===1){decorator.expression=nodes[0]}else{decorator.expression=t.sequenceExpression(nodes)}}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"babel-types":194}],61:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(opts){var visitor={};function isAssignment(node){return node&&node.operator===opts.operator+"="}function buildAssignment(left,right){return t.assignmentExpression("=",left,right)}visitor.ExpressionStatement=function(path,file){if(path.isCompletionRecord())return;var expr=path.node.expression;if(!isAssignment(expr))return;var nodes=[];var exploded=(0,_babelHelperExplodeAssignableExpression2.default)(expr.left,nodes,file,path.scope,true);nodes.push(t.expressionStatement(buildAssignment(exploded.ref,opts.build(exploded.uid,expr.right))));path.replaceWithMultiple(nodes)};visitor.AssignmentExpression=function(path,file){var node=path.node;var scope=path.scope;if(!isAssignment(node))return;var nodes=[];var exploded=(0,_babelHelperExplodeAssignableExpression2.default)(node.left,nodes,file,scope);nodes.push(buildAssignment(exploded.ref,opts.build(exploded.uid,node.right)));path.replaceWithMultiple(nodes)};visitor.BinaryExpression=function(path){var node=path.node;if(node.operator===opts.operator){path.replaceWith(opts.build(node.left,node.right))}};return visitor};var _babelHelperExplodeAssignableExpression=require("babel-helper-explode-assignable-expression");var _babelHelperExplodeAssignableExpression2=_interopRequireDefault(_babelHelperExplodeAssignableExpression);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-explode-assignable-expression":64,"babel-types":194}],62:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(path){var scope=arguments.length<=1||arguments[1]===undefined?path.scope:arguments[1];var node=path.node;var container=t.functionExpression(null,[],node.body,node.generator,node.async);var callee=container;var args=[];(0,_babelHelperHoistVariables2.default)(path,function(id){return scope.push({id:id})});var state={foundThis:false,foundArguments:false};path.traverse(visitor,state);if(state.foundArguments){callee=t.memberExpression(container,t.identifier("apply"));args=[];if(state.foundThis){args.push(t.thisExpression())}if(state.foundArguments){if(!state.foundThis)args.push(t.nullLiteral());args.push(t.identifier("arguments"))}}var call=t.callExpression(callee,args);if(node.generator)call=t.yieldExpression(call,true);return t.returnStatement(call)};var _babelHelperHoistVariables=require("babel-helper-hoist-variables");var _babelHelperHoistVariables2=_interopRequireDefault(_babelHelperHoistVariables);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var visitor={enter:function enter(path,state){if(path.isThisExpression()){state.foundThis=true}if(path.isReferencedIdentifier({name:"arguments"})){state.foundArguments=true}},Function:function Function(path){path.skip()}};module.exports=exports["default"]},{"babel-helper-hoist-variables":68,"babel-types":194}],63:[function(require,module,exports){"use strict";exports.__esModule=true;exports.push=push;exports.hasComputed=hasComputed;exports.toComputedObjectFromClass=toComputedObjectFromClass;exports.toClassObject=toClassObject;exports.toDefineObject=toDefineObject;var _babelHelperFunctionName=require("babel-helper-function-name");var _babelHelperFunctionName2=_interopRequireDefault(_babelHelperFunctionName);var _each=require("lodash/each");var _each2=_interopRequireDefault(_each);var _has=require("lodash/has");var _has2=_interopRequireDefault(_has);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function toKind(node){if(t.isClassMethod(node)||t.isObjectMethod(node)){if(node.kind==="get"||node.kind==="set"){return node.kind}}return"value"}function push(mutatorMap,node,kind,file,scope){var alias=t.toKeyAlias(node);var map={};if((0,_has2.default)(mutatorMap,alias))map=mutatorMap[alias];mutatorMap[alias]=map;map._inherits=map._inherits||[];map._inherits.push(node);map._key=node.key;if(node.computed){map._computed=true}if(node.decorators){var decorators=map.decorators=map.decorators||t.arrayExpression([]);decorators.elements=decorators.elements.concat(node.decorators.map(function(dec){return dec.expression}).reverse())}if(map.value||map.initializer){throw file.buildCodeFrameError(node,"Key conflict with sibling node")}var key=void 0,value=void 0;if(t.isObjectProperty(node)||t.isObjectMethod(node)||t.isClassMethod(node)){key=t.toComputedKey(node,node.key)}if(t.isObjectProperty(node)||t.isClassProperty(node)){value=node.value}else if(t.isObjectMethod(node)||t.isClassMethod(node)){value=t.functionExpression(null,node.params,node.body,node.generator,node.async)}var inheritedKind=toKind(node);if(!kind||inheritedKind!=="value"){kind=inheritedKind}if(scope&&t.isStringLiteral(key)&&(kind==="value"||kind==="initializer")&&t.isFunctionExpression(value)){value=(0,_babelHelperFunctionName2.default)({id:key,node:value,scope:scope})}if(value){t.inheritsComments(value,node);map[kind]=value}return map}function hasComputed(mutatorMap){for(var key in mutatorMap){if(mutatorMap[key]._computed){return true}}return false}function toComputedObjectFromClass(obj){var objExpr=t.arrayExpression([]);for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var path=_ref;maybeMemoise(path)}}maybeMemoise(classPath.get("superClass"));memoiseDecorators(classPath.get("decorators"),true);var methods=classPath.get("body.body");for(var _iterator2=methods,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var methodPath=_ref2;if(methodPath.is("computed")){maybeMemoise(methodPath.get("key"))}if(methodPath.has("decorators")){memoiseDecorators(classPath.get("decorators"))}}if(memoisedExpressions){classPath.insertBefore(memoisedExpressions.map(function(expr){return t.expressionStatement(expr)}))}};var _babelHelperBindifyDecorators=require("babel-helper-bindify-decorators");var _babelHelperBindifyDecorators2=_interopRequireDefault(_babelHelperBindifyDecorators);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-bindify-decorators":60,"babel-runtime/core-js/get-iterator":139,"babel-types":194}],66:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var node=_ref.node;var parent=_ref.parent;var scope=_ref.scope;var id=_ref.id;if(node.id)return;if((t.isObjectProperty(parent)||t.isObjectMethod(parent,{kind:"method"}))&&(!parent.computed||t.isLiteral(parent.key))){id=parent.key}else if(t.isVariableDeclarator(parent)){id=parent.id;if(t.isIdentifier(id)){var binding=scope.parent.getBinding(id.name);if(binding&&binding.constant&&scope.getBinding(id.name)===binding){node.id=id;node.id[t.NOT_LOCAL_BINDING]=true;return}}}else if(t.isAssignmentExpression(parent)){id=parent.left}else if(!id){return}var name=void 0;if(id&&t.isLiteral(id)){name=id.value}else if(id&&t.isIdentifier(id)){name=id.name}else{return}name=t.toBindingIdentifierName(name);id=t.identifier(name);id[t.NOT_LOCAL_BINDING]=true;var state=visit(node,name,scope);return wrap(state,node,id,scope)||node};var _babelHelperGetFunctionArity=require("babel-helper-get-function-arity");var _babelHelperGetFunctionArity2=_interopRequireDefault(_babelHelperGetFunctionArity);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildPropertyMethodAssignmentWrapper=(0,_babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n");var buildGeneratorPropertyMethodAssignmentWrapper=(0,_babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n");var visitor={"ReferencedIdentifier|BindingIdentifier":function ReferencedIdentifierBindingIdentifier(path,state){if(path.node.name!==state.name)return;var localDeclar=path.scope.getBindingIdentifier(state.name);if(localDeclar!==state.outerDeclar)return;state.selfReference=true;path.stop()}};function wrap(state,method,id,scope){if(state.selfReference){if(scope.hasBinding(id.name)&&!scope.hasGlobal(id.name)){scope.rename(id.name)}else{if(!t.isFunction(method))return;var build=buildPropertyMethodAssignmentWrapper;if(method.generator)build=buildGeneratorPropertyMethodAssignmentWrapper;var _template=build({FUNCTION:method,FUNCTION_ID:id,FUNCTION_KEY:scope.generateUidIdentifier(id.name)}).expression;_template.callee._skipModulesRemap=true;var params=_template.callee.body.body[0].params;for(var i=0,len=(0,_babelHelperGetFunctionArity2.default)(method);i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var declar=_ref;firstId=declar.node.id;if(declar.node.init){nodes.push(t.expressionStatement(t.assignmentExpression("=",declar.node.id,declar.node.init)))}for(var name in declar.getBindingIdentifiers()){state.emit(t.identifier(name),name)}}if(path.parentPath.isFor({left:path.node})){path.replaceWith(firstId)}else{path.replaceWithMultiple(nodes)}}};module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"babel-types":194}],69:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(callee,thisNode,args){if(args.length===1&&t.isSpreadElement(args[0])&&t.isIdentifier(args[0].argument,{name:"arguments"})){return t.callExpression(t.memberExpression(callee,t.identifier("apply")),[thisNode,args[0].argument])}else{return t.callExpression(t.memberExpression(callee,t.identifier("call")),[thisNode].concat(args))}};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}module.exports=exports["default"]},{"babel-types":194}],70:[function(require,module,exports){"use strict";exports.__esModule=true;exports.is=is;exports.pullFlag=pullFlag;var _pull=require("lodash/pull");var _pull2=_interopRequireDefault(_pull);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function is(node,flag){return t.isRegExpLiteral(node)&&node.flags.indexOf(flag)>=0}function pullFlag(node,flag){var flags=node.flags.split("");if(node.flags.indexOf(flag)<0)return;(0,_pull2.default)(flags,flag);node.flags=flags.join("")}},{"babel-types":194,"lodash/pull":866}],71:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(path,helpers){var node=path.node;var scope=path.scope;var parent=path.parent;var stepKey=scope.generateUidIdentifier("step");var stepValue=scope.generateUidIdentifier("value");var left=node.left;var declar=void 0;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}var template=buildForAwait();(0,_babelTraverse2.default)(template,forAwaitVisitor,null,{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:scope.generateUidIdentifier("iterator"),GET_ITERATOR:helpers.getAsyncIterator,OBJECT:node.right,STEP_VALUE:stepValue,STEP_KEY:stepKey,AWAIT:helpers.wrapAwait});template=template.body.body;var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,node:template,declar:declar,loop:loop}};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelTraverse=require("babel-traverse");var _babelTraverse2=_interopRequireDefault(_babelTraverse);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){ -return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}var buildForAwait=(0,_babelTemplate2.default)("\n function* wrapper() {\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE;\n (\n STEP_KEY = yield AWAIT(ITERATOR_KEY.next()),\n ITERATOR_COMPLETION = STEP_KEY.done,\n STEP_VALUE = yield AWAIT(STEP_KEY.value),\n !ITERATOR_COMPLETION\n );\n ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n yield AWAIT(ITERATOR_KEY.return());\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n");var forAwaitVisitor={noScope:true,Identifier:function Identifier(path,replacements){if(path.node.name in replacements){path.replaceInline(replacements[path.node.name])}},CallExpression:function CallExpression(path,replacements){var callee=path.node.callee;if(t.isIdentifier(callee)&&callee.name==="AWAIT"&&!replacements.AWAIT){path.replaceWith(path.node.arguments[0])}}};module.exports=exports["default"]},{"babel-template":157,"babel-traverse":161,"babel-types":194}],72:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(path,file,helpers){if(!helpers){helpers={wrapAsync:file};file=null}path.traverse(awaitVisitor,{file:file,wrapAwait:helpers.wrapAwait});if(path.isClassMethod()||path.isObjectMethod()){classOrObjectMethod(path,helpers.wrapAsync)}else{plainFunction(path,helpers.wrapAsync)}};var _babelHelperFunctionName=require("babel-helper-function-name");var _babelHelperFunctionName2=_interopRequireDefault(_babelHelperFunctionName);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _forAwait=require("./for-await");var _forAwait2=_interopRequireDefault(_forAwait);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildWrapper=(0,_babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })\n");var namedBuildWrapper=(0,_babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })\n");var awaitVisitor={Function:function Function(path){if(path.isArrowFunctionExpression()&&!path.node.async){path.arrowFunctionToShadowed();return}path.skip()},AwaitExpression:function AwaitExpression(_ref,_ref2){var node=_ref.node;var wrapAwait=_ref2.wrapAwait;node.type="YieldExpression";if(wrapAwait){node.argument=t.callExpression(wrapAwait,[node.argument])}},ForAwaitStatement:function ForAwaitStatement(path,_ref3){var file=_ref3.file;var wrapAwait=_ref3.wrapAwait;var node=path.node;var build=(0,_forAwait2.default)(path,{getAsyncIterator:file.addHelper("asyncIterator"),wrapAwait:wrapAwait});var declar=build.declar;var loop=build.loop;var block=loop.body;path.ensureBlock();if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){path.parentPath.replaceWithMultiple(build.node);path.remove()}else{path.replaceWithMultiple(build.node)}}};function classOrObjectMethod(path,callId){var node=path.node;var body=node.body;node.async=false;var container=t.functionExpression(null,[],t.blockStatement(body.body),true);container.shadow=true;body.body=[t.returnStatement(t.callExpression(t.callExpression(callId,[container]),[]))]}function plainFunction(path,callId){var node=path.node;var isDeclaration=path.isFunctionDeclaration();var asyncFnId=node.id;var wrapper=buildWrapper;if(path.isArrowFunctionExpression()){path.arrowFunctionToShadowed()}else if(!isDeclaration&&asyncFnId){wrapper=namedBuildWrapper}node.async=false;node.generator=true;node.id=null;if(isDeclaration){node.type="FunctionExpression"}var built=t.callExpression(callId,[node]);var container=wrapper({NAME:asyncFnId,REF:path.scope.generateUidIdentifier("ref"),FUNCTION:built,PARAMS:node.params.map(function(){return path.scope.generateUidIdentifier("x")})}).expression;if(isDeclaration){var declar=t.variableDeclaration("let",[t.variableDeclarator(t.identifier(asyncFnId.name),t.callExpression(container,[]))]);declar._blockHoist=true;path.replaceWith(declar)}else{var retFunction=container.body.body[1].argument;if(!asyncFnId){(0,_babelHelperFunctionName2.default)({node:retFunction,parent:path.parent,scope:path.scope})}if(!retFunction||retFunction.id||node.params.length){path.replaceWith(t.callExpression(container,[]))}else{path.replaceWith(built)}}}module.exports=exports["default"]},{"./for-await":71,"babel-helper-function-name":66,"babel-template":157,"babel-types":194}],73:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);var _babelHelperOptimiseCallExpression=require("babel-helper-optimise-call-expression");var _babelHelperOptimiseCallExpression2=_interopRequireDefault(_babelHelperOptimiseCallExpression);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var HARDCORE_THIS_REF=(0,_symbol2.default)();function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}function getPrototypeOfExpression(objectRef,isStatic){var targetRef=isStatic?objectRef:t.memberExpression(objectRef,t.identifier("prototype"));return t.logicalExpression("||",t.memberExpression(targetRef,t.identifier("__proto__")),t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[targetRef]))}var visitor={Function:function Function(path){if(!path.inShadow("this")){path.skip()}},ReturnStatement:function ReturnStatement(path,state){if(!path.inShadow("this")){state.returns.push(path)}},ThisExpression:function ThisExpression(path,state){if(!path.node[HARDCORE_THIS_REF]){state.thises.push(path)}},enter:function enter(path,state){var callback=state.specHandle;if(state.isLoose)callback=state.looseHandle;var isBareSuper=path.isCallExpression()&&path.get("callee").isSuper();var result=callback.call(state,path);if(result){state.hasSuper=true}if(isBareSuper){state.bareSupers.push(path)}if(result===true){path.requeue()}if(result!==true&&result){if(Array.isArray(result)){path.replaceWithMultiple(result)}else{path.replaceWith(result)}}}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments.length<=1||arguments[1]===undefined?false:arguments[1];(0,_classCallCheck3.default)(this,ReplaceSupers);this.forceSuperMemoisation=opts.forceSuperMemoisation;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=this.methodPath.scope;this.file=opts.file;this.opts=opts;this.bareSupers=[];this.returns=[];this.thises=[]}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed){return t.callExpression(this.file.addHelper("set"),[getPrototypeOfExpression(this.getObjectRef(),this.isStatic),isComputed?property:t.stringLiteral(property.name),value,t.thisExpression()])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed){return t.callExpression(this.file.addHelper("get"),[getPrototypeOfExpression(this.getObjectRef(),this.isStatic),isComputed?property:t.stringLiteral(property.name),t.thisExpression()])};ReplaceSupers.prototype.replace=function replace(){this.methodPath.traverse(visitor,this)};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){return}else if(t.isMemberExpression(parent)&&!methodNode.static){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(t.thisExpression());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed)}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path){var property=void 0;var computed=void 0;var args=void 0;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.buildCodeFrameError(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){return}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.numericLiteral(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node)}if(!property)return;var superProperty=this.getSuperProperty(property,computed);if(args){return this.optimiseCall(superProperty,args)}else{return superProperty}};ReplaceSupers.prototype.optimiseCall=function optimiseCall(callee,args){var thisNode=t.thisExpression();thisNode[HARDCORE_THIS_REF]=true;return(0,_babelHelperOptimiseCallExpression2.default)(callee,thisNode,args)};return ReplaceSupers}();exports.default=ReplaceSupers;module.exports=exports["default"]},{"babel-helper-optimise-call-expression":69,"babel-messages":76,"babel-runtime/core-js/symbol":148,"babel-runtime/helpers/classCallCheck":153,"babel-types":194}],74:[function(require,module,exports){"use strict";exports.__esModule=true;var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var helpers={};exports.default=helpers;helpers.typeof=(0,_babelTemplate2.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n');helpers.jsx=(0,_babelTemplate2.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n');helpers.asyncIterator=(0,_babelTemplate2.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n');helpers.asyncGenerator=(0,_babelTemplate2.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n');helpers.asyncGeneratorDelegate=(0,_babelTemplate2.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n');helpers.asyncToGenerator=(0,_babelTemplate2.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n');helpers.classCallCheck=(0,_babelTemplate2.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n');helpers.createClass=(0,_babelTemplate2.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n');helpers.defineEnumerableProperties=(0,_babelTemplate2.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n');helpers.defaults=(0,_babelTemplate2.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n");helpers.defineProperty=(0,_babelTemplate2.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n");helpers.extends=(0,_babelTemplate2.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n");helpers.get=(0,_babelTemplate2.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n');helpers.inherits=(0,_babelTemplate2.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n');helpers.instanceof=(0,_babelTemplate2.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n');helpers.interopRequireDefault=(0,_babelTemplate2.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n");helpers.interopRequireWildcard=(0,_babelTemplate2.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n");helpers.newArrowCheck=(0,_babelTemplate2.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n');helpers.objectDestructuringEmpty=(0,_babelTemplate2.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n');helpers.objectWithoutProperties=(0,_babelTemplate2.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n");helpers.possibleConstructorReturn=(0,_babelTemplate2.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n');helpers.selfGlobal=(0,_babelTemplate2.default)('\n typeof global === "undefined" ? self : global\n');helpers.set=(0,_babelTemplate2.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n');helpers.slicedToArray=(0,_babelTemplate2.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n');helpers.slicedToArrayLoose=(0,_babelTemplate2.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n');helpers.taggedTemplateLiteral=(0,_babelTemplate2.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n");helpers.taggedTemplateLiteralLoose=(0,_babelTemplate2.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n");helpers.temporalRef=(0,_babelTemplate2.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n');helpers.temporalUndefined=(0,_babelTemplate2.default)("\n ({})\n");helpers.toArray=(0,_babelTemplate2.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n");helpers.toConsumableArray=(0,_babelTemplate2.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n");module.exports=exports["default"]},{"babel-template":157}],75:[function(require,module,exports){"use strict";exports.__esModule=true;exports.list=undefined;var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);exports.get=get;var _helpers=require("./helpers");var _helpers2=_interopRequireDefault(_helpers);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function get(name){var fn=_helpers2.default[name];if(!fn)throw new ReferenceError("Unknown helper "+name);return fn().expression}var list=exports.list=(0,_keys2.default)(_helpers2.default).map(function(name){return name[0]==="_"?name.slice(1):name}).filter(function(name){return name!=="__esModule"});exports.default=get},{"./helpers":74,"babel-runtime/core-js/object/keys":146}],76:[function(require,module,exports){"use strict";exports.__esModule=true;exports.MESSAGES=undefined;var _stringify=require("babel-runtime/core-js/json/stringify");var _stringify2=_interopRequireDefault(_stringify);exports.get=get;exports.parseArgs=parseArgs;var _util=require("util");var util=_interopRequireWildcard(_util);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var MESSAGES=exports.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", -traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"};function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+(0,_stringify2.default)(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[i-1]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return(0,_stringify2.default)(val)||val+""}catch(e){return util.inspect(val)}}})}},{"babel-runtime/core-js/json/stringify":140,util:987}],77:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var messages=_ref.messages;return{visitor:{Scope:function Scope(_ref2){var scope=_ref2.scope;for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind!=="const"&&binding.kind!=="module")continue;for(var _iterator=binding.constantViolations,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref3;if(_isArray){if(_i>=_iterator.length)break;_ref3=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref3=_i.value}var violation=_ref3;throw violation.buildCodeFrameError(messages.get("readOnly",name))}}}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139}],78:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("asyncFunctions")}}};module.exports=exports["default"]},{}],79:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("classConstructorCall")}}};module.exports=exports["default"]},{}],80:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("classProperties")}}};module.exports=exports["default"]},{}],81:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("decorators")}}};module.exports=exports["default"]},{}],82:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("doExpressions")}}};module.exports=exports["default"]},{}],83:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("exponentiationOperator")}}};module.exports=exports["default"]},{}],84:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("exportExtensions")}}};module.exports=exports["default"]},{}],85:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("functionBind")}}};module.exports=exports["default"]},{}],86:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("objectRestSpread")}}};module.exports=exports["default"]},{}],87:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{manipulateOptions:function manipulateOptions(opts,parserOpts){parserOpts.plugins.push("trailingFunctionCommas")}}};module.exports=exports["default"]},{}],88:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{inherits:require("babel-plugin-syntax-async-functions"),visitor:{Function:function Function(path,state){if(!path.node.async||path.node.generator)return;(0,_babelHelperRemapAsyncToGenerator2.default)(path,state.file,{wrapAsync:state.addHelper("asyncToGenerator")})}}}};var _babelHelperRemapAsyncToGenerator=require("babel-helper-remap-async-to-generator");var _babelHelperRemapAsyncToGenerator2=_interopRequireDefault(_babelHelperRemapAsyncToGenerator);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-remap-async-to-generator":72,"babel-plugin-syntax-async-functions":78}],89:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);exports.default=function(_ref){var t=_ref.types;var ALREADY_VISITED=(0,_symbol2.default)();function findConstructorCall(path){var methods=path.get("body.body");for(var _iterator=methods,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var method=_ref2;if(method.node.kind==="constructorCall"){return method}}return null}function handleClassWithCall(constructorCall,classPath){var _classPath=classPath;var node=_classPath.node;var ref=node.id||classPath.scope.generateUidIdentifier("class");if(classPath.parentPath.isExportDefaultDeclaration()){classPath=classPath.parentPath;classPath.insertAfter(t.exportDefaultDeclaration(ref))}classPath.replaceWithMultiple(buildWrapper({CLASS_REF:classPath.scope.generateUidIdentifier(ref.name),CALL_REF:classPath.scope.generateUidIdentifier(ref.name+"Call"),CALL:t.functionExpression(null,constructorCall.node.params,constructorCall.node.body),CLASS:t.toExpression(node),WRAPPER_REF:ref}));constructorCall.remove()}return{inherits:require("babel-plugin-syntax-class-constructor-call"),visitor:{Class:function Class(path){if(path.node[ALREADY_VISITED])return;path.node[ALREADY_VISITED]=true;var constructorCall=findConstructorCall(path);if(constructorCall){handleClassWithCall(constructorCall,path)}else{return}}}}};var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildWrapper=(0,_babelTemplate2.default)("\n let CLASS_REF = CLASS;\n var CALL_REF = CALL;\n var WRAPPER_REF = function (...args) {\n if (this instanceof WRAPPER_REF) {\n return Reflect.construct(CLASS_REF, args);\n } else {\n return CALL_REF.apply(this, args);\n }\n };\n WRAPPER_REF.__proto__ = CLASS_REF;\n WRAPPER_REF;\n");module.exports=exports["default"]},{"babel-plugin-syntax-class-constructor-call":79,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/symbol":148,"babel-template":157}],90:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;var findBareSupers={Super:function Super(path){if(path.parentPath.isCallExpression({callee:path.node})){this.push(path.parentPath)}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(path){if(this.scope.hasOwnBinding(path.node.name)){this.collision=true;path.skip()}}};return{inherits:require("babel-plugin-syntax-class-properties"),visitor:{Class:function Class(path){var isDerived=!!path.node.superClass;var constructor=void 0;var props=[];var body=path.get("body");for(var _iterator=body.get("body"),_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var _path=_ref2;if(_path.isClassProperty()){props.push(_path)}else if(_path.isClassMethod({kind:"constructor"})){constructor=_path}}if(!props.length)return;var nodes=[];var ref=void 0;if(path.isClassExpression()||!path.node.id){(0,_babelHelperFunctionName2.default)(path);ref=path.scope.generateUidIdentifier("class")}else{ref=path.node.id}var instanceBody=[];for(var _iterator2=props,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var _prop=_ref3;var propNode=_prop.node;if(propNode.decorators&&propNode.decorators.length>0)continue;if(!propNode.value)continue;var isStatic=propNode.static;var isComputed=propNode.computed||t.isLiteral(_prop.key);if(isStatic){nodes.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(ref,propNode.key,isComputed),propNode.value)))}else{instanceBody.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(t.thisExpression(),propNode.key,isComputed),propNode.value)))}}if(instanceBody.length){if(!constructor){var newConstructor=t.classMethod("constructor",t.identifier("constructor"),[],t.blockStatement([]));if(isDerived){newConstructor.params=[t.restElement(t.identifier("args"))];newConstructor.body.body.push(t.returnStatement(t.callExpression(t.super(),[t.spreadElement(t.identifier("args"))])))}var _body$unshiftContaine=body.unshiftContainer("body",newConstructor);constructor=_body$unshiftContaine[0]}var collisionState={collision:false,scope:constructor.scope};for(var _iterator3=props,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref4;if(_isArray3){if(_i3>=_iterator3.length)break;_ref4=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref4=_i3.value}var prop=_ref4;prop.traverse(referenceVisitor,collisionState);if(collisionState.collision)break}if(collisionState.collision){var initialisePropsRef=path.scope.generateUidIdentifier("initialiseProps");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(initialisePropsRef,t.functionExpression(null,[],t.blockStatement(instanceBody)))]));instanceBody=[t.expressionStatement(t.callExpression(t.memberExpression(initialisePropsRef,t.identifier("call")),[t.thisExpression()]))]}if(isDerived){var bareSupers=[];constructor.traverse(findBareSupers,bareSupers);for(var _iterator4=bareSupers,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref5;if(_isArray4){if(_i4>=_iterator4.length)break;_ref5=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref5=_i4.value}var bareSuper=_ref5;bareSuper.insertAfter(instanceBody)}}else{constructor.get("body").unshiftContainer("body",instanceBody)}}for(var _iterator5=props,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref6;if(_isArray5){if(_i5>=_iterator5.length)break;_ref6=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref6=_i5.value}var _prop2=_ref6;_prop2.remove()}if(!nodes.length)return;if(path.isClassExpression()){path.scope.push({id:ref});path.replaceWith(t.assignmentExpression("=",ref,path.node))}else{if(!path.node.id){path.node.id=ref}if(path.parentPath.isExportDeclaration()){path=path.parentPath}}path.insertAfter(nodes)},ArrowFunctionExpression:function ArrowFunctionExpression(path){var classExp=path.get("body");if(!classExp.isClassExpression())return;var body=classExp.get("body");var members=body.get("body");if(members.some(function(member){return member.isClassProperty()})){path.ensureBlock()}}}}};var _babelHelperFunctionName=require("babel-helper-function-name");var _babelHelperFunctionName2=_interopRequireDefault(_babelHelperFunctionName);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-function-name":66,"babel-plugin-syntax-class-properties":80,"babel-runtime/core-js/get-iterator":139}],91:[function(require,module,exports){"use strict";exports.__esModule=true;var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;function cleanDecorators(decorators){return decorators.reverse().map(function(dec){return dec.expression})}function transformClass(path,ref,state){var nodes=[];state;var classDecorators=path.node.decorators;if(classDecorators){path.node.decorators=null;classDecorators=cleanDecorators(classDecorators);for(var _iterator=classDecorators,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var decorator=_ref2;nodes.push(buildClassDecorator({CLASS_REF:ref,DECORATOR:decorator}))}}var map=(0,_create2.default)(null);for(var _iterator2=path.get("body.body"),_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var method=_ref3;var decorators=method.node.decorators;if(!decorators)continue;var _alias=t.toKeyAlias(method.node);map[_alias]=map[_alias]||[];map[_alias].push(method.node);method.remove()}for(var alias in map){var items=map[alias];items}return nodes}function hasDecorators(path){if(path.isClass()){if(path.node.decorators)return true;for(var _iterator3=path.node.body.body,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref4;if(_isArray3){if(_i3>=_iterator3.length)break;_ref4=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref4=_i3.value}var method=_ref4;if(method.decorators){return true}}}else if(path.isObjectExpression()){for(var _iterator4=path.node.properties,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref5;if(_isArray4){if(_i4>=_iterator4.length)break;_ref5=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref5=_i4.value}var prop=_ref5;if(prop.decorators){return true}}}return false}function doError(path){throw path.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}return{inherits:require("babel-plugin-syntax-decorators"),visitor:{ClassExpression:function ClassExpression(path){if(!hasDecorators(path))return;doError(path);(0,_babelHelperExplodeClass2.default)(path);var ref=path.scope.generateDeclaredUidIdentifier("ref");var nodes=[];nodes.push(t.assignmentExpression("=",ref,path.node));nodes=nodes.concat(transformClass(path,ref,this));nodes.push(ref);path.replaceWith(t.sequenceExpression(nodes))},ClassDeclaration:function ClassDeclaration(path){if(!hasDecorators(path))return;doError(path);(0,_babelHelperExplodeClass2.default)(path);var ref=path.node.id;var nodes=[];nodes=nodes.concat(transformClass(path,ref,this).map(function(expr){return t.expressionStatement(expr)}));nodes.push(t.expressionStatement(ref));path.insertAfter(nodes)},ObjectExpression:function ObjectExpression(path){if(!hasDecorators(path))return;doError(path)}}}};var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelHelperExplodeClass=require("babel-helper-explode-class");var _babelHelperExplodeClass2=_interopRequireDefault(_babelHelperExplodeClass);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildClassDecorator=(0,_babelTemplate2.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");module.exports=exports["default"]},{"babel-helper-explode-class":65,"babel-plugin-syntax-decorators":81,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/object/create":144,"babel-template":157}],92:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{inherits:require("babel-plugin-syntax-do-expressions"),visitor:{DoExpression:function DoExpression(path){var body=path.node.body.body;if(body.length){path.replaceWithMultiple(body)}else{path.replaceWith(path.scope.buildUndefinedNode())}}}}};module.exports=exports["default"]},{"babel-plugin-syntax-do-expressions":82}],93:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var t=_ref.types;return{visitor:{ArrowFunctionExpression:function ArrowFunctionExpression(path,state){if(state.opts.spec){var node=path.node;if(node.shadow)return;node.shadow={this:false};node.type="FunctionExpression";var boundThis=t.thisExpression();boundThis._forceShadow=path;path.ensureBlock();path.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(state.addHelper("newArrowCheck"),[t.thisExpression(),boundThis])));path.replaceWith(t.callExpression(t.memberExpression(node,t.identifier("bind")),[t.thisExpression()]))}else{path.arrowFunctionToShadowed()}}}}};module.exports=exports["default"]},{}],94:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;function statementList(key,path){var paths=path.get(key);for(var _iterator=paths,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var _path=_ref2;var func=_path.node;if(!_path.isFunctionDeclaration())continue;var declar=t.variableDeclaration("let",[t.variableDeclarator(func.id,t.toExpression(func))]);declar._blockHoist=2;func.id=null;_path.replaceWith(declar)}}return{visitor:{BlockStatement:function BlockStatement(path){var node=path.node;var parent=path.parent;if(t.isFunction(parent,{body:node})||t.isExportDeclaration(parent)){return}statementList("body",path)},SwitchCase:function SwitchCase(path){statementList("consequent",path)}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139}],95:[function(require,module,exports){"use strict";exports.__esModule=true;var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);exports.default=function(){return{visitor:{VariableDeclaration:function VariableDeclaration(path,file){var node=path.node;var parent=path.parent;var scope=path.scope;if(!isBlockScoped(node))return;convertBlockScopedToVar(path,null,parent,scope,true);if(node._tdzThis){var nodes=[node];for(var i=0;i=0){return}loopText=loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.stringLiteral(loopText)}if(path.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.objectProperty(t.identifier("v"),node.argument||scope.buildUndefinedNode())])}if(replace){replace=t.returnStatement(replace);replace[this.LOOP_IGNORE]=true;path.skip();path.replaceWith(t.inherits(replace,node))}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){(0,_classCallCheck3.default)(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=(0,_create2.default)(null);this.hasLetReferences=false;this.letReferences=(0,_create2.default)(null);this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block)){this.updateScopeInfo();return}if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}this.updateScopeInfo();if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.updateScopeInfo=function updateScopeInfo(){var scope=this.scope;var parentScope=scope.getFunctionParent();var letRefs=this.letReferences;for(var key in letRefs){var ref=letRefs[key];var binding=scope.getBinding(ref.name);if(!binding)continue;if(binding.kind==="let"||binding.kind==="const"){binding.kind="var";scope.moveBindingTo(ref.name,parentScope)}}};BlockScoping.prototype.remap=function remap(){var letRefs=this.letReferences;var scope=this.scope;for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){if(scope.hasOwnBinding(key))scope.rename(ref.name);if(this.blockPath.scope.hasOwnBinding(key))this.blockPath.scope.rename(ref.name)}}};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=(0,_values2.default)(outsideRefs);var args=(0,_values2.default)(outsideRefs);var isSwitch=this.blockPath.isSwitchStatement();var fn=t.functionExpression(null,params,t.blockStatement(isSwitch?[block]:block.body));fn.shadow=true;this.addContinuations(fn);var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_babelTraverse2.default.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_babelTraverse2.default.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call);if(isSwitch)this.blockPath.replaceWithMultiple(this.body);else block.body=this.body};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var path=_ref;hasConstructor=path.equals("kind","constructor");if(hasConstructor)break}if(hasConstructor)return;var params=void 0,body=void 0;if(this.isDerived){var _constructor=buildDerivedConstructor().expression;params=_constructor.params;body=_constructor.body}else{params=[];body=t.blockStatement([])}this.path.get("body").unshiftContainer("body",t.classMethod("constructor",t.identifier("constructor"),params,body))};ClassTransformer.prototype.buildBody=function buildBody(){this.constructorMeMaybe();this.pushBody();this.verifyConstructor();if(this.userConstructor){var constructorBody=this.constructorBody;constructorBody.body=constructorBody.body.concat(this.userConstructor.body.body);t.inherits(this.constructor,this.userConstructor);t.inherits(constructorBody,this.userConstructor.body)}this.pushDescriptors()};ClassTransformer.prototype.pushBody=function pushBody(){var classBodyPaths=this.path.get("body.body");for(var _iterator2=classBodyPaths,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var path=_ref2;var node=path.node;if(path.isClassProperty()){throw path.buildCodeFrameError("Missing class properties transform.")}if(node.decorators){throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.")}if(t.isClassMethod(node)){var isConstructor=node.kind==="constructor";if(isConstructor){path.traverse(verifyConstructorVisitor,this);if(!this.hasBareSuper&&this.isDerived){throw path.buildCodeFrameError("missing super() call in constructor")}}var replaceSupers=new _babelHelperReplaceSupers2.default({forceSuperMemoisation:isConstructor,methodPath:path,methodNode:node,objectRef:this.classRef,superRef:this.superName,isStatic:node.static,isLoose:this.isLoose,scope:this.scope,file:this.file},true);replaceSupers.replace();if(isConstructor){this.pushConstructor(replaceSupers,node,path)}else{this.pushMethod(node,path)}}}};ClassTransformer.prototype.clearDescriptors=function clearDescriptors(){this.hasInstanceDescriptors=false;this.hasStaticDescriptors=false;this.instanceMutatorMap={};this.staticMutatorMap={}};ClassTransformer.prototype.pushDescriptors=function pushDescriptors(){this.pushInherits();var body=this.body;var instanceProps=void 0;var staticProps=void 0;if(this.hasInstanceDescriptors){instanceProps=defineMap.toClassObject(this.instanceMutatorMap)}if(this.hasStaticDescriptors){staticProps=defineMap.toClassObject(this.staticMutatorMap)}if(instanceProps||staticProps){if(instanceProps)instanceProps=defineMap.toComputedObjectFromClass(instanceProps);if(staticProps)staticProps=defineMap.toComputedObjectFromClass(staticProps);var nullNode=t.nullLiteral();var args=[this.classRef,nullNode,nullNode,nullNode,nullNode];if(instanceProps)args[1]=instanceProps;if(staticProps)args[2]=staticProps;if(this.instanceInitializersId){args[3]=this.instanceInitializersId;body.unshift(this.buildObjectAssignment(this.instanceInitializersId))}if(this.staticInitializersId){args[4]=this.staticInitializersId;body.unshift(this.buildObjectAssignment(this.staticInitializersId))}var lastNonNullIndex=0;for(var i=0;i=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var bareSuper=_ref3;this.wrapSuperCall(bareSuper,superRef,thisRef,body);if(guaranteedSuperBeforeFinish){bareSuper.find(function(parentPath){if(parentPath===path){return true}if(parentPath.isLoop()||parentPath.isConditional()){guaranteedSuperBeforeFinish=false;return true}})}}for(var _iterator4=this.superThises,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value}var thisPath=_ref4;thisPath.replaceWith(thisRef)}var wrapReturn=function wrapReturn(returnArg){return t.callExpression(_this2.file.addHelper("possibleConstructorReturn"),[thisRef].concat(returnArg||[]))};var bodyPaths=body.get("body");if(bodyPaths.length&&!bodyPaths.pop().isReturnStatement()){body.pushContainer("body",t.returnStatement(guaranteedSuperBeforeFinish?thisRef:wrapReturn()))}for(var _iterator5=this.superReturns,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref5;if(_isArray5){if(_i5>=_iterator5.length)break;_ref5=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref5=_i5.value}var returnPath=_ref5;if(returnPath.node.argument){var ref=returnPath.scope.generateDeclaredUidIdentifier("ret");returnPath.get("argument").replaceWithMultiple([t.assignmentExpression("=",ref,returnPath.node.argument),wrapReturn(ref)])}else{returnPath.get("argument").replaceWith(wrapReturn())}}};ClassTransformer.prototype.pushMethod=function pushMethod(node,path){var scope=path?path.scope:this.scope;if(node.kind==="method"){if(this._processMethod(node,scope))return}this.pushToMap(node,false,null,scope)};ClassTransformer.prototype._processMethod=function _processMethod(){return false};ClassTransformer.prototype.pushConstructor=function pushConstructor(replaceSupers,method,path){this.bareSupers=replaceSupers.bareSupers;this.superReturns=replaceSupers.returns;if(path.scope.hasOwnBinding(this.classRef.name)){path.scope.rename(this.classRef.name)}var construct=this.constructor;this.userConstructorPath=path;this.userConstructor=method;this.hasConstructor=true;t.inheritsComments(construct,method);construct._ignoreUserWhitespace=true;construct.params=method.params;t.inherits(construct.body,method.body);construct.body.directives=method.body.directives;this._pushConstructor()};ClassTransformer.prototype._pushConstructor=function _pushConstructor(){if(this.pushedConstructor)return;this.pushedConstructor=true;if(this.hasInstanceDescriptors||this.hasStaticDescriptors){this.pushDescriptors()}this.body.push(this.constructor);this.pushInherits()};ClassTransformer.prototype.pushInherits=function pushInherits(){if(!this.isDerived||this.pushedInherits)return;this.pushedInherits=true;this.body.unshift(t.expressionStatement(t.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName])))};return ClassTransformer}();exports.default=ClassTransformer;module.exports=exports["default"]},{"babel-helper-define-map":63,"babel-helper-optimise-call-expression":69,"babel-helper-replace-supers":73,"babel-runtime/core-js/get-iterator":139,"babel-runtime/helpers/classCallCheck":153,"babel-template":157,"babel-traverse":161,"babel-types":194}],100:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;var template=_ref.template;var buildMutatorMapAssign=template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");function getValue(prop){if(t.isObjectProperty(prop)){return prop.value}else if(t.isObjectMethod(prop)){return t.functionExpression(null,prop.params,prop.body,prop.generator,prop.async)}}function pushAssign(objId,prop,body){if(prop.kind==="get"&&prop.kind==="set"){pushMutatorDefine(objId,prop,body)}else{body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(objId,prop.key,prop.computed||t.isLiteral(prop.key)),getValue(prop))))}}function pushMutatorDefine(_ref2,prop){var objId=_ref2.objId;var body=_ref2.body;var getMutatorId=_ref2.getMutatorId;var scope=_ref2.scope;var key=!prop.computed&&t.isIdentifier(prop.key)?t.stringLiteral(prop.key.name):prop.key;var maybeMemoise=scope.maybeGenerateMemoised(key);if(maybeMemoise){body.push(t.expressionStatement(t.assignmentExpression("=",maybeMemoise,key)));key=maybeMemoise}body.push.apply(body,buildMutatorMapAssign({MUTATOR_MAP_REF:getMutatorId(),KEY:key,VALUE:getValue(prop),KIND:t.identifier(prop.kind)}))}function loose(info){for(var _iterator=info.computedProps,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref3;if(_isArray){if(_i>=_iterator.length)break;_ref3=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref3=_i.value}var prop=_ref3;if(prop.kind==="get"||prop.kind==="set"){pushMutatorDefine(info,prop)}else{pushAssign(info.objId,prop,info.body)}}}function spec(info){var objId=info.objId;var body=info.body;var computedProps=info.computedProps;var state=info.state;for(var _iterator2=computedProps,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref4;if(_isArray2){if(_i2>=_iterator2.length)break;_ref4=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref4=_i2.value}var prop=_ref4;var key=t.toComputedKey(prop);if(prop.kind==="get"||prop.kind==="set"){pushMutatorDefine(info,prop)}else if(t.isStringLiteral(key,{value:"__proto__"})){pushAssign(objId,prop,body)}else{if(computedProps.length===1){return t.callExpression(state.addHelper("defineProperty"),[info.initPropExpression,key,getValue(prop)])}else{body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"),[objId,key,getValue(prop)])))}}}}return{visitor:{ObjectExpression:{exit:function exit(path,state){var node=path.node;var parent=path.parent;var scope=path.scope;var hasComputed=false;for(var _iterator3=node.properties,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref5;if(_isArray3){if(_i3>=_iterator3.length)break;_ref5=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref5=_i3.value}var prop=_ref5;hasComputed=prop.computed===true;if(hasComputed)break}if(!hasComputed)return;var initProps=[];var computedProps=[];var foundComputed=false;for(var _iterator4=node.properties,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref6;if(_isArray4){if(_i4>=_iterator4.length)break;_ref6=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref6=_i4.value}var _prop=_ref6;if(_prop.computed){foundComputed=true}if(foundComputed){computedProps.push(_prop)}else{initProps.push(_prop)}}var objId=scope.generateUidIdentifierBasedOnNode(parent);var initPropExpression=t.objectExpression(initProps);var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(objId,initPropExpression)]));var callback=spec;if(state.opts.loose)callback=loose;var mutatorRef=void 0;var getMutatorId=function getMutatorId(){if(!mutatorRef){mutatorRef=scope.generateUidIdentifier("mutatorMap");body.push(t.variableDeclaration("var",[t.variableDeclarator(mutatorRef,t.objectExpression([]))]))}return mutatorRef};var single=callback({scope:scope,objId:objId,body:body,computedProps:computedProps,initPropExpression:initPropExpression,getMutatorId:getMutatorId,state:state});if(mutatorRef){body.push(t.expressionStatement(t.callExpression(state.addHelper("defineEnumerableProperties"),[objId,mutatorRef])))}if(single){path.replaceWith(single)}else{body.push(t.expressionStatement(objId));path.replaceWithMultiple(body)}}}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139}],101:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;function variableDeclarationHasPattern(node){for(var _iterator=node.declarations,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var declar=_ref2;if(t.isPattern(declar.id)){return true}}return false}function hasRest(pattern){for(var _iterator2=pattern.elements,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var elem=_ref3;if(t.isRestElement(elem)){return true}}return false}var arrayUnpackVisitor={ReferencedIdentifier:function ReferencedIdentifier(path,state){if(state.bindings[path.node.name]){state.deopt=true;path.stop()}}};var DestructuringTransformer=function(){function DestructuringTransformer(opts){(0,_classCallCheck3.default)(this,DestructuringTransformer);this.blockHoist=opts.blockHoist;this.operator=opts.operator;this.arrays={};this.nodes=opts.nodes||[];this.scope=opts.scope;this.file=opts.file;this.kind=opts.kind}DestructuringTransformer.prototype.buildVariableAssignment=function buildVariableAssignment(id,init){var op=this.operator;if(t.isMemberExpression(id))op="=";var node=void 0;if(op){node=t.expressionStatement(t.assignmentExpression(op,id,init))}else{node=t.variableDeclaration(this.kind,[t.variableDeclarator(id,init)])}node._blockHoist=this.blockHoist;return node};DestructuringTransformer.prototype.buildVariableDeclaration=function buildVariableDeclaration(id,init){var declar=t.variableDeclaration("var",[t.variableDeclarator(id,init)]);declar._blockHoist=this.blockHoist;return declar};DestructuringTransformer.prototype.push=function push(id,init){if(t.isObjectPattern(id)){this.pushObjectPattern(id,init)}else if(t.isArrayPattern(id)){this.pushArrayPattern(id,init)}else if(t.isAssignmentPattern(id)){this.pushAssignmentPattern(id,init)}else{this.nodes.push(this.buildVariableAssignment(id,init))}};DestructuringTransformer.prototype.toArray=function toArray(node,count){if(this.file.opts.loose||t.isIdentifier(node)&&this.arrays[node.name]){return node}else{return this.scope.toArray(node,count)}};DestructuringTransformer.prototype.pushAssignmentPattern=function pushAssignmentPattern(pattern,valueRef){var tempValueRef=this.scope.generateUidIdentifierBasedOnNode(valueRef);var declar=t.variableDeclaration("var",[t.variableDeclarator(tempValueRef,valueRef)]);declar._blockHoist=this.blockHoist;this.nodes.push(declar);var tempConditional=t.conditionalExpression(t.binaryExpression("===",tempValueRef,t.identifier("undefined")),pattern.right,tempValueRef);var left=pattern.left;if(t.isPattern(left)){var tempValueDefault=t.expressionStatement(t.assignmentExpression("=",tempValueRef,tempConditional));tempValueDefault._blockHoist=this.blockHoist;this.nodes.push(tempValueDefault);this.push(left,tempValueRef)}else{this.nodes.push(this.buildVariableAssignment(left,tempConditional))}};DestructuringTransformer.prototype.pushObjectRest=function pushObjectRest(pattern,objRef,spreadProp,spreadPropIndex){var keys=[];for(var i=0;i=spreadPropIndex)break;if(t.isRestProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.stringLiteral(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("objectWithoutProperties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef); -}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"),[objRef])))}if(pattern.properties.length>1&&!this.scope.isStatic(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length=_iterator3.length)break;_ref4=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref4=_i3.value}var elem=_ref4;if(!elem)return false;if(t.isMemberExpression(elem))return false}for(var _iterator4=arr.elements,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref5;if(_isArray4){if(_i4>=_iterator4.length)break;_ref5=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref5=_i4.value}var _elem=_ref5;if(t.isSpreadElement(_elem))return false;if(t.isCallExpression(_elem))return false;if(t.isMemberExpression(_elem))return false}var bindings=t.getBindingIdentifiers(pattern);var state={deopt:false,bindings:bindings};this.scope.traverse(arr,arrayUnpackVisitor,state);return!state.deopt};DestructuringTransformer.prototype.pushUnpackedArrayPattern=function pushUnpackedArrayPattern(pattern,arr){for(var i=0;i0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.numericLiteral(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.numericLiteral(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}();return{visitor:{ExportNamedDeclaration:function ExportNamedDeclaration(path){var declaration=path.get("declaration");if(!declaration.isVariableDeclaration())return;if(!variableDeclarationHasPattern(declaration.node))return;var specifiers=[];for(var name in path.getOuterBindingIdentifiers(path)){var id=t.identifier(name);specifiers.push(t.exportSpecifier(id,id))}path.replaceWith(declaration.node);path.insertAfter(t.exportNamedDeclaration(null,specifiers))},ForXStatement:function ForXStatement(path,file){var node=path.node;var scope=path.scope;var left=node.left;if(t.isPattern(left)){var temp=scope.generateUidIdentifier("ref");node.left=t.variableDeclaration("var",[t.variableDeclarator(temp)]);path.ensureBlock();node.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(left,temp)]));return}if(!t.isVariableDeclaration(left))return;var pattern=left.declarations[0].id;if(!t.isPattern(pattern))return;var key=scope.generateUidIdentifier("ref");node.left=t.variableDeclaration(left.kind,[t.variableDeclarator(key,null)]);var nodes=[];var destructuring=new DestructuringTransformer({kind:left.kind,file:file,scope:scope,nodes:nodes});destructuring.init(pattern,key);path.ensureBlock();var block=node.body;block.body=nodes.concat(block.body)},CatchClause:function CatchClause(_ref6,file){var node=_ref6.node;var scope=_ref6.scope;var pattern=node.param;if(!t.isPattern(pattern))return;var ref=scope.generateUidIdentifier("ref");node.param=ref;var nodes=[];var destructuring=new DestructuringTransformer({kind:"let",file:file,scope:scope,nodes:nodes});destructuring.init(pattern,ref);node.body.body=nodes.concat(node.body.body)},AssignmentExpression:function AssignmentExpression(path,file){var node=path.node;var scope=path.scope;if(!t.isPattern(node.left))return;var nodes=[];var destructuring=new DestructuringTransformer({operator:node.operator,file:file,scope:scope,nodes:nodes});var ref=void 0;if(path.isCompletionRecord()||!path.parentPath.isExpressionStatement()){ref=scope.generateUidIdentifierBasedOnNode(node.right,"ref");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(ref,node.right)]));if(t.isArrayExpression(node.right)){destructuring.arrays[ref.name]=true}}destructuring.init(node.left,ref||node.right);if(ref){nodes.push(t.expressionStatement(ref))}path.replaceWithMultiple(nodes)},VariableDeclaration:function VariableDeclaration(path,file){var node=path.node;var scope=path.scope;var parent=path.parent;if(t.isForXStatement(parent))return;if(!parent||!path.container)return;if(!variableDeclarationHasPattern(node))return;var nodes=[];var declar=void 0;for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var prop=_ref;var name=getName(prop.key);var isDuplicate=false;switch(prop.kind){case"get":if(alreadySeenData[name]||alreadySeenGetters[name]){isDuplicate=true}alreadySeenGetters[name]=true;break;case"set":if(alreadySeenData[name]||alreadySeenSetters[name]){isDuplicate=true}alreadySeenSetters[name]=true;break;default:if(alreadySeenData[name]||alreadySeenGetters[name]||alreadySeenSetters[name]){isDuplicate=true}alreadySeenData[name]=true}if(isDuplicate){prop.computed=true;prop.key=t.stringLiteral(name)}}}}}};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function getName(key){if(t.isIdentifier(key)){return key.name}return key.value.toString()}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/object/create":144,"babel-types":194}],103:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var messages=_ref.messages;var template=_ref.template;var t=_ref.types;var buildForOfArray=template("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n ");var buildForOfLoose=template("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n ");var buildForOf=template("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");function _ForOfStatementArray(path){var node=path.node;var scope=path.scope;var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=buildForOfArray({BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(path.parentPath.isLabeledStatement()){loop=t.labeledStatement(path.parentPath.node.label,loop)}nodes.push(loop);return nodes}return{visitor:{ForOfStatement:function ForOfStatement(path,state){if(path.get("right").isArrayExpression()){return path.replaceWithMultiple(_ForOfStatementArray.call(this,path,state))}var callback=spec;if(state.opts.loose)callback=loose;var node=path.node;var build=callback(path,state);var declar=build.declar;var loop=build.loop;var block=loop.body;path.ensureBlock();if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){path.parentPath.replaceWithMultiple(build.node);path.remove()}else{path.replaceWithMultiple(build.node)}}}};function loose(path,file){var node=path.node;var scope=path.scope;var left=node.left;var declar=void 0,id=void 0;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.buildCodeFrameError(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=buildForOfLoose({LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}}function spec(path,file){var node=path.node;var scope=path.scope;var parent=path.parent;var left=node.left;var declar=void 0;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.buildCodeFrameError(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=buildForOf({ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}};module.exports=exports["default"]},{}],104:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{visitor:{"ArrowFunctionExpression|FunctionExpression":{exit:function exit(path){if(path.key!=="value"&&!path.parentPath.isObjectProperty()){var replacement=(0,_babelHelperFunctionName2.default)(path);if(replacement)path.replaceWith(replacement)}}},ObjectProperty:function ObjectProperty(path){var value=path.get("value");if(value.isFunction()){var newNode=(0,_babelHelperFunctionName2.default)(value);if(newNode)value.replaceWith(newNode)}}}}};var _babelHelperFunctionName=require("babel-helper-function-name");var _babelHelperFunctionName2=_interopRequireDefault(_babelHelperFunctionName);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-function-name":66}],105:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{visitor:{NumericLiteral:function NumericLiteral(_ref){var node=_ref.node;if(node.extra&&/^0[ob]/i.test(node.extra.raw)){node.extra=undefined}},StringLiteral:function StringLiteral(_ref2){var node=_ref2.node;if(node.extra&&/\\[u]/gi.test(node.extra.raw)){node.extra=undefined}}}}};module.exports=exports["default"]},{}],106:[function(require,module,exports){"use strict";exports.__esModule=true;var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);exports.default=function(_ref){var t=_ref.types;function isValidRequireCall(path){if(!path.isCallExpression())return false;if(!path.get("callee").isIdentifier({name:"require"}))return false;if(path.scope.getBinding("require"))return false;var args=path.get("arguments");if(args.length!==1)return false;var arg=args[0];if(!arg.isStringLiteral())return false;return true}var amdVisitor={ReferencedIdentifier:function ReferencedIdentifier(_ref2){var node=_ref2.node;var scope=_ref2.scope;if(node.name==="exports"&&!scope.getBinding("exports")){this.hasExports=true}if(node.name==="module"&&!scope.getBinding("module")){this.hasModule=true}},CallExpression:function CallExpression(path){if(!isValidRequireCall(path))return;this.bareSources.push(path.node.arguments[0]);path.remove()},VariableDeclarator:function VariableDeclarator(path){var id=path.get("id");if(!id.isIdentifier())return;var init=path.get("init");if(!isValidRequireCall(init))return;var source=init.node.arguments[0];this.sourceNames[source.value]=true;this.sources.push([id.node,source]);path.remove()}};return{inherits:require("babel-plugin-transform-es2015-modules-commonjs"),pre:function pre(){this.sources=[];this.sourceNames=(0,_create2.default)(null);this.bareSources=[];this.hasExports=false;this.hasModule=false},visitor:{Program:{exit:function exit(path){var _this=this;if(this.ran)return;this.ran=true;path.traverse(amdVisitor,this);var params=this.sources.map(function(source){return source[0]});var sources=this.sources.map(function(source){return source[1]});sources=sources.concat(this.bareSources.filter(function(str){return!_this.sourceNames[str.value]}));var moduleName=this.getModuleName();if(moduleName)moduleName=t.stringLiteral(moduleName);if(this.hasExports){sources.unshift(t.stringLiteral("exports"));params.unshift(t.identifier("exports"))}if(this.hasModule){sources.unshift(t.stringLiteral("module"));params.unshift(t.identifier("module"))}var node=path.node;var factory=buildFactory({PARAMS:params,BODY:node.body});factory.expression.body.directives=node.directives;node.directives=[];node.body=[buildDefine({MODULE_NAME:moduleName,SOURCES:sources,FACTORY:factory})]}}}}};var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildDefine=(0,_babelTemplate2.default)("\n define(MODULE_NAME, [SOURCES], FACTORY);\n");var buildFactory=(0,_babelTemplate2.default)("\n (function (PARAMS) {\n BODY;\n })\n");module.exports=exports["default"]},{"babel-plugin-transform-es2015-modules-commonjs":107,"babel-runtime/core-js/object/create":144,"babel-template":157}],107:[function(require,module,exports){"use strict";exports.__esModule=true;var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);exports.default=function(){var REASSIGN_REMAP_SKIP=(0,_symbol2.default)();var reassignmentVisitor={ReferencedIdentifier:function ReferencedIdentifier(path){var name=path.node.name;var remap=this.remaps[name];if(!remap)return;if(this.scope.getBinding(name)!==path.scope.getBinding(name))return;if(path.parentPath.isCallExpression({callee:path.node})){path.replaceWith(t.sequenceExpression([t.numericLiteral(0),remap]))}else{path.replaceWith(remap)}this.requeueInParent(path)},AssignmentExpression:function AssignmentExpression(path){var node=path.node;if(node[REASSIGN_REMAP_SKIP])return;var left=path.get("left");if(!left.isIdentifier())return;var name=left.node.name;var exports=this.exports[name];if(!exports)return;if(this.scope.getBinding(name)!==path.scope.getBinding(name))return;node[REASSIGN_REMAP_SKIP]=true;for(var _iterator=exports,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var reid=_ref;node=buildExportsAssignment(reid,node).expression}path.replaceWith(node);this.requeueInParent(path)},UpdateExpression:function UpdateExpression(path){var arg=path.get("argument");if(!arg.isIdentifier())return;var name=arg.node.name;var exports=this.exports[name];if(!exports)return;if(this.scope.getBinding(name)!==path.scope.getBinding(name))return;var node=t.assignmentExpression(path.node.operator[0]+"=",arg.node,t.numericLiteral(1));if(path.parentPath.isExpressionStatement()&&!path.isCompletionRecord()||path.node.prefix){path.replaceWith(node);this.requeueInParent(path);return}var nodes=[];nodes.push(node);var operator=void 0;if(path.node.operator==="--"){operator="+"}else{operator="-"}nodes.push(t.binaryExpression(operator,arg.node,t.numericLiteral(1)));path.replaceWithMultiple(t.sequenceExpression(nodes))}};return{inherits:require("babel-plugin-transform-strict-mode"),visitor:{ThisExpression:function ThisExpression(path,state){if(this.ranCommonJS)return;if(state.opts.allowTopLevelThis!==true&&!path.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){path.replaceWith(t.identifier("undefined"))}},Program:{exit:function exit(path){this.ranCommonJS=true;var strict=!!this.opts.strict;var scope=path.scope;scope.rename("module");scope.rename("exports");scope.rename("require");var hasExports=false;var hasImports=false;var body=path.get("body");var imports=(0,_create2.default)(null);var exports=(0,_create2.default)(null);var nonHoistedExportNames=(0,_create2.default)(null);var topNodes=[];var remaps=(0,_create2.default)(null);var requires=(0,_create2.default)(null);function addRequire(source,blockHoist){var cached=requires[source];if(cached)return cached;var ref=path.scope.generateUidIdentifier((0,_path2.basename)(source,(0,_path2.extname)(source)));var varDecl=t.variableDeclaration("var",[t.variableDeclarator(ref,buildRequire(t.stringLiteral(source)).expression)]);if(imports[source]){varDecl.loc=imports[source].loc}if(typeof blockHoist==="number"&&blockHoist>0){varDecl._blockHoist=blockHoist}topNodes.push(varDecl);return requires[source]=ref}function addTo(obj,key,arr){var existing=obj[key]||[];obj[key]=existing.concat(arr)}for(var _iterator2=body,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _path=_ref2;if(_path.isExportDeclaration()){hasExports=true;var specifiers=[].concat(_path.get("declaration"),_path.get("specifiers"));for(var _iterator4=specifiers,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value}var _specifier2=_ref4;var ids=_specifier2.getBindingIdentifiers();if(ids.__esModule){throw _specifier2.buildCodeFrameError('Illegal export "__esModule"')}}}if(_path.isImportDeclaration()){var _importsEntry$specifi;hasImports=true;var key=_path.node.source.value;var importsEntry=imports[key]||{specifiers:[],maxBlockHoist:0,loc:_path.node.loc};(_importsEntry$specifi=importsEntry.specifiers).push.apply(_importsEntry$specifi,_path.node.specifiers);if(typeof _path.node._blockHoist==="number"){importsEntry.maxBlockHoist=Math.max(_path.node._blockHoist,importsEntry.maxBlockHoist)}imports[key]=importsEntry;_path.remove()}else if(_path.isExportDefaultDeclaration()){var declaration=_path.get("declaration");if(declaration.isFunctionDeclaration()){var id=declaration.node.id;var defNode=t.identifier("default");if(id){addTo(exports,id.name,defNode);topNodes.push(buildExportsAssignment(defNode,id));_path.replaceWith(declaration.node)}else{topNodes.push(buildExportsAssignment(defNode,t.toExpression(declaration.node)));_path.remove()}}else if(declaration.isClassDeclaration()){var _id=declaration.node.id;var _defNode=t.identifier("default");if(_id){addTo(exports,_id.name,_defNode);_path.replaceWithMultiple([declaration.node,buildExportsAssignment(_defNode,_id)])}else{_path.replaceWith(buildExportsAssignment(_defNode,t.toExpression(declaration.node)));_path.parentPath.requeue(_path.get("expression.left"))}}else{_path.replaceWith(buildExportsAssignment(t.identifier("default"),declaration.node));_path.parentPath.requeue(_path.get("expression.left"))}}else if(_path.isExportNamedDeclaration()){var _declaration=_path.get("declaration");if(_declaration.node){if(_declaration.isFunctionDeclaration()){var _id2=_declaration.node.id;addTo(exports,_id2.name,_id2);topNodes.push(buildExportsAssignment(_id2,_id2));_path.replaceWith(_declaration.node)}else if(_declaration.isClassDeclaration()){var _id3=_declaration.node.id;addTo(exports,_id3.name,_id3);_path.replaceWithMultiple([_declaration.node,buildExportsAssignment(_id3,_id3)]);nonHoistedExportNames[_id3.name]=true}else if(_declaration.isVariableDeclaration()){var declarators=_declaration.get("declarations");for(var _iterator5=declarators,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref5;if(_isArray5){if(_i5>=_iterator5.length)break;_ref5=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref5=_i5.value}var decl=_ref5;var _id4=decl.get("id");var init=decl.get("init");if(!init.node)init.replaceWith(t.identifier("undefined"));if(_id4.isIdentifier()){addTo(exports,_id4.node.name,_id4.node);init.replaceWith(buildExportsAssignment(_id4.node,init.node).expression);nonHoistedExportNames[_id4.node.name]=true}else{}}_path.replaceWith(_declaration.node)}continue}var _specifiers=_path.get("specifiers");var nodes=[];var _source=_path.node.source;if(_source){var ref=addRequire(_source.value,_path.node._blockHoist);for(var _iterator6=_specifiers,_isArray6=Array.isArray(_iterator6),_i6=0,_iterator6=_isArray6?_iterator6:(0,_getIterator3.default)(_iterator6);;){var _ref6;if(_isArray6){if(_i6>=_iterator6.length)break;_ref6=_iterator6[_i6++]}else{_i6=_iterator6.next();if(_i6.done)break;_ref6=_i6.value}var _specifier3=_ref6;if(_specifier3.isExportNamespaceSpecifier()){}else if(_specifier3.isExportDefaultSpecifier()){}else if(_specifier3.isExportSpecifier()){if(_specifier3.node.local.name==="default"){topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name),t.memberExpression(t.callExpression(this.addHelper("interopRequireDefault"),[ref]),_specifier3.node.local)))}else{topNodes.push(buildExportsFrom(t.stringLiteral(_specifier3.node.exported.name),t.memberExpression(ref,_specifier3.node.local)))}nonHoistedExportNames[_specifier3.node.exported.name]=true}}}else{for(var _iterator7=_specifiers,_isArray7=Array.isArray(_iterator7),_i7=0,_iterator7=_isArray7?_iterator7:(0,_getIterator3.default)(_iterator7);;){var _ref7;if(_isArray7){if(_i7>=_iterator7.length)break;_ref7=_iterator7[_i7++]}else{_i7=_iterator7.next();if(_i7.done)break;_ref7=_i7.value}var _specifier4=_ref7;if(_specifier4.isExportSpecifier()){addTo(exports,_specifier4.node.local.name,_specifier4.node.exported);nonHoistedExportNames[_specifier4.node.exported.name]=true;nodes.push(buildExportsAssignment(_specifier4.node.exported,_specifier4.node.local))}}}_path.replaceWithMultiple(nodes)}else if(_path.isExportAllDeclaration()){var exportNode=buildExportAll({OBJECT:addRequire(_path.node.source.value,_path.node._blockHoist)});exportNode.loc=_path.node.loc;topNodes.push(exportNode);_path.remove()}}for(var source in imports){var _imports$source=imports[source];var specifiers=_imports$source.specifiers;var maxBlockHoist=_imports$source.maxBlockHoist;if(specifiers.length){var uid=addRequire(source,maxBlockHoist);var wildcard=void 0;for(var i=0;i0){varDecl._blockHoist=maxBlockHoist}topNodes.push(varDecl)}wildcard=specifier.local}else if(t.isImportDefaultSpecifier(specifier)){specifiers[i]=t.importSpecifier(specifier.local,t.identifier("default"))}}for(var _iterator3=specifiers,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var _specifier=_ref3;if(t.isImportSpecifier(_specifier)){var target=uid;if(_specifier.imported.name==="default"){if(wildcard){target=wildcard}else{target=wildcard=path.scope.generateUidIdentifier(uid.name);var _varDecl=t.variableDeclaration("var",[t.variableDeclarator(target,t.callExpression(this.addHelper("interopRequireDefault"),[uid]))]);if(maxBlockHoist>0){_varDecl._blockHoist=maxBlockHoist}topNodes.push(_varDecl)}}remaps[_specifier.local.name]=t.memberExpression(target,t.cloneWithoutLoc(_specifier.imported))}}}else{var requireNode=buildRequire(t.stringLiteral(source));requireNode.loc=imports[source].loc;topNodes.push(requireNode)}}if(hasImports&&(0,_keys2.default)(nonHoistedExportNames).length){var hoistedExportsNode=t.identifier("undefined");for(var name in nonHoistedExportNames){hoistedExportsNode=buildExportsAssignment(t.identifier(name),hoistedExportsNode).expression}var node=t.expressionStatement(hoistedExportsNode);node._blockHoist=3;topNodes.unshift(node)}if(hasExports&&!strict){var buildTemplate=buildExportsModuleDeclaration;if(this.opts.loose)buildTemplate=buildLooseExportsModuleDeclaration;var declar=buildTemplate();declar._blockHoist=3;topNodes.unshift(declar)}path.unshiftContainer("body",topNodes);path.traverse(reassignmentVisitor,{remaps:remaps,scope:scope,exports:exports,requeueInParent:function requeueInParent(newPath){return path.requeue(newPath)}})}}}}};var _path2=require("path");var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildRequire=(0,_babelTemplate2.default)("\n require($0);\n");var buildExportsModuleDeclaration=(0,_babelTemplate2.default)('\n Object.defineProperty(exports, "__esModule", {\n value: true\n });\n');var buildExportsFrom=(0,_babelTemplate2.default)("\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n");var buildLooseExportsModuleDeclaration=(0,_babelTemplate2.default)("\n exports.__esModule = true;\n");var buildExportsAssignment=(0,_babelTemplate2.default)("\n exports.$0 = $1;\n");var buildExportAll=(0,_babelTemplate2.default)('\n Object.keys(OBJECT).forEach(function (key) {\n if (key === "default" || key === "__esModule") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n');var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassProperty","ClassMethod","ObjectMethod"];module.exports=exports["default"]},{"babel-plugin-transform-strict-mode":132,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/object/create":144,"babel-runtime/core-js/object/keys":146,"babel-runtime/core-js/symbol":148,"babel-template":157,"babel-types":194,path:884}],108:[function(require,module,exports){"use strict";exports.__esModule=true;var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);exports.default=function(_ref){var t=_ref.types;var IGNORE_REASSIGNMENT_SYMBOL=(0,_symbol2.default)();var reassignmentVisitor={"AssignmentExpression|UpdateExpression":function AssignmentExpressionUpdateExpression(path){if(path.node[IGNORE_REASSIGNMENT_SYMBOL])return; -path.node[IGNORE_REASSIGNMENT_SYMBOL]=true;var arg=path.get(path.isAssignmentExpression()?"left":"argument");if(!arg.isIdentifier())return;var name=arg.node.name;if(this.scope.getBinding(name)!==path.scope.getBinding(name))return;var exportedNames=this.exports[name];if(!exportedNames)return;var node=path.node;var isPostUpdateExpression=path.isUpdateExpression()&&!node.prefix;if(isPostUpdateExpression){if(node.operator==="++")node=t.binaryExpression("+",node.argument,t.numericLiteral(1));else if(node.operator==="--")node=t.binaryExpression("-",node.argument,t.numericLiteral(1));else isPostUpdateExpression=false}for(var _iterator=exportedNames,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var exportedName=_ref2;node=this.buildCall(exportedName,node).expression}if(isPostUpdateExpression)node=t.sequenceExpression([node,path.node]);path.replaceWith(node)}};return{visitor:{ReferencedIdentifier:function ReferencedIdentifier(path,state){if(path.node.name=="__moduleName"&&!path.scope.hasBinding("__moduleName")){path.replaceWith(t.memberExpression(state.contextIdent,t.identifier("id")))}},Program:{enter:function enter(path,state){state.contextIdent=path.scope.generateUidIdentifier("context")},exit:function exit(path,state){var exportIdent=path.scope.generateUidIdentifier("export");var contextIdent=state.contextIdent;var exportNames=(0,_create2.default)(null);var modules=(0,_create2.default)(null);var beforeBody=[];var setters=[];var sources=[];var variableIds=[];var removedPaths=[];function addExportName(key,val){exportNames[key]=exportNames[key]||[];exportNames[key].push(val)}function pushModule(source,key,specifiers){var _modules=modules[source]=modules[source]||{imports:[],exports:[]};_modules[key]=_modules[key].concat(specifiers)}function buildExportCall(name,val){return t.expressionStatement(t.callExpression(exportIdent,[t.stringLiteral(name),val]))}var body=path.get("body");var canHoist=true;for(var _iterator2=body,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var _path=_ref3;if(_path.isExportDeclaration())_path=_path.get("declaration");if(_path.isVariableDeclaration()&&_path.node.kind!=="var"){canHoist=false;break}}for(var _iterator3=body,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref4;if(_isArray3){if(_i3>=_iterator3.length)break;_ref4=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref4=_i3.value}var _path2=_ref4;if(canHoist&&_path2.isFunctionDeclaration()){beforeBody.push(_path2.node);removedPaths.push(_path2)}else if(_path2.isImportDeclaration()){var _source=_path2.node.source.value;pushModule(_source,"imports",_path2.node.specifiers);for(var name in _path2.getBindingIdentifiers()){_path2.scope.removeBinding(name);variableIds.push(t.identifier(name))}_path2.remove()}else if(_path2.isExportAllDeclaration()){pushModule(_path2.node.source.value,"exports",_path2.node);_path2.remove()}else if(_path2.isExportDefaultDeclaration()){var declar=_path2.get("declaration");if(declar.isClassDeclaration()||declar.isFunctionDeclaration()){var id=declar.node.id;var nodes=[];if(id){nodes.push(declar.node);nodes.push(buildExportCall("default",id));addExportName(id.name,"default")}else{nodes.push(buildExportCall("default",t.toExpression(declar.node)))}if(!canHoist||declar.isClassDeclaration()){_path2.replaceWithMultiple(nodes)}else{beforeBody=beforeBody.concat(nodes);removedPaths.push(_path2)}}else{_path2.replaceWith(buildExportCall("default",declar.node))}}else if(_path2.isExportNamedDeclaration()){var _declar=_path2.get("declaration");if(_declar.node){_path2.replaceWith(_declar);var _nodes=[];var bindingIdentifiers=void 0;if(_path2.isFunction()){var _node=_declar.node;var _name=_node.id.name;if(canHoist){addExportName(_name,_name);beforeBody.push(_node);beforeBody.push(buildExportCall(_name,_node.id));removedPaths.push(_path2)}else{var _bindingIdentifiers;bindingIdentifiers=(_bindingIdentifiers={},_bindingIdentifiers[_name]=_node.id,_bindingIdentifiers)}}else{bindingIdentifiers=_declar.getBindingIdentifiers()}for(var _name2 in bindingIdentifiers){addExportName(_name2,_name2);_nodes.push(buildExportCall(_name2,t.identifier(_name2)))}_path2.insertAfter(_nodes)}else{var _specifiers=_path2.node.specifiers;if(_specifiers&&_specifiers.length){if(_path2.node.source){pushModule(_path2.node.source.value,"exports",_specifiers);_path2.remove()}else{var _nodes2=[];for(var _iterator7=_specifiers,_isArray7=Array.isArray(_iterator7),_i7=0,_iterator7=_isArray7?_iterator7:(0,_getIterator3.default)(_iterator7);;){var _ref8;if(_isArray7){if(_i7>=_iterator7.length)break;_ref8=_iterator7[_i7++]}else{_i7=_iterator7.next();if(_i7.done)break;_ref8=_i7.value}var _specifier=_ref8;_nodes2.push(buildExportCall(_specifier.exported.name,_specifier.local));addExportName(_specifier.local.name,_specifier.exported.name)}_path2.replaceWithMultiple(_nodes2)}}}}}for(var source in modules){var specifiers=modules[source];var setterBody=[];var target=path.scope.generateUidIdentifier(source);for(var _iterator4=specifiers.imports,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref5;if(_isArray4){if(_i4>=_iterator4.length)break;_ref5=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref5=_i4.value}var specifier=_ref5;if(t.isImportNamespaceSpecifier(specifier)){setterBody.push(t.expressionStatement(t.assignmentExpression("=",specifier.local,target)))}else if(t.isImportDefaultSpecifier(specifier)){specifier=t.importSpecifier(specifier.local,t.identifier("default"))}if(t.isImportSpecifier(specifier)){setterBody.push(t.expressionStatement(t.assignmentExpression("=",specifier.local,t.memberExpression(target,specifier.imported))))}}if(specifiers.exports.length){var exportObjRef=path.scope.generateUidIdentifier("exportObj");setterBody.push(t.variableDeclaration("var",[t.variableDeclarator(exportObjRef,t.objectExpression([]))]));for(var _iterator5=specifiers.exports,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref6;if(_isArray5){if(_i5>=_iterator5.length)break;_ref6=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref6=_i5.value}var node=_ref6;if(t.isExportAllDeclaration(node)){setterBody.push(buildExportAll({KEY:path.scope.generateUidIdentifier("key"),EXPORT_OBJ:exportObjRef,TARGET:target}))}else if(t.isExportSpecifier(node)){setterBody.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(exportObjRef,node.exported),t.memberExpression(target,node.local))))}else{}}setterBody.push(t.expressionStatement(t.callExpression(exportIdent,[exportObjRef])))}sources.push(t.stringLiteral(source));setters.push(t.functionExpression(null,[target],t.blockStatement(setterBody)))}var moduleName=this.getModuleName();if(moduleName)moduleName=t.stringLiteral(moduleName);if(canHoist){(0,_babelHelperHoistVariables2.default)(path,function(id){return variableIds.push(id)})}if(variableIds.length){beforeBody.unshift(t.variableDeclaration("var",variableIds.map(function(id){return t.variableDeclarator(id)})))}path.traverse(reassignmentVisitor,{exports:exportNames,buildCall:buildExportCall,scope:path.scope});for(var _iterator6=removedPaths,_isArray6=Array.isArray(_iterator6),_i6=0,_iterator6=_isArray6?_iterator6:(0,_getIterator3.default)(_iterator6);;){var _ref7;if(_isArray6){if(_i6>=_iterator6.length)break;_ref7=_iterator6[_i6++]}else{_i6=_iterator6.next();if(_i6.done)break;_ref7=_i6.value}var _path3=_ref7;_path3.remove()}path.node.body=[buildTemplate({SYSTEM_REGISTER:t.memberExpression(t.identifier(state.opts.systemGlobal||"System"),t.identifier("register")),BEFORE_BODY:beforeBody,MODULE_NAME:moduleName,SETTERS:setters,SOURCES:sources,BODY:path.node.body,EXPORT_IDENTIFIER:exportIdent,CONTEXT_IDENTIFIER:contextIdent})]}}}}};var _babelHelperHoistVariables=require("babel-helper-hoist-variables");var _babelHelperHoistVariables2=_interopRequireDefault(_babelHelperHoistVariables);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildTemplate=(0,_babelTemplate2.default)('\n SYSTEM_REGISTER(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n "use strict";\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n');var buildExportAll=(0,_babelTemplate2.default)('\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n');module.exports=exports["default"]},{"babel-helper-hoist-variables":68,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/object/create":144,"babel-runtime/core-js/symbol":148,"babel-template":157}],109:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var t=_ref.types;function isValidDefine(path){if(!path.isExpressionStatement())return;var expr=path.get("expression");if(!expr.isCallExpression())return false;if(!expr.get("callee").isIdentifier({name:"define"}))return false;var args=expr.get("arguments");if(args.length===3&&!args.shift().isStringLiteral())return false;if(args.length!==2)return false;if(!args.shift().isArrayExpression())return false;if(!args.shift().isFunctionExpression())return false;return true}return{inherits:require("babel-plugin-transform-es2015-modules-amd"),visitor:{Program:{exit:function exit(path,state){var last=path.get("body").pop();if(!isValidDefine(last))return;var call=last.node.expression;var args=call.arguments;var moduleName=args.length===3?args.shift():null;var amdArgs=call.arguments[0];var func=call.arguments[1];var browserGlobals=state.opts.globals||{};var commonArgs=amdArgs.elements.map(function(arg){if(arg.value==="module"||arg.value==="exports"){return t.identifier(arg.value)}else{return t.callExpression(t.identifier("require"),[arg])}});var browserArgs=amdArgs.elements.map(function(arg){if(arg.value==="module"){return t.identifier("mod")}else if(arg.value==="exports"){return t.memberExpression(t.identifier("mod"),t.identifier("exports"))}else{var memberExpression=void 0;if(state.opts.exactGlobals){var globalRef=browserGlobals[arg.value];if(globalRef){memberExpression=globalRef.split(".").reduce(function(accum,curr){return t.memberExpression(accum,t.identifier(curr))},t.identifier("global"))}else{memberExpression=t.memberExpression(t.identifier("global"),t.identifier(t.toIdentifier(arg.value)))}}else{var requireName=(0,_path.basename)(arg.value,(0,_path.extname)(arg.value));var globalName=browserGlobals[requireName]||requireName;memberExpression=t.memberExpression(t.identifier("global"),t.identifier(t.toIdentifier(globalName)))}return memberExpression}});var moduleNameOrBasename=moduleName?moduleName.value:this.file.opts.basename;var globalToAssign=t.memberExpression(t.identifier("global"),t.identifier(t.toIdentifier(moduleNameOrBasename)));var prerequisiteAssignments=null;if(state.opts.exactGlobals){var globalName=browserGlobals[moduleNameOrBasename];if(globalName){prerequisiteAssignments=[];var members=globalName.split(".");globalToAssign=members.slice(1).reduce(function(accum,curr){prerequisiteAssignments.push(buildPrerequisiteAssignment({GLOBAL_REFERENCE:accum}));return t.memberExpression(accum,t.identifier(curr))},t.memberExpression(t.identifier("global"),t.identifier(members[0])))}}var globalExport=buildGlobalExport({BROWSER_ARGUMENTS:browserArgs,PREREQUISITE_ASSIGNMENTS:prerequisiteAssignments,GLOBAL_TO_ASSIGN:globalToAssign});last.replaceWith(buildWrapper({MODULE_NAME:moduleName,AMD_ARGUMENTS:amdArgs,COMMON_ARGUMENTS:commonArgs,GLOBAL_EXPORT:globalExport,FUNC:func}))}}}}};var _path=require("path");var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildPrerequisiteAssignment=(0,_babelTemplate2.default)("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n");var buildGlobalExport=(0,_babelTemplate2.default)("\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n PREREQUISITE_ASSIGNMENTS\n GLOBAL_TO_ASSIGN = mod.exports;\n");var buildWrapper=(0,_babelTemplate2.default)('\n (function (global, factory) {\n if (typeof define === "function" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== "undefined") {\n factory(COMMON_ARGUMENTS);\n } else {\n GLOBAL_EXPORT\n }\n })(this, FUNC);\n');module.exports=exports["default"]},{"babel-plugin-transform-es2015-modules-amd":106,"babel-template":157,path:884}],110:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);exports.default=function(_ref){var t=_ref.types;function Property(path,node,scope,getObjectRef,file){var replaceSupers=new _babelHelperReplaceSupers2.default({getObjectRef:getObjectRef,methodNode:node,methodPath:path,isStatic:true,scope:scope,file:file});replaceSupers.replace()}var CONTAINS_SUPER=(0,_symbol2.default)();return{visitor:{Super:function Super(path){var parentObj=path.findParent(function(path){return path.isObjectExpression()});if(parentObj)parentObj.node[CONTAINS_SUPER]=true},ObjectExpression:{exit:function exit(path,file){if(!path.node[CONTAINS_SUPER])return;var objectRef=void 0;var getObjectRef=function getObjectRef(){return objectRef=objectRef||path.scope.generateUidIdentifier("obj")};var propPaths=path.get("properties");for(var _iterator=propPaths,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var propPath=_ref2;if(propPath.isObjectProperty())propPath=propPath.get("value");Property(propPath,propPath.node,path.scope,getObjectRef,file)}if(objectRef){path.scope.push({id:objectRef});path.replaceWith(t.assignmentExpression("=",objectRef,path.node))}}}}}};var _babelHelperReplaceSupers=require("babel-helper-replace-supers");var _babelHelperReplaceSupers2=_interopRequireDefault(_babelHelperReplaceSupers);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-replace-supers":73,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/symbol":148}],111:[function(require,module,exports){"use strict";exports.__esModule=true;exports.visitor=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _babelHelperGetFunctionArity=require("babel-helper-get-function-arity");var _babelHelperGetFunctionArity2=_interopRequireDefault(_babelHelperGetFunctionArity);var _babelHelperCallDelegate=require("babel-helper-call-delegate");var _babelHelperCallDelegate2=_interopRequireDefault(_babelHelperCallDelegate);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildDefaultParam=(0,_babelTemplate2.default)("\n let VARIABLE_NAME =\n ARGUMENTS.length > ARGUMENT_KEY && ARGUMENTS[ARGUMENT_KEY] !== undefined ?\n ARGUMENTS[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n");var buildCutOff=(0,_babelTemplate2.default)("\n let $0 = $1[$2];\n");function hasDefaults(node){for(var _iterator=node.params,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var param=_ref;if(!t.isIdentifier(param))return true}return false}var iifeVisitor={ReferencedIdentifier:function ReferencedIdentifier(path,state){var name=path.node.name;if(name==="eval"||path.scope.hasOwnBinding(name)&&path.scope.getOwnBinding(name).kind!=="param"){state.iife=true;path.stop()}},Scope:function Scope(path){path.skip()}};var visitor=exports.visitor={Function:function Function(path){var node=path.node;var scope=path.scope;if(!hasDefaults(node))return;path.ensureBlock();var state={iife:false,scope:scope};var body=[];var argsIdentifier=t.identifier("arguments");argsIdentifier._shadowedFunctionLiteral=path;function pushDefNode(left,right,i){var defNode=buildDefaultParam({VARIABLE_NAME:left,DEFAULT_VALUE:right,ARGUMENT_KEY:t.numericLiteral(i),ARGUMENTS:argsIdentifier});defNode._blockHoist=node.params.length-i;body.push(defNode)}var lastNonDefaultParam=(0,_babelHelperGetFunctionArity2.default)(node);var params=path.get("params");for(var i=0;i=lastNonDefaultParam||left.isPattern()){var placeholder=scope.generateUidIdentifier("x");placeholder._isDefaultPlaceholder=true;node.params[i]=placeholder}else{node.params[i]=left.node}if(!state.iife){if(right.isIdentifier()&&scope.hasOwnBinding(right.node.name)&&scope.getOwnBinding(right.node.name).kind!=="param"){state.iife=true}else{right.traverse(iifeVisitor,state)}}pushDefNode(left.node,right.node,i)}for(var _i2=lastNonDefaultParam+1;_i2=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var param=_ref;if(param.isRestElement()||param.isAssignmentPattern()){path.arrowFunctionToShadowed();break}}}},destructuring.visitor,rest.visitor,def.visitor])}};var _babelTraverse=require("babel-traverse");var _destructuring=require("./destructuring");var destructuring=_interopRequireWildcard(_destructuring);var _default=require("./default");var def=_interopRequireWildcard(_default);var _rest=require("./rest");var rest=_interopRequireWildcard(_rest);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"./default":111,"./destructuring":112,"./rest":114,"babel-runtime/core-js/get-iterator":139,"babel-traverse":161}],114:[function(require,module,exports){"use strict";exports.__esModule=true;exports.visitor=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _babelTemplate=require("babel-template");var _babelTemplate2=_interopRequireDefault(_babelTemplate);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var buildRest=(0,_babelTemplate2.default)("\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n");var restIndex=(0,_babelTemplate2.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n");var restLength=(0,_babelTemplate2.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");var memberExpressionOptimisationVisitor={Scope:function Scope(path,state){if(!path.scope.bindingIdentifierEquals(state.name,state.outerBinding)){path.skip()}},Flow:function Flow(path){path.skip()},"Function|ClassProperty":function FunctionClassProperty(path,state){var oldNoOptimise=state.noOptimise;state.noOptimise=true;path.traverse(memberExpressionOptimisationVisitor,state);state.noOptimise=oldNoOptimise;path.skip()},ReferencedIdentifier:function ReferencedIdentifier(path,state){var node=path.node;if(node.name==="arguments"){state.deopted=true}if(node.name!==state.name)return;if(state.noOptimise){state.deopted=true}else{var parentPath=path.parentPath;if(parentPath.isMemberExpression({object:node})){var grandparentPath=parentPath.parentPath;var argsOptEligible=!state.deopted&&!(grandparentPath.isAssignmentExpression()&&parentPath.node===grandparentPath.node.left||grandparentPath.isLVal()||grandparentPath.isForXStatement()||grandparentPath.isUpdateExpression()||grandparentPath.isUnaryExpression({operator:"delete"})||(grandparentPath.isCallExpression()||grandparentPath.isNewExpression())&&parentPath.node===grandparentPath.node.callee);if(argsOptEligible){if(parentPath.node.computed){if(parentPath.get("property").isBaseType("number")){state.candidates.push({cause:"indexGetter",path:path});return}}else if(parentPath.node.property.name==="length"){state.candidates.push({cause:"lengthGetter",path:path});return}}}if(state.offset===0&&parentPath.isSpreadElement()){var call=parentPath.parentPath;if(call.isCallExpression()&&call.node.arguments.length===1){state.candidates.push({cause:"argSpread",path:path});return}}state.references.push(path)}},BindingIdentifier:function BindingIdentifier(_ref,state){var node=_ref.node;if(node.name===state.name){state.deopted=true}}};function hasRest(node){return t.isRestElement(node.params[node.params.length-1])}function optimiseIndexGetter(path,argsId,offset){var index=void 0;if(t.isNumericLiteral(path.parent.property)){index=t.numericLiteral(path.parent.property.value+offset)}else{index=t.binaryExpression("+",path.parent.property,t.numericLiteral(offset))}path.parentPath.replaceWith(restIndex({ARGUMENTS:argsId,INDEX:index}))}function optimiseLengthGetter(path,argsId,offset){if(offset){path.parentPath.replaceWith(restLength({ARGUMENTS:argsId,OFFSET:t.numericLiteral(offset)}))}else{path.replaceWith(argsId)}}var visitor=exports.visitor={Function:function Function(path){var node=path.node;var scope=path.scope;if(!hasRest(node))return;var rest=node.params.pop().argument;var argsId=t.identifier("arguments");argsId._shadowedFunctionLiteral=path;var state={references:[],offset:node.params.length,argumentsNode:argsId,outerBinding:scope.getBindingIdentifier(rest.name),candidates:[],name:rest.name,deopted:false};path.traverse(memberExpressionOptimisationVisitor,state);if(!state.deopted&&!state.references.length){for(var _iterator=state.candidates,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var _ref3=_ref2;var _path=_ref3.path;var cause=_ref3.cause;switch(cause){case"indexGetter":optimiseIndexGetter(_path,argsId,state.offset);break;case"lengthGetter":optimiseLengthGetter(_path,argsId,state.offset);break;default:_path.replaceWith(argsId)}}return}state.references=state.references.concat(state.candidates.map(function(_ref4){var path=_ref4.path;return path}));state.deopted=state.deopted||!!node.shadow;var start=t.numericLiteral(node.params.length);var key=scope.generateUidIdentifier("key");var len=scope.generateUidIdentifier("len");var arrKey=key;var arrLen=len;if(node.params.length){arrKey=t.binaryExpression("-",key,start);arrLen=t.conditionalExpression(t.binaryExpression(">",len,start),t.binaryExpression("-",len,start),t.numericLiteral(0))}var loop=buildRest({ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});if(state.deopted){loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}else{loop._blockHoist=1;var target=path.getEarliestCommonAncestorFrom(state.references).getStatementParent();target.findParent(function(path){if(path.isLoop()){target=path}else{return path.isFunction()}});target.insertBefore(loop)}}}},{"babel-runtime/core-js/get-iterator":139,"babel-template":157,"babel-types":194}],115:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{visitor:{ObjectMethod:function ObjectMethod(path){var node=path.node;if(node.kind==="method"){path.replaceWith(t.objectProperty(node.key,t.functionExpression(null,node.params,node.body,node.generator,node.async),node.computed))}},ObjectProperty:function ObjectProperty(_ref){var node=_ref.node;if(node.shorthand){node.shorthand=false}}}}};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}module.exports=exports["default"]},{"babel-types":194}],116:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;function getSpreadLiteral(spread,scope,state){if(state.opts.loose&&!t.isIdentifier(spread.argument,{name:"arguments"})){return spread.argument}else{return scope.toArray(spread.argument,true)}}function hasSpread(nodes){for(var i=0;i=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var prop=_ref2;if(t.isSpreadElement(prop)){push();nodes.push(getSpreadLiteral(prop,scope,state))}else{_props.push(prop)}}push();return nodes}return{visitor:{ArrayExpression:function ArrayExpression(path,state){var node=path.node;var scope=path.scope;var elements=node.elements;if(!hasSpread(elements))return;var nodes=build(elements,scope,state);var first=nodes.shift();if(!t.isArrayExpression(first)){nodes.unshift(first);first=t.arrayExpression([])}path.replaceWith(t.callExpression(t.memberExpression(first,t.identifier("concat")),nodes))},CallExpression:function CallExpression(path,state){var node=path.node;var scope=path.scope;var args=node.arguments;if(!hasSpread(args))return;var calleePath=path.get("callee");if(calleePath.isSuper())return;var contextLiteral=t.identifier("undefined");node.arguments=[];var nodes=void 0;if(args.length===1&&args[0].argument.name==="arguments"){nodes=[args[0].argument]}else{nodes=build(args,scope,state)}var first=nodes.shift();if(nodes.length){node.arguments.push(t.callExpression(t.memberExpression(first,t.identifier("concat")),nodes))}else{node.arguments.push(first)}var callee=node.callee;if(calleePath.isMemberExpression()){var temp=scope.maybeGenerateMemoised(callee.object);if(temp){callee.object=t.assignmentExpression("=",temp,callee.object);contextLiteral=temp}else{contextLiteral=callee.object}t.appendToMemberExpression(callee,t.identifier("apply"))}else{node.callee=t.memberExpression(node.callee,t.identifier("apply"))}if(t.isSuper(contextLiteral)){contextLiteral=t.thisExpression()}node.arguments.unshift(contextLiteral)},NewExpression:function NewExpression(path,state){var node=path.node;var scope=path.scope;var args=node.arguments;if(!hasSpread(args))return;var nodes=build(args,scope,state);var context=t.arrayExpression([t.nullLiteral()]);args=t.callExpression(t.memberExpression(context,t.identifier("concat")),nodes);path.replaceWith(t.newExpression(t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Function"),t.identifier("prototype")),t.identifier("bind")),t.identifier("apply")),[node.callee,args]),[]))}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139}],117:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{visitor:{RegExpLiteral:function RegExpLiteral(path){var node=path.node;if(!regex.is(node,"y"))return;path.replaceWith(t.newExpression(t.identifier("RegExp"),[t.stringLiteral(node.pattern),t.stringLiteral(node.flags)]))}}}};var _babelHelperRegex=require("babel-helper-regex");var regex=_interopRequireWildcard(_babelHelperRegex);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}module.exports=exports["default"]},{"babel-helper-regex":70,"babel-types":194}],118:[function(require,module,exports){ -"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;function isString(node){return t.isLiteral(node)&&typeof node.value==="string"}function buildBinaryExpression(left,right){return t.binaryExpression("+",left,right)}return{visitor:{TaggedTemplateExpression:function TaggedTemplateExpression(path,state){var node=path.node;var quasi=node.quasi;var args=[];var strings=[];var raw=[];for(var _iterator=quasi.quasis,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var elem=_ref2;strings.push(t.stringLiteral(elem.value.cooked));raw.push(t.stringLiteral(elem.value.raw))}strings=t.arrayExpression(strings);raw=t.arrayExpression(raw);var templateName="taggedTemplateLiteral";if(state.opts.loose)templateName+="Loose";var templateObject=state.file.addTemplateObject(templateName,strings,raw);args.push(templateObject);args=args.concat(quasi.expressions);path.replaceWith(t.callExpression(node.tag,args))},TemplateLiteral:function TemplateLiteral(path,state){var nodes=[];var expressions=path.get("expressions");for(var _iterator2=path.node.quasis,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var elem=_ref3;nodes.push(t.stringLiteral(elem.value.cooked));var expr=expressions.shift();if(expr){if(state.opts.spec&&!expr.isBaseType("string")&&!expr.isBaseType("number")){nodes.push(t.callExpression(t.identifier("String"),[expr.node]))}else{nodes.push(expr.node)}}}nodes=nodes.filter(function(n){return!t.isLiteral(n,{value:""})});if(!isString(nodes[0])&&!isString(nodes[1])){nodes.unshift(t.stringLiteral(""))}if(nodes.length>1){var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(var _iterator3=nodes,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref4;if(_isArray3){if(_i3>=_iterator3.length)break;_ref4=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref4=_i3.value}var node=_ref4;root=buildBinaryExpression(root,node)}path.replaceWith(root)}else{path.replaceWith(nodes[0])}}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139}],119:[function(require,module,exports){"use strict";exports.__esModule=true;var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);exports.default=function(_ref){var t=_ref.types;var IGNORE=(0,_symbol2.default)();return{visitor:{Scope:function Scope(_ref2){var scope=_ref2.scope;if(!scope.getBinding("Symbol")){return}scope.rename("Symbol")},UnaryExpression:function UnaryExpression(path){var node=path.node;var parent=path.parent;if(node[IGNORE])return;if(path.find(function(path){return path.node&&!!path.node._generated}))return;if(path.parentPath.isBinaryExpression()&&t.EQUALITY_BINARY_OPERATORS.indexOf(parent.operator)>=0){var opposite=path.getOpposite();if(opposite.isLiteral()&&opposite.node.value!=="symbol"&&opposite.node.value!=="object"){return}}if(node.operator==="typeof"){var call=t.callExpression(this.addHelper("typeof"),[node.argument]);if(path.get("argument").isIdentifier()){var undefLiteral=t.stringLiteral("undefined");var unary=t.unaryExpression("typeof",node.argument);unary[IGNORE]=true;path.replaceWith(t.conditionalExpression(t.binaryExpression("===",unary,undefLiteral),undefLiteral,call))}else{path.replaceWith(call)}}}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/symbol":148}],120:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return{visitor:{RegExpLiteral:function RegExpLiteral(_ref){var node=_ref.node;if(!regex.is(node,"u"))return;node.pattern=(0,_regexpuCore2.default)(node.pattern,node.flags);regex.pullFlag(node,"u")}}}};var _regexpuCore=require("regexpu-core");var _regexpuCore2=_interopRequireDefault(_regexpuCore);var _babelHelperRegex=require("babel-helper-regex");var regex=_interopRequireWildcard(_babelHelperRegex);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-regex":70,"regexpu-core":961}],121:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var t=_ref.types;return{inherits:require("babel-plugin-syntax-exponentiation-operator"),visitor:(0,_babelHelperBuilderBinaryAssignmentOperatorVisitor2.default)({operator:"**",build:function build(left,right){return t.callExpression(t.memberExpression(t.identifier("Math"),t.identifier("pow")),[left,right])}})}};var _babelHelperBuilderBinaryAssignmentOperatorVisitor=require("babel-helper-builder-binary-assignment-operator-visitor");var _babelHelperBuilderBinaryAssignmentOperatorVisitor2=_interopRequireDefault(_babelHelperBuilderBinaryAssignmentOperatorVisitor);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-helper-builder-binary-assignment-operator-visitor":61,"babel-plugin-syntax-exponentiation-operator":83}],122:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var t=_ref.types;function build(node,nodes,scope){var first=node.specifiers[0];if(!t.isExportNamespaceSpecifier(first)&&!t.isExportDefaultSpecifier(first))return;var specifier=node.specifiers.shift();var uid=scope.generateUidIdentifier(specifier.exported.name);var newSpecifier=void 0;if(t.isExportNamespaceSpecifier(specifier)){newSpecifier=t.importNamespaceSpecifier(uid)}else{newSpecifier=t.importDefaultSpecifier(uid)}nodes.push(t.importDeclaration([newSpecifier],node.source));nodes.push(t.exportNamedDeclaration(null,[t.exportSpecifier(uid,specifier.exported)]));build(node,nodes,scope)}return{inherits:require("babel-plugin-syntax-export-extensions"),visitor:{ExportNamedDeclaration:function ExportNamedDeclaration(path){var node=path.node;var scope=path.scope;var nodes=[];build(node,nodes,scope);if(!nodes.length)return;if(node.specifiers.length>=1){nodes.push(node)}path.replaceWithMultiple(nodes)}}}};module.exports=exports["default"]},{"babel-plugin-syntax-export-extensions":84}],123:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(_ref){var t=_ref.types;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}return{inherits:require("babel-plugin-syntax-function-bind"),visitor:{CallExpression:function CallExpression(_ref2){var node=_ref2.node;var scope=_ref2.scope;var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)},BindExpression:function BindExpression(path){var node=path.node;var scope=path.scope;var context=inferBindContext(node,scope);path.replaceWith(t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context]))}}}};module.exports=exports["default"]},{"babel-plugin-syntax-function-bind":85}],124:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(_ref){var t=_ref.types;function hasSpread(node){for(var _iterator=node.properties,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;if(_isArray){if(_i>=_iterator.length)break;_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref2=_i.value}var prop=_ref2;if(t.isSpreadProperty(prop)){return true}}return false}return{inherits:require("babel-plugin-syntax-object-rest-spread"),visitor:{ObjectExpression:function ObjectExpression(path,file){if(!hasSpread(path.node))return;var useBuiltIns=file.opts.useBuiltIns||false;if(typeof useBuiltIns!=="boolean"){throw new Error("transform-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)")}var args=[];var props=[];function push(){if(!props.length)return;args.push(t.objectExpression(props));props=[]}for(var _iterator2=path.node.properties,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref3;if(_isArray2){if(_i2>=_iterator2.length)break;_ref3=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref3=_i2.value}var prop=_ref3;if(t.isSpreadProperty(prop)){push();args.push(prop.argument)}else{props.push(prop)}}push();if(!t.isObjectExpression(args[0])){args.unshift(t.objectExpression([]))}var helper=useBuiltIns?t.memberExpression(t.identifier("Object"),t.identifier("assign")):file.addHelper("extends");path.replaceWith(t.callExpression(helper,args))}}}};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-plugin-syntax-object-rest-spread":86,"babel-runtime/core-js/get-iterator":139}],125:[function(require,module,exports){"use strict";var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _stringify=require("babel-runtime/core-js/json/stringify");var _stringify2=_interopRequireDefault(_stringify);var _assert=require("assert");var _assert2=_interopRequireDefault(_assert);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _leap=require("./leap");var leap=_interopRequireWildcard(_leap);var _meta=require("./meta");var meta=_interopRequireWildcard(_meta);var _util=require("./util");var util=_interopRequireWildcard(_util);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){_assert2.default.ok(this instanceof Emitter);t.assertIdentifier(contextId);this.nextTempId=0;this.contextId=contextId;this.listing=[];this.marked=[true];this.finalLoc=loc();this.tryEntries=[];this.leapManager=new leap.LeapManager(this)}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return t.numericLiteral(-1)}Ep.mark=function(loc){t.assertLiteral(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{_assert2.default.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(t.isExpression(node)){node=t.expressionStatement(node)}t.assertStatement(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return t.expressionStatement(t.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return t.memberExpression(this.contextId,computed?t.stringLiteral(name):t.identifier(name),!!computed)};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){t.assertExpression(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){t.assertLiteral(tryLoc);var catchCall=t.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(t.breakStatement())};Ep.jumpIf=function(test,toLoc){t.assertExpression(test);t.assertLiteral(toLoc);this.emit(t.ifStatement(test,t.blockStatement([this.assign(this.contextProperty("next"),toLoc),t.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){t.assertExpression(test);t.assertLiteral(toLoc);var negatedTest=void 0;if(t.isUnaryExpression(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=t.unaryExpression("!",test)}this.emit(t.ifStatement(negatedTest,t.blockStatement([this.assign(this.contextProperty("next"),toLoc),t.breakStatement()])))};Ep.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)};Ep.getContextFunction=function(id){return t.functionExpression(id||null,[this.contextId],t.blockStatement([this.getDispatchLoop()]),false,false)};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current=void 0;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(t.switchCase(t.numericLiteral(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(t.isCompletionStatement(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(t.switchCase(this.finalLoc,[]),t.switchCase(t.stringLiteral("end"),[t.returnStatement(t.callExpression(this.contextProperty("stop"),[]))]));return t.whileStatement(t.numericLiteral(1),t.switchStatement(t.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return t.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;_assert2.default.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return t.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){var node=path.node;var self=this;t.assertNode(node);if(t.isDeclaration(node))throw getDeclError(node);if(t.isStatement(node))return self.explodeStatement(path);if(t.isExpression(node))return self.explodeExpression(path,ignoreResult);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,_stringify2.default)(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+(0,_stringify2.default)(node))}Ep.explodeStatement=function(path,labelId){var stmt=path.node;var self=this;var before=void 0,after=void 0,head=void 0;t.assertStatement(stmt);if(labelId){t.assertIdentifier(labelId)}else{labelId=null}if(t.isBlockStatement(stmt)){path.get("body").forEach(function(path){self.explodeStatement(path)});return}if(!meta.containsLeap(stmt)){self.emit(stmt);return}var _ret=function(){switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":before=loc();after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":head=loc();var update=loc();after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"TypeCastExpression":return{v:self.explodeExpression(path.get("expression"))};case"ForInStatement":head=loc();after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,t.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(t.memberExpression(t.assignmentExpression("=",keyInfoTmpVar,t.callExpression(keyIterNextFn,[])),t.identifier("done"),false),after);self.emitAssign(stmt.left,t.memberExpression(keyInfoTmpVar,t.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];t.assertSwitchCase(c);if(c.test){condition=t.conditionalExpression(t.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}var discriminant=path.get("discriminant");discriminant.replaceWith(condition);self.jump(self.explodeExpression(discriminant));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").forEach(function(casePath){var i=casePath.key;self.mark(caseLocs[i]);casePath.get("consequent").forEach(function(path){self.explodeStatement(path)})})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);_assert2.default.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":after=loc();var handler=stmt.handler;var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){(function(){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler.body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);bodyPath.traverse(catchParamVisitor,{safeParam:safeParam,catchParamName:handler.param.name});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})})()}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(t.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,_stringify2.default)(stmt.type))}}();if((typeof _ret==="undefined"?"undefined":(0,_typeof3.default)(_ret))==="object")return _ret.v};var catchParamVisitor={Identifier:function Identifier(path,state){if(path.node.name===state.catchParamName&&util.isReference(path)){path.replaceWith(state.safeParam)}},Scope:function Scope(path,state){if(path.scope.hasOwnBinding(state.catchParamName)){path.skip()}}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){_assert2.default.ok(false,"invalid completion record: "+(0,_stringify2.default)(record))}_assert2.default.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[t.stringLiteral(record.type)];if(record.type==="break"||record.type==="continue"){t.assertLiteral(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){t.assertExpression(record.value);abruptArgs[1]=record.value}}this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&t.isLiteral(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return t.numericLiteral(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){t.assertLiteral(loc);if(loc.value===-1){loc.value=this.listing.length}else{_assert2.default.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){var expr=path.node;if(expr){t.assertExpression(expr)}else{return expr}var self=this;var result=void 0;var after=void 0;function finish(expr){t.assertExpression(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){_assert2.default.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&!t.isLiteral(result)){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}var _ret3=function(){switch(expr.type){case"MemberExpression":return{v:finish(t.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed))};case"CallExpression":var calleePath=path.get("callee");var argsPath=path.get("arguments");var newCallee=void 0;var newArgs=[];var hasLeapingArgs=false;argsPath.forEach(function(argPath){hasLeapingArgs=hasLeapingArgs||meta.containsLeap(argPath.node)});if(t.isMemberExpression(calleePath.node)){if(hasLeapingArgs){var newObject=explodeViaTempVar(self.makeTempVar(),calleePath.get("object"));var newProperty=calleePath.node.computed?explodeViaTempVar(null,calleePath.get("property")):calleePath.node.property;newArgs.unshift(newObject);newCallee=t.memberExpression(t.memberExpression(newObject,newProperty,calleePath.node.computed),t.identifier("call"),false)}else{newCallee=self.explodeExpression(calleePath)}}else{newCallee=self.explodeExpression(calleePath);if(t.isMemberExpression(newCallee)){newCallee=t.sequenceExpression([t.numericLiteral(0),newCallee])}}argsPath.forEach(function(argPath){newArgs.push(explodeViaTempVar(null,argPath))});return{v:finish(t.callExpression(newCallee,newArgs))};case"NewExpression":return{v:finish(t.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})))};case"ObjectExpression":return{v:finish(t.objectExpression(path.get("properties").map(function(propPath){if(propPath.isObjectProperty()){return t.objectProperty(propPath.node.key,explodeViaTempVar(null,propPath.get("value")),propPath.node.computed)}else{return propPath.node}})))};case"ArrayExpression":return{v:finish(t.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})))};case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").forEach(function(exprPath){if(exprPath.key===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return{v:result};case"LogicalExpression":after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{_assert2.default.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return{v:result};case"ConditionalExpression":var elseLoc=loc();after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return{v:result};case"UnaryExpression":return{v:finish(t.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix))};case"BinaryExpression":return{v:finish(t.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))))};case"AssignmentExpression":return{v:finish(t.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))))};case"UpdateExpression":return{v:finish(t.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix))};case"YieldExpression":after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var _result=self.makeTempVar();self.emit(t.returnStatement(t.callExpression(self.contextProperty("delegateYield"),[arg,t.stringLiteral(_result.property.name),after])));self.mark(after);return{v:_result}}self.emitAssign(self.contextProperty("next"),after);self.emit(t.returnStatement(arg||null));self.mark(after);return{v:self.contextProperty("sent")};default:throw new Error("unknown Expression of type "+(0,_stringify2.default)(expr.type))}}();if((typeof _ret3==="undefined"?"undefined":(0,_typeof3.default)(_ret3))==="object")return _ret3.v}},{"./leap":128,"./meta":129,"./util":130,assert:17,"babel-runtime/core-js/json/stringify":140,"babel-runtime/helpers/typeof":156,"babel-types":194}],126:[function(require,module,exports){"use strict";var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){t.assertFunction(funPath.node);var vars={};function varDeclToExpr(vdec,includeIdentifiers){t.assertVariableDeclaration(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=t.identifier(dec.id.name);if(dec.init){exprs.push(t.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return t.sequenceExpression(exprs)}funPath.get("body").traverse({VariableDeclaration:{exit:function exit(path){var expr=varDeclToExpr(path.node,false);if(expr===null){path.remove()}else{path.replaceWith(t.expressionStatement(expr))}path.skip()}},ForStatement:function ForStatement(path){var init=path.node.init;if(t.isVariableDeclaration(init)){path.get("init").replaceWith(varDeclToExpr(init,false))}},ForXStatement:function ForXStatement(path){var left=path.get("left");if(left.isVariableDeclaration()){left.replaceWith(varDeclToExpr(left.node,true))}},FunctionDeclaration:function FunctionDeclaration(path){var node=path.node;vars[node.id.name]=node.id;var assignment=t.expressionStatement(t.assignmentExpression("=",node.id,t.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(path.parentPath.isBlockStatement()){path.parentPath.unshiftContainer("body",assignment);path.remove()}else{path.replaceWith(assignment)}path.skip()},FunctionExpression:function FunctionExpression(path){path.skip()}});var paramNames={};funPath.get("params").forEach(function(paramPath){var param=paramPath.node;if(t.isIdentifier(param)){paramNames[param.name]=param}else{}});var declarations=[];(0,_keys2.default)(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(t.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return t.variableDeclaration("var",declarations)}},{"babel-runtime/core-js/object/keys":146,"babel-types":194}],127:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(){return require("./visit")};module.exports=exports["default"]},{"./visit":131}],128:[function(require,module,exports){"use strict";var _assert=require("assert");var _assert2=_interopRequireDefault(_assert);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _util=require("util");function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function Entry(){_assert2.default.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);t.assertLiteral(returnLoc);this.returnLoc=returnLoc}(0,_util.inherits)(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);t.assertLiteral(breakLoc);t.assertLiteral(continueLoc);if(label){t.assertIdentifier(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}(0,_util.inherits)(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);t.assertLiteral(breakLoc);this.breakLoc=breakLoc}(0,_util.inherits)(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);t.assertLiteral(firstLoc);if(catchEntry){_assert2.default.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){ -_assert2.default.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}_assert2.default.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}(0,_util.inherits)(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);t.assertLiteral(firstLoc);t.assertIdentifier(paramId);this.firstLoc=firstLoc;this.paramId=paramId}(0,_util.inherits)(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);t.assertLiteral(firstLoc);t.assertLiteral(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}(0,_util.inherits)(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);t.assertLiteral(breakLoc);t.assertIdentifier(label);this.breakLoc=breakLoc;this.label=label}(0,_util.inherits)(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){_assert2.default.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;_assert2.default.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){_assert2.default.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();_assert2.default.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":125,assert:17,"babel-types":194,util:987}],129:[function(require,module,exports){"use strict";var _assert=require("assert");var _assert2=_interopRequireDefault(_assert);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var m=require("private").makeAccessor();var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){t.assertNode(node);var result=false;function check(child){if(result){}else if(Array.isArray(child)){child.some(check)}else if(t.isNode(child)){_assert2.default.strictEqual(result,false);result=predicate(child)}return result}var keys=t.VISITOR_KEYS[node.type];if(keys){for(var i=0;i0){bodyBlockPath.node.body=innerBody}var outerFnExpr=getOuterFnExpr(path);t.assertIdentifier(node.id);var innerFnId=t.identifier(node.id.name+"$");var vars=(0,_hoist.hoist)(path);var didRenameArguments=renameArguments(path,argsId);if(didRenameArguments){vars=vars||t.variableDeclaration("var",[]);vars.declarations.push(t.variableDeclarator(argsId,t.identifier("arguments")))}var emitter=new _emit.Emitter(contextId);emitter.explode(path.get("body"));if(vars&&vars.declarations.length>0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),node.generator?outerFnExpr:t.nullLiteral(),t.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=t.callExpression(util.runtimeProperty(node.async?"async":"wrap"),wrapArgs);outerBody.push(t.returnStatement(wrapCall));node.body=t.blockStatement(outerBody);var wasGeneratorFunction=node.generator;if(wasGeneratorFunction){node.generator=false}if(node.async){node.async=false}if(wasGeneratorFunction&&t.isExpression(node)){path.replaceWith(t.callExpression(util.runtimeProperty("mark"),[node]))}path.requeue()}}};function getOuterFnExpr(funPath){var node=funPath.node;t.assertFunction(node);if(!node.id){node.id=funPath.scope.parent.generateUidIdentifier("callee")}if(node.generator&&t.isFunctionDeclaration(node)){var pp=funPath.findParent(function(path){return path.isProgram()||path.isBlockStatement()});if(!pp){return node.id}var markDecl=getRuntimeMarkDecl(pp);var markedArray=markDecl.declarations[0].id;var funDeclIdArray=markDecl.declarations[0].init.callee.object;t.assertArrayExpression(funDeclIdArray);var index=funDeclIdArray.elements.length;funDeclIdArray.elements.push(node.id);return t.memberExpression(markedArray,t.numericLiteral(index),true)}return node.id}function getRuntimeMarkDecl(blockPath){var block=blockPath.node;_assert2.default.ok(Array.isArray(block.body));var info=getMarkInfo(block);if(info.decl){return info.decl}info.decl=t.variableDeclaration("var",[t.variableDeclarator(blockPath.scope.generateUidIdentifier("marked"),t.callExpression(t.memberExpression(t.arrayExpression([]),t.identifier("map"),false),[util.runtimeProperty("mark")]))]);blockPath.unshiftContainer("body",info.decl);return info.decl}function renameArguments(funcPath,argsId){var state={didRenameArguments:false,argsId:argsId};funcPath.traverse(argumentsVisitor,state);return state.didRenameArguments}var argumentsVisitor={"FunctionExpression|FunctionDeclaration":function FunctionExpressionFunctionDeclaration(path){path.skip()},Identifier:function Identifier(path,state){if(path.node.name==="arguments"&&util.isReference(path)){path.replaceWith(state.argsId);state.didRenameArguments=true}}};var functionSentVisitor={MetaProperty:function MetaProperty(path){var node=path.node;if(node.meta.name==="function"&&node.property.name==="sent"){path.replaceWith(t.memberExpression(this.context,t.identifier("_sent")))}}};var awaitVisitor={Function:function Function(path){path.skip()},AwaitExpression:function AwaitExpression(path){var argument=path.node.argument;path.replaceWith(t.yieldExpression(t.callExpression(util.runtimeProperty("awrap"),[argument]),false))}}},{"./emit":125,"./hoist":126,"./util":130,assert:17,"babel-types":194,private:888}],132:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(){return{visitor:{Program:function Program(path,state){if(state.opts.strict===false||state.opts.strictMode===false)return;var node=path.node;for(var _iterator=node.directives,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var directive=_ref;if(directive.value.value==="use strict")return}path.unshiftContainer("directives",t.directive(t.directiveLiteral("use strict")))}}}};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"babel-types":194}],133:[function(require,module,exports){(function(global){"use strict";require("core-js/shim");require("regenerator-runtime/runtime");require("core-js/fn/regexp/escape");if(global._babelPolyfill){throw new Error("only one instance of babel-polyfill is allowed")}global._babelPolyfill=true;var DEFINE_PROPERTY="defineProperty";function define(O,key,value){O[key]||Object[DEFINE_PROPERTY](O,key,{writable:true,configurable:true,value:value})}define(String.prototype,"padLeft","".padStart);define(String.prototype,"padRight","".padEnd);"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(key){[][key]&&define(Array,key,Function.call.bind([][key]))})}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"core-js/fn/regexp/escape":233,"core-js/shim":632,"regenerator-runtime/runtime":958}],134:[function(require,module,exports){"use strict";exports.__esModule=true;var _babelPluginTransformEs2015TemplateLiterals=require("babel-plugin-transform-es2015-template-literals");var _babelPluginTransformEs2015TemplateLiterals2=_interopRequireDefault(_babelPluginTransformEs2015TemplateLiterals);var _babelPluginTransformEs2015Literals=require("babel-plugin-transform-es2015-literals");var _babelPluginTransformEs2015Literals2=_interopRequireDefault(_babelPluginTransformEs2015Literals);var _babelPluginTransformEs2015FunctionName=require("babel-plugin-transform-es2015-function-name");var _babelPluginTransformEs2015FunctionName2=_interopRequireDefault(_babelPluginTransformEs2015FunctionName);var _babelPluginTransformEs2015ArrowFunctions=require("babel-plugin-transform-es2015-arrow-functions");var _babelPluginTransformEs2015ArrowFunctions2=_interopRequireDefault(_babelPluginTransformEs2015ArrowFunctions);var _babelPluginTransformEs2015BlockScopedFunctions=require("babel-plugin-transform-es2015-block-scoped-functions");var _babelPluginTransformEs2015BlockScopedFunctions2=_interopRequireDefault(_babelPluginTransformEs2015BlockScopedFunctions);var _babelPluginTransformEs2015Classes=require("babel-plugin-transform-es2015-classes");var _babelPluginTransformEs2015Classes2=_interopRequireDefault(_babelPluginTransformEs2015Classes);var _babelPluginTransformEs2015ObjectSuper=require("babel-plugin-transform-es2015-object-super");var _babelPluginTransformEs2015ObjectSuper2=_interopRequireDefault(_babelPluginTransformEs2015ObjectSuper);var _babelPluginTransformEs2015ShorthandProperties=require("babel-plugin-transform-es2015-shorthand-properties");var _babelPluginTransformEs2015ShorthandProperties2=_interopRequireDefault(_babelPluginTransformEs2015ShorthandProperties);var _babelPluginTransformEs2015DuplicateKeys=require("babel-plugin-transform-es2015-duplicate-keys");var _babelPluginTransformEs2015DuplicateKeys2=_interopRequireDefault(_babelPluginTransformEs2015DuplicateKeys);var _babelPluginTransformEs2015ComputedProperties=require("babel-plugin-transform-es2015-computed-properties");var _babelPluginTransformEs2015ComputedProperties2=_interopRequireDefault(_babelPluginTransformEs2015ComputedProperties);var _babelPluginTransformEs2015ForOf=require("babel-plugin-transform-es2015-for-of");var _babelPluginTransformEs2015ForOf2=_interopRequireDefault(_babelPluginTransformEs2015ForOf);var _babelPluginTransformEs2015StickyRegex=require("babel-plugin-transform-es2015-sticky-regex");var _babelPluginTransformEs2015StickyRegex2=_interopRequireDefault(_babelPluginTransformEs2015StickyRegex);var _babelPluginTransformEs2015UnicodeRegex=require("babel-plugin-transform-es2015-unicode-regex");var _babelPluginTransformEs2015UnicodeRegex2=_interopRequireDefault(_babelPluginTransformEs2015UnicodeRegex);var _babelPluginCheckEs2015Constants=require("babel-plugin-check-es2015-constants");var _babelPluginCheckEs2015Constants2=_interopRequireDefault(_babelPluginCheckEs2015Constants);var _babelPluginTransformEs2015Spread=require("babel-plugin-transform-es2015-spread");var _babelPluginTransformEs2015Spread2=_interopRequireDefault(_babelPluginTransformEs2015Spread);var _babelPluginTransformEs2015Parameters=require("babel-plugin-transform-es2015-parameters");var _babelPluginTransformEs2015Parameters2=_interopRequireDefault(_babelPluginTransformEs2015Parameters);var _babelPluginTransformEs2015Destructuring=require("babel-plugin-transform-es2015-destructuring");var _babelPluginTransformEs2015Destructuring2=_interopRequireDefault(_babelPluginTransformEs2015Destructuring);var _babelPluginTransformEs2015BlockScoping=require("babel-plugin-transform-es2015-block-scoping");var _babelPluginTransformEs2015BlockScoping2=_interopRequireDefault(_babelPluginTransformEs2015BlockScoping);var _babelPluginTransformEs2015TypeofSymbol=require("babel-plugin-transform-es2015-typeof-symbol");var _babelPluginTransformEs2015TypeofSymbol2=_interopRequireDefault(_babelPluginTransformEs2015TypeofSymbol);var _babelPluginTransformEs2015ModulesCommonjs=require("babel-plugin-transform-es2015-modules-commonjs");var _babelPluginTransformEs2015ModulesCommonjs2=_interopRequireDefault(_babelPluginTransformEs2015ModulesCommonjs);var _babelPluginTransformEs2015ModulesSystemjs=require("babel-plugin-transform-es2015-modules-systemjs");var _babelPluginTransformEs2015ModulesSystemjs2=_interopRequireDefault(_babelPluginTransformEs2015ModulesSystemjs);var _babelPluginTransformEs2015ModulesAmd=require("babel-plugin-transform-es2015-modules-amd");var _babelPluginTransformEs2015ModulesAmd2=_interopRequireDefault(_babelPluginTransformEs2015ModulesAmd);var _babelPluginTransformEs2015ModulesUmd=require("babel-plugin-transform-es2015-modules-umd");var _babelPluginTransformEs2015ModulesUmd2=_interopRequireDefault(_babelPluginTransformEs2015ModulesUmd);var _babelPluginTransformRegenerator=require("babel-plugin-transform-regenerator");var _babelPluginTransformRegenerator2=_interopRequireDefault(_babelPluginTransformRegenerator);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function preset(context){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var moduleTypes=["commonjs","amd","umd","systemjs"];var loose=false;var modules="commonjs";var spec=false;if(opts!==undefined){if(opts.loose!==undefined)loose=opts.loose;if(opts.modules!==undefined)modules=opts.modules;if(opts.spec!==undefined)spec=opts.spec}if(typeof loose!=="boolean")throw new Error("Preset es2015 'loose' option must be a boolean.");if(typeof spec!=="boolean")throw new Error("Preset es2015 'spec' option must be a boolean.");if(modules!==false&&moduleTypes.indexOf(modules)===-1){throw new Error("Preset es2015 'modules' option must be 'false' to indicate no modules\n"+"or a module type which be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'")}var optsLoose={loose:loose};return{plugins:[[_babelPluginTransformEs2015TemplateLiterals2.default,{loose:loose,spec:spec}],_babelPluginTransformEs2015Literals2.default,_babelPluginTransformEs2015FunctionName2.default,[_babelPluginTransformEs2015ArrowFunctions2.default,{spec:spec}],_babelPluginTransformEs2015BlockScopedFunctions2.default,[_babelPluginTransformEs2015Classes2.default,optsLoose],_babelPluginTransformEs2015ObjectSuper2.default,_babelPluginTransformEs2015ShorthandProperties2.default,_babelPluginTransformEs2015DuplicateKeys2.default,[_babelPluginTransformEs2015ComputedProperties2.default,optsLoose],[_babelPluginTransformEs2015ForOf2.default,optsLoose],_babelPluginTransformEs2015StickyRegex2.default,_babelPluginTransformEs2015UnicodeRegex2.default,_babelPluginCheckEs2015Constants2.default,[_babelPluginTransformEs2015Spread2.default,optsLoose],_babelPluginTransformEs2015Parameters2.default,[_babelPluginTransformEs2015Destructuring2.default,optsLoose],_babelPluginTransformEs2015BlockScoping2.default,_babelPluginTransformEs2015TypeofSymbol2.default,modules==="commonjs"&&[_babelPluginTransformEs2015ModulesCommonjs2.default,optsLoose],modules==="systemjs"&&[_babelPluginTransformEs2015ModulesSystemjs2.default,optsLoose],modules==="amd"&&[_babelPluginTransformEs2015ModulesAmd2.default,optsLoose],modules==="umd"&&[_babelPluginTransformEs2015ModulesUmd2.default,optsLoose],[_babelPluginTransformRegenerator2.default,{async:false,asyncGenerators:false}]].filter(Boolean)}}var oldConfig=preset({});exports.default=oldConfig;Object.defineProperty(oldConfig,"buildPreset",{configurable:true,writable:true,enumerable:false,value:preset});module.exports=exports["default"]},{"babel-plugin-check-es2015-constants":77,"babel-plugin-transform-es2015-arrow-functions":93,"babel-plugin-transform-es2015-block-scoped-functions":94,"babel-plugin-transform-es2015-block-scoping":95,"babel-plugin-transform-es2015-classes":97,"babel-plugin-transform-es2015-computed-properties":100,"babel-plugin-transform-es2015-destructuring":101,"babel-plugin-transform-es2015-duplicate-keys":102,"babel-plugin-transform-es2015-for-of":103,"babel-plugin-transform-es2015-function-name":104,"babel-plugin-transform-es2015-literals":105,"babel-plugin-transform-es2015-modules-amd":106,"babel-plugin-transform-es2015-modules-commonjs":107,"babel-plugin-transform-es2015-modules-systemjs":108,"babel-plugin-transform-es2015-modules-umd":109,"babel-plugin-transform-es2015-object-super":110,"babel-plugin-transform-es2015-parameters":113,"babel-plugin-transform-es2015-shorthand-properties":115,"babel-plugin-transform-es2015-spread":116,"babel-plugin-transform-es2015-sticky-regex":117,"babel-plugin-transform-es2015-template-literals":118,"babel-plugin-transform-es2015-typeof-symbol":119,"babel-plugin-transform-es2015-unicode-regex":120,"babel-plugin-transform-regenerator":127}],135:[function(require,module,exports){"use strict";exports.__esModule=true;var _babelPresetStage=require("babel-preset-stage-1");var _babelPresetStage2=_interopRequireDefault(_babelPresetStage);var _babelPluginTransformDoExpressions=require("babel-plugin-transform-do-expressions");var _babelPluginTransformDoExpressions2=_interopRequireDefault(_babelPluginTransformDoExpressions);var _babelPluginTransformFunctionBind=require("babel-plugin-transform-function-bind");var _babelPluginTransformFunctionBind2=_interopRequireDefault(_babelPluginTransformFunctionBind);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default={presets:[_babelPresetStage2.default],plugins:[_babelPluginTransformDoExpressions2.default,_babelPluginTransformFunctionBind2.default]};module.exports=exports["default"]},{"babel-plugin-transform-do-expressions":92,"babel-plugin-transform-function-bind":123,"babel-preset-stage-1":136}],136:[function(require,module,exports){"use strict";exports.__esModule=true;var _babelPresetStage=require("babel-preset-stage-2");var _babelPresetStage2=_interopRequireDefault(_babelPresetStage);var _babelPluginTransformClassConstructorCall=require("babel-plugin-transform-class-constructor-call");var _babelPluginTransformClassConstructorCall2=_interopRequireDefault(_babelPluginTransformClassConstructorCall);var _babelPluginTransformExportExtensions=require("babel-plugin-transform-export-extensions");var _babelPluginTransformExportExtensions2=_interopRequireDefault(_babelPluginTransformExportExtensions);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default={presets:[_babelPresetStage2.default],plugins:[_babelPluginTransformClassConstructorCall2.default,_babelPluginTransformExportExtensions2.default]};module.exports=exports["default"]},{"babel-plugin-transform-class-constructor-call":89,"babel-plugin-transform-export-extensions":122,"babel-preset-stage-2":137}],137:[function(require,module,exports){"use strict";exports.__esModule=true;var _babelPresetStage=require("babel-preset-stage-3");var _babelPresetStage2=_interopRequireDefault(_babelPresetStage);var _babelPluginTransformClassProperties=require("babel-plugin-transform-class-properties");var _babelPluginTransformClassProperties2=_interopRequireDefault(_babelPluginTransformClassProperties);var _babelPluginTransformObjectRestSpread=require("babel-plugin-transform-object-rest-spread");var _babelPluginTransformObjectRestSpread2=_interopRequireDefault(_babelPluginTransformObjectRestSpread);var _babelPluginTransformDecorators=require("babel-plugin-transform-decorators");var _babelPluginTransformDecorators2=_interopRequireDefault(_babelPluginTransformDecorators);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default={presets:[_babelPresetStage2.default],plugins:[_babelPluginTransformClassProperties2.default,_babelPluginTransformObjectRestSpread2.default,_babelPluginTransformDecorators2.default]};module.exports=exports["default"]},{"babel-plugin-transform-class-properties":90,"babel-plugin-transform-decorators":91,"babel-plugin-transform-object-rest-spread":124,"babel-preset-stage-3":138}],138:[function(require,module,exports){"use strict";exports.__esModule=true;var _babelPluginSyntaxTrailingFunctionCommas=require("babel-plugin-syntax-trailing-function-commas");var _babelPluginSyntaxTrailingFunctionCommas2=_interopRequireDefault(_babelPluginSyntaxTrailingFunctionCommas);var _babelPluginTransformAsyncToGenerator=require("babel-plugin-transform-async-to-generator");var _babelPluginTransformAsyncToGenerator2=_interopRequireDefault(_babelPluginTransformAsyncToGenerator);var _babelPluginTransformExponentiationOperator=require("babel-plugin-transform-exponentiation-operator");var _babelPluginTransformExponentiationOperator2=_interopRequireDefault(_babelPluginTransformExponentiationOperator);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default={plugins:[_babelPluginSyntaxTrailingFunctionCommas2.default,_babelPluginTransformAsyncToGenerator2.default,_babelPluginTransformExponentiationOperator2.default]};module.exports=exports["default"]},{"babel-plugin-syntax-trailing-function-commas":87,"babel-plugin-transform-async-to-generator":88,"babel-plugin-transform-exponentiation-operator":121}],139:[function(require,module,exports){module.exports={default:require("core-js/library/fn/get-iterator"),__esModule:true}},{"core-js/library/fn/get-iterator":234}],140:[function(require,module,exports){module.exports={default:require("core-js/library/fn/json/stringify"),__esModule:true}},{"core-js/library/fn/json/stringify":235}],141:[function(require,module,exports){module.exports={default:require("core-js/library/fn/map"),__esModule:true}},{"core-js/library/fn/map":236}],142:[function(require,module,exports){module.exports={default:require("core-js/library/fn/number/max-safe-integer"),__esModule:true}},{"core-js/library/fn/number/max-safe-integer":237}],143:[function(require,module,exports){module.exports={default:require("core-js/library/fn/object/assign"),__esModule:true}},{"core-js/library/fn/object/assign":238}],144:[function(require,module,exports){module.exports={default:require("core-js/library/fn/object/create"),__esModule:true}},{"core-js/library/fn/object/create":239}],145:[function(require,module,exports){module.exports={default:require("core-js/library/fn/object/get-own-property-symbols"),__esModule:true}},{"core-js/library/fn/object/get-own-property-symbols":240}],146:[function(require,module,exports){module.exports={default:require("core-js/library/fn/object/keys"),__esModule:true}},{"core-js/library/fn/object/keys":241}],147:[function(require,module,exports){module.exports={default:require("core-js/library/fn/object/set-prototype-of"),__esModule:true}},{"core-js/library/fn/object/set-prototype-of":242}],148:[function(require,module,exports){module.exports={default:require("core-js/library/fn/symbol"),__esModule:true}},{"core-js/library/fn/symbol":244}],149:[function(require,module,exports){module.exports={default:require("core-js/library/fn/symbol/for"),__esModule:true}},{"core-js/library/fn/symbol/for":243}],150:[function(require,module,exports){module.exports={default:require("core-js/library/fn/symbol/iterator"),__esModule:true}},{"core-js/library/fn/symbol/iterator":245}],151:[function(require,module,exports){module.exports={default:require("core-js/library/fn/weak-map"),__esModule:true}},{"core-js/library/fn/weak-map":246}],152:[function(require,module,exports){module.exports={default:require("core-js/library/fn/weak-set"),__esModule:true}},{"core-js/library/fn/weak-set":247}],153:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}},{}],154:[function(require,module,exports){"use strict";exports.__esModule=true;var _setPrototypeOf=require("../core-js/object/set-prototype-of");var _setPrototypeOf2=_interopRequireDefault(_setPrototypeOf);var _create=require("../core-js/object/create");var _create2=_interopRequireDefault(_create);var _typeof2=require("../helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+(typeof superClass==="undefined"?"undefined":(0,_typeof3.default)(superClass)))}subClass.prototype=(0,_create2.default)(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)_setPrototypeOf2.default?(0,_setPrototypeOf2.default)(subClass,superClass):subClass.__proto__=superClass}},{"../core-js/object/create":144,"../core-js/object/set-prototype-of":147,"../helpers/typeof":156}],155:[function(require,module,exports){"use strict";exports.__esModule=true;var _typeof2=require("../helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&((typeof call==="undefined"?"undefined":(0,_typeof3.default)(call))==="object"||typeof call==="function")?call:self}},{"../helpers/typeof":156}],156:[function(require,module,exports){"use strict";exports.__esModule=true;var _iterator=require("../core-js/symbol/iterator");var _iterator2=_interopRequireDefault(_iterator);var _symbol=require("../core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);var _typeof=typeof _symbol2.default==="function"&&typeof _iterator2.default==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof _symbol2.default==="function"&&obj.constructor===_symbol2.default?"symbol":typeof obj};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=typeof _symbol2.default==="function"&&_typeof(_iterator2.default)==="symbol"?function(obj){return typeof obj==="undefined"?"undefined":_typeof(obj)}:function(obj){return obj&&typeof _symbol2.default==="function"&&obj.constructor===_symbol2.default?"symbol":typeof obj==="undefined"?"undefined":_typeof(obj)}},{"../core-js/symbol":148,"../core-js/symbol/iterator":150}],157:[function(require,module,exports){"use strict";exports.__esModule=true;var _symbol=require("babel-runtime/core-js/symbol");var _symbol2=_interopRequireDefault(_symbol);exports.default=function(code,opts){var stack=void 0;try{throw new Error}catch(error){if(error.stack){stack=error.stack.split("\n").slice(1).join("\n")}}opts=(0,_assign2.default)({allowReturnOutsideFunction:true,allowSuperOutsideMethod:true,preserveComments:false},opts);var _getAst=function getAst(){var ast=void 0;try{ast=babylon.parse(code,opts);ast=_babelTraverse2.default.removeProperties(ast,{preserveComments:opts.preserveComments});_babelTraverse2.default.cheap(ast,function(node){node[FROM_TEMPLATE]=true})}catch(err){err.stack=err.stack+"from\n"+stack;throw err}_getAst=function getAst(){return ast};return ast};return function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return useTemplate(_getAst(),args)}};var _cloneDeep=require("lodash/cloneDeep");var _cloneDeep2=_interopRequireDefault(_cloneDeep);var _assign=require("lodash/assign");var _assign2=_interopRequireDefault(_assign);var _has=require("lodash/has");var _has2=_interopRequireDefault(_has);var _babelTraverse=require("babel-traverse");var _babelTraverse2=_interopRequireDefault(_babelTraverse);var _babylon=require("babylon");var babylon=_interopRequireWildcard(_babylon);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var FROM_TEMPLATE="_fromTemplate";var TEMPLATE_SKIP=(0,_symbol2.default)();function useTemplate(ast,nodes){ast=(0,_cloneDeep2.default)(ast);var _ast=ast;var program=_ast.program;if(nodes.length){(0,_babelTraverse2.default)(ast,templateVisitor,null,nodes); -}if(program.body.length>1){return program.body}else{return program.body[0]}}var templateVisitor={noScope:true,enter:function enter(path,args){var node=path.node;if(node[TEMPLATE_SKIP])return path.skip();if(t.isExpressionStatement(node)){node=node.expression}var replacement=void 0;if(t.isIdentifier(node)&&node[FROM_TEMPLATE]){if((0,_has2.default)(args[0],node.name)){replacement=args[0][node.name]}else if(node.name[0]==="$"){var i=+node.name.slice(1);if(args[i])replacement=args[i]}}if(replacement===null){path.remove()}if(replacement){replacement[TEMPLATE_SKIP]=true;path.replaceInline(replacement)}},exit:function exit(_ref){var node=_ref.node;if(!node.loc)_babelTraverse2.default.clearNode(node)}};module.exports=exports["default"]},{"babel-runtime/core-js/symbol":148,"babel-traverse":161,"babel-types":194,babylon:198,"lodash/assign":819,"lodash/cloneDeep":823,"lodash/has":838}],158:[function(require,module,exports){"use strict";exports.__esModule=true;exports.scope=exports.path=undefined;var _weakMap=require("babel-runtime/core-js/weak-map");var _weakMap2=_interopRequireDefault(_weakMap);exports.clear=clear;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var path=exports.path=new _weakMap2.default;var scope=exports.scope=new _weakMap2.default;function clear(){exports.path=path=new _weakMap2.default;exports.scope=scope=new _weakMap2.default}},{"babel-runtime/core-js/weak-map":151}],159:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _path2=require("./path");var _path3=_interopRequireDefault(_path2);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var testing=process.env.NODE_ENV==="test";var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){(0,_classCallCheck3.default)(this,TraversalContext);this.queue=null;this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.shouldVisit=function shouldVisit(node){var opts=this.opts;if(opts.enter||opts.exit)return true;if(opts[node.type])return true;var keys=t.VISITOR_KEYS[node.type];if(!keys||!keys.length)return false;for(var _iterator=keys,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var key=_ref;if(node[key])return true}return false};TraversalContext.prototype.create=function create(node,obj,key,listKey){return _path3.default.get({parentPath:this.parentPath,parent:node,container:obj,key:key,listKey:listKey})};TraversalContext.prototype.maybeQueue=function maybeQueue(path,notPriority){if(this.trap){throw new Error("Infinite cycle detected")}if(this.queue){if(notPriority){this.queue.push(path)}else{this.priorityQueue.push(path)}}};TraversalContext.prototype.visitMultiple=function visitMultiple(container,parent,listKey){if(container.length===0)return false;var queue=[];for(var key=0;key=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var path=_ref2;path.resync();if(path.contexts.length===0||path.contexts[path.contexts.length-1]!==this){path.pushContext(this)}if(path.key===null)continue;if(testing&&queue.length>=1e4){this.trap=true}if(visited.indexOf(path.node)>=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}if(this.priorityQueue.length){stop=this.visitQueue(this.priorityQueue);this.priorityQueue=[];this.queue=queue;if(stop)break}}for(var _iterator3=queue,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var _path=_ref3;_path.popContext()}this.queue=null;return stop};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return false;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports.default=TraversalContext;module.exports=exports["default"]}).call(this,require("_process"))},{"./path":168,_process:889,"babel-runtime/core-js/get-iterator":139,"babel-runtime/helpers/classCallCheck":153,"babel-types":194}],160:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var Hub=function Hub(file,options){(0,_classCallCheck3.default)(this,Hub);this.file=file;this.options=options};exports.default=Hub;module.exports=exports["default"]},{"babel-runtime/helpers/classCallCheck":153}],161:[function(require,module,exports){"use strict";exports.__esModule=true;exports.visitors=exports.Hub=exports.Scope=exports.NodePath=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _path=require("./path");Object.defineProperty(exports,"NodePath",{enumerable:true,get:function get(){return _interopRequireDefault(_path).default}});var _scope=require("./scope");Object.defineProperty(exports,"Scope",{enumerable:true,get:function get(){return _interopRequireDefault(_scope).default}});var _hub=require("./hub");Object.defineProperty(exports,"Hub",{enumerable:true,get:function get(){return _interopRequireDefault(_hub).default}});exports.default=traverse;var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _includes=require("lodash/includes");var _includes2=_interopRequireDefault(_includes);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _cache=require("./cache");var cache=_interopRequireWildcard(_cache);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.visitors=visitors;function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts)opts={};if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}visitors.explode(opts);traverse.node(parent,opts,scope,state,parentPath)}traverse.visitors=visitors;traverse.verify=visitors.verify;traverse.explode=visitors.explode;traverse.NodePath=require("./path");traverse.Scope=require("./scope");traverse.Hub=require("./hub");traverse.cheap=function(node,enter){return t.traverseFast(node,enter)};traverse.node=function(node,opts,scope,state,parentPath,skipKeys){var keys=t.VISITOR_KEYS[node.type];if(!keys)return;var context=new _context2.default(scope,opts,state,parentPath);for(var _iterator=keys,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var key=_ref;if(skipKeys&&skipKeys[key])continue;if(context.visit(node,key))return}};traverse.clearNode=function(node,opts){t.removeProperties(node,opts);cache.path.delete(node)};traverse.removeProperties=function(tree,opts){t.traverseFast(tree,traverse.clearNode,opts);return tree};function hasBlacklistedType(path,state){if(path.node.type===state.type){state.has=true;path.stop()}}traverse.hasType=function(tree,scope,type,blacklistTypes){if((0,_includes2.default)(blacklistTypes,tree.type))return false;if(tree.type===type)return true;var state={has:false,type:type};traverse(tree,{blacklist:blacklistTypes,enter:hasBlacklistedType},scope,state);return state.has};traverse.clearCache=function(){cache.clear()};traverse.copyCache=function(source,destination){if(cache.path.has(source)){cache.path.set(destination,cache.path.get(source))}}},{"./cache":158,"./context":159,"./hub":160,"./path":168,"./scope":180,"./visitors":182,"babel-messages":76,"babel-runtime/core-js/get-iterator":139,"babel-types":194,"lodash/includes":841}],162:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.findParent=findParent;exports.find=find;exports.getFunctionParent=getFunctionParent;exports.getStatementParent=getStatementParent;exports.getEarliestCommonAncestorFrom=getEarliestCommonAncestorFrom;exports.getDeepestCommonAncestorFrom=getDeepestCommonAncestorFrom;exports.getAncestry=getAncestry;exports.inType=inType;exports.inShadow=inShadow;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function findParent(callback){var path=this;while(path=path.parentPath){if(callback(path))return path}return null}function find(callback){var path=this;do{if(callback(path))return path}while(path=path.parentPath);return null}function getFunctionParent(){return this.findParent(function(path){return path.isFunction()||path.isProgram()})}function getStatementParent(){var path=this;do{if(Array.isArray(path.container)){return path}}while(path=path.parentPath)}function getEarliestCommonAncestorFrom(paths){return this.getDeepestCommonAncestorFrom(paths,function(deepest,i,ancestries){var earliest=void 0;var keys=t.VISITOR_KEYS[deepest.type];for(var _iterator=ancestries,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var ancestry=_ref;var path=ancestry[i+1];if(!earliest){earliest=path;continue}if(path.listKey&&earliest.listKey===path.listKey){if(path.keycurrentKeyIndex){earliest=path}}return earliest})}function getDeepestCommonAncestorFrom(paths,filter){var _this=this;if(!paths.length){return this}if(paths.length===1){return paths[0]}var minDepth=Infinity;var lastCommonIndex=void 0,lastCommon=void 0;var ancestries=paths.map(function(path){var ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==_this);if(ancestry.length=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var ancestry=_ref2;if(ancestry[i]!==shouldMatch){break depthLoop}}lastCommonIndex=i;lastCommon=shouldMatch}if(lastCommon){if(filter){return filter(lastCommon,lastCommonIndex,ancestries)}else{return lastCommon}}else{throw new Error("Couldn't find intersection")}}function getAncestry(){var path=this;var paths=[];do{paths.push(path)}while(path=path.parentPath);return paths}function inType(){var path=this;while(path){for(var _iterator3=arguments,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var type=_ref3;if(path.node.type===type)return true}path=path.parentPath}return false}function inShadow(key){var parentFn=this.isFunction()?this:this.findParent(function(p){return p.isFunction()});if(!parentFn)return;if(parentFn.isFunctionExpression()||parentFn.isFunctionDeclaration()){var shadow=parentFn.node.shadow;if(shadow&&(!key||shadow[key]!==false)){return parentFn}}else if(parentFn.isArrowFunctionExpression()){return parentFn}return null}},{"./index":168,"babel-runtime/core-js/get-iterator":139,"babel-types":194}],163:[function(require,module,exports){"use strict";exports.__esModule=true;exports.shareCommentsWithSiblings=shareCommentsWithSiblings;exports.addComment=addComment;exports.addComments=addComments;function shareCommentsWithSiblings(){var node=this.node;if(!node)return;var trailing=node.trailingComments;var leading=node.leadingComments;if(!trailing&&!leading)return;var prev=this.getSibling(this.key-1);var next=this.getSibling(this.key+1);if(!prev.node)prev=next;if(!next.node)next=prev;prev.addComments("trailing",leading);next.addComments("leading",trailing)}function addComment(type,content,line){this.addComments(type,[{type:line?"CommentLine":"CommentBlock",value:content}])}function addComments(type,comments){if(!comments)return;var node=this.node;if(!node)return;var key=type+"Comments";if(node[key]){node[key]=node[key].concat(comments)}else{node[key]=comments}}},{}],164:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.call=call;exports._call=_call;exports.isBlacklisted=isBlacklisted;exports.visit=visit;exports.skip=skip;exports.skipKey=skipKey;exports.stop=stop;exports.setScope=setScope;exports.setContext=setContext;exports.resync=resync;exports._resyncParent=_resyncParent;exports._resyncKey=_resyncKey;exports._resyncList=_resyncList;exports._resyncRemoved=_resyncRemoved;exports.popContext=popContext;exports.pushContext=pushContext;exports.setup=setup;exports.setKey=setKey;exports.requeue=requeue;exports._getQueueContexts=_getQueueContexts;var _index=require("../index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function call(key){var opts=this.opts;this.debug(function(){return key});if(this.node){if(this._call(opts[key]))return true}if(this.node){return this._call(opts[this.node.type]&&opts[this.node.type][key])}return false}function _call(fns){if(!fns)return false;for(var _iterator=fns,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var fn=_ref;if(!fn)continue;var node=this.node;if(!node)return true;var ret=fn.call(this.state,this,this.state);if(ret)throw new Error("Unexpected return value from visitor method "+fn);if(this.node!==node)return true;if(this.shouldStop||this.shouldSkip||this.removed)return true}return false}function isBlacklisted(){var blacklist=this.opts.blacklist;return blacklist&&blacklist.indexOf(this.node.type)>-1}function visit(){if(!this.node){return false}if(this.isBlacklisted()){return false}if(this.opts.shouldSkip&&this.opts.shouldSkip(this)){return false}if(this.call("enter")||this.shouldSkip){this.debug(function(){return"Skip..."});return this.shouldStop}this.debug(function(){return"Recursing into..."});_index2.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys);this.call("exit");return this.shouldStop}function skip(){this.shouldSkip=true}function skipKey(key){this.skipKeys[key]=true}function stop(){this.shouldStop=true;this.shouldSkip=true}function setScope(){if(this.opts&&this.opts.noScope)return;var target=this.context&&this.context.scope;if(!target){var path=this.parentPath;while(path&&!target){if(path.opts&&path.opts.noScope)return;target=path.scope;path=path.parentPath}}this.scope=this.getScope(target);if(this.scope)this.scope.init()}function setContext(context){this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.skipKeys={};if(context){this.context=context;this.state=context.state;this.opts=context.opts}this.setScope();return this}function resync(){if(this.removed)return;this._resyncParent();this._resyncList();this._resyncKey()}function _resyncParent(){if(this.parentPath){this.parent=this.parentPath.node}}function _resyncKey(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(var i=0;i=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var context=_ref2;context.maybeQueue(pathToQueue)}}function _getQueueContexts(){var path=this;var contexts=this.contexts;while(!contexts.length){path=path.parentPath;contexts=path.contexts}return contexts}},{"../index":161,"babel-runtime/core-js/get-iterator":139}],165:[function(require,module,exports){"use strict";exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.ensureBlock=ensureBlock;exports.arrowFunctionToShadowed=arrowFunctionToShadowed;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function toComputedKey(){var node=this.node;var key=void 0;if(this.isMemberExpression()){key=node.property}else if(this.isProperty()||this.isMethod()){key=node.key}else{throw new ReferenceError("todo")}if(!node.computed){if(t.isIdentifier(key))key=t.stringLiteral(key.name)}return key}function ensureBlock(){return t.ensureBlock(this.node)}function arrowFunctionToShadowed(){if(!this.isArrowFunctionExpression())return;this.ensureBlock();var node=this.node;node.expression=false;node.type="FunctionExpression";node.shadow=node.shadow||true}},{"babel-types":194}],166:[function(require,module,exports){(function(global){"use strict";exports.__esModule=true;var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _map=require("babel-runtime/core-js/map");var _map2=_interopRequireDefault(_map);exports.evaluateTruthy=evaluateTruthy;exports.evaluate=evaluate;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var VALID_CALLEES=["String","Number","Math"];var INVALID_METHODS=["random"];function evaluateTruthy(){var res=this.evaluate();if(res.confident)return!!res.value}function evaluate(){var confident=true;var deoptPath=void 0;var seen=new _map2.default;function deopt(path){if(!confident)return;deoptPath=path;confident=false}var value=evaluate(this);if(!confident)value=undefined;return{confident:confident,deopt:deoptPath,value:value};function evaluate(path){var node=path.node;if(seen.has(node)){var existing=seen.get(node);if(existing.resolved){return existing.value}else{deopt(path);return}}else{var item={resolved:false};seen.set(node,item);var val=_evaluate(path);if(confident){item.resolved=true;item.value=val}return val}}function _evaluate(path){if(!confident)return;var node=path.node;if(path.isSequenceExpression()){var exprs=path.get("expressions");return evaluate(exprs[exprs.length-1])}if(path.isStringLiteral()||path.isNumericLiteral()||path.isBooleanLiteral()){return node.value}if(path.isNullLiteral()){return null}if(path.isTemplateLiteral()){var str="";var i=0;var _exprs=path.get("expressions");for(var _iterator=node.quasis,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var elem=_ref;if(!confident)break;str+=elem.value.cooked;var expr=_exprs[i++];if(expr)str+=String(evaluate(expr))}if(!confident)return;return str}if(path.isConditionalExpression()){var testResult=evaluate(path.get("test"));if(!confident)return;if(testResult){return evaluate(path.get("consequent"))}else{return evaluate(path.get("alternate"))}}if(path.isExpressionWrapper()){return evaluate(path.get("expression"))}if(path.isMemberExpression()&&!path.parentPath.isCallExpression({callee:node})){var property=path.get("property");var object=path.get("object");if(object.isLiteral()&&property.isIdentifier()){var _value=object.node.value;var type=typeof _value==="undefined"?"undefined":(0,_typeof3.default)(_value);if(type==="number"||type==="string"){return _value[property.node.name]}}}if(path.isReferencedIdentifier()){var binding=path.scope.getBinding(node.name);if(binding&&binding.constantViolations.length>0){return deopt(binding.path)}if(binding&&binding.hasValue){return binding.value}else{if(node.name==="undefined"){return undefined}else if(node.name==="Infinity"){return Infinity}else if(node.name==="NaN"){return NaN}var resolved=path.resolve();if(resolved===path){return deopt(path)}else{return evaluate(resolved)}}}if(path.isUnaryExpression({prefix:true})){if(node.operator==="void"){return undefined}var argument=path.get("argument");if(node.operator==="typeof"&&(argument.isFunction()||argument.isClass())){return"function"}var arg=evaluate(argument);if(!confident)return;switch(node.operator){case"!":return!arg;case"+":return+arg;case"-":return-arg;case"~":return~arg;case"typeof":return typeof arg==="undefined"?"undefined":(0,_typeof3.default)(arg)}}if(path.isArrayExpression()){var arr=[];var elems=path.get("elements");for(var _iterator2=elems,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _elem=_ref2;_elem=_elem.evaluate();if(_elem.confident){arr.push(_elem.value)}else{return deopt(_elem)}}return arr}if(path.isObjectExpression()){}if(path.isLogicalExpression()){var wasConfident=confident;var left=evaluate(path.get("left"));var leftConfident=confident;confident=wasConfident;var right=evaluate(path.get("right"));var rightConfident=confident;confident=leftConfident&&rightConfident;switch(node.operator){case"||":if(left&&leftConfident){confident=true;return left}if(!confident)return;return left||right;case"&&":if(!left&&leftConfident||!right&&rightConfident){confident=true}if(!confident)return;return left&&right}}if(path.isBinaryExpression()){var _left=evaluate(path.get("left"));if(!confident)return;var _right=evaluate(path.get("right"));if(!confident)return;switch(node.operator){case"-":return _left-_right;case"+":return _left+_right;case"/":return _left/_right;case"*":return _left*_right;case"%":return _left%_right;case"**":return Math.pow(_left,_right);case"<":return _left<_right;case">":return _left>_right;case"<=":return _left<=_right;case">=":return _left>=_right;case"==":return _left==_right;case"!=":return _left!=_right;case"===":return _left===_right;case"!==":return _left!==_right;case"|":return _left|_right;case"&":return _left&_right;case"^":return _left^_right;case"<<":return _left<<_right;case">>":return _left>>_right;case">>>":return _left>>>_right}}if(path.isCallExpression()){var callee=path.get("callee");var context=void 0;var func=void 0;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var _object=callee.get("object");var _property=callee.get("property");if(_object.isIdentifier()&&_property.isIdentifier()&&VALID_CALLEES.indexOf(_object.node.name)>=0&&INVALID_METHODS.indexOf(_property.node.name)<0){context=global[_object.node.name];func=context[_property.node.name]}if(_object.isLiteral()&&_property.isIdentifier()){var _type=(0,_typeof3.default)(_object.node.value);if(_type==="string"||_type==="number"){context=_object.node.value;func=context[_property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}deopt(path)}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/map":141,"babel-runtime/helpers/typeof":156}],167:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.getStatementParent=getStatementParent;exports.getOpposite=getOpposite;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;var _index=require("./index");var _index2=_interopRequireDefault(_index);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else if(this.isTryStatement()){add(this.get("block"));add(this.get("handler"));add(this.get("finalizer"))}else{paths.push(this)}return paths}function getSibling(key){return _index2.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key})}function get(key,context){if(context===true)context=this.context;var parts=key.split(".");if(parts.length===1){return this._getKey(key,context)}else{return this._getPattern(parts,context)}}function _getKey(key,context){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2.default.get({listKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext(context)})}else{return _index2.default.get({parentPath:this,parent:node,container:node,key:key}).setContext(context)}}function _getPattern(parts,context){var path=this;for(var _iterator=parts,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var part=_ref;if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part,context)}}}return path}function getBindingIdentifiers(duplicates){return t.getBindingIdentifiers(this.node,duplicates)}function getOuterBindingIdentifiers(duplicates){return t.getOuterBindingIdentifiers(this.node,duplicates)}},{"./index":168,"babel-runtime/core-js/get-iterator":139,"babel-types":194}],168:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _virtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_virtualTypes);var _debug2=require("debug");var _debug3=_interopRequireDefault(_debug2);var _invariant=require("invariant");var _invariant2=_interopRequireDefault(_invariant);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _assign=require("lodash/assign");var _assign2=_interopRequireDefault(_assign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _cache=require("../cache");function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){ -return obj&&obj.__esModule?obj:{default:obj}}var _debug=(0,_debug3.default)("babel");var NodePath=function(){function NodePath(hub,parent){(0,_classCallCheck3.default)(this,NodePath);this.parent=parent;this.hub=hub;this.contexts=[];this.data={};this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.state=null;this.opts=null;this.skipKeys=null;this.parentPath=null;this.context=null;this.container=null;this.listKey=null;this.inList=false;this.parentKey=null;this.key=null;this.node=null;this.scope=null;this.type=null;this.typeAnnotation=null}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var listKey=_ref.listKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}(0,_invariant2.default)(parent,"To get a node path the parent needs to exist");var targetNode=container[key];var paths=_cache.path.get(parent)||[];if(!_cache.path.has(parent)){_cache.path.set(parent,paths)}var path=void 0;for(var i=0;i=_iterator.length)return"break";_ref2=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)return"break";_ref2=_i.value}var type=_ref2;var typeKey="is"+type;NodePath.prototype[typeKey]=function(opts){return t[typeKey](this.node,opts)};NodePath.prototype["assert"+type]=function(opts){if(!this[typeKey](opts)){throw new TypeError("Expected node path of type "+type)}}};for(var _iterator=t.TYPES,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref2;var _ret2=_loop2();if(_ret2==="break")break}var _loop=function _loop(type){if(type[0]==="_")return"continue";if(t.TYPES.indexOf(type)<0)t.TYPES.push(type);var virtualType=virtualTypes[type];NodePath.prototype["is"+type]=function(opts){return virtualType.checkPath(this,opts)}};for(var type in virtualTypes){var _ret=_loop(type);if(_ret==="continue")continue}module.exports=exports["default"]},{"../cache":158,"../index":161,"../scope":180,"./ancestry":162,"./comments":163,"./context":164,"./conversion":165,"./evaluation":166,"./family":167,"./inference":169,"./introspection":172,"./lib/virtual-types":175,"./modification":176,"./removal":177,"./replacement":178,"babel-runtime/core-js/get-iterator":139,"babel-runtime/helpers/classCallCheck":153,"babel-types":194,debug:635,invariant:648,"lodash/assign":819}],169:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.getTypeAnnotation=getTypeAnnotation;exports._getTypeAnnotation=_getTypeAnnotation;exports.isBaseType=isBaseType;exports.couldBeBaseType=couldBeBaseType;exports.baseTypeStrictlyMatches=baseTypeStrictlyMatches;exports.isGenericType=isGenericType;var _inferers=require("./inferers");var inferers=_interopRequireWildcard(_inferers);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function getTypeAnnotation(){if(this.typeAnnotation)return this.typeAnnotation;var type=this._getTypeAnnotation()||t.anyTypeAnnotation();if(t.isTypeAnnotation(type))type=type.typeAnnotation;return this.typeAnnotation=type}function _getTypeAnnotation(){var node=this.node;if(!node){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){var declar=this.parentPath.parentPath;var declarParent=declar.parentPath;if(declar.key==="left"&&declarParent.isForInStatement()){return t.stringTypeAnnotation()}if(declar.key==="left"&&declarParent.isForOfStatement()){return t.anyTypeAnnotation()}return t.voidTypeAnnotation()}else{return}}if(node.typeAnnotation){return node.typeAnnotation}var inferer=inferers[node.type];if(inferer){return inferer.call(this,node)}inferer=inferers[this.parentPath.type];if(inferer&&inferer.validParent){return this.parentPath.getTypeAnnotation()}}function isBaseType(baseName,soft){return _isBaseType(baseName,this.getTypeAnnotation(),soft)}function _isBaseType(baseName,type,soft){if(baseName==="string"){return t.isStringTypeAnnotation(type)}else if(baseName==="number"){return t.isNumberTypeAnnotation(type)}else if(baseName==="boolean"){return t.isBooleanTypeAnnotation(type)}else if(baseName==="any"){return t.isAnyTypeAnnotation(type)}else if(baseName==="mixed"){return t.isMixedTypeAnnotation(type)}else if(baseName==="void"){return t.isVoidTypeAnnotation(type)}else{if(soft){return false}else{throw new Error("Unknown base type "+baseName)}}}function couldBeBaseType(name){var type=this.getTypeAnnotation();if(t.isAnyTypeAnnotation(type))return true;if(t.isUnionTypeAnnotation(type)){for(var _iterator=type.types,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var type2=_ref;if(t.isAnyTypeAnnotation(type2)||_isBaseType(name,type2,true)){return true}}return false}else{return _isBaseType(name,type,true)}}function baseTypeStrictlyMatches(right){var left=this.getTypeAnnotation();right=right.getTypeAnnotation();if(!t.isAnyTypeAnnotation(left)&&t.isFlowBaseAnnotation(left)){return right.type===left.type}}function isGenericType(genericName){var type=this.getTypeAnnotation();return t.isGenericTypeAnnotation(type)&&t.isIdentifier(type.id,{name:genericName})}},{"./inferers":171,"babel-runtime/core-js/get-iterator":139,"babel-types":194}],170:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.default=function(node){if(!this.isReferenced())return;var binding=this.scope.getBinding(node.name);if(binding){if(binding.identifier.typeAnnotation){return binding.identifier.typeAnnotation}else{return getTypeAnnotationBindingConstantViolations(this,node.name)}}if(node.name==="undefined"){return t.voidTypeAnnotation()}else if(node.name==="NaN"||node.name==="Infinity"){return t.numberTypeAnnotation()}else if(node.name==="arguments"){}};var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function getTypeAnnotationBindingConstantViolations(path,name){var binding=path.scope.getBinding(name);var types=[];path.typeAnnotation=t.unionTypeAnnotation(types);var functionConstantViolations=[];var constantViolations=getConstantViolationsBefore(binding,path,functionConstantViolations);var testType=getConditionalAnnotation(path,name);if(testType){(function(){var testConstantViolations=getConstantViolationsBefore(binding,testType.ifStatement);constantViolations=constantViolations.filter(function(path){return testConstantViolations.indexOf(path)<0});types.push(testType.typeAnnotation)})()}if(constantViolations.length){constantViolations=constantViolations.concat(functionConstantViolations);for(var _iterator=constantViolations,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var violation=_ref;types.push(violation.getTypeAnnotation())}}if(types.length){return t.createUnionTypeAnnotation(types)}}function getConstantViolationsBefore(binding,path,functions){var violations=binding.constantViolations.slice();violations.unshift(binding.path);return violations.filter(function(violation){violation=violation.resolve();var status=violation._guessExecutionStatusRelativeTo(path);if(functions&&status==="function")functions.push(violation);return status==="before"})}function inferAnnotationFromBinaryExpression(name,path){var operator=path.node.operator;var right=path.get("right").resolve();var left=path.get("left").resolve();var target=void 0;if(left.isIdentifier({name:name})){target=right}else if(right.isIdentifier({name:name})){target=left}if(target){if(operator==="==="){return target.getTypeAnnotation()}else if(t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else{return}}else{if(operator!=="===")return}var typeofPath=void 0;var typePath=void 0;if(left.isUnaryExpression({operator:"typeof"})){typeofPath=left;typePath=right}else if(right.isUnaryExpression({operator:"typeof"})){typeofPath=right;typePath=left}if(!typePath&&!typeofPath)return;typePath=typePath.resolve();if(!typePath.isLiteral())return;var typeValue=typePath.node.value;if(typeof typeValue!=="string")return;if(!typeofPath.get("argument").isIdentifier({name:name}))return;return t.createTypeAnnotationBasedOnTypeof(typePath.node.value)}function getParentConditionalPath(path){var parentPath=void 0;while(parentPath=path.parentPath){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if(path.key==="test"){return}else{return parentPath}}else{path=parentPath}}}function getConditionalAnnotation(path,name){var ifStatement=getParentConditionalPath(path);if(!ifStatement)return;var test=ifStatement.get("test");var paths=[test];var types=[];do{var _path=paths.shift().resolve();if(_path.isLogicalExpression()){paths.push(_path.get("left"));paths.push(_path.get("right"))}if(_path.isBinaryExpression()){var type=inferAnnotationFromBinaryExpression(name,_path);if(type)types.push(type)}}while(paths.length);if(types.length){return{typeAnnotation:t.createUnionTypeAnnotation(types),ifStatement:ifStatement}}else{return getConditionalAnnotation(ifStatement,name)}}module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"babel-types":194}],171:[function(require,module,exports){"use strict";exports.__esModule=true;exports.Class=exports.Function=exports.Identifier=undefined;var _infererReference=require("./inferer-reference");Object.defineProperty(exports,"Identifier",{enumerable:true,get:function get(){return _interopRequireDefault(_infererReference).default}});exports.VariableDeclarator=VariableDeclarator;exports.TypeCastExpression=TypeCastExpression;exports.NewExpression=NewExpression;exports.TemplateLiteral=TemplateLiteral;exports.UnaryExpression=UnaryExpression;exports.BinaryExpression=BinaryExpression;exports.LogicalExpression=LogicalExpression;exports.ConditionalExpression=ConditionalExpression;exports.SequenceExpression=SequenceExpression;exports.AssignmentExpression=AssignmentExpression;exports.UpdateExpression=UpdateExpression;exports.StringLiteral=StringLiteral;exports.NumericLiteral=NumericLiteral;exports.BooleanLiteral=BooleanLiteral;exports.NullLiteral=NullLiteral;exports.RegExpLiteral=RegExpLiteral;exports.ObjectExpression=ObjectExpression;exports.ArrayExpression=ArrayExpression;exports.RestElement=RestElement;exports.CallExpression=CallExpression;exports.TaggedTemplateExpression=TaggedTemplateExpression;var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function VariableDeclarator(){var id=this.get("id");if(id.isIdentifier()){return this.get("init").getTypeAnnotation()}else{return}}function TypeCastExpression(node){return node.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(node){if(this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}}function TemplateLiteral(){return t.stringTypeAnnotation()}function UnaryExpression(node){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}function BinaryExpression(node){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isBaseType("number")&&right.isBaseType("number")){return t.numberTypeAnnotation()}else if(left.isBaseType("string")||right.isBaseType("string")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}function LogicalExpression(){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function ConditionalExpression(){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(node){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}function StringLiteral(){return t.stringTypeAnnotation()}function NumericLiteral(){return t.numberTypeAnnotation()}function BooleanLiteral(){return t.booleanTypeAnnotation()}function NullLiteral(){return t.nullLiteralTypeAnnotation()}function RegExpLiteral(){return t.genericTypeAnnotation(t.identifier("RegExp"))}function ObjectExpression(){return t.genericTypeAnnotation(t.identifier("Object"))}function ArrayExpression(){return t.genericTypeAnnotation(t.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return t.genericTypeAnnotation(t.identifier("Function"))}exports.Function=Func;exports.Class=Func;function CallExpression(){return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(callee){callee=callee.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}},{"./inferer-reference":170,"babel-types":194}],172:[function(require,module,exports){"use strict";exports.__esModule=true;exports.is=undefined;var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.matchesPattern=matchesPattern;exports.has=has;exports.isStatic=isStatic;exports.isnt=isnt;exports.equals=equals;exports.isNodeType=isNodeType;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;exports.isCompletionRecord=isCompletionRecord;exports.isStatementOrBlock=isStatementOrBlock;exports.referencesImport=referencesImport;exports.getSource=getSource;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports._guessExecutionStatusRelativeToDifferentFunctions=_guessExecutionStatusRelativeToDifferentFunctions;exports.resolve=resolve;exports._resolve=_resolve;var _includes=require("lodash/includes");var _includes2=_interopRequireDefault(_includes);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function matchesPattern(pattern,allowPartial){if(!this.isMemberExpression())return false;var parts=pattern.split(".");var search=[this.node];var i=0;function matches(name){var part=parts[i];return part==="*"||name===part}while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(!matches(node.name))return false}else if(t.isLiteral(node)){if(!matches(node.value))return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.unshift(node.property);search.unshift(node.object);continue}}else if(t.isThisExpression(node)){if(!matches("this"))return false}else{return false}if(++i>parts.length){return false}}return i===parts.length}function has(key){var val=this.node&&this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}function isStatic(){return this.scope.isStatic(this.node)}var is=exports.is=has;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(replacement){if(this.key!=="body"||!this.parentPath.isArrowFunctionExpression()){return false}if(this.isExpression()){return t.isBlockStatement(replacement)}else if(this.isBlockStatement()){return t.isExpression(replacement)}return false}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return(0,_includes2.default)(t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;var parent=path.parentPath;if(!parent.isImportDeclaration())return false;if(parent.node.source.value===moduleSource){if(!importName)return true}else{return false}if(path.isImportDefaultSpecifier()&&importName==="default"){return true}if(path.isImportNamespaceSpecifier()&&importName==="*"){return true}if(path.isImportSpecifier()&&path.node.imported.name===importName){return true}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function _guessExecutionStatusRelativeTo(target){var targetFuncParent=target.scope.getFunctionParent();var selfFuncParent=this.scope.getFunctionParent();if(targetFuncParent.node!==selfFuncParent.node){var status=this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);if(status){return status}else{target=targetFuncParent.path}}var targetPaths=target.getAncestry();if(targetPaths.indexOf(this)>=0)return"after";var selfPaths=this.getAncestry();var commonPath=void 0;var targetIndex=void 0;var selfIndex=void 0;for(selfIndex=0;selfIndex=0){commonPath=selfPath;break}}if(!commonPath){return"before"}var targetRelationship=targetPaths[targetIndex-1];var selfRelationship=selfPaths[selfIndex-1];if(!targetRelationship||!selfRelationship){return"before"}if(targetRelationship.listKey&&targetRelationship.container===selfRelationship.container){return targetRelationship.key>selfRelationship.key?"before":"after"}var targetKeyPosition=t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);var selfKeyPosition=t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);return targetKeyPosition>selfKeyPosition?"before":"after"}function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent){var targetFuncPath=targetFuncParent.path;if(!targetFuncPath.isFunctionDeclaration())return;var binding=targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);if(!binding.references)return"before";var referencePaths=binding.referencePaths;for(var _iterator=referencePaths,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var path=_ref;if(path.key!=="callee"||!path.parentPath.isCallExpression()){return}}var allStatus=void 0;for(var _iterator2=referencePaths,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _path=_ref2;var childOfFunction=!!_path.find(function(path){return path.node===targetFuncPath.node});if(childOfFunction)continue;var status=this._guessExecutionStatusRelativeTo(_path);if(allStatus){if(allStatus!==status)return}else{allStatus=status}}return allStatus}function resolve(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){var _this=this;if(resolved&&resolved.indexOf(this)>=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){var _ret=function(){var ret=binding.path.resolve(dangerous,resolved);if(_this.find(function(parent){return parent.node===ret.node}))return{v:void 0};return{v:ret}}();if((typeof _ret==="undefined"?"undefined":(0,_typeof3.default)(_ret))==="object")return _ret.v}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(dangerous,resolved)}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");for(var _iterator3=props,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var prop=_ref3;if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}},{"babel-runtime/core-js/get-iterator":139,"babel-runtime/helpers/typeof":156,"babel-types":194,"lodash/includes":841}],173:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(path,state){if(path.isJSXIdentifier()&&_babelTypes.react.isCompatTag(path.node.name)){return}var binding=path.scope.getBinding(path.node.name);if(!binding)return;if(binding!==state.scope.getBinding(path.node.name))return;if(binding.constant){state.bindings[path.node.name]=binding}else{for(var _iterator=binding.constantViolations,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var violationPath=_ref;state.breakOnScopePaths=state.breakOnScopePaths.concat(violationPath.getAncestry())}}}};var PathHoister=function(){function PathHoister(path,scope){(0,_classCallCheck3.default)(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var path=this._getAttachmentPath();if(!path)return;var targetScope=path.scope;if(targetScope.path===path){targetScope=path.scope.parent}if(targetScope.path.isProgram()||targetScope.path.isFunction()){for(var name in this.bindings){if(!targetScope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")continue;if(binding.path.getStatementParent().key>path.key)return}}return path};PathHoister.prototype._getAttachmentPath=function _getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var attachTo=this.getAttachmentPath();if(!attachTo)return;if(attachTo.getFunctionParent()===this.path.getFunctionParent())return;var uid=attachTo.scope.generateUidIdentifier("ref");attachTo.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.JSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports.default=PathHoister;module.exports=exports["default"]},{"babel-runtime/core-js/get-iterator":139,"babel-runtime/helpers/classCallCheck":153,"babel-types":194}],174:[function(require,module,exports){"use strict";exports.__esModule=true;var hooks=exports.hooks=[function(self,parent){if(self.key==="body"&&parent.isArrowFunctionExpression()){self.replaceWith(self.scope.buildUndefinedNode());return true}},function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===1;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();if(removeParent){parent.remove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}},function(self,parent){if(parent.isIfStatement()&&(self.key==="consequent"||self.key==="alternate")||parent.isLoop()&&self.key==="body"){self.replaceWith({type:"BlockStatement",body:[]});return true}}]},{}],175:[function(require,module,exports){"use strict";exports.__esModule=true;exports.Flow=exports.Pure=exports.Generated=exports.User=exports.Var=exports.BlockScoped=exports.Referenced=exports.Scope=exports.Expression=exports.Statement=exports.BindingIdentifier=exports.ReferencedMemberExpression=exports.ReferencedIdentifier=undefined;var _babelTypes=require("babel-types"); -var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}var ReferencedIdentifier=exports.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(_babelTypes.react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};var ReferencedMemberExpression=exports.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function checkPath(_ref2){var node=_ref2.node;var parent=_ref2.parent;return t.isMemberExpression(node)&&t.isReferenced(node,parent)}};var BindingIdentifier=exports.BindingIdentifier={types:["Identifier"],checkPath:function checkPath(_ref3){var node=_ref3.node;var parent=_ref3.parent;return t.isIdentifier(node)&&t.isBinding(node,parent)}};var Statement=exports.Statement={types:["Statement"],checkPath:function checkPath(_ref4){var node=_ref4.node;var parent=_ref4.parent;if(t.isStatement(node)){if(t.isVariableDeclaration(node)){if(t.isForXStatement(parent,{left:node}))return false;if(t.isForStatement(parent,{init:node}))return false}return true}else{return false}}};var Expression=exports.Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};var Scope=exports.Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};var Referenced=exports.Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};var BlockScoped=exports.BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};var Var=exports.Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};var User=exports.User={checkPath:function checkPath(path){return path.node&&!!path.node.loc}};var Generated=exports.Generated={checkPath:function checkPath(path){return!path.isUser()}};var Pure=exports.Pure={checkPath:function checkPath(path,opts){return path.scope.isPure(path.node,opts)}};var Flow=exports.Flow={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function checkPath(_ref5){var node=_ref5.node;if(t.isFlow(node)){return true}else if(t.isImportDeclaration(node)){return node.importKind==="type"||node.importKind==="typeof"}else if(t.isExportDeclaration(node)){return node.exportKind==="type"}else{return false}}}},{"babel-types":194}],176:[function(require,module,exports){"use strict";exports.__esModule=true;var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;var _cache=require("../cache");var _hoister=require("./lib/hoister");var _hoister2=_interopRequireDefault(_hoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this._replaceWith(t.blockStatement(nodes))}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var _path=_ref;_path.setScope();_path.debug(function(){return"Inserted."});for(var _iterator2=contexts,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var context=_ref2;context.maybeQueue(_path,true)}}return paths}function _containerInsertBefore(nodes){return this._containerInsert(this.key,nodes)}function _containerInsertAfter(nodes){return this._containerInsert(this.key+1,nodes)}function _maybePopFromStatements(nodes){var last=nodes[nodes.length-1];var isIdentifier=t.isIdentifier(last)||t.isExpressionStatement(last)&&t.isIdentifier(last.expression);if(isIdentifier&&!this.isCompletionRecord()){nodes.pop()}}function insertAfter(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertAfter(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node){var temp=this.scope.generateDeclaredUidIdentifier();nodes.unshift(t.expressionStatement(t.assignmentExpression("=",temp,this.node)));nodes.push(t.expressionStatement(temp))}this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertAfter(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.unshift(this.node);this._replaceWith(t.blockStatement(nodes))}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;var paths=_cache.path.get(this.parent);for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(!nodes){return[]}if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var fn=_ref;if(fn(this,this.parentPath))return true}}function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this._replaceWith(null)}}function _markRemoved(){this.shouldSkip=true;this.removed=true;this.node=null}function _assertUnremoved(){if(this.removed){throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}},{"./lib/removal-hooks":174,"babel-runtime/core-js/get-iterator":139}],178:[function(require,module,exports){"use strict";exports.__esModule=true;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.replaceWithMultiple=replaceWithMultiple;exports.replaceWithSourceString=replaceWithSourceString;exports.replaceWith=replaceWith;exports._replaceWith=_replaceWith;exports.replaceExpressionWithStatements=replaceExpressionWithStatements;exports.replaceInline=replaceInline;var _babelCodeFrame=require("babel-code-frame");var _babelCodeFrame2=_interopRequireDefault(_babelCodeFrame);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _index3=require("./index");var _index4=_interopRequireDefault(_index3);var _babylon=require("babylon");var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var hoistVariablesVisitor={Function:function Function(path){path.skip()},VariableDeclaration:function VariableDeclaration(path){if(path.node.kind!=="var")return;var bindings=path.getBindingIdentifiers();for(var key in bindings){path.scope.push({id:bindings[key]})}var exprs=[];for(var _iterator=path.node.declarations,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var declar=_ref;if(declar.init){exprs.push(t.expressionStatement(t.assignmentExpression("=",declar.id,declar.init)))}}path.replaceWithMultiple(exprs)}};function replaceWithMultiple(nodes){this.resync();nodes=this._verifyNodeList(nodes);t.inheritLeadingComments(nodes[0],this.node);t.inheritTrailingComments(nodes[nodes.length-1],this.node);this.node=this.container[this.key]=null;this.insertAfter(nodes);if(this.node){this.requeue()}else{this.remove()}}function replaceWithSourceString(replacement){this.resync();try{replacement="("+replacement+")";replacement=(0,_babylon.parse)(replacement)}catch(err){var loc=err.loc;if(loc){err.message+=" - make sure this is an expression.";err.message+="\n"+(0,_babelCodeFrame2.default)(replacement,loc.line,loc.column+1)}throw err}replacement=replacement.program.body[0].expression;_index2.default.removeProperties(replacement);return this.replaceWith(replacement)}function replaceWith(replacement){this.resync();if(this.removed){throw new Error("You can't replace this node, we've already removed it")}if(replacement instanceof _index4.default){replacement=replacement.node}if(!replacement){throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead")}if(this.node===replacement){return}if(this.isProgram()&&!t.isProgram(replacement)){throw new Error("You can only replace a Program root node with another Program node")}if(Array.isArray(replacement)){throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if(typeof replacement==="string"){throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`")}if(this.isNodeType("Statement")&&t.isExpression(replacement)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(replacement)){replacement=t.expressionStatement(replacement)}}if(this.isNodeType("Expression")&&t.isStatement(replacement)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(replacement)){return this.replaceExpressionWithStatements([replacement])}}var oldNode=this.node;if(oldNode){t.inheritsComments(replacement,oldNode);t.removeComments(oldNode)}this._replaceWith(replacement);this.type=replacement.type;this.setScope();this.requeue()}function _replaceWith(node){if(!this.container){throw new ReferenceError("Container is falsy")}if(this.inList){t.validate(this.parent,this.key,[node])}else{t.validate(this.parent,this.key,node)}this.debug(function(){return"Replace with "+(node&&node.type)});this.node=this.container[this.key]=node}function replaceExpressionWithStatements(nodes){this.resync();var toSequenceExpression=t.toSequenceExpression(nodes,this.scope);if(t.isSequenceExpression(toSequenceExpression)){var exprs=toSequenceExpression.expressions;if(exprs.length>=2&&this.parentPath.isExpressionStatement()){this._maybePopFromStatements(exprs)}if(exprs.length===1){this.replaceWith(exprs[0])}else{this.replaceWith(toSequenceExpression)}}else if(toSequenceExpression){this.replaceWith(toSequenceExpression)}else{var container=t.functionExpression(null,[],t.blockStatement(nodes));container.shadow=true;this.replaceWith(t.callExpression(container,[]));this.traverse(hoistVariablesVisitor);var completionRecords=this.get("callee").getCompletionRecords();for(var _iterator2=completionRecords,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var path=_ref2;if(!path.isExpressionStatement())continue;var loop=path.findParent(function(path){return path.isLoop()});if(loop){var callee=this.get("callee");var uid=callee.scope.generateDeclaredUidIdentifier("ret");callee.get("body").pushContainer("body",t.returnStatement(uid));path.get("expression").replaceWith(t.assignmentExpression("=",uid,path.node.expression))}else{path.replaceWith(t.returnStatement(path.node.expression))}}return this.node}}function replaceInline(nodes){this.resync();if(Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=this._verifyNodeList(nodes);this._containerInsertAfter(nodes);return this.remove()}else{return this.replaceWithMultiple(nodes)}}else{return this.replaceWith(nodes)}}},{"../index":161,"./index":168,"babel-code-frame":18,"babel-runtime/core-js/get-iterator":139,"babel-types":194,babylon:198}],179:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var Binding=function(){function Binding(_ref){var existing=_ref.existing;var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;(0,_classCallCheck3.default)(this,Binding);this.identifier=identifier;this.scope=scope;this.path=path;this.kind=kind;this.constantViolations=[];this.constant=true;this.referencePaths=[];this.referenced=false;this.references=0;this.clearValue();if(existing){this.constantViolations=[].concat(existing.path,existing.constantViolations,this.constantViolations)}}Binding.prototype.deoptValue=function deoptValue(){this.clearValue();this.hasDeoptedValue=true};Binding.prototype.setValue=function setValue(value){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=value};Binding.prototype.clearValue=function clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null};Binding.prototype.reassign=function reassign(path){this.constant=false;if(this.constantViolations.indexOf(path)!==-1){return}this.constantViolations.push(path)};Binding.prototype.reference=function reference(path){if(this.referencePaths.indexOf(path)!==-1){return}this.referenced=true;this.references++;this.referencePaths.push(path)};Binding.prototype.dereference=function dereference(){this.references--;this.referenced=!!this.references};return Binding}();exports.default=Binding;module.exports=exports["default"]},{"babel-runtime/helpers/classCallCheck":153}],180:[function(require,module,exports){"use strict";exports.__esModule=true;var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);var _create=require("babel-runtime/core-js/object/create");var _create2=_interopRequireDefault(_create);var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _includes=require("lodash/includes");var _includes2=_interopRequireDefault(_includes);var _repeat=require("lodash/repeat");var _repeat2=_interopRequireDefault(_repeat);var _renamer=require("./lib/renamer");var _renamer2=_interopRequireDefault(_renamer);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _defaults=require("lodash/defaults");var _defaults2=_interopRequireDefault(_defaults);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _binding2=require("./binding");var _binding3=_interopRequireDefault(_binding2);var _globals=require("globals");var _globals2=_interopRequireDefault(_globals);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _cache=require("../cache");function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _crawlCallsCount=0;function getCache(path,parentScope,self){var scopes=_cache.scope.get(path.node)||[];for(var _iterator=scopes,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var scope=_ref;if(scope.parent===parentScope&&scope.path===path)return scope}scopes.push(self);if(!_cache.scope.has(path.node)){_cache.scope.set(path.node,scopes)}}var collectorVisitor={For:function For(path){for(var _iterator2=t.FOR_INIT_KEYS,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var key=_ref2;var declar=path.get(key);if(declar.isVar())path.scope.getFunctionParent().registerBinding("var",declar)}},Declaration:function Declaration(path){if(path.isBlockScoped())return;if(path.isExportDeclaration()&&path.get("declaration").isDeclaration())return;path.scope.getFunctionParent().registerDeclaration(path)},ReferencedIdentifier:function ReferencedIdentifier(path,state){state.references.push(path)},ForXStatement:function ForXStatement(path,state){var left=path.get("left");if(left.isPattern()||left.isIdentifier()){state.constantViolations.push(left)}},ExportDeclaration:{exit:function exit(path){var node=path.node;var scope=path.scope;var declar=node.declaration;if(t.isClassDeclaration(declar)||t.isFunctionDeclaration(declar)){var _id=declar.id;if(!_id)return;var binding=scope.getBinding(_id.name);if(binding)binding.reference(path)}else if(t.isVariableDeclaration(declar)){for(var _iterator3=declar.declarations,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var decl=_ref3;var ids=t.getBindingIdentifiers(decl);for(var name in ids){var _binding=scope.getBinding(name);if(_binding)_binding.reference(path)}}}}},LabeledStatement:function LabeledStatement(path){path.scope.getProgramParent().addGlobal(path.node);path.scope.getBlockParent().registerDeclaration(path)},AssignmentExpression:function AssignmentExpression(path,state){state.assignments.push(path)},UpdateExpression:function UpdateExpression(path,state){state.constantViolations.push(path.get("argument"))},UnaryExpression:function UnaryExpression(path,state){if(path.node.operator==="delete"){state.constantViolations.push(path.get("argument"))}},BlockScoped:function BlockScoped(path){var scope=path.scope;if(scope.path===path)scope=scope.parent;scope.getBlockParent().registerDeclaration(path)},ClassDeclaration:function ClassDeclaration(path){var id=path.node.id;if(!id)return;var name=id.name;path.scope.bindings[name]=path.scope.getBinding(name)},Block:function Block(path){var paths=path.get("body");for(var _iterator4=paths,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value}var bodyPath=_ref4;if(bodyPath.isFunctionDeclaration()){path.scope.getBlockParent().registerDeclaration(bodyPath)}}}};var uid=0;var Scope=function(){function Scope(path,parentScope){(0,_classCallCheck3.default)(this,Scope);if(parentScope&&parentScope.block===path.node){return parentScope}var cached=getCache(path,parentScope,this);if(cached)return cached;this.uid=uid++;this.parent=parentScope;this.hub=path.hub;this.parentBlock=path.parent;this.block=path.node;this.path=path}Scope.prototype.traverse=function traverse(node,opts,state){(0,_index2.default)(node,opts,this,state,this.path)};Scope.prototype.generateDeclaredUidIdentifier=function generateDeclaredUidIdentifier(){var name=arguments.length<=0||arguments[0]===undefined?"temp":arguments[0];var id=this.generateUidIdentifier(name);this.push({id:id});return id};Scope.prototype.generateUidIdentifier=function generateUidIdentifier(){var name=arguments.length<=0||arguments[0]===undefined?"temp":arguments[0];return t.identifier(this.generateUid(name))};Scope.prototype.generateUid=function generateUid(){var name=arguments.length<=0||arguments[0]===undefined?"temp":arguments[0];name=t.toIdentifier(name).replace(/^_+/,"").replace(/[0-9]+$/g,"");var uid=void 0;var i=0;do{uid=this._generateUid(name,i);i++}while(this.hasBinding(uid)||this.hasGlobal(uid)||this.hasReference(uid));var program=this.getProgramParent();program.references[uid]=true;program.uids[uid]=true;return uid};Scope.prototype._generateUid=function _generateUid(name,i){var id=name;if(i>1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isObjectProperty(node)||t.isObjectMethod(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){for(var _iterator5=node.specifiers,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref5;if(_isArray5){if(_i5>=_iterator5.length)break;_ref5=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref5=_i5.value}var specifier=_ref5;add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){for(var _iterator6=node.properties,_isArray6=Array.isArray(_iterator6),_i6=0,_iterator6=_isArray6?_iterator6:(0,_getIterator3.default)(_iterator6);;){var _ref6;if(_isArray6){if(_i6>=_iterator6.length)break;_ref6=_iterator6[_i6++]}else{_i6=_iterator6.next();if(_i6.done)break;_ref6=_i6.value}var prop=_ref6;add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id.slice(0,20))};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding){return binding.constant}else{return this.hasBinding(node.name)}}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var _id2=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:_id2});return _id2}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.buildCodeFrameError(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){var binding=this.getBinding(oldName);if(binding){newName=newName||this.generateUidIdentifier(oldName).name;return new _renamer2.default(binding,oldName,newName).rename(block)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=(0,_repeat2.default)("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references,violations:binding.constantViolations.length,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"),t.identifier("prototype")),t.identifier("slice")),t.identifier("call")),[node])}var helperName="toArray";var args=[node];if(i===true){helperName="toConsumableArray"}else if(i){args.push(t.numericLiteral(i));helperName="slicedToArray"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){if(path.isLabeledStatement()){this.registerBinding("label",path)}else if(path.isFunctionDeclaration()){this.registerBinding("hoisted",path.get("id"),path)}else if(path.isVariableDeclaration()){var declarations=path.get("declarations");for(var _iterator7=declarations,_isArray7=Array.isArray(_iterator7),_i7=0,_iterator7=_isArray7?_iterator7:(0,_getIterator3.default)(_iterator7);;){var _ref7;if(_isArray7){if(_i7>=_iterator7.length)break;_ref7=_iterator7[_i7++]}else{_i7=_iterator7.next();if(_i7.done)break;_ref7=_i7.value}var declar=_ref7;this.registerBinding(path.node.kind,declar)}}else if(path.isClassDeclaration()){this.registerBinding("let",path)}else if(path.isImportDeclaration()){var specifiers=path.get("specifiers");for(var _iterator8=specifiers,_isArray8=Array.isArray(_iterator8),_i8=0,_iterator8=_isArray8?_iterator8:(0,_getIterator3.default)(_iterator8);;){var _ref8;if(_isArray8){if(_i8>=_iterator8.length)break;_ref8=_iterator8[_i8++]}else{_i8=_iterator8.next();if(_i8.done)break;_ref8=_i8.value}var specifier=_ref8;this.registerBinding("module",specifier)}}else if(path.isExportDeclaration()){var _declar=path.get("declaration");if(_declar.isClassDeclaration()||_declar.isFunctionDeclaration()||_declar.isVariableDeclaration()){this.registerDeclaration(_declar)}}else{this.registerBinding("unknown",path)}};Scope.prototype.buildUndefinedNode=function buildUndefinedNode(){if(this.hasBinding("undefined")){return t.unaryExpression("void",t.numericLiteral(0),true)}else{return t.identifier("undefined")}};Scope.prototype.registerConstantViolation=function registerConstantViolation(path){var ids=path.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(binding)binding.reassign(path)}};Scope.prototype.registerBinding=function registerBinding(kind,path){var bindingPath=arguments.length<=2||arguments[2]===undefined?path:arguments[2];if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");for(var _iterator9=declarators,_isArray9=Array.isArray(_iterator9),_i9=0,_iterator9=_isArray9?_iterator9:(0,_getIterator3.default)(_iterator9);;){var _ref9;if(_isArray9){if(_i9>=_iterator9.length)break;_ref9=_iterator9[_i9++]}else{_i9=_iterator9.next();if(_i9.done)break;_ref9=_i9.value}var declar=_ref9;this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers(true);for(var name in ids){for(var _iterator10=ids[name],_isArray10=Array.isArray(_iterator10),_i10=0,_iterator10=_isArray10?_iterator10:(0,_getIterator3.default)(_iterator10);;){var _ref10;if(_isArray10){if(_i10>=_iterator10.length)break;_ref10=_iterator10[_i10++]}else{_i10=_iterator10.next();if(_i10.done)break;_ref10=_i10.value}var _id3=_ref10;var local=this.getOwnBinding(name);if(local){if(local.identifier===_id3)continue;this.checkBlockScopedCollisions(local,kind,name,_id3)}if(local&&local.path.isFlow())local=null;parent.references[name]=true; -this.bindings[name]=new _binding3.default({identifier:_id3,existing:local,scope:this,path:bindingPath,kind:kind})}}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){if(node.superClass&&!this.isPure(node.superClass,constantsOnly))return false;return this.isPure(node.body,constantsOnly)}else if(t.isClassBody(node)){for(var _iterator11=node.body,_isArray11=Array.isArray(_iterator11),_i11=0,_iterator11=_isArray11?_iterator11:(0,_getIterator3.default)(_iterator11);;){var _ref11;if(_isArray11){if(_i11>=_iterator11.length)break;_ref11=_iterator11[_i11++]}else{_i11=_iterator11.next();if(_i11.done)break;_ref11=_i11.value}var method=_ref11;if(!this.isPure(method,constantsOnly))return false}return true}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){for(var _iterator12=node.elements,_isArray12=Array.isArray(_iterator12),_i12=0,_iterator12=_isArray12?_iterator12:(0,_getIterator3.default)(_iterator12);;){var _ref12;if(_isArray12){if(_i12>=_iterator12.length)break;_ref12=_iterator12[_i12++]}else{_i12=_iterator12.next();if(_i12.done)break;_ref12=_i12.value}var elem=_ref12;if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){for(var _iterator13=node.properties,_isArray13=Array.isArray(_iterator13),_i13=0,_iterator13=_isArray13?_iterator13:(0,_getIterator3.default)(_iterator13);;){var _ref13;if(_isArray13){if(_i13>=_iterator13.length)break;_ref13=_iterator13[_i13++]}else{_i13=_iterator13.next();if(_i13.done)break;_ref13=_i13.value}var prop=_ref13;if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isClassMethod(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;if(node.kind==="get"||node.kind==="set")return false;return true}else if(t.isClassProperty(node)||t.isObjectProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else if(t.isUnaryExpression(node)){return this.isPure(node.argument,constantsOnly)}else{return t.isPureish(node)}};Scope.prototype.setData=function setData(key,val){return this.data[key]=val};Scope.prototype.getData=function getData(key){var scope=this;do{var data=scope.data[key];if(data!=null)return data}while(scope=scope.parent)};Scope.prototype.removeData=function removeData(key){var scope=this;do{var data=scope.data[key];if(data!=null)scope.data[key]=null}while(scope=scope.parent)};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){_crawlCallsCount++;this._crawl();_crawlCallsCount--};Scope.prototype._crawl=function _crawl(){var path=this.path;this.references=(0,_create2.default)(null);this.bindings=(0,_create2.default)(null);this.globals=(0,_create2.default)(null);this.uids=(0,_create2.default)(null);this.data=(0,_create2.default)(null);if(path.isLoop()){for(var _iterator14=t.FOR_INIT_KEYS,_isArray14=Array.isArray(_iterator14),_i14=0,_iterator14=_isArray14?_iterator14:(0,_getIterator3.default)(_iterator14);;){var _ref14;if(_isArray14){if(_i14>=_iterator14.length)break;_ref14=_iterator14[_i14++]}else{_i14=_iterator14.next();if(_i14.done)break;_ref14=_i14.value}var key=_ref14;var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!path.get("id").node[t.NOT_LOCAL_BINDING]){this.registerBinding("local",path.get("id"),path)}}if(path.isClassExpression()&&path.has("id")){if(!path.get("id").node[t.NOT_LOCAL_BINDING]){this.registerBinding("local",path)}}if(path.isFunction()){var params=path.get("params");for(var _iterator15=params,_isArray15=Array.isArray(_iterator15),_i15=0,_iterator15=_isArray15?_iterator15:(0,_getIterator3.default)(_iterator15);;){var _ref15;if(_isArray15){if(_i15>=_iterator15.length)break;_ref15=_iterator15[_i15++]}else{_i15=_iterator15.next();if(_i15.done)break;_ref15=_i15.value}var param=_ref15;this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;var state={references:[],constantViolations:[],assignments:[]};this.crawling=true;path.traverse(collectorVisitor,state);this.crawling=false;for(var _iterator16=state.assignments,_isArray16=Array.isArray(_iterator16),_i16=0,_iterator16=_isArray16?_iterator16:(0,_getIterator3.default)(_iterator16);;){var _ref16;if(_isArray16){if(_i16>=_iterator16.length)break;_ref16=_iterator16[_i16++]}else{_i16=_iterator16.next();if(_i16.done)break;_ref16=_i16.value}var _path=_ref16;var ids=_path.getBindingIdentifiers();var programParent=void 0;for(var name in ids){if(_path.scope.getBinding(name))continue;programParent=programParent||_path.scope.getProgramParent();programParent.addGlobal(ids[name])}_path.scope.registerConstantViolation(_path)}for(var _iterator17=state.references,_isArray17=Array.isArray(_iterator17),_i17=0,_iterator17=_isArray17?_iterator17:(0,_getIterator3.default)(_iterator17);;){var _ref17;if(_isArray17){if(_i17>=_iterator17.length)break;_ref17=_iterator17[_i17++]}else{_i17=_iterator17.next();if(_i17.done)break;_ref17=_i17.value}var ref=_ref17;var binding=ref.scope.getBinding(ref.node.name);if(binding){binding.reference(ref)}else{ref.scope.getProgramParent().addGlobal(ref.node)}}for(var _iterator18=state.constantViolations,_isArray18=Array.isArray(_iterator18),_i18=0,_iterator18=_isArray18?_iterator18:(0,_getIterator3.default)(_iterator18);;){var _ref18;if(_isArray18){if(_i18>=_iterator18.length)break;_ref18=_iterator18[_i18++]}else{_i18=_iterator18.next();if(_i18.done)break;_ref18=_i18.value}var _path2=_ref18;_path2.scope.registerConstantViolation(_path2)}};Scope.prototype.push=function push(opts){var path=this.path;if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}var unique=opts.unique;var kind=opts.kind||"var";var blockHoist=opts._blockHoist==null?2:opts._blockHoist;var dataKey="declaration:"+kind+":"+blockHoist;var declarPath=!unique&&path.getData(dataKey);if(!declarPath){var declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=blockHoist;var _path$unshiftContaine=path.unshiftContainer("body",[declar]);declarPath=_path$unshiftContaine[0];if(!unique)path.setData(dataKey,declarPath)}var declarator=t.variableDeclarator(opts.id,opts.init);declarPath.node.declarations.push(declarator);this.registerBinding(kind,declarPath.get("declarations").pop())};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=(0,_create2.default)(null);var scope=this;do{(0,_defaults2.default)(ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=(0,_create2.default)(null);for(var _iterator19=arguments,_isArray19=Array.isArray(_iterator19),_i19=0,_iterator19=_isArray19?_iterator19:(0,_getIterator3.default)(_iterator19);;){var _ref19;if(_isArray19){if(_i19>=_iterator19.length)break;_ref19=_iterator19[_i19++]}else{_i19=_iterator19.next();if(_i19.done)break;_ref19=_i19.value}var kind=_ref19;var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.warnOnFlowBinding=function warnOnFlowBinding(binding){if(_crawlCallsCount===0&&binding&&binding.path.isFlow()){console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n ")}return binding};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBinding(name);if(binding)return this.warnOnFlowBinding(binding)}while(scope=scope.parent)};Scope.prototype.getOwnBinding=function getOwnBinding(name){return this.warnOnFlowBinding(this.bindings[name])};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBinding(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&(0,_includes2.default)(Scope.globals,name))return true;if(!noGlobals&&(0,_includes2.default)(Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name)}var scope=this;do{if(scope.uids[name]){scope.uids[name]=false}}while(scope=scope.parent)};return Scope}();Scope.globals=(0,_keys2.default)(_globals2.default.builtin);Scope.contextVariables=["arguments","undefined","Infinity","NaN"];exports.default=Scope;module.exports=exports["default"]},{"../cache":158,"../index":161,"./binding":179,"./lib/renamer":181,"babel-messages":76,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/object/create":144,"babel-runtime/core-js/object/keys":146,"babel-runtime/helpers/classCallCheck":153,"babel-types":194,globals:645,"lodash/defaults":827,"lodash/includes":841,"lodash/repeat":868}],181:[function(require,module,exports){"use strict";exports.__esModule=true;var _classCallCheck2=require("babel-runtime/helpers/classCallCheck");var _classCallCheck3=_interopRequireDefault(_classCallCheck2);var _binding=require("../binding");var _binding2=_interopRequireDefault(_binding);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var renameVisitor={ReferencedIdentifier:function ReferencedIdentifier(_ref,state){var node=_ref.node;if(node.name===state.oldName){node.name=state.newName}},Scope:function Scope(path,state){if(!path.scope.bindingIdentifierEquals(state.oldName,state.binding.identifier)){path.skip()}},"AssignmentExpression|Declaration":function AssignmentExpressionDeclaration(path,state){var ids=path.getOuterBindingIdentifiers();for(var name in ids){if(name===state.oldName)ids[name].name=state.newName}}};var Renamer=function(){function Renamer(binding,oldName,newName){(0,_classCallCheck3.default)(this,Renamer);this.newName=newName;this.oldName=oldName;this.binding=binding}Renamer.prototype.maybeConvertFromExportDeclaration=function maybeConvertFromExportDeclaration(parentDeclar){var exportDeclar=parentDeclar.parentPath.isExportDeclaration()&&parentDeclar.parentPath;if(!exportDeclar)return;var isDefault=exportDeclar.isExportDefaultDeclaration();if(isDefault&&(parentDeclar.isFunctionDeclaration()||parentDeclar.isClassDeclaration())&&!parentDeclar.node.id){parentDeclar.node.id=parentDeclar.scope.generateUidIdentifier("default")}var bindingIdentifiers=parentDeclar.getOuterBindingIdentifiers();var specifiers=[];for(var name in bindingIdentifiers){var localName=name===this.oldName?this.newName:name;var exportedName=isDefault?"default":name;specifiers.push(t.exportSpecifier(t.identifier(localName),t.identifier(exportedName)))}if(specifiers.length){var aliasDeclar=t.exportNamedDeclaration(null,specifiers);if(parentDeclar.isFunctionDeclaration()){aliasDeclar._blockHoist=3}exportDeclar.insertAfter(aliasDeclar);exportDeclar.replaceWith(parentDeclar.node)}};Renamer.prototype.maybeConvertFromClassFunctionDeclaration=function maybeConvertFromClassFunctionDeclaration(path){return;if(!path.isFunctionDeclaration()&&!path.isClassDeclaration())return;if(this.binding.kind!=="hoisted")return;path.node.id=t.identifier(this.oldName);path.node._blockHoist=3;path.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(t.identifier(this.newName),t.toExpression(path.node))]))};Renamer.prototype.maybeConvertFromClassFunctionExpression=function maybeConvertFromClassFunctionExpression(path){return;if(!path.isFunctionExpression()&&!path.isClassExpression())return;if(this.binding.kind!=="local")return;path.node.id=t.identifier(this.oldName);this.binding.scope.parent.push({id:t.identifier(this.newName)});path.replaceWith(t.assignmentExpression("=",t.identifier(this.newName),path.node))};Renamer.prototype.rename=function rename(block){var binding=this.binding;var oldName=this.oldName;var newName=this.newName;var scope=binding.scope;var path=binding.path;var parentDeclar=path.find(function(path){return path.isDeclaration()||path.isFunctionExpression()});if(parentDeclar){this.maybeConvertFromExportDeclaration(parentDeclar)}scope.traverse(block||scope.block,renameVisitor,this);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=binding;this.binding.identifier.name=newName}if(binding.type==="hoisted"){}if(parentDeclar){this.maybeConvertFromClassFunctionDeclaration(parentDeclar);this.maybeConvertFromClassFunctionExpression(parentDeclar)}};return Renamer}();exports.default=Renamer;module.exports=exports["default"]},{"../binding":179,"babel-runtime/helpers/classCallCheck":153,"babel-types":194}],182:[function(require,module,exports){"use strict";exports.__esModule=true;var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.explode=explode;exports.verify=verify;exports.merge=merge;var _virtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_virtualTypes);var _babelMessages=require("babel-messages");var messages=_interopRequireWildcard(_babelMessages);var _babelTypes=require("babel-types");var t=_interopRequireWildcard(_babelTypes);var _clone=require("lodash/clone");var _clone2=_interopRequireDefault(_clone);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var parts=nodeType.split("|");if(parts.length===1)continue;var fns=visitor[nodeType];delete visitor[nodeType];for(var _iterator=parts,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var part=_ref;visitor[part]=fns}}verify(visitor);delete visitor.__esModule;ensureEntranceObjects(visitor);ensureCallbackArrays(visitor);for(var _iterator2=(0,_keys2.default)(visitor),_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _nodeType3=_ref2;if(shouldIgnoreKey(_nodeType3))continue;var wrapper=virtualTypes[_nodeType3];if(!wrapper)continue;var _fns2=visitor[_nodeType3];for(var type in _fns2){_fns2[type]=wrapCheck(wrapper,_fns2[type])}delete visitor[_nodeType3];if(wrapper.types){for(var _iterator4=wrapper.types,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value}var _type=_ref4;if(visitor[_type]){mergePair(visitor[_type],_fns2)}else{visitor[_type]=_fns2}}}else{mergePair(visitor,_fns2)}}for(var _nodeType in visitor){if(shouldIgnoreKey(_nodeType))continue;var _fns=visitor[_nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[_nodeType];var deprecratedKey=t.DEPRECATED_KEYS[_nodeType];if(deprecratedKey){console.trace("Visitor defined for "+_nodeType+" but it has been renamed to "+deprecratedKey);aliases=[deprecratedKey]}if(!aliases)continue;delete visitor[_nodeType];for(var _iterator3=aliases,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var alias=_ref3;var existing=visitor[alias];if(existing){mergePair(existing,_fns)}else{visitor[alias]=(0,_clone2.default)(_fns)}}}for(var _nodeType2 in visitor){if(shouldIgnoreKey(_nodeType2))continue;ensureCallbackArrays(visitor[_nodeType2])}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(nodeType==="enter"||nodeType==="exit"){validateVisitorMethods(nodeType,visitor[nodeType])}if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if((typeof visitors==="undefined"?"undefined":(0,_typeof3.default)(visitors))==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit"){validateVisitorMethods(nodeType+"."+visitorKey,visitors[visitorKey])}else{throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}}visitor._verified=true}function validateVisitorMethods(path,val){var fns=[].concat(val);for(var _iterator5=fns,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref5;if(_isArray5){if(_i5>=_iterator5.length)break;_ref5=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref5=_i5.value}var fn=_ref5;if(typeof fn!=="function"){throw new TypeError("Non-function found defined in "+path+" with type "+(typeof fn==="undefined"?"undefined":(0,_typeof3.default)(fn)))}}}function merge(visitors){var states=arguments.length<=1||arguments[1]===undefined?[]:arguments[1];var wrapper=arguments[2];var rootVisitor={};for(var i=0;i","<",">=","<="];var EQUALITY_BINARY_OPERATORS=exports.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="];var COMPARISON_BINARY_OPERATORS=exports.COMPARISON_BINARY_OPERATORS=[].concat(EQUALITY_BINARY_OPERATORS,["in","instanceof"]);var BOOLEAN_BINARY_OPERATORS=exports.BOOLEAN_BINARY_OPERATORS=[].concat(COMPARISON_BINARY_OPERATORS,BOOLEAN_NUMBER_BINARY_OPERATORS);var NUMBER_BINARY_OPERATORS=exports.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"];var BINARY_OPERATORS=exports.BINARY_OPERATORS=["+"].concat(NUMBER_BINARY_OPERATORS,BOOLEAN_BINARY_OPERATORS);var BOOLEAN_UNARY_OPERATORS=exports.BOOLEAN_UNARY_OPERATORS=["delete","!"];var NUMBER_UNARY_OPERATORS=exports.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];var STRING_UNARY_OPERATORS=exports.STRING_UNARY_OPERATORS=["typeof"];var UNARY_OPERATORS=exports.UNARY_OPERATORS=["void"].concat(BOOLEAN_UNARY_OPERATORS,NUMBER_UNARY_OPERATORS,STRING_UNARY_OPERATORS);var INHERIT_KEYS=exports.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};var BLOCK_SCOPED_SYMBOL=exports.BLOCK_SCOPED_SYMBOL=(0,_for2.default)("var used to be block scoped");var NOT_LOCAL_BINDING=exports.NOT_LOCAL_BINDING=(0,_for2.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":149}],184:[function(require,module,exports){"use strict";exports.__esModule=true;var _maxSafeInteger=require("babel-runtime/core-js/number/max-safe-integer");var _maxSafeInteger2=_interopRequireDefault(_maxSafeInteger);var _stringify=require("babel-runtime/core-js/json/stringify");var _stringify2=_interopRequireDefault(_stringify);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toBindingIdentifierName=toBindingIdentifierName;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;var _isPlainObject=require("lodash/isPlainObject");var _isPlainObject2=_interopRequireDefault(_isPlainObject);var _isNumber=require("lodash/isNumber");var _isNumber2=_interopRequireDefault(_isNumber);var _isRegExp=require("lodash/isRegExp");var _isRegExp2=_interopRequireDefault(_isRegExp);var _isString=require("lodash/isString");var _isString2=_interopRequireDefault(_isString);var _index=require("./index");var t=_interopRequireWildcard(_index);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function toComputedKey(node){var key=arguments.length<=1||arguments[1]===undefined?node.key||node.property:arguments[1];if(!node.computed){if(t.isIdentifier(key))key=t.stringLiteral(key.name)}return key}function toSequenceExpression(nodes,scope){if(!nodes||!nodes.length)return;var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var node=_ref;if(t.isExpression(node)){exprs.push(node)}else if(t.isExpressionStatement(node)){exprs.push(node.expression)}else if(t.isVariableDeclaration(node)){if(node.kind!=="var")return bailed=true;for(var _iterator2=node.declarations,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var declar=_ref2;var bindings=t.getBindingIdentifiers(declar);for(var key in bindings){declars.push({kind:node.kind,id:bindings[key]})}if(declar.init){exprs.push(t.assignmentExpression("=",declar.id,declar.init))}}ensureLastUndefined=true;continue}else if(t.isIfStatement(node)){var consequent=node.consequent?convert([node.consequent]):scope.buildUndefinedNode();var alternate=node.alternate?convert([node.alternate]):scope.buildUndefinedNode();if(!consequent||!alternate)return bailed=true;exprs.push(t.conditionalExpression(node.test,consequent,alternate))}else if(t.isBlockStatement(node)){exprs.push(convert(node.body))}else if(t.isEmptyStatement(node)){ensureLastUndefined=true;continue}else{return bailed=true}ensureLastUndefined=false}if(ensureLastUndefined||exprs.length===0){exprs.push(scope.buildUndefinedNode())}if(exprs.length===1){return exprs[0]}else{return t.sequenceExpression(exprs)}}}function toKeyAlias(node){var key=arguments.length<=1||arguments[1]===undefined?node.key:arguments[1];var alias=void 0;if(node.kind==="method"){return toKeyAlias.increment()+""}else if(t.isIdentifier(key)){alias=key.name}else if(t.isStringLiteral(key)){alias=(0,_stringify2.default)(key.value)}else{alias=(0,_stringify2.default)(t.removePropertiesDeep(t.cloneDeep(key)))}if(node.computed){alias="["+alias+"]"}if(node.static){alias="static:"+alias}return alias}toKeyAlias.uid=0;toKeyAlias.increment=function(){if(toKeyAlias.uid>=_maxSafeInteger2.default){return toKeyAlias.uid=0}else{return toKeyAlias.uid++}};function toIdentifier(name){name=name+"";name=name.replace(/[^a-zA-Z0-9$_]/g,"-");name=name.replace(/^[-0-9]+/,"");name=name.replace(/[-\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""});if(!t.isValidIdentifier(name)){name="_"+name}return name||"_"}function toBindingIdentifierName(name){name=toIdentifier(name);if(name==="eval"||name==="arguments")name="_"+name;return name}function toStatement(node,ignore){if(t.isStatement(node)){return node}var mustHaveId=false;var newType=void 0;if(t.isClass(node)){mustHaveId=true;newType="ClassDeclaration"}else if(t.isFunction(node)){mustHaveId=true;newType="FunctionDeclaration"}else if(t.isAssignmentExpression(node)){return t.expressionStatement(node)}if(mustHaveId&&!node.id){newType=false}if(!newType){if(ignore){return false}else{throw new Error("cannot turn "+node.type+" to a statement")}}node.type=newType;return node}function toExpression(node){if(t.isExpressionStatement(node)){node=node.expression}if(t.isExpression(node)){return node}if(t.isClass(node)){node.type="ClassExpression"}else if(t.isFunction(node)){node.type="FunctionExpression"}if(!t.isExpression(node)){throw new Error("cannot turn "+node.type+" to an expression")}return node}function toBlock(node,parent){if(t.isBlockStatement(node)){return node}if(t.isEmptyStatement(node)){node=[]}if(!Array.isArray(node)){if(!t.isStatement(node)){if(t.isFunction(parent)){node=t.returnStatement(node)}else{node=t.expressionStatement(node)}}node=[node]}return t.blockStatement(node)}function valueToNode(value){if(value===undefined){return t.identifier("undefined")}if(value===true||value===false){return t.booleanLiteral(value)}if(value===null){return t.nullLiteral()}if((0,_isString2.default)(value)){return t.stringLiteral(value)}if((0,_isNumber2.default)(value)){return t.numericLiteral(value)}if((0,_isRegExp2.default)(value)){var pattern=value.source;var flags=value.toString().match(/\/([a-z]+|)$/)[1];return t.regExpLiteral(pattern,flags)}if(Array.isArray(value)){return t.arrayExpression(value.map(t.valueToNode))}if((0,_isPlainObject2.default)(value)){var props=[];for(var key in value){var nodeKey=void 0;if(t.isValidIdentifier(key)){nodeKey=t.identifier(key)}else{nodeKey=t.stringLiteral(key)}props.push(t.objectProperty(nodeKey,t.valueToNode(value[key])))}return t.objectExpression(props)}throw new Error("don't know how to turn this value into a node")}},{"./index":194,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/json/stringify":140,"babel-runtime/core-js/number/max-safe-integer":142,"lodash/isNumber":851,"lodash/isPlainObject":854, -"lodash/isRegExp":855,"lodash/isString":856}],185:[function(require,module,exports){"use strict";var _index=require("../index");var t=_interopRequireWildcard(_index);var _constants=require("../constants");var _index2=require("./index");var _index3=_interopRequireDefault(_index2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}(0,_index3.default)("ArrayExpression",{fields:{elements:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,_index3.default)("AssignmentExpression",{fields:{operator:{validate:(0,_index2.assertValueType)("string")},left:{validate:(0,_index2.assertNodeType)("LVal")},right:{validate:(0,_index2.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});(0,_index3.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:_index2.assertOneOf.apply(undefined,_constants.BINARY_OPERATORS)},left:{validate:(0,_index2.assertNodeType)("Expression")},right:{validate:(0,_index2.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});(0,_index3.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,_index2.assertNodeType)("DirectiveLiteral")}}});(0,_index3.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,_index2.assertValueType)("string")}}});(0,_index3.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Directive"))),default:[]},body:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]});(0,_index3.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,_index2.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});(0,_index3.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,_index2.assertNodeType)("Expression")},arguments:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]});(0,_index3.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,_index2.assertNodeType)("Identifier")},body:{validate:(0,_index2.assertNodeType)("BlockStatement")}},aliases:["Scopable"]});(0,_index3.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,_index2.assertNodeType)("Expression")},consequent:{validate:(0,_index2.assertNodeType)("Expression")},alternate:{validate:(0,_index2.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});(0,_index3.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,_index2.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});(0,_index3.default)("DebuggerStatement",{aliases:["Statement"]});(0,_index3.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,_index2.assertNodeType)("Expression")},body:{validate:(0,_index2.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});(0,_index3.default)("EmptyStatement",{aliases:["Statement"]});(0,_index3.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,_index2.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});(0,_index3.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,_index2.assertNodeType)("Program")}}});(0,_index3.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,_index2.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,_index2.assertNodeType)("Expression")},body:{validate:(0,_index2.assertNodeType)("Statement")}}});(0,_index3.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,_index2.assertNodeType)("VariableDeclaration","Expression"),optional:true},test:{validate:(0,_index2.assertNodeType)("Expression"),optional:true},update:{validate:(0,_index2.assertNodeType)("Expression"),optional:true},body:{validate:(0,_index2.assertNodeType)("Statement")}}});(0,_index3.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,_index2.assertNodeType)("Identifier")},params:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("LVal")))},body:{validate:(0,_index2.assertNodeType)("BlockStatement")},generator:{default:false,validate:(0,_index2.assertValueType)("boolean")},async:{default:false,validate:(0,_index2.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]});(0,_index3.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,_index2.assertNodeType)("Identifier"),optional:true},params:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("LVal")))},body:{validate:(0,_index2.assertNodeType)("BlockStatement")},generator:{default:false,validate:(0,_index2.assertValueType)("boolean")},async:{default:false,validate:(0,_index2.assertValueType)("boolean")}}});(0,_index3.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function validate(node,key,val){if(!t.isValidIdentifier(val)){}}},decorators:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Decorator")))}}});(0,_index3.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,_index2.assertNodeType)("Expression")},consequent:{validate:(0,_index2.assertNodeType)("Statement")},alternate:{optional:true,validate:(0,_index2.assertNodeType)("Statement")}}});(0,_index3.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,_index2.assertNodeType)("Identifier")},body:{validate:(0,_index2.assertNodeType)("Statement")}}});(0,_index3.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,_index2.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,_index3.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,_index2.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,_index3.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});(0,_index3.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,_index2.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,_index3.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,_index2.assertValueType)("string")},flags:{validate:(0,_index2.assertValueType)("string"),default:""}}});(0,_index3.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:_index2.assertOneOf.apply(undefined,_constants.LOGICAL_OPERATORS)},left:{validate:(0,_index2.assertNodeType)("Expression")},right:{validate:(0,_index2.assertNodeType)("Expression")}}});(0,_index3.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,_index2.assertNodeType)("Expression")},property:{validate:function validate(node,key,val){var expectedType=node.computed?"Expression":"Identifier";(0,_index2.assertNodeType)(expectedType)(node,key,val)}},computed:{default:false}}});(0,_index3.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,_index2.assertNodeType)("Expression")},arguments:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Expression","SpreadElement")))}}});(0,_index3.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Directive"))),default:[]},body:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]});(0,_index3.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}});(0,_index3.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,_index2.chain)((0,_index2.assertValueType)("string"),(0,_index2.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,_index2.assertValueType)("boolean"),default:false},key:{validate:function validate(node,key,val){var expectedTypes=node.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];_index2.assertNodeType.apply(undefined,expectedTypes)(node,key,val)}},decorators:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Decorator")))},body:{validate:(0,_index2.assertNodeType)("BlockStatement")},generator:{default:false,validate:(0,_index2.assertValueType)("boolean")},async:{default:false,validate:(0,_index2.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});(0,_index3.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,_index2.assertValueType)("boolean"),default:false},key:{validate:function validate(node,key,val){var expectedTypes=node.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];_index2.assertNodeType.apply(undefined,expectedTypes)(node,key,val)}},value:{validate:(0,_index2.assertNodeType)("Expression")},shorthand:{validate:(0,_index2.assertValueType)("boolean"),default:false},decorators:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Decorator"))),optional:true}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]});(0,_index3.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,_index2.assertNodeType)("LVal")},decorators:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Decorator")))}}});(0,_index3.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,_index2.assertNodeType)("Expression"),optional:true}}});(0,_index3.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Expression")))}},aliases:["Expression"]});(0,_index3.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,_index2.assertNodeType)("Expression"),optional:true},consequent:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("Statement")))}}});(0,_index3.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,_index2.assertNodeType)("Expression")},cases:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("SwitchCase")))}}});(0,_index3.default)("ThisExpression",{aliases:["Expression"]});(0,_index3.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,_index2.assertNodeType)("Expression")}}});(0,_index3.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,_index2.assertNodeType)("BlockStatement")},handler:{optional:true,handler:(0,_index2.assertNodeType)("BlockStatement")},finalizer:{optional:true,validate:(0,_index2.assertNodeType)("BlockStatement")}}});(0,_index3.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:true},argument:{validate:(0,_index2.assertNodeType)("Expression")},operator:{validate:_index2.assertOneOf.apply(undefined,_constants.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});(0,_index3.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:false},argument:{validate:(0,_index2.assertNodeType)("Expression")},operator:{validate:_index2.assertOneOf.apply(undefined,_constants.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});(0,_index3.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,_index2.chain)((0,_index2.assertValueType)("string"),(0,_index2.assertOneOf)("var","let","const"))},declarations:{validate:(0,_index2.chain)((0,_index2.assertValueType)("array"),(0,_index2.assertEach)((0,_index2.assertNodeType)("VariableDeclarator")))}}});(0,_index3.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,_index2.assertNodeType)("LVal")},init:{optional:true,validate:(0,_index2.assertNodeType)("Expression")}}});(0,_index3.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,_index2.assertNodeType)("Expression")},body:{validate:(0,_index2.assertNodeType)("BlockStatement","Statement")}}});(0,_index3.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,_index2.assertNodeType)("Expression")},body:{validate:(0,_index2.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":183,"../index":194,"./index":189}],186:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(0,_index2.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,_index.assertNodeType)("Identifier")},right:{validate:(0,_index.assertNodeType)("Expression")},decorators:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Decorator")))}}});(0,_index2.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Expression")))},decorators:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Decorator")))}}});(0,_index2.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("LVal")))},body:{validate:(0,_index.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,_index.assertValueType)("boolean"),default:false}}});(0,_index2.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("ClassMethod","ClassProperty")))}}});(0,_index2.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,_index.assertNodeType)("Identifier")},body:{validate:(0,_index.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,_index.assertNodeType)("Expression")},decorators:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Decorator")))}}});(0,_index2.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:true,validate:(0,_index.assertNodeType)("Identifier")},body:{validate:(0,_index.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,_index.assertNodeType)("Expression")},decorators:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Decorator")))}}});(0,_index2.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,_index.assertNodeType)("StringLiteral")}}});(0,_index2.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,_index.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}});(0,_index2.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,_index.assertNodeType)("Declaration"),optional:true},specifiers:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("ExportSpecifier")))},source:{validate:(0,_index.assertNodeType)("StringLiteral"),optional:true}}});(0,_index2.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_index.assertNodeType)("Identifier")},exported:{validate:(0,_index.assertNodeType)("Identifier")}}});(0,_index2.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,_index.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,_index.assertNodeType)("Expression")},body:{validate:(0,_index.assertNodeType)("Statement")}}});(0,_index2.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,_index.assertNodeType)("StringLiteral")}}});(0,_index2.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_index.assertNodeType)("Identifier")}}});(0,_index2.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_index.assertNodeType)("Identifier")}}});(0,_index2.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_index.assertNodeType)("Identifier")},imported:{validate:(0,_index.assertNodeType)("Identifier")}}});(0,_index2.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,_index.assertValueType)("string")},property:{validate:(0,_index.assertValueType)("string")}}});(0,_index2.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,_index.chain)((0,_index.assertValueType)("string"),(0,_index.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:false,validate:(0,_index.assertValueType)("boolean")},static:{default:false,validate:(0,_index.assertValueType)("boolean")},key:{validate:function validate(node,key,val){var expectedTypes=node.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];_index.assertNodeType.apply(undefined,expectedTypes)(node,key,val)}},params:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("LVal")))},body:{validate:(0,_index.assertNodeType)("BlockStatement")},generator:{default:false,validate:(0,_index.assertValueType)("boolean")},async:{default:false,validate:(0,_index.assertValueType)("boolean")}}});(0,_index2.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Decorator")))}}});(0,_index2.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,_index.assertNodeType)("Expression")}}});(0,_index2.default)("Super",{aliases:["Expression"]});(0,_index2.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,_index.assertNodeType)("Expression")},quasi:{validate:(0,_index.assertNodeType)("TemplateLiteral")}}});(0,_index2.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,_index.assertValueType)("boolean"),default:false}}});(0,_index2.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("TemplateElement")))},expressions:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("Expression")))}}});(0,_index2.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,_index.assertValueType)("boolean"),default:false},argument:{optional:true,validate:(0,_index.assertNodeType)("Expression")}}})},{"./index":189}],187:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(0,_index2.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,_index.assertNodeType)("Expression")}}});(0,_index2.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,_index.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,_index.assertNodeType)("Expression")},body:{validate:(0,_index.assertNodeType)("Statement")}}});(0,_index2.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}});(0,_index2.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,_index.assertNodeType)("Expression")}}});(0,_index2.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,_index.assertNodeType)("BlockStatement")}}});(0,_index2.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,_index.assertNodeType)("Identifier")}}});(0,_index2.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,_index.assertNodeType)("Identifier")}}});(0,_index2.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,_index.assertNodeType)("LVal")}}});(0,_index2.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,_index.assertNodeType)("Expression")}}})},{"./index":189}],188:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(0,_index2.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});(0,_index2.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}});(0,_index2.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});(0,_index2.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}});(0,_index2.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});(0,_index2.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}});(0,_index2.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,_index.assertValueType)("boolean"),default:false}}});(0,_index2.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("ExistentialTypeParam",{aliases:["Flow"]});(0,_index2.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}});(0,_index2.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}});(0,_index2.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}});(0,_index2.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}});(0,_index2.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}});(0,_index2.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]});(0,_index2.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}});(0,_index2.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}});(0,_index2.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});(0,_index2.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}});(0,_index2.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});(0,_index2.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}});(0,_index2.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}});(0,_index2.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}});(0,_index2.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}});(0,_index2.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}});(0,_index2.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}});(0,_index2.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}});(0,_index2.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}});(0,_index2.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}});(0,_index2.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}});(0,_index2.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}});(0,_index2.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}});(0,_index2.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}});(0,_index2.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}});(0,_index2.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}});(0,_index2.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":189}],189:[function(require,module,exports){"use strict";exports.__esModule=true;exports.DEPRECATED_KEYS=exports.BUILDER_KEYS=exports.NODE_FIELDS=exports.ALIAS_KEYS=exports.VISITOR_KEYS=undefined;var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _stringify=require("babel-runtime/core-js/json/stringify");var _stringify2=_interopRequireDefault(_stringify);var _typeof2=require("babel-runtime/helpers/typeof");var _typeof3=_interopRequireDefault(_typeof2);exports.assertEach=assertEach;exports.assertOneOf=assertOneOf;exports.assertNodeType=assertNodeType;exports.assertNodeOrValueType=assertNodeOrValueType;exports.assertValueType=assertValueType;exports.chain=chain;exports.default=defineType;var _index=require("../index");var t=_interopRequireWildcard(_index);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var VISITOR_KEYS=exports.VISITOR_KEYS={};var ALIAS_KEYS=exports.ALIAS_KEYS={};var NODE_FIELDS=exports.NODE_FIELDS={};var BUILDER_KEYS=exports.BUILDER_KEYS={};var DEPRECATED_KEYS=exports.DEPRECATED_KEYS={};function getType(val){if(Array.isArray(val)){return"array"}else if(val===null){return"null"}else if(val===undefined){return"undefined"}else{return typeof val==="undefined"?"undefined":(0,_typeof3.default)(val)}}function assertEach(callback){function validator(node,key,val){if(!Array.isArray(val))return;for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var type=_ref;if(t.is(type,val)){valid=true;break}}if(!valid){throw new TypeError("Property "+key+" of "+node.type+" expected node to be of a type "+(0,_stringify2.default)(types)+" "+("but instead got "+(0,_stringify2.default)(val&&val.type)))}}validate.oneOfNodeTypes=types;return validate}function assertNodeOrValueType(){for(var _len3=arguments.length,types=Array(_len3),_key3=0;_key3<_len3;_key3++){types[_key3]=arguments[_key3]}function validate(node,key,val){var valid=false;for(var _iterator2=types,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var type=_ref2;if(getType(val)===type||t.is(type,val)){valid=true;break}}if(!valid){throw new TypeError("Property "+key+" of "+node.type+" expected node to be of a type "+(0,_stringify2.default)(types)+" "+("but instead got "+(0,_stringify2.default)(val&&val.type)))}}validate.oneOfNodeOrValueTypes=types;return validate}function assertValueType(type){function validate(node,key,val){var valid=getType(val)===type;if(!valid){throw new TypeError("Property "+key+" expected type of "+type+" but got "+getType(val))}}validate.type=type;return validate}function chain(){for(var _len4=arguments.length,fns=Array(_len4),_key4=0;_key4<_len4;_key4++){fns[_key4]=arguments[_key4]}function validate(){for(var _iterator3=fns,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var fn=_ref3;fn.apply(undefined,arguments)}}validate.chainOf=fns;return validate}function defineType(type){var opts=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var inherits=opts.inherits&&store[opts.inherits]||{};opts.fields=opts.fields||inherits.fields||{};opts.visitor=opts.visitor||inherits.visitor||[];opts.aliases=opts.aliases||inherits.aliases||[];opts.builder=opts.builder||inherits.builder||opts.visitor||[];if(opts.deprecatedAlias){DEPRECATED_KEYS[opts.deprecatedAlias]=type}for(var _iterator4=opts.visitor.concat(opts.builder),_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value}var _key5=_ref4;opts.fields[_key5]=opts.fields[_key5]||{}}for(var key in opts.fields){var field=opts.fields[key];if(opts.builder.indexOf(key)===-1){field.optional=true}if(field.default===undefined){field.default=null}else if(!field.validate){field.validate=assertValueType(getType(field.default))}}VISITOR_KEYS[type]=opts.visitor;BUILDER_KEYS[type]=opts.builder;NODE_FIELDS[type]=opts.fields;ALIAS_KEYS[type]=opts.aliases;store[type]=opts}var store={}},{"../index":194,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/json/stringify":140,"babel-runtime/helpers/typeof":156}],190:[function(require,module,exports){"use strict";require("./index");require("./core");require("./es2015");require("./flow");require("./jsx");require("./misc");require("./experimental")},{"./core":185,"./es2015":186,"./experimental":187,"./flow":188,"./index":189,"./jsx":191,"./misc":192}],191:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(0,_index2.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,_index.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:true,validate:(0,_index.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}});(0,_index2.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,_index.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}});(0,_index2.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,_index.assertNodeType)("JSXOpeningElement")},closingElement:{optional:true,validate:(0,_index.assertNodeType)("JSXClosingElement")},children:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("JSXText","JSXExpressionContainer","JSXElement")))}}});(0,_index2.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]});(0,_index2.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,_index.assertNodeType)("Expression")}}});(0,_index2.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,_index.assertValueType)("string")}}});(0,_index2.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,_index.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,_index.assertNodeType)("JSXIdentifier")}}});(0,_index2.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,_index.assertNodeType)("JSXIdentifier")},name:{validate:(0,_index.assertNodeType)("JSXIdentifier")}}});(0,_index2.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,_index.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:false,validate:(0,_index.assertValueType)("boolean")},attributes:{validate:(0,_index.chain)((0,_index.assertValueType)("array"),(0,_index.assertEach)((0,_index.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}});(0,_index2.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,_index.assertNodeType)("Expression")}}});(0,_index2.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,_index.assertValueType)("string")}}})},{"./index":189}],192:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}(0,_index2.default)("Noop",{visitor:[]});(0,_index2.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,_index.assertNodeType)("Expression")}}})},{"./index":189}],193:[function(require,module,exports){"use strict";exports.__esModule=true;exports.createUnionTypeAnnotation=createUnionTypeAnnotation;exports.removeTypeDuplicates=removeTypeDuplicates;exports.createTypeAnnotationBasedOnTypeof=createTypeAnnotationBasedOnTypeof;var _index=require("./index");var t=_interopRequireWildcard(_index);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function createUnionTypeAnnotation(types){var flattened=removeTypeDuplicates(types);if(flattened.length===1){return flattened[0]}else{return t.unionTypeAnnotation(flattened)}}function removeTypeDuplicates(nodes){var generics={};var bases={};var typeGroups=[];var types=[];for(var i=0;i=0){continue}if(t.isAnyTypeAnnotation(node)){return[node]}if(t.isFlowBaseAnnotation(node)){bases[node.type]=node;continue}if(t.isUnionTypeAnnotation(node)){if(typeGroups.indexOf(node.types)<0){nodes=nodes.concat(node.types);typeGroups.push(node.types)}continue}if(t.isGenericTypeAnnotation(node)){var name=node.id.name;if(generics[name]){var existing=generics[name];if(existing.typeParameters){if(node.typeParameters){existing.typeParameters.params=removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params))}}else{existing=node.typeParameters}}else{generics[name]=node}continue}types.push(node)}for(var type in bases){types.push(bases[type])}for(var _name in generics){types.push(generics[_name])}return types}function createTypeAnnotationBasedOnTypeof(type){if(type==="string"){return t.stringTypeAnnotation()}else if(type==="number"){return t.numberTypeAnnotation()}else if(type==="undefined"){return t.voidTypeAnnotation()}else if(type==="boolean"){return t.booleanTypeAnnotation()}else if(type==="function"){return t.genericTypeAnnotation(t.identifier("Function"))}else if(type==="object"){return t.genericTypeAnnotation(t.identifier("Object"))}else if(type==="symbol"){return t.genericTypeAnnotation(t.identifier("Symbol"))}else{throw new Error("Invalid typeof value")}}},{"./index":194}],194:[function(require,module,exports){"use strict";exports.__esModule=true;exports.createTypeAnnotationBasedOnTypeof=exports.removeTypeDuplicates=exports.createUnionTypeAnnotation=exports.valueToNode=exports.toBlock=exports.toExpression=exports.toStatement=exports.toBindingIdentifierName=exports.toIdentifier=exports.toKeyAlias=exports.toSequenceExpression=exports.toComputedKey=exports.isImmutable=exports.isScope=exports.isSpecifierDefault=exports.isVar=exports.isBlockScoped=exports.isLet=exports.isValidIdentifier=exports.isReferenced=exports.isBinding=exports.getOuterBindingIdentifiers=exports.getBindingIdentifiers=exports.TYPES=exports.react=exports.DEPRECATED_KEYS=exports.BUILDER_KEYS=exports.NODE_FIELDS=exports.ALIAS_KEYS=exports.VISITOR_KEYS=exports.NOT_LOCAL_BINDING=exports.BLOCK_SCOPED_SYMBOL=exports.INHERIT_KEYS=exports.UNARY_OPERATORS=exports.STRING_UNARY_OPERATORS=exports.NUMBER_UNARY_OPERATORS=exports.BOOLEAN_UNARY_OPERATORS=exports.BINARY_OPERATORS=exports.NUMBER_BINARY_OPERATORS=exports.BOOLEAN_BINARY_OPERATORS=exports.COMPARISON_BINARY_OPERATORS=exports.EQUALITY_BINARY_OPERATORS=exports.BOOLEAN_NUMBER_BINARY_OPERATORS=exports.UPDATE_OPERATORS=exports.LOGICAL_OPERATORS=exports.COMMENT_KEYS=exports.FOR_INIT_KEYS=exports.FLATTENABLE_KEYS=exports.STATEMENT_OR_BLOCK_KEYS=undefined;var _getOwnPropertySymbols=require("babel-runtime/core-js/object/get-own-property-symbols");var _getOwnPropertySymbols2=_interopRequireDefault(_getOwnPropertySymbols);var _getIterator2=require("babel-runtime/core-js/get-iterator");var _getIterator3=_interopRequireDefault(_getIterator2);var _keys=require("babel-runtime/core-js/object/keys");var _keys2=_interopRequireDefault(_keys);var _stringify=require("babel-runtime/core-js/json/stringify");var _stringify2=_interopRequireDefault(_stringify);var _constants=require("./constants");Object.defineProperty(exports,"STATEMENT_OR_BLOCK_KEYS",{enumerable:true,get:function get(){return _constants.STATEMENT_OR_BLOCK_KEYS}});Object.defineProperty(exports,"FLATTENABLE_KEYS",{enumerable:true,get:function get(){return _constants.FLATTENABLE_KEYS}});Object.defineProperty(exports,"FOR_INIT_KEYS",{enumerable:true,get:function get(){return _constants.FOR_INIT_KEYS}});Object.defineProperty(exports,"COMMENT_KEYS",{enumerable:true,get:function get(){return _constants.COMMENT_KEYS}});Object.defineProperty(exports,"LOGICAL_OPERATORS",{enumerable:true,get:function get(){return _constants.LOGICAL_OPERATORS}});Object.defineProperty(exports,"UPDATE_OPERATORS",{enumerable:true,get:function get(){return _constants.UPDATE_OPERATORS}});Object.defineProperty(exports,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:true,get:function get(){return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS}});Object.defineProperty(exports,"EQUALITY_BINARY_OPERATORS",{enumerable:true,get:function get(){return _constants.EQUALITY_BINARY_OPERATORS}});Object.defineProperty(exports,"COMPARISON_BINARY_OPERATORS",{enumerable:true,get:function get(){return _constants.COMPARISON_BINARY_OPERATORS}});Object.defineProperty(exports,"BOOLEAN_BINARY_OPERATORS",{enumerable:true,get:function get(){return _constants.BOOLEAN_BINARY_OPERATORS}});Object.defineProperty(exports,"NUMBER_BINARY_OPERATORS",{enumerable:true,get:function get(){return _constants.NUMBER_BINARY_OPERATORS}});Object.defineProperty(exports,"BINARY_OPERATORS",{enumerable:true,get:function get(){return _constants.BINARY_OPERATORS}});Object.defineProperty(exports,"BOOLEAN_UNARY_OPERATORS",{enumerable:true,get:function get(){return _constants.BOOLEAN_UNARY_OPERATORS}});Object.defineProperty(exports,"NUMBER_UNARY_OPERATORS",{enumerable:true,get:function get(){return _constants.NUMBER_UNARY_OPERATORS}});Object.defineProperty(exports,"STRING_UNARY_OPERATORS",{enumerable:true,get:function get(){return _constants.STRING_UNARY_OPERATORS}});Object.defineProperty(exports,"UNARY_OPERATORS",{enumerable:true,get:function get(){return _constants.UNARY_OPERATORS}});Object.defineProperty(exports,"INHERIT_KEYS",{enumerable:true,get:function get(){return _constants.INHERIT_KEYS}});Object.defineProperty(exports,"BLOCK_SCOPED_SYMBOL",{enumerable:true,get:function get(){return _constants.BLOCK_SCOPED_SYMBOL}});Object.defineProperty(exports,"NOT_LOCAL_BINDING",{enumerable:true,get:function get(){return _constants.NOT_LOCAL_BINDING}});exports.is=is;exports.isType=isType;exports.validate=validate;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneWithoutLoc=cloneWithoutLoc;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inheritTrailingComments=inheritTrailingComments;exports.inheritLeadingComments=inheritLeadingComments;exports.inheritInnerComments=inheritInnerComments;exports.inherits=inherits;exports.assertNode=assertNode;exports.isNode=isNode;exports.traverseFast=traverseFast;exports.removeProperties=removeProperties;exports.removePropertiesDeep=removePropertiesDeep;var _retrievers=require("./retrievers");Object.defineProperty(exports,"getBindingIdentifiers",{enumerable:true,get:function get(){return _retrievers.getBindingIdentifiers}});Object.defineProperty(exports,"getOuterBindingIdentifiers",{enumerable:true,get:function get(){return _retrievers.getOuterBindingIdentifiers}});var _validators=require("./validators");Object.defineProperty(exports,"isBinding",{enumerable:true,get:function get(){return _validators.isBinding}});Object.defineProperty(exports,"isReferenced",{enumerable:true,get:function get(){return _validators.isReferenced}});Object.defineProperty(exports,"isValidIdentifier",{enumerable:true,get:function get(){return _validators.isValidIdentifier}});Object.defineProperty(exports,"isLet",{enumerable:true,get:function get(){return _validators.isLet}});Object.defineProperty(exports,"isBlockScoped",{enumerable:true,get:function get(){return _validators.isBlockScoped}});Object.defineProperty(exports,"isVar",{enumerable:true,get:function get(){return _validators.isVar}});Object.defineProperty(exports,"isSpecifierDefault",{enumerable:true,get:function get(){return _validators.isSpecifierDefault}});Object.defineProperty(exports,"isScope",{enumerable:true,get:function get(){return _validators.isScope}});Object.defineProperty(exports,"isImmutable",{enumerable:true,get:function get(){return _validators.isImmutable}});var _converters=require("./converters");Object.defineProperty(exports,"toComputedKey",{enumerable:true,get:function get(){return _converters.toComputedKey}});Object.defineProperty(exports,"toSequenceExpression",{enumerable:true,get:function get(){return _converters.toSequenceExpression}});Object.defineProperty(exports,"toKeyAlias",{enumerable:true,get:function get(){return _converters.toKeyAlias}});Object.defineProperty(exports,"toIdentifier",{enumerable:true,get:function get(){return _converters.toIdentifier}});Object.defineProperty(exports,"toBindingIdentifierName",{enumerable:true,get:function get(){return _converters.toBindingIdentifierName}});Object.defineProperty(exports,"toStatement",{enumerable:true,get:function get(){return _converters.toStatement}});Object.defineProperty(exports,"toExpression",{enumerable:true,get:function get(){return _converters.toExpression}});Object.defineProperty(exports,"toBlock",{enumerable:true,get:function get(){return _converters.toBlock}});Object.defineProperty(exports,"valueToNode",{enumerable:true,get:function get(){return _converters.valueToNode}});var _flow=require("./flow");Object.defineProperty(exports,"createUnionTypeAnnotation",{enumerable:true,get:function get(){return _flow.createUnionTypeAnnotation}});Object.defineProperty(exports,"removeTypeDuplicates",{enumerable:true,get:function get(){return _flow.removeTypeDuplicates}});Object.defineProperty(exports,"createTypeAnnotationBasedOnTypeof",{enumerable:true,get:function get(){return _flow.createTypeAnnotationBasedOnTypeof}});var _toFastProperties=require("to-fast-properties");var _toFastProperties2=_interopRequireDefault(_toFastProperties);var _compact=require("lodash/compact");var _compact2=_interopRequireDefault(_compact);var _clone=require("lodash/clone");var _clone2=_interopRequireDefault(_clone);var _each=require("lodash/each");var _each2=_interopRequireDefault(_each);var _uniq=require("lodash/uniq");var _uniq2=_interopRequireDefault(_uniq);require("./definitions/init");var _definitions=require("./definitions");var _react2=require("./react");var _react=_interopRequireWildcard(_react2);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var t=exports;function registerType(type){var is=t["is"+type];if(!is){is=t["is"+type]=function(node,opts){return t.is(type,node,opts)}}t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+(0,_stringify2.default)(type)+" with option "+(0,_stringify2.default)(opts))}}}exports.VISITOR_KEYS=_definitions.VISITOR_KEYS;exports.ALIAS_KEYS=_definitions.ALIAS_KEYS;exports.NODE_FIELDS=_definitions.NODE_FIELDS;exports.BUILDER_KEYS=_definitions.BUILDER_KEYS;exports.DEPRECATED_KEYS=_definitions.DEPRECATED_KEYS;exports.react=_react;for(var type in t.VISITOR_KEYS){registerType(type)}t.FLIPPED_ALIAS_KEYS={};(0,_each2.default)(t.ALIAS_KEYS,function(aliases,type){(0,_each2.default)(aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});(0,_each2.default)(t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type)});var TYPES=exports.TYPES=(0,_keys2.default)(t.VISITOR_KEYS).concat((0,_keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0,_keys2.default)(t.DEPRECATED_KEYS));function is(type,node,opts){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;if(t.ALIAS_KEYS[targetType])return false;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;for(var _iterator=aliases,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var alias=_ref;if(nodeType===alias)return true}}return false}(0,_each2.default)(t.BUILDER_KEYS,function(keys,type){function builder(){if(arguments.length>keys.length){throw new Error("t."+type+": Too many arguments passed. Received "+arguments.length+" but can receive "+("no more than "+keys.length))}var node={};node.type=type;var i=0;for(var _iterator2=keys,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:(0,_getIterator3.default)(_iterator2);;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var _key=_ref2;var field=t.NODE_FIELDS[type][_key];var arg=arguments[i++];if(arg===undefined)arg=(0,_clone2.default)(field.default);node[_key]=arg}for(var key in node){validate(node,key,node[key])}return node}t[type]=builder;t[type[0].toLowerCase()+type.slice(1)]=builder});var _loop=function _loop(_type){var newType=t.DEPRECATED_KEYS[_type];function proxy(fn){return function(){console.trace("The node type "+_type+" has been renamed to "+newType);return fn.apply(this,arguments)}}t[_type]=t[_type[0].toLowerCase()+_type.slice(1)]=proxy(t[newType]);t["is"+_type]=proxy(t["is"+newType]);t["assert"+_type]=proxy(t["assert"+newType])};for(var _type in t.DEPRECATED_KEYS){_loop(_type)}function validate(node,key,val){if(!node)return;var fields=t.NODE_FIELDS[node.type];if(!fields)return;var field=fields[key];if(!field||!field.validate)return;if(field.optional&&val==null)return;field.validate(node,key,val)}function shallowEqual(actual,expected){var keys=(0,_keys2.default)(expected);for(var _iterator3=keys,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:(0,_getIterator3.default)(_iterator3);;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var key=_ref3;if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,prepend){member.object=t.memberExpression(prepend,member.object);return member}function ensureBlock(node){var key=arguments.length<=1||arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneWithoutLoc(node){var newNode=clone(node);delete newNode.loc;return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isStringLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isStringLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(node){for(var _iterator4=t.COMMENT_KEYS,_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:(0,_getIterator3.default)(_iterator4);;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++]}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value}var key=_ref4;delete node[key]}return node}function inheritsComments(child,parent){inheritTrailingComments(child,parent);inheritLeadingComments(child,parent);inheritInnerComments(child,parent);return child}function inheritTrailingComments(child,parent){_inheritComments("trailingComments",child,parent)}function inheritLeadingComments(child,parent){_inheritComments("leadingComments",child,parent)}function inheritInnerComments(child,parent){_inheritComments("innerComments",child,parent)}function _inheritComments(key,child,parent){if(child&&parent){child[key]=(0,_uniq2.default)((0,_compact2.default)([].concat(child[key],parent[key])))}}function inherits(child,parent){if(!child||!parent)return child;for(var _iterator5=t.INHERIT_KEYS.optional,_isArray5=Array.isArray(_iterator5),_i5=0,_iterator5=_isArray5?_iterator5:(0,_getIterator3.default)(_iterator5);;){var _ref5;if(_isArray5){if(_i5>=_iterator5.length)break;_ref5=_iterator5[_i5++]}else{_i5=_iterator5.next();if(_i5.done)break;_ref5=_i5.value}var _key2=_ref5;if(child[_key2]==null){child[_key2]=parent[_key2]}}for(var key in parent){if(key[0]==="_")child[key]=parent[key]}for(var _iterator6=t.INHERIT_KEYS.force,_isArray6=Array.isArray(_iterator6),_i6=0,_iterator6=_isArray6?_iterator6:(0,_getIterator3.default)(_iterator6);;){var _ref6;if(_isArray6){if(_i6>=_iterator6.length)break;_ref6=_iterator6[_i6++]}else{_i6=_iterator6.next();if(_i6.done)break;_ref6=_i6.value}var _key3=_ref6;child[_key3]=parent[_key3]}t.inheritsComments(child,parent);return child}function assertNode(node){if(!isNode(node)){throw new TypeError("Not a valid node "+(node&&node.type))}}function isNode(node){return!!(node&&_definitions.VISITOR_KEYS[node.type])}(0,_toFastProperties2.default)(t);(0,_toFastProperties2.default)(t.VISITOR_KEYS);function traverseFast(node,enter,opts){if(!node)return;var keys=t.VISITOR_KEYS[node.type];if(!keys)return;opts=opts||{};enter(node,opts);for(var _iterator7=keys,_isArray7=Array.isArray(_iterator7),_i7=0,_iterator7=_isArray7?_iterator7:(0,_getIterator3.default)(_iterator7);;){var _ref7;if(_isArray7){if(_i7>=_iterator7.length)break;_ref7=_iterator7[_i7++]}else{_i7=_iterator7.next();if(_i7.done)break;_ref7=_i7.value}var key=_ref7;var subNode=node[key];if(Array.isArray(subNode)){for(var _iterator8=subNode,_isArray8=Array.isArray(_iterator8),_i8=0,_iterator8=_isArray8?_iterator8:(0,_getIterator3.default)(_iterator8);;){var _ref8;if(_isArray8){if(_i8>=_iterator8.length)break;_ref8=_iterator8[_i8++]}else{_i8=_iterator8.next();if(_i8.done)break;_ref8=_i8.value}var _node=_ref8;traverseFast(_node,enter,opts)}}else{traverseFast(subNode,enter,opts)}}}var CLEAR_KEYS=["tokens","start","end","loc","raw","rawValue"];var CLEAR_KEYS_PLUS_COMMENTS=t.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);function removeProperties(node,opts){opts=opts||{};var map=opts.preserveComments?CLEAR_KEYS:CLEAR_KEYS_PLUS_COMMENTS;for(var _iterator9=map,_isArray9=Array.isArray(_iterator9),_i9=0,_iterator9=_isArray9?_iterator9:(0,_getIterator3.default)(_iterator9);;){var _ref9;if(_isArray9){if(_i9>=_iterator9.length)break;_ref9=_iterator9[_i9++]}else{_i9=_iterator9.next();if(_i9.done)break;_ref9=_i9.value}var _key4=_ref9;if(node[_key4]!=null)node[_key4]=undefined}for(var key in node){if(key[0]==="_"&&node[key]!=null)node[key]=undefined}var syms=(0,_getOwnPropertySymbols2.default)(node);for(var _iterator10=syms,_isArray10=Array.isArray(_iterator10),_i10=0,_iterator10=_isArray10?_iterator10:(0,_getIterator3.default)(_iterator10);;){var _ref10;if(_isArray10){if(_i10>=_iterator10.length)break;_ref10=_iterator10[_i10++]}else{_i10=_iterator10.next();if(_i10.done)break;_ref10=_i10.value}var sym=_ref10;node[sym]=null}}function removePropertiesDeep(tree,opts){traverseFast(tree,removeProperties,opts);return tree}},{"./constants":183,"./converters":184,"./definitions":189,"./definitions/init":190,"./flow":193,"./react":195,"./retrievers":196,"./validators":197,"babel-runtime/core-js/get-iterator":139,"babel-runtime/core-js/json/stringify":140,"babel-runtime/core-js/object/get-own-property-symbols":145,"babel-runtime/core-js/object/keys":146,"lodash/clone":822,"lodash/compact":825,"lodash/each":828,"lodash/uniq":879,"to-fast-properties":983}],195:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isReactComponent=undefined;exports.isCompatTag=isCompatTag;exports.buildChildren=buildChildren;var _index=require("./index");var t=_interopRequireWildcard(_index);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}var isReactComponent=exports.isReactComponent=t.buildMatchMemberExpression("React.Component");function isCompatTag(tagName){return!!tagName&&/^[a-z]|\-/.test(tagName)}function cleanJSXElementLiteralChild(child,args){var lines=child.value.split(/\r\n|\n|\r/);var lastNonEmptyLine=0;for(var i=0;i=0)return true}else{if(val===node)return true}}}return false}function isReferenced(node,parent){switch(parent.type){case"BindExpression":return parent.object===node||parent.callee===node;case"MemberExpression":case"JSXMemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"ObjectProperty":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var _iterator=parent.params,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:(0,_getIterator3.default)(_iterator);;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var param=_ref;if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return false;case"JSXAttribute":return parent.name!==node;case"ClassProperty":if(parent.key===node){return parent.computed}else{return parent.value===node}case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"ClassMethod":case"ObjectMethod":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":return parent.right===node;case"AssignmentPattern":return parent.right===node;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2.default.keyword.isReservedWordES6(name,true)){return false}else{return _esutils2.default.keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node[_constants.BLOCK_SCOPED_SYMBOL])}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node[_constants.BLOCK_SCOPED_SYMBOL]}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./constants":183,"./index":194,"./retrievers":196,"babel-runtime/core-js/get-iterator":139,esutils:643}],198:[function(require,module,exports){"use strict";exports.__esModule=true;exports.tokTypes=undefined;exports.parse=parse;var _parser=require("./parser");var _parser2=_interopRequireDefault(_parser);require("./parser/util");require("./parser/statement");require("./parser/lval");require("./parser/expression");require("./parser/node");require("./parser/location");require("./parser/comments");var _types=require("./tokenizer/types");require("./tokenizer");require("./tokenizer/context");var _flow=require("./plugins/flow");var _flow2=_interopRequireDefault(_flow);var _jsx=require("./plugins/jsx");var _jsx2=_interopRequireDefault(_jsx);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_parser.plugins.flow=_flow2.default;_parser.plugins.jsx=_jsx2.default;function parse(input,options){return new _parser2.default(options,input).parse()}exports.tokTypes=_types.types},{"./parser":202,"./parser/comments":200,"./parser/expression":201,"./parser/location":203,"./parser/lval":204,"./parser/node":205,"./parser/statement":206,"./parser/util":207,"./plugins/flow":208,"./plugins/jsx":209,"./tokenizer":212,"./tokenizer/context":211,"./tokenizer/types":214}],199:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getOptions=getOptions;var defaultOptions=exports.defaultOptions={sourceType:"script",sourceFilename:undefined,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowSuperOutsideMethod:false,plugins:[],strictMode:null};function getOptions(opts){var options={};for(var key in defaultOptions){options[key]=opts&&key in opts?opts[key]:defaultOptions[key]}return options}},{}],200:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function last(stack){return stack[stack.length-1]}var pp=_index2.default.prototype;pp.addComment=function(comment){if(this.filename)comment.loc.filename=this.filename;this.state.trailingComments.push(comment);this.state.leadingComments.push(comment)};pp.processComment=function(node){if(node.type==="Program"&&node.body.length>0)return;var stack=this.state.commentStack;var lastChild=void 0,trailingComments=void 0,i=void 0,j=void 0;if(this.state.trailingComments.length>0){if(this.state.trailingComments[0].start>=node.end){trailingComments=this.state.trailingComments;this.state.trailingComments=[]}else{this.state.trailingComments.length=0}}else{var lastInStack=last(stack);if(stack.length>0&&lastInStack.trailingComments&&lastInStack.trailingComments[0].start>=node.end){trailingComments=lastInStack.trailingComments;lastInStack.trailingComments=null}}while(stack.length>0&&last(stack).start>=node.start){lastChild=stack.pop()}if(lastChild){if(lastChild.leadingComments){if(lastChild!==node&&last(lastChild.leadingComments).end<=node.start){node.leadingComments=lastChild.leadingComments;lastChild.leadingComments=null}else{for(i=lastChild.leadingComments.length-2;i>=0;--i){if(lastChild.leadingComments[i].end<=node.start){node.leadingComments=lastChild.leadingComments.splice(0,i+1);break}}}}}else if(this.state.leadingComments.length>0){if(last(this.state.leadingComments).end<=node.start){if(this.state.commentPreviousNode){for(j=0;j0){node.leadingComments=this.state.leadingComments;this.state.leadingComments=[]}}else{for(i=0;inode.start){break}}node.leadingComments=this.state.leadingComments.slice(0,i);if(node.leadingComments.length===0){node.leadingComments=null}trailingComments=this.state.leadingComments.slice(i);if(trailingComments.length===0){trailingComments=null}}}this.state.commentPreviousNode=node;if(trailingComments){if(trailingComments.length&&trailingComments[0].start>=node.start&&last(trailingComments).end<=node.end){node.innerComments=trailingComments}else{node.trailingComments=trailingComments}}stack.push(node)}},{"./index":202}],201:[function(require,module,exports){"use strict";var _types=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _identifier=require("../util/identifier");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var pp=_index2.default.prototype;pp.checkPropClash=function(prop,propHash){if(prop.computed)return;var key=prop.key;var name=void 0;switch(key.type){case"Identifier":name=key.name;break;case"StringLiteral":case"NumericLiteral":name=String(key.value);break;default:return}if(name==="__proto__"&&prop.kind==="init"){if(propHash.proto)this.raise(key.start,"Redefinition of __proto__ property");propHash.proto=true}};pp.parseExpression=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.match(_types.types.comma)){var node=this.startNodeAt(startPos,startLoc);node.expressions=[expr];while(this.eat(_types.types.comma)){node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos))}this.toReferencedList(node.expressions);return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse,refNeedsArrowPos){if(this.match(_types.types._yield)&&this.state.inGenerator){return this.parseYield()}var failOnShorthandAssign=void 0;if(refShorthandDefaultPos){failOnShorthandAssign=false}else{refShorthandDefaultPos={start:0};failOnShorthandAssign=true}var startPos=this.state.start;var startLoc=this.state.startLoc;if(this.match(_types.types.parenL)||this.match(_types.types.name)){this.state.potentialArrowAt=this.state.start}var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos,refNeedsArrowPos);if(afterLeftParse)left=afterLeftParse.call(this,left,startPos,startLoc);if(this.state.type.isAssign){var node=this.startNodeAt(startPos,startLoc);node.operator=this.state.value;node.left=this.match(_types.types.eq)?this.toAssignable(left,undefined,"assignment expression"):left;refShorthandDefaultPos.start=0;this.checkLVal(left,undefined,undefined,"assignment expression");if(left.extra&&left.extra.parenthesized){var errorMsg=void 0;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos,refNeedsArrowPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseConditional(expr,noIn,startPos,startLoc,refNeedsArrowPos)};pp.parseConditional=function(expr,noIn,startPos,startLoc){if(this.eat(_types.types.question)){var node=this.startNodeAt(startPos,startLoc);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_types.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start){return expr}else{return this.parseExprOp(expr,startPos,startLoc,-1,noIn)}};pp.parseExprOp=function(left,leftStartPos,leftStartLoc,minPrec,noIn){var prec=this.state.type.binop;if(prec!=null&&(!noIn||!this.match(_types.types._in))){if(prec>minPrec){var node=this.startNodeAt(leftStartPos,leftStartLoc);node.left=left;node.operator=this.state.value;if(node.operator==="**"&&left.type==="UnaryExpression"&&left.extra&&!left.extra.parenthesizedArgument&&!left.extra.parenthesized){this.raise(left.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.")}var op=this.state.type;this.next();var startPos=this.state.start;var startLoc=this.state.startLoc;node.right=this.parseExprOp(this.parseMaybeUnary(),startPos,startLoc,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_types.types.logicalOR||op===_types.types.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStartPos,leftStartLoc,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.state.type.prefix){var node=this.startNode();var update=this.match(_types.types.incDec);node.operator=this.state.value;node.prefix=true;this.next();var argType=this.state.type;node.argument=this.parseMaybeUnary();this.addExtra(node,"parenthesizedArgument",argType===_types.types.parenL&&(!node.argument.extra||!node.argument.extra.parenthesized));if(refShorthandDefaultPos&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}if(update){this.checkLVal(node.argument,undefined,undefined,"prefix operation")}else if(this.state.strict&&node.operator==="delete"&&node.argument.type==="Identifier"){this.raise(node.start,"Deleting local variable in strict mode")}return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var startPos=this.state.start,startLoc=this.state.startLoc;var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.state.type.postfix&&!this.canInsertSemicolon()){var _node=this.startNodeAt(startPos,startLoc);_node.operator=this.state.value;_node.prefix=false;_node.argument=expr;this.checkLVal(expr,undefined,undefined,"postfix operation");this.next();expr=this.finishNode(_node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var startPos=this.state.start,startLoc=this.state.startLoc;var potentialArrowAt=this.state.potentialArrowAt;var expr=this.parseExprAtom(refShorthandDefaultPos);if(expr.type==="ArrowFunctionExpression"&&expr.start===potentialArrowAt){return expr}if(refShorthandDefaultPos&&refShorthandDefaultPos.start){return expr}return this.parseSubscripts(expr,startPos,startLoc)};pp.parseSubscripts=function(base,startPos,startLoc,noCalls){for(;;){if(!noCalls&&this.eat(_types.types.doubleColon)){var node=this.startNodeAt(startPos,startLoc);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),startPos,startLoc,noCalls)}else if(this.eat(_types.types.dot)){var _node2=this.startNodeAt(startPos,startLoc);_node2.object=base;_node2.property=this.parseIdentifier(true);_node2.computed=false;base=this.finishNode(_node2,"MemberExpression")}else if(this.eat(_types.types.bracketL)){var _node3=this.startNodeAt(startPos,startLoc);_node3.object=base;_node3.property=this.parseExpression();_node3.computed=true;this.expect(_types.types.bracketR);base=this.finishNode(_node3,"MemberExpression")}else if(!noCalls&&this.match(_types.types.parenL)){var possibleAsync=this.state.potentialArrowAt===base.start&&base.type==="Identifier"&&base.name==="async"&&!this.canInsertSemicolon();this.next();var _node4=this.startNodeAt(startPos,startLoc);_node4.callee=base;_node4.arguments=this.parseCallExpressionArguments(_types.types.parenR,possibleAsync);base=this.finishNode(_node4,"CallExpression");if(possibleAsync&&this.shouldParseAsyncArrow()){return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos,startLoc),_node4)}else{this.toReferencedList(_node4.arguments)}}else if(this.match(_types.types.backQuote)){var _node5=this.startNodeAt(startPos,startLoc);_node5.tag=base;_node5.quasi=this.parseTemplate();base=this.finishNode(_node5,"TaggedTemplateExpression")}else{return base}}};pp.parseCallExpressionArguments=function(close,possibleAsyncArrow){var innerParenStart=void 0;var elts=[],first=true;while(!this.eat(close)){if(first){first=false}else{this.expect(_types.types.comma);if(this.eat(close))break}if(this.match(_types.types.parenL)&&!innerParenStart){innerParenStart=this.state.start}elts.push(this.parseExprListItem(undefined,possibleAsyncArrow?{start:0}:undefined))}if(possibleAsyncArrow&&innerParenStart&&this.shouldParseAsyncArrow()){this.unexpected()}return elts};pp.shouldParseAsyncArrow=function(){return this.match(_types.types.arrow)};pp.parseAsyncArrowFromCallExpression=function(node,call){this.expect(_types.types.arrow);return this.parseArrowExpression(node,call.arguments,true)};pp.parseNoCallExpr=function(){var startPos=this.state.start,startLoc=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),startPos,startLoc,true)};pp.parseExprAtom=function(refShorthandDefaultPos){var node=void 0,canBeArrow=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case _types.types._super:if(!this.state.inMethod&&!this.options.allowSuperOutsideMethod){this.raise(this.state.start,"'super' outside of function or class")}node=this.startNode();this.next();if(!this.match(_types.types.parenL)&&!this.match(_types.types.bracketL)&&!this.match(_types.types.dot)){this.unexpected()}if(this.match(_types.types.parenL)&&this.state.inMethod!=="constructor"&&!this.options.allowSuperOutsideMethod){this.raise(node.start,"super() outside of class constructor")}return this.finishNode(node,"Super");case _types.types._this:node=this.startNode();this.next();return this.finishNode(node,"ThisExpression");case _types.types._yield:if(this.state.inGenerator)this.unexpected();case _types.types.name:node=this.startNode();var allowAwait=this.state.value==="await"&&this.state.inAsync;var allowYield=this.shouldAllowYieldIdentifier();var id=this.parseIdentifier(allowAwait||allowYield);if(id.name==="await"){if(this.state.inAsync||this.inModule){return this.parseAwait(node)}}else if(id.name==="async"&&this.match(_types.types._function)&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}else if(canBeArrow&&id.name==="async"&&this.match(_types.types.name)){var params=[this.parseIdentifier()];this.expect(_types.types.arrow);return this.parseArrowExpression(node,params,true)}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_types.types.arrow)){return this.parseArrowExpression(node,[id])}return id;case _types.types._do:if(this.hasPlugin("doExpressions")){var _node6=this.startNode();this.next();var oldInFunction=this.state.inFunction;var oldLabels=this.state.labels;this.state.labels=[];this.state.inFunction=false;_node6.body=this.parseBlock(false,true);this.state.inFunction=oldInFunction;this.state.labels=oldLabels;return this.finishNode(_node6,"DoExpression")}case _types.types.regexp:var value=this.state.value;node=this.parseLiteral(value.value,"RegExpLiteral");node.pattern=value.pattern;node.flags=value.flags;return node;case _types.types.num:return this.parseLiteral(this.state.value,"NumericLiteral");case _types.types.string:return this.parseLiteral(this.state.value,"StringLiteral");case _types.types._null:node=this.startNode();this.next();return this.finishNode(node,"NullLiteral");case _types.types._true:case _types.types._false:node=this.startNode();node.value=this.match(_types.types._true);this.next();return this.finishNode(node,"BooleanLiteral");case _types.types.parenL:return this.parseParenAndDistinguishExpression(null,null,canBeArrow);case _types.types.bracketL:node=this.startNode();this.next();node.elements=this.parseExprList(_types.types.bracketR,true,refShorthandDefaultPos);this.toReferencedList(node.elements);return this.finishNode(node,"ArrayExpression");case _types.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _types.types._function:return this.parseFunctionExpression();case _types.types.at:this.parseDecorators();case _types.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _types.types._new:return this.parseNew();case _types.types.backQuote:return this.parseTemplate();case _types.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type==="MemberExpression"){return this.finishNode(node,"BindExpression")}else{this.raise(callee.start,"Binding should be performed on object property.")}default:this.unexpected()}};pp.parseFunctionExpression=function(){var node=this.startNode();var meta=this.parseIdentifier(true);if(this.state.inGenerator&&this.eat(_types.types.dot)&&this.hasPlugin("functionSent")){return this.parseMetaProperty(node,meta,"sent")}else{return this.parseFunction(node,false)}};pp.parseMetaProperty=function(node,meta,propertyName){node.meta=meta;node.property=this.parseIdentifier(true);if(node.property.name!==propertyName){this.raise(node.property.start,"The only valid meta property for new is "+meta.name+"."+propertyName)}return this.finishNode(node,"MetaProperty")};pp.parseLiteral=function(value,type){var node=this.startNode();this.addExtra(node,"rawValue",value);this.addExtra(node,"raw",this.input.slice(this.state.start,this.state.end));node.value=value;this.next();return this.finishNode(node,type)};pp.parseParenExpression=function(){this.expect(_types.types.parenL);var val=this.parseExpression();this.expect(_types.types.parenR);return val};pp.parseParenAndDistinguishExpression=function(startPos,startLoc,canBeArrow,isAsync){startPos=startPos||this.state.start;startLoc=startLoc||this.state.startLoc;var val=void 0;this.expect(_types.types.parenL);var innerStartPos=this.state.start,innerStartLoc=this.state.startLoc;var exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=void 0,optionalCommaStart=void 0;var refNeedsArrowPos={start:0};while(!this.match(_types.types.parenR)){if(first){first=false}else{this.expect(_types.types.comma,refNeedsArrowPos.start||null);if(this.match(_types.types.parenR)){optionalCommaStart=this.state.start;break}}if(this.match(_types.types.ellipsis)){var spreadNodeStartPos=this.state.start,spreadNodeStartLoc=this.state.startLoc;spreadStart=this.state.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStartLoc,spreadNodeStartPos));break}else{exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem,refNeedsArrowPos))}}var innerEndPos=this.state.start;var innerEndLoc=this.state.startLoc;this.expect(_types.types.parenR);var arrowNode=this.startNodeAt(startPos,startLoc);if(canBeArrow&&this.shouldParseArrow()&&(arrowNode=this.parseArrow(arrowNode))){for(var _iterator=exprList,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var param=_ref;if(param.extra&¶m.extra.parenthesized)this.unexpected(param.extra.parenStart)}return this.parseArrowExpression(arrowNode,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.state.lastTokStart)}}if(optionalCommaStart)this.unexpected(optionalCommaStart);if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(refNeedsArrowPos.start)this.unexpected(refNeedsArrowPos.start);if(exprList.length>1){val=this.startNodeAt(innerStartPos,innerStartLoc);val.expressions=exprList;this.toReferencedList(val.expressions);this.finishNodeAt(val,"SequenceExpression",innerEndPos,innerEndLoc)}else{val=exprList[0]}this.addExtra(val,"parenthesized",true);this.addExtra(val,"parenStart",startPos);return val};pp.shouldParseArrow=function(){return!this.canInsertSemicolon()};pp.parseArrow=function(node){if(this.eat(_types.types.arrow)){return node}};pp.parseParenItem=function(node){return node};pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdentifier(true);if(this.eat(_types.types.dot)){return this.parseMetaProperty(node,meta,"target")}node.callee=this.parseNoCallExpr();if(this.eat(_types.types.parenL)){node.arguments=this.parseExprList(_types.types.parenR);this.toReferencedList(node.arguments)}else{node.arguments=[]}return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value};this.next();elem.tail=this.match(_types.types.backQuote);return this.finishNode(elem,"TemplateElement")};pp.parseTemplate=function(){var node=this.startNode();this.next();node.expressions=[];var curElt=this.parseTemplateElement();node.quasis=[curElt];while(!curElt.tail){this.expect(_types.types.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(_types.types.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var decorators=[];var propHash=Object.create(null);var first=true;var node=this.startNode();node.properties=[];this.next();while(!this.eat(_types.types.braceR)){if(first){first=false}else{this.expect(_types.types.comma);if(this.eat(_types.types.braceR))break}while(this.match(_types.types.at)){decorators.push(this.parseDecorator())}var prop=this.startNode(),isGenerator=false,isAsync=false,startPos=void 0,startLoc=void 0;if(decorators.length){prop.decorators=decorators;decorators=[]}if(this.hasPlugin("objectRestSpread")&&this.match(_types.types.ellipsis)){prop=this.parseSpread();prop.type=isPattern?"RestProperty":"SpreadProperty";node.properties.push(prop);continue}prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos){startPos=this.state.start;startLoc=this.state.startLoc}if(!isPattern){isGenerator=this.eat(_types.types.star)}if(!isPattern&&this.isContextual("async")){if(isGenerator)this.unexpected();var asyncId=this.parseIdentifier();if(this.match(_types.types.colon)||this.match(_types.types.parenL)||this.match(_types.types.braceR)){prop.key=asyncId}else{isAsync=true;if(this.hasPlugin("asyncGenerators"))isGenerator=this.eat(_types.types.star);this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,startPos,startLoc,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);if(prop.shorthand){this.addExtra(prop,"shorthand",true)}node.properties.push(prop)}if(decorators.length){this.raise(this.state.start,"You have trailing decorators with no property")}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,startPos,startLoc,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(isAsync||isGenerator||this.match(_types.types.parenL)){if(isPattern)this.unexpected();prop.kind="method";prop.method=true;this.parseMethod(prop,isGenerator,isAsync);return this.finishNode(prop,"ObjectMethod")}if(this.eat(_types.types.colon)){prop.value=isPattern?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(false,refShorthandDefaultPos);return this.finishNode(prop,"ObjectProperty")}if(!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&!this.match(_types.types.comma)&&!this.match(_types.types.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);this.parseMethod(prop,false);var paramCount=prop.kind==="get"?0:1;if(prop.params.length!==paramCount){var start=prop.start;if(prop.kind==="get"){this.raise(start,"getter should have no params")}else{this.raise(start,"setter should have exactly one param")}}return this.finishNode(prop,"ObjectMethod")}if(!prop.computed&&prop.key.type==="Identifier"){if(isPattern){var illegalBinding=this.isKeyword(prop.key.name);if(!illegalBinding&&this.state.strict){illegalBinding=_identifier.reservedWords.strictBind(prop.key.name)||_identifier.reservedWords.strict(prop.key.name)}if(illegalBinding){this.raise(prop.key.start,"Binding "+prop.key.name)}prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key.__clone())}else if(this.match(_types.types.eq)&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start){refShorthandDefaultPos.start=this.state.start}prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key.__clone())}else{prop.value=prop.key.__clone()}prop.shorthand=true;return this.finishNode(prop,"ObjectProperty")}this.unexpected()};pp.parsePropertyName=function(prop){if(this.eat(_types.types.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(_types.types.bracketR);return prop.key}else{prop.computed=false;return prop.key=this.match(_types.types.num)||this.match(_types.types.string)?this.parseExprAtom():this.parseIdentifier(true)}};pp.initFunction=function(node,isAsync){node.id=null;node.generator=false;node.expression=false;node.async=!!isAsync};pp.parseMethod=function(node,isGenerator,isAsync){var oldInMethod=this.state.inMethod;this.state.inMethod=node.kind||true;this.initFunction(node,isAsync);this.expect(_types.types.parenL);node.params=this.parseBindingList(_types.types.parenR);node.generator=isGenerator;this.parseFunctionBody(node);this.state.inMethod=oldInMethod;return node};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true,"arrow function parameters");this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&!this.match(_types.types.braceL);var oldInAsync=this.state.inAsync;this.state.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.state.inFunction,oldInGen=this.state.inGenerator,oldLabels=this.state.labels;this.state.inFunction=true;this.state.inGenerator=node.generator;this.state.labels=[];node.body=this.parseBlock(true);node.expression=false;this.state.inFunction=oldInFunc;this.state.inGenerator=oldInGen;this.state.labels=oldLabels}this.state.inAsync=oldInAsync;var checkLVal=this.state.strict;var isStrict=false;if(allowExpression)checkLVal=true;if(!isExpression&&node.body.directives.length){for(var _iterator2=node.body.directives,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_iterator2[Symbol.iterator]();;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var directive=_ref2;if(directive.value.value==="use strict"){isStrict=true;checkLVal=true;break}}}if(isStrict&&node.id&&node.id.type==="Identifier"&&node.id.name==="yield"){this.raise(node.id.start,"Binding yield in strict mode")}if(checkLVal){var nameHash=Object.create(null);var oldStrict=this.state.strict;if(isStrict)this.state.strict=true;if(node.id){this.checkLVal(node.id,true,undefined,"function name")}for(var _iterator3=node.params,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:_iterator3[Symbol.iterator]();;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break; -_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var param=_ref3;if(isStrict&¶m.type!=="Identifier"){this.raise(param.start,"Non-simple parameter in strict mode")}this.checkLVal(param,true,nameHash,"function parameter list")}this.state.strict=oldStrict}};pp.parseExprList=function(close,allowEmpty,refShorthandDefaultPos){var elts=[],first=true;while(!this.eat(close)){if(first){first=false}else{this.expect(_types.types.comma);if(this.eat(close))break}elts.push(this.parseExprListItem(allowEmpty,refShorthandDefaultPos))}return elts};pp.parseExprListItem=function(allowEmpty,refShorthandDefaultPos){var elt=void 0;if(allowEmpty&&this.match(_types.types.comma)){elt=null}else if(this.match(_types.types.ellipsis)){elt=this.parseSpread(refShorthandDefaultPos)}else{elt=this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem)}return elt};pp.parseIdentifier=function(liberal){var node=this.startNode();if(this.match(_types.types.name)){if(!liberal&&this.state.strict&&_identifier.reservedWords.strict(this.state.value)){this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved")}node.name=this.state.value}else if(liberal&&this.state.type.keyword){node.name=this.state.type.keyword}else{this.unexpected()}if(!liberal&&node.name==="await"&&this.state.inAsync){this.raise(node.start,"invalid use of await inside of an async function")}node.loc.identifierName=node.name;this.next();return this.finishNode(node,"Identifier")};pp.parseAwait=function(node){if(!this.state.inAsync){this.unexpected()}if(this.match(_types.types.star)){this.raise(node.start,"await* has been removed from the async functions proposal. Use Promise.all() instead.")}node.argument=this.parseMaybeUnary();return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.match(_types.types.semi)||this.canInsertSemicolon()||!this.match(_types.types.star)&&!this.state.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(_types.types.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")}},{"../tokenizer/types":214,"../util/identifier":215,"./index":202}],202:[function(require,module,exports){"use strict";exports.__esModule=true;exports.plugins=undefined;var _identifier=require("../util/identifier");var _options=require("../options");var _tokenizer=require("../tokenizer");var _tokenizer2=_interopRequireDefault(_tokenizer);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var plugins=exports.plugins={};var Parser=function(_Tokenizer){_inherits(Parser,_Tokenizer);function Parser(options,input){_classCallCheck(this,Parser);options=(0,_options.getOptions)(options);var _this=_possibleConstructorReturn(this,_Tokenizer.call(this,options,input));_this.options=options;_this.inModule=_this.options.sourceType==="module";_this.isReservedWord=_identifier.reservedWords[6];_this.input=input;_this.plugins=_this.loadPlugins(_this.options.plugins);_this.filename=options.sourceFilename;if(_this.state.pos===0&&_this.input[0]==="#"&&_this.input[1]==="!"){_this.skipLineComment(2)}return _this}Parser.prototype.hasPlugin=function hasPlugin(name){return!!(this.plugins["*"]||this.plugins[name])};Parser.prototype.extend=function extend(name,f){this[name]=f(this[name])};Parser.prototype.loadPlugins=function loadPlugins(plugins){var pluginMap={};if(plugins.indexOf("flow")>=0){plugins=plugins.filter(function(plugin){return plugin!=="flow"});plugins.push("flow")}for(var _iterator=plugins,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var name=_ref;if(!pluginMap[name]){pluginMap[name]=true;var plugin=exports.plugins[name];if(plugin)plugin(this)}}return pluginMap};Parser.prototype.parse=function parse(){var file=this.startNode();var program=this.startNode();this.nextToken();return this.parseTopLevel(file,program)};return Parser}(_tokenizer2.default);exports.default=Parser},{"../options":199,"../tokenizer":212,"../util/identifier":215}],203:[function(require,module,exports){"use strict";var _location=require("../util/location");var _index=require("./index");var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var pp=_index2.default.prototype;pp.raise=function(pos,message){var loc=(0,_location.getLineInfo)(this.input,pos);message+=" ("+loc.line+":"+loc.column+")";var err=new SyntaxError(message);err.pos=pos;err.loc=loc;throw err}},{"../util/location":216,"./index":202}],204:[function(require,module,exports){"use strict";var _types=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _identifier=require("../util/identifier");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var pp=_index2.default.prototype;pp.toAssignable=function(node,isBinding,contextDescription){if(node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var _iterator=node.properties,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var prop=_ref;if(prop.type==="ObjectMethod"){if(prop.kind==="get"||prop.kind==="set"){this.raise(prop.key.start,"Object pattern can't contain getter or setter")}else{this.raise(prop.key.start,"Object pattern can't contain methods")}}else{this.toAssignable(prop,isBinding,"object destructuring pattern")}}break;case"ObjectProperty":this.toAssignable(node.value,isBinding,contextDescription);break;case"SpreadProperty":node.type="RestProperty";break;case"ArrayExpression":node.type="ArrayPattern";this.toAssignableList(node.elements,isBinding,contextDescription);break;case"AssignmentExpression":if(node.operator==="="){node.type="AssignmentPattern";delete node.operator}else{this.raise(node.left.end,"Only '=' operator can be used for specifying default value.")}break;case"MemberExpression":if(!isBinding)break;default:{var message="Invalid left-hand side"+(contextDescription?" in "+contextDescription:"expression");this.raise(node.start,message)}}}return node};pp.toAssignableList=function(exprList,isBinding,contextDescription){var end=exprList.length;if(end){var last=exprList[end-1];if(last&&last.type==="RestElement"){--end}else if(last&&last.type==="SpreadElement"){last.type="RestElement";var arg=last.argument;this.toAssignable(arg,isBinding,contextDescription);if(arg.type!=="Identifier"&&arg.type!=="MemberExpression"&&arg.type!=="ArrayPattern"){this.unexpected(arg.start)}--end}}for(var i=0;i=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var prop=_ref2;if(prop.type==="ObjectProperty")prop=prop.value;this.checkLVal(prop,isBinding,checkClashes,"object destructuring pattern")}break;case"ArrayPattern":for(var _iterator3=expr.elements,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:_iterator3[Symbol.iterator]();;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var elem=_ref3;if(elem)this.checkLVal(elem,isBinding,checkClashes,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(expr.left,isBinding,checkClashes,"assignment pattern");break;case"RestProperty":this.checkLVal(expr.argument,isBinding,checkClashes,"rest property");break;case"RestElement":this.checkLVal(expr.argument,isBinding,checkClashes,"rest element");break;default:{var message=(isBinding?"Binding invalid":"Invalid")+" left-hand side"+(contextDescription?" in "+contextDescription:"expression");this.raise(expr.start,message)}}}},{"../tokenizer/types":214,"../util/identifier":215,"./index":202}],205:[function(require,module,exports){"use strict";var _index=require("./index");var _index2=_interopRequireDefault(_index);var _location=require("../util/location");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var pp=_index2.default.prototype;var commentKeys=["leadingComments","trailingComments","innerComments"];var Node=function(){function Node(pos,loc,filename){_classCallCheck(this,Node);this.type="";this.start=pos;this.end=0;this.loc=new _location.SourceLocation(loc);if(filename)this.loc.filename=filename}Node.prototype.__clone=function __clone(){var node2=new Node;for(var key in this){if(commentKeys.indexOf(key)<0){node2[key]=this[key]}}return node2};return Node}();pp.startNode=function(){return new Node(this.state.start,this.state.startLoc,this.filename)};pp.startNodeAt=function(pos,loc){return new Node(pos,loc,this.filename)};function finishNodeAt(node,type,pos,loc){node.type=type;node.end=pos;node.loc.end=loc;this.processComment(node);return node}pp.finishNode=function(node,type){return finishNodeAt.call(this,node,type,this.state.lastTokEnd,this.state.lastTokEndLoc)};pp.finishNodeAt=function(node,type,pos,loc){return finishNodeAt.call(this,node,type,pos,loc)}},{"../util/location":216,"./index":202}],206:[function(require,module,exports){"use strict";var _types=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _whitespace=require("../util/whitespace");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var pp=_index2.default.prototype;pp.parseTopLevel=function(file,program){program.sourceType=this.options.sourceType;this.parseBlockBody(program,true,true,_types.types.eof);file.program=this.finishNode(program,"Program");file.comments=this.state.comments;file.tokens=this.state.tokens;return this.finishNode(file,"File")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.stmtToDirective=function(stmt){var expr=stmt.expression;var directiveLiteral=this.startNodeAt(expr.start,expr.loc.start);var directive=this.startNodeAt(stmt.start,stmt.loc.start);var raw=this.input.slice(expr.start,expr.end);var val=directiveLiteral.value=raw.slice(1,-1);this.addExtra(directiveLiteral,"raw",raw);this.addExtra(directiveLiteral,"rawValue",val);directive.value=this.finishNodeAt(directiveLiteral,"DirectiveLiteral",expr.end,expr.loc.end);return this.finishNodeAt(directive,"Directive",stmt.end,stmt.loc.end)};pp.parseStatement=function(declaration,topLevel){if(this.match(_types.types.at)){this.parseDecorators(true)}var starttype=this.state.type,node=this.startNode();switch(starttype){case _types.types._break:case _types.types._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case _types.types._debugger:return this.parseDebuggerStatement(node);case _types.types._do:return this.parseDoStatement(node);case _types.types._for:return this.parseForStatement(node);case _types.types._function:if(!declaration)this.unexpected();return this.parseFunctionStatement(node);case _types.types._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case _types.types._if:return this.parseIfStatement(node);case _types.types._return:return this.parseReturnStatement(node);case _types.types._switch:return this.parseSwitchStatement(node);case _types.types._throw:return this.parseThrowStatement(node);case _types.types._try:return this.parseTryStatement(node);case _types.types._let:case _types.types._const:if(!declaration)this.unexpected();case _types.types._var:return this.parseVarStatement(node,starttype);case _types.types._while:return this.parseWhileStatement(node);case _types.types._with:return this.parseWithStatement(node);case _types.types.braceL:return this.parseBlock();case _types.types.semi:return this.parseEmptyStatement(node);case _types.types._export:case _types.types._import:if(!this.options.allowImportExportEverywhere){if(!topLevel){this.raise(this.state.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return starttype===_types.types._import?this.parseImport(node):this.parseExport(node);case _types.types.name:if(this.state.value==="async"){var state=this.state.clone();this.next();if(this.match(_types.types._function)&&!this.canInsertSemicolon()){this.expect(_types.types._function);return this.parseFunction(node,true,false,true)}else{this.state=state}}}var maybeName=this.state.value;var expr=this.parseExpression();if(starttype===_types.types.name&&expr.type==="Identifier"&&this.eat(_types.types.colon)){return this.parseLabeledStatement(node,maybeName,expr)}else{return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.state.decorators.length){node.decorators=this.state.decorators;this.state.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.match(_types.types.at)){this.state.decorators.push(this.parseDecorator())}if(allowExport&&this.match(_types.types._export)){return}if(!this.match(_types.types._class)){this.raise(this.state.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(){if(!this.hasPlugin("decorators")){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword==="break";this.next();if(this.isLineTerminator()){node.label=null}else if(!this.match(_types.types.name)){this.unexpected()}else{node.label=this.parseIdentifier();this.semicolon()}var i=void 0;for(i=0;i=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var _label=_ref;if(_label.name===maybeName){this.raise(expr.start,"Label '"+maybeName+"' is already declared")}}var kind=this.state.type.isLoop?"loop":this.match(_types.types._switch)?"switch":null;for(var i=this.state.labels.length-1;i>=0;i--){var label=this.state.labels[i];if(label.statementStart===node.start){label.statementStart=this.state.start;label.kind=kind}else{break}}this.state.labels.push({name:maybeName,kind:kind,statementStart:this.state.start});node.body=this.parseStatement(true);this.state.labels.pop();node.label=expr;return this.finishNode(node,"LabeledStatement")};pp.parseExpressionStatement=function(node,expr){node.expression=expr;this.semicolon();return this.finishNode(node,"ExpressionStatement")};pp.parseBlock=function(allowDirectives){var node=this.startNode();this.expect(_types.types.braceL);this.parseBlockBody(node,allowDirectives,false,_types.types.braceR);return this.finishNode(node,"BlockStatement")};pp.parseBlockBody=function(node,allowDirectives,topLevel,end){node.body=[];node.directives=[];var parsedNonDirective=false;var oldStrict=void 0;var octalPosition=void 0;while(!this.eat(end)){if(!parsedNonDirective&&this.state.containsOctal&&!octalPosition){octalPosition=this.state.octalPosition}var stmt=this.parseStatement(true,topLevel);if(allowDirectives&&!parsedNonDirective&&stmt.type==="ExpressionStatement"&&stmt.expression.type==="StringLiteral"&&!stmt.expression.extra.parenthesized){var directive=this.stmtToDirective(stmt);node.directives.push(directive);if(oldStrict===undefined&&directive.value.value==="use strict"){oldStrict=this.state.strict;this.setStrict(true);if(octalPosition){this.raise(octalPosition,"Octal literal in strict mode")}}continue}parsedNonDirective=true;node.body.push(stmt)}if(oldStrict===false){this.setStrict(false)}};pp.parseFor=function(node,init){node.init=init;this.expect(_types.types.semi);node.test=this.match(_types.types.semi)?null:this.parseExpression();this.expect(_types.types.semi);node.update=this.match(_types.types.parenR)?null:this.parseExpression();this.expect(_types.types.parenR);node.body=this.parseStatement(false);this.state.labels.pop();return this.finishNode(node,"ForStatement")};pp.parseForIn=function(node,init,forAwait){var type=void 0;if(forAwait){this.eatContextual("of");type="ForAwaitStatement"}else{type=this.match(_types.types._in)?"ForInStatement":"ForOfStatement";this.next()}node.left=init;node.right=this.parseExpression();this.expect(_types.types.parenR);node.body=this.parseStatement(false);this.state.labels.pop();return this.finishNode(node,type)};pp.parseVar=function(node,isFor,kind){node.declarations=[];node.kind=kind.keyword;for(;;){var decl=this.startNode();this.parseVarHead(decl);if(this.eat(_types.types.eq)){decl.init=this.parseMaybeAssign(isFor)}else if(kind===_types.types._const&&!(this.match(_types.types._in)||this.isContextual("of"))){this.unexpected()}else if(decl.id.type!=="Identifier"&&!(isFor&&(this.match(_types.types._in)||this.isContextual("of")))){this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value")}else{decl.init=null}node.declarations.push(this.finishNode(decl,"VariableDeclarator"));if(!this.eat(_types.types.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true,undefined,"variable declaration")};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync,optionalId){var oldInMethod=this.state.inMethod;this.state.inMethod=false;this.initFunction(node,isAsync);if(this.match(_types.types.star)){if(node.async&&!this.hasPlugin("asyncGenerators")){this.unexpected()}else{node.generator=true;this.next()}}if(isStatement&&!optionalId&&!this.match(_types.types.name)&&!this.match(_types.types._yield)){this.unexpected()}if(this.match(_types.types.name)||this.match(_types.types._yield)){node.id=this.parseBindingIdentifier()}this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);this.state.inMethod=oldInMethod;return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(_types.types.parenL);node.params=this.parseBindingList(_types.types.parenR)};pp.parseClass=function(node,isStatement,optionalId){this.next();this.parseClassId(node,isStatement,optionalId);this.parseClassSuper(node);this.parseClassBody(node);return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.match(_types.types.eq)||this.isLineTerminator()};pp.isClassMutatorStarter=function(){return false};pp.parseClassBody=function(node){var oldStrict=this.state.strict;this.state.strict=true;var hadConstructorCall=false;var hadConstructor=false;var decorators=[];var classBody=this.startNode();classBody.body=[];this.expect(_types.types.braceL);while(!this.eat(_types.types.braceR)){if(this.eat(_types.types.semi)){continue}if(this.match(_types.types.at)){decorators.push(this.parseDecorator());continue}var method=this.startNode();if(decorators.length){method.decorators=decorators;decorators=[]}var isConstructorCall=false;var isMaybeStatic=this.match(_types.types.name)&&this.state.value==="static";var isGenerator=this.eat(_types.types.star);var isGetSet=false;var isAsync=false;this.parsePropertyName(method);method.static=isMaybeStatic&&!this.match(_types.types.parenL);if(method.static){if(isGenerator)this.unexpected();isGenerator=this.eat(_types.types.star);this.parsePropertyName(method)}if(!isGenerator){if(this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(method.key.type==="Identifier"&&!method.computed&&this.hasPlugin("classConstructorCall")&&method.key.name==="call"&&this.match(_types.types.name)&&this.state.value==="constructor"){isConstructorCall=true;this.parsePropertyName(method)}}var isAsyncMethod=!this.match(_types.types.parenL)&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async";if(isAsyncMethod){if(this.hasPlugin("asyncGenerators")&&this.eat(_types.types.star))isGenerator=true;isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed){var key=method.key;if(!isAsync&&!isGenerator&&!this.isClassMutatorStarter()&&key.type==="Identifier"&&!this.match(_types.types.parenL)&&(key.name==="get"||key.name==="set")){isGetSet=true;method.kind=key.name;key=this.parsePropertyName(method)}var isConstructor=!isConstructorCall&&!method.static&&(key.type==="Identifier"&&key.name==="constructor"||key.type==="StringLiteral"&&key.value==="constructor");if(isConstructor){if(hadConstructor)this.raise(key.start,"Duplicate constructor in the same class");if(isGetSet)this.raise(key.start,"Constructor can't have get/set modifier");if(isGenerator)this.raise(key.start,"Constructor can't be a generator");if(isAsync)this.raise(key.start,"Constructor can't be an async function");method.kind="constructor";hadConstructor=true}var isStaticPrototype=method.static&&(key.type==="Identifier"&&key.name==="prototype"||key.type==="StringLiteral"&&key.value==="prototype");if(isStaticPrototype){this.raise(key.start,"Classes may not have static property named prototype")}}if(isConstructorCall){if(hadConstructorCall)this.raise(method.start,"Duplicate constructor call in the same class");method.kind="constructorCall";hadConstructorCall=true}if((method.kind==="constructor"||method.kind==="constructorCall")&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync);if(isGetSet){var paramCount=method.kind==="get"?0:1;if(method.params.length!==paramCount){var start=method.start;if(method.kind==="get"){this.raise(start,"getter should have no params")}else{this.raise(start,"setter should have exactly one param")}}}}if(decorators.length){this.raise(this.state.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");this.state.strict=oldStrict};pp.parseClassProperty=function(node){if(this.match(_types.types.eq)){if(!this.hasPlugin("classProperties"))this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){this.parseMethod(method,isGenerator,isAsync);classBody.body.push(this.finishNode(method,"ClassMethod"))};pp.parseClassId=function(node,isStatement,optionalId){if(this.match(_types.types.name)){ -node.id=this.parseIdentifier()}else{if(optionalId||!isStatement){node.id=null}else{this.unexpected()}}};pp.parseClassSuper=function(node){node.superClass=this.eat(_types.types._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.match(_types.types.star)){var specifier=this.startNode();this.next();if(this.hasPlugin("exportExtensions")&&this.eatContextual("as")){specifier.exported=this.parseIdentifier();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node,true)}else{this.parseExportFrom(node,true);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var _specifier=this.startNode();_specifier.exported=this.parseIdentifier(true);node.specifiers=[this.finishNode(_specifier,"ExportDefaultSpecifier")];if(this.match(_types.types.comma)&&this.lookahead().type===_types.types.star){this.expect(_types.types.comma);var _specifier2=this.startNode();this.expect(_types.types.star);this.expectContextual("as");_specifier2.exported=this.parseIdentifier();node.specifiers.push(this.finishNode(_specifier2,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node,true)}else if(this.eat(_types.types._default)){var expr=this.startNode();var needsSemi=false;if(this.eat(_types.types._function)){expr=this.parseFunction(expr,true,false,false,true)}else if(this.match(_types.types._class)){expr=this.parseClass(expr,true,true)}else{needsSemi=true;expr=this.parseMaybeAssign()}node.declaration=expr;if(needsSemi)this.semicolon();this.checkExport(node,true,true);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.state.type.keyword||this.shouldParseExportDeclaration()){node.specifiers=[];node.source=null;node.declaration=this.parseExportDeclaration(node)}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();this.parseExportFrom(node)}this.checkExport(node,true);return this.finishNode(node,"ExportNamedDeclaration")};pp.parseExportDeclaration=function(){return this.parseStatement(true)};pp.isExportDefaultSpecifier=function(){if(this.match(_types.types.name)){return this.state.value!=="type"&&this.state.value!=="async"&&this.state.value!=="interface"}if(!this.match(_types.types._default)){return false}var lookahead=this.lookahead();return lookahead.type===_types.types.comma||lookahead.type===_types.types.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(_types.types.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node,expect){if(this.eatContextual("from")){node.source=this.match(_types.types.string)?this.parseExprAtom():this.unexpected();this.checkExport(node)}else{if(expect){this.unexpected()}else{node.source=null}}this.semicolon()};pp.shouldParseExportDeclaration=function(){return this.isContextual("async")};pp.checkExport=function(node,checkNames,isDefault){if(checkNames){if(isDefault){this.checkDuplicateExports(node,"default",isDefault)}else if(node.specifiers&&node.specifiers.length){for(var _iterator2=node.specifiers,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_iterator2[Symbol.iterator]();;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++]}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value}var specifier=_ref2;var name=specifier.exported.name;if(name==="default")isDefault=true;this.checkDuplicateExports(specifier,name,isDefault)}}else if(node.declaration){if(node.declaration.type==="FunctionDeclaration"||node.declaration.type==="ClassDeclaration"){this.checkDuplicateExports(node,node.declaration.id.name,isDefault)}else if(node.declaration.type==="VariableDeclaration"){for(var _iterator3=node.declaration.declarations,_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:_iterator3[Symbol.iterator]();;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++]}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value}var declaration=_ref3;if(declaration.id.name){this.checkDuplicateExports(declaration,declaration.id.name,isDefault)}}}}}if(this.state.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.checkDuplicateExports=function(node,name,isDefault){if(this.state.exportedIdentifiers.indexOf(name)>-1){this.raiseDuplicateExportError(node,name,isDefault)}this.state.exportedIdentifiers.push(name)};pp.raiseDuplicateExportError=function(node,name,isDefault){this.raise(node.start,isDefault?"Only one default export allowed per module.":"`"+name+"` has already been exported. Exported identifiers must be unique.")};pp.parseExportSpecifiers=function(){var nodes=[];var first=true;var needsFrom=void 0;this.expect(_types.types.braceL);while(!this.eat(_types.types.braceR)){if(first){first=false}else{this.expect(_types.types.comma);if(this.eat(_types.types.braceR))break}var isDefault=this.match(_types.types._default);if(isDefault&&!needsFrom)needsFrom=true;var node=this.startNode();node.local=this.parseIdentifier(isDefault);node.exported=this.eatContextual("as")?this.parseIdentifier(true):node.local.__clone();nodes.push(this.finishNode(node,"ExportSpecifier"))}if(needsFrom&&!this.isContextual("from")){this.unexpected()}return nodes};pp.parseImport=function(node){this.next();if(this.match(_types.types.string)){node.specifiers=[];node.source=this.parseExprAtom()}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.match(_types.types.string)?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.match(_types.types.name)){var startPos=this.state.start,startLoc=this.state.startLoc;node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),startPos,startLoc));if(!this.eat(_types.types.comma))return}if(this.match(_types.types.star)){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdentifier();this.checkLVal(specifier.local,true,undefined,"import namespace specifier");node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(_types.types.braceL);while(!this.eat(_types.types.braceR)){if(first){first=false}else{this.expect(_types.types.comma);if(this.eat(_types.types.braceR))break}var _specifier3=this.startNode();_specifier3.imported=this.parseIdentifier(true);_specifier3.local=this.eatContextual("as")?this.parseIdentifier():_specifier3.imported.__clone();this.checkLVal(_specifier3.local,true,undefined,"import specifier");node.specifiers.push(this.finishNode(_specifier3,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,startPos,startLoc){var node=this.startNodeAt(startPos,startLoc);node.local=id;this.checkLVal(node.local,true,undefined,"default import specifier");return this.finishNode(node,"ImportDefaultSpecifier")}},{"../tokenizer/types":214,"../util/whitespace":217,"./index":202}],207:[function(require,module,exports){"use strict";var _types=require("../tokenizer/types");var _index=require("./index");var _index2=_interopRequireDefault(_index);var _whitespace=require("../util/whitespace");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var pp=_index2.default.prototype;pp.addExtra=function(node,key,val){if(!node)return;var extra=node.extra=node.extra||{};extra[key]=val};pp.isRelational=function(op){return this.match(_types.types.relational)&&this.state.value===op};pp.expectRelational=function(op){if(this.isRelational(op)){this.next()}else{this.unexpected()}};pp.isContextual=function(name){return this.match(_types.types.name)&&this.state.value===name};pp.eatContextual=function(name){return this.state.value===name&&this.eat(_types.types.name)};pp.expectContextual=function(name,message){if(!this.eatContextual(name))this.unexpected(null,message)};pp.canInsertSemicolon=function(){return this.match(_types.types.eof)||this.match(_types.types.braceR)||_whitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))};pp.isLineTerminator=function(){return this.eat(_types.types.semi)||this.canInsertSemicolon()};pp.semicolon=function(){if(!this.isLineTerminator())this.unexpected()};pp.expect=function(type,pos){return this.eat(type)||this.unexpected(pos)};pp.unexpected=function(pos){var message=arguments.length<=1||arguments[1]===undefined?"Unexpected token":arguments[1];this.raise(pos!=null?pos:this.state.start,message)}},{"../tokenizer/types":214,"../util/whitespace":217,"./index":202}],208:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.match(_types.types.colon)&&!allowExpression){node.returnType=this.flowParseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.state.strict&&this.match(_types.types.name)&&this.state.value==="interface"){var node=this.startNode();this.next();return this.flowParseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.match(_types.types._class)||this.match(_types.types.name)||this.match(_types.types._function)||this.match(_types.types._var)){return this.flowParseDeclare(node)}}else if(this.match(_types.types.name)){if(expr.name==="interface"){return this.flowParseInterface(node)}else if(expr.name==="type"){return this.flowParseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||this.isContextual("interface")||inner.call(this)}});instance.extend("parseConditional",function(inner){return function(expr,noIn,startPos,startLoc,refNeedsArrowPos){if(refNeedsArrowPos&&this.match(_types.types.question)){var state=this.state.clone();try{return inner.call(this,expr,noIn,startPos,startLoc)}catch(err){if(err instanceof SyntaxError){this.state=state;refNeedsArrowPos.start=err.pos||this.state.start;return expr}else{throw err}}}return inner.call(this,expr,noIn,startPos,startLoc)}});instance.extend("parseParenItem",function(inner){return function(node,startLoc,startPos){node=inner.call(this,node,startLoc,startPos);if(this.eat(_types.types.question)){node.optional=true}if(this.match(_types.types.colon)){var typeCastNode=this.startNodeAt(startLoc,startPos);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flowParseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}return node}});instance.extend("parseExport",function(inner){return function(node){node=inner.call(this,node);if(node.type==="ExportNamedDeclaration"){node.exportKind=node.exportKind||"value"}return node}});instance.extend("parseExportDeclaration",function(inner){return function(node){if(this.isContextual("type")){node.exportKind="type";var declarationNode=this.startNode();this.next();if(this.match(_types.types.braceL)){node.specifiers=this.parseExportSpecifiers();this.parseExportFrom(node);return null}else{return this.flowParseTypeAlias(declarationNode)}}else if(this.isContextual("interface")){node.exportKind="type";var _declarationNode=this.startNode();this.next();return this.flowParseInterface(_declarationNode)}else{return inner.call(this,node)}}});instance.extend("parseClassId",function(inner){return function(node){inner.apply(this,arguments);if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}}});instance.extend("isKeyword",function(inner){return function(name){if(this.state.inType&&name==="void"){return false}else{return inner.call(this,name)}}});instance.extend("readToken",function(inner){return function(code){if(this.state.inType&&(code===62||code===60)){return this.finishOp(_types.types.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.state.inType)return inner.call(this)}});instance.extend("toAssignable",function(inner){return function(node,isBinding,contextDescription){if(node.type==="TypeCastExpression"){return inner.call(this,this.typeCastToParameter(node),isBinding,contextDescription)}else{return inner.call(this,node,isBinding,contextDescription)}}});instance.extend("toAssignableList",function(inner){return function(exprList,isBinding,contextDescription){for(var i=0;i")){this.expect(_types.types.comma)}}while(!this.isRelational(">"));this.expectRelational(">");this.state.inType=oldInType;return this.finishNode(node,"TypeParameterDeclaration")};pp.flowParseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.state.inType;node.params=[];this.state.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flowParseType());if(!this.isRelational(">")){this.expect(_types.types.comma)}}this.expectRelational(">");this.state.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flowParseObjectPropertyKey=function(){return this.match(_types.types.num)||this.match(_types.types.string)?this.parseExprAtom():this.parseIdentifier(true)};pp.flowParseObjectTypeIndexer=function(node,isStatic){node.static=isStatic;this.expect(_types.types.bracketL);node.id=this.flowParseObjectPropertyKey();node.key=this.flowParseTypeInitialiser();this.expect(_types.types.bracketR);node.value=this.flowParseTypeInitialiser();this.flowObjectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flowParseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterDeclaration()}this.expect(_types.types.parenL);while(this.match(_types.types.name)){node.params.push(this.flowParseFunctionTypeParam());if(!this.match(_types.types.parenR)){this.expect(_types.types.comma)}}if(this.eat(_types.types.ellipsis)){node.rest=this.flowParseFunctionTypeParam()}this.expect(_types.types.parenR);node.returnType=this.flowParseTypeInitialiser();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flowParseObjectTypeMethod=function(startPos,startLoc,isStatic,key){var node=this.startNodeAt(startPos,startLoc);node.value=this.flowParseObjectTypeMethodish(this.startNodeAt(startPos,startLoc));node.static=isStatic;node.key=key;node.optional=false;this.flowObjectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flowParseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node.static=isStatic;node.value=this.flowParseObjectTypeMethodish(valueNode);this.flowObjectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flowParseObjectType=function(allowStatic,allowExact){var nodeStart=this.startNode();var node=void 0;var propertyKey=void 0;var isStatic=false;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];var endDelim=void 0;var exact=void 0;if(allowExact&&this.match(_types.types.braceBarL)){this.expect(_types.types.braceBarL);endDelim=_types.types.braceBarR;exact=true}else{this.expect(_types.types.braceL);endDelim=_types.types.braceR;exact=false}nodeStart.exact=exact;while(!this.match(endDelim)){var optional=false;var startPos=this.state.start,startLoc=this.state.startLoc;node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.match(_types.types.bracketL)){nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node,isStatic))}else if(this.match(_types.types.parenL)||this.isRelational("<")){nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.match(_types.types.colon)){propertyKey=this.parseIdentifier()}else{propertyKey=this.flowParseObjectPropertyKey()}if(this.isRelational("<")||this.match(_types.types.parenL)){nodeStart.properties.push(this.flowParseObjectTypeMethod(startPos,startLoc,isStatic,propertyKey))}else{if(this.eat(_types.types.question)){optional=true}node.key=propertyKey;node.value=this.flowParseTypeInitialiser();node.optional=optional;node.static=isStatic;this.flowObjectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}isStatic=false}this.expect(endDelim);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flowObjectTypeSemicolon=function(){if(!this.eat(_types.types.semi)&&!this.eat(_types.types.comma)&&!this.match(_types.types.braceR)&&!this.match(_types.types.braceBarR)){this.unexpected()}};pp.flowParseQualifiedTypeIdentifier=function(startPos,startLoc,id){startPos=startPos||this.state.start;startLoc=startLoc||this.state.startLoc;var node=id||this.parseIdentifier();while(this.eat(_types.types.dot)){var node2=this.startNodeAt(startPos,startLoc);node2.qualification=node;node2.id=this.parseIdentifier();node=this.finishNode(node2,"QualifiedTypeIdentifier")}return node};pp.flowParseGenericType=function(startPos,startLoc,id){var node=this.startNodeAt(startPos,startLoc);node.typeParameters=null;node.id=this.flowParseQualifiedTypeIdentifier(startPos,startLoc,id);if(this.isRelational("<")){node.typeParameters=this.flowParseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flowParseTypeofType=function(){var node=this.startNode();this.expect(_types.types._typeof);node.argument=this.flowParsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flowParseTupleType=function(){var node=this.startNode();node.types=[];this.expect(_types.types.bracketL);while(this.state.pos...",true,true);_types.types.jsxName=new _types.TokenType("jsxName");_types.types.jsxText=new _types.TokenType("jsxText",{beforeExpr:true});_types.types.jsxTagStart=new _types.TokenType("jsxTagStart",{startsExpr:true});_types.types.jsxTagEnd=new _types.TokenType("jsxTagEnd");_types.types.jsxTagStart.updateContext=function(){this.state.context.push(_context.types.j_expr);this.state.context.push(_context.types.j_oTag);this.state.exprAllowed=false};_types.types.jsxTagEnd.updateContext=function(prevType){var out=this.state.context.pop();if(out===_context.types.j_oTag&&prevType===_types.types.slash||out===_context.types.j_cTag){this.state.context.pop();this.state.exprAllowed=this.curContext()===_context.types.j_expr}else{this.state.exprAllowed=true}};var pp=_parser2.default.prototype;pp.jsxReadToken=function(){var out="";var chunkStart=this.state.pos;for(;;){if(this.state.pos>=this.input.length){this.raise(this.state.start,"Unterminated JSX contents")}var ch=this.input.charCodeAt(this.state.pos);switch(ch){case 60:case 123:if(this.state.pos===this.state.start){if(ch===60&&this.state.exprAllowed){++this.state.pos;return this.finishToken(_types.types.jsxTagStart)}return this.getTokenFromCode(ch)}out+=this.input.slice(chunkStart,this.state.pos);return this.finishToken(_types.types.jsxText,out);case 38:out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadEntity();chunkStart=this.state.pos;break;default:if((0,_whitespace.isNewLine)(ch)){out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadNewLine(true);chunkStart=this.state.pos}else{++this.state.pos}}}};pp.jsxReadNewLine=function(normalizeCRLF){var ch=this.input.charCodeAt(this.state.pos);var out=void 0;++this.state.pos;if(ch===13&&this.input.charCodeAt(this.state.pos)===10){++this.state.pos;out=normalizeCRLF?"\n":"\r\n"}else{out=String.fromCharCode(ch)}++this.state.curLine;this.state.lineStart=this.state.pos;return out};pp.jsxReadString=function(quote){var out="";var chunkStart=++this.state.pos;for(;;){if(this.state.pos>=this.input.length){this.raise(this.state.start,"Unterminated string constant")}var ch=this.input.charCodeAt(this.state.pos);if(ch===quote)break;if(ch===38){out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadEntity();chunkStart=this.state.pos}else if((0,_whitespace.isNewLine)(ch)){out+=this.input.slice(chunkStart,this.state.pos);out+=this.jsxReadNewLine(false);chunkStart=this.state.pos}else{++this.state.pos}}out+=this.input.slice(chunkStart,this.state.pos++);return this.finishToken(_types.types.string,out)};pp.jsxReadEntity=function(){var str="";var count=0;var entity=void 0;var ch=this.input[this.state.pos];var startPos=++this.state.pos;while(this.state.pos")}}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;if(this.match(_types.types.relational)&&this.state.value==="<"){this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag")}return this.finishNode(node,"JSXElement")};pp.jsxParseElement=function(){var startPos=this.state.start,startLoc=this.state.startLoc;this.next();return this.jsxParseElementAt(startPos,startLoc)}},{"../../parser":202,"../../tokenizer/context":211,"../../tokenizer/types":214,"../../util/identifier":215,"../../util/whitespace":217,"./xhtml":210}],210:[function(require,module,exports){"use strict";exports.__esModule=true;exports.default={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:"♦"}},{}],211:[function(require,module,exports){"use strict";exports.__esModule=true;exports.types=exports.TokContext=undefined;var _types=require("./types");var _whitespace=require("../util/whitespace");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TokContext=exports.TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=!!isExpr;this.preserveSpace=!!preserveSpace;this.override=override};var types=exports.types={braceStatement:new TokContext("{",false),braceExpression:new TokContext("{",true),templateQuasi:new TokContext("${",true),parenStatement:new TokContext("(",false),parenExpression:new TokContext("(",true),template:new TokContext("`",true,true,function(p){return p.readTmplToken()}),functionExpression:new TokContext("function",true)};_types.types.parenR.updateContext=_types.types.braceR.updateContext=function(){if(this.state.context.length===1){this.state.exprAllowed=true;return}var out=this.state.context.pop();if(out===types.braceStatement&&this.curContext()===types.functionExpression){this.state.context.pop();this.state.exprAllowed=false}else if(out===types.templateQuasi){this.state.exprAllowed=true}else{this.state.exprAllowed=!out.isExpr}};_types.types.name.updateContext=function(prevType){this.state.exprAllowed=false;if(prevType===_types.types._let||prevType===_types.types._const||prevType===_types.types._var){if(_whitespace.lineBreak.test(this.input.slice(this.state.end))){this.state.exprAllowed=true}}};_types.types.braceL.updateContext=function(prevType){this.state.context.push(this.braceIsBlock(prevType)?types.braceStatement:types.braceExpression);this.state.exprAllowed=true};_types.types.dollarBraceL.updateContext=function(){this.state.context.push(types.templateQuasi);this.state.exprAllowed=true};_types.types.parenL.updateContext=function(prevType){var statementParens=prevType===_types.types._if||prevType===_types.types._for||prevType===_types.types._with||prevType===_types.types._while;this.state.context.push(statementParens?types.parenStatement:types.parenExpression);this.state.exprAllowed=true};_types.types.incDec.updateContext=function(){};_types.types._function.updateContext=function(){if(this.curContext()!==types.braceStatement){this.state.context.push(types.functionExpression)}this.state.exprAllowed=false};_types.types.backQuote.updateContext=function(){if(this.curContext()===types.template){this.state.context.pop()}else{this.state.context.push(types.template)}this.state.exprAllowed=false}},{"../util/whitespace":217,"./types":214}],212:[function(require,module,exports){"use strict";exports.__esModule=true;exports.Token=undefined;var _identifier=require("../util/identifier");var _types=require("./types");var _context=require("./context");var _location=require("../util/location");var _whitespace=require("../util/whitespace");var _state=require("./state");var _state2=_interopRequireDefault(_state);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Token=exports.Token=function Token(state){_classCallCheck(this,Token);this.type=state.type;this.value=state.value;this.start=state.start;this.end=state.end;this.loc=new _location.SourceLocation(state.startLoc,state.endLoc)};function codePointToString(code){if(code<=65535){return String.fromCharCode(code)}else{return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}}var Tokenizer=function(){function Tokenizer(options,input){_classCallCheck(this,Tokenizer);this.state=new _state2.default;this.state.init(options,input)}Tokenizer.prototype.next=function next(){if(!this.isLookahead){this.state.tokens.push(new Token(this.state))}this.state.lastTokEnd=this.state.end;this.state.lastTokStart=this.state.start;this.state.lastTokEndLoc=this.state.endLoc;this.state.lastTokStartLoc=this.state.startLoc;this.nextToken()};Tokenizer.prototype.eat=function eat(type){if(this.match(type)){this.next();return true}else{return false}};Tokenizer.prototype.match=function match(type){return this.state.type===type};Tokenizer.prototype.isKeyword=function isKeyword(word){return(0,_identifier.isKeyword)(word)};Tokenizer.prototype.lookahead=function lookahead(){var old=this.state;this.state=old.clone(true);this.isLookahead=true;this.next();this.isLookahead=false;var curr=this.state.clone(true);this.state=old;return curr};Tokenizer.prototype.setStrict=function setStrict(strict){this.state.strict=strict;if(!this.match(_types.types.num)&&!this.match(_types.types.string))return;this.state.pos=this.state.start;while(this.state.pos=this.input.length)return this.finishToken(_types.types.eof);if(curContext.override){return curContext.override(this)}else{return this.readToken(this.fullCharCodeAtPos())}};Tokenizer.prototype.readToken=function readToken(code){if((0,_identifier.isIdentifierStart)(code)||code===92){return this.readWord()}else{return this.getTokenFromCode(code)}};Tokenizer.prototype.fullCharCodeAtPos=function fullCharCodeAtPos(){var code=this.input.charCodeAt(this.state.pos);if(code<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.state.pos+1);return(code<<10)+next-56613888};Tokenizer.prototype.pushComment=function pushComment(block,text,start,end,startLoc,endLoc){var comment={type:block?"CommentBlock":"CommentLine",value:text,start:start,end:end,loc:new _location.SourceLocation(startLoc,endLoc)};if(!this.isLookahead){this.state.tokens.push(comment);this.state.comments.push(comment);this.addComment(comment)}};Tokenizer.prototype.skipBlockComment=function skipBlockComment(){var startLoc=this.state.curPosition();var start=this.state.pos,end=this.input.indexOf("*/",this.state.pos+=2);if(end===-1)this.raise(this.state.pos-2,"Unterminated comment");this.state.pos=end+2;_whitespace.lineBreakG.lastIndex=start;var match=void 0;while((match=_whitespace.lineBreakG.exec(this.input))&&match.index8&&ch<14||ch>=5760&&_whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.state.pos}else{break loop}}}};Tokenizer.prototype.finishToken=function finishToken(type,val){this.state.end=this.state.pos;this.state.endLoc=this.state.curPosition();var prevType=this.state.type;this.state.type=type;this.state.value=val;this.updateContext(prevType)};Tokenizer.prototype.readToken_dot=function readToken_dot(){var next=this.input.charCodeAt(this.state.pos+1);if(next>=48&&next<=57){return this.readNumber(true)}var next2=this.input.charCodeAt(this.state.pos+2);if(next===46&&next2===46){this.state.pos+=3;return this.finishToken(_types.types.ellipsis)}else{++this.state.pos;return this.finishToken(_types.types.dot)}};Tokenizer.prototype.readToken_slash=function readToken_slash(){if(this.state.exprAllowed){++this.state.pos;return this.readRegexp()}var next=this.input.charCodeAt(this.state.pos+1);if(next===61){return this.finishOp(_types.types.assign,2)}else{return this.finishOp(_types.types.slash,1)}};Tokenizer.prototype.readToken_mult_modulo=function readToken_mult_modulo(code){var type=code===42?_types.types.star:_types.types.modulo;var width=1;var next=this.input.charCodeAt(this.state.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.state.pos+2);type=_types.types.exponent}if(next===61){width++;type=_types.types.assign}return this.finishOp(type,width)};Tokenizer.prototype.readToken_pipe_amp=function readToken_pipe_amp(code){var next=this.input.charCodeAt(this.state.pos+1);if(next===code)return this.finishOp(code===124?_types.types.logicalOR:_types.types.logicalAND,2);if(next===61)return this.finishOp(_types.types.assign,2);if(code===124&&next===125&&this.hasPlugin("flow"))return this.finishOp(_types.types.braceBarR,2);return this.finishOp(code===124?_types.types.bitwiseOR:_types.types.bitwiseAND,1)};Tokenizer.prototype.readToken_caret=function readToken_caret(){var next=this.input.charCodeAt(this.state.pos+1);if(next===61){return this.finishOp(_types.types.assign,2)}else{return this.finishOp(_types.types.bitwiseXOR,1)}};Tokenizer.prototype.readToken_plus_min=function readToken_plus_min(code){var next=this.input.charCodeAt(this.state.pos+1);if(next===code){if(next===45&&this.input.charCodeAt(this.state.pos+2)===62&&_whitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(_types.types.incDec,2)}if(next===61){return this.finishOp(_types.types.assign,2)}else{return this.finishOp(_types.types.plusMin,1)}};Tokenizer.prototype.readToken_lt_gt=function readToken_lt_gt(code){var next=this.input.charCodeAt(this.state.pos+1);var size=1;if(next===code){size=code===62&&this.input.charCodeAt(this.state.pos+2)===62?3:2;if(this.input.charCodeAt(this.state.pos+size)===61)return this.finishOp(_types.types.assign,size+1);return this.finishOp(_types.types.bitShift,size)}if(next===33&&code===60&&this.input.charCodeAt(this.state.pos+2)===45&&this.input.charCodeAt(this.state.pos+3)===45){if(this.inModule)this.unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61){size=2}return this.finishOp(_types.types.relational,size)};Tokenizer.prototype.readToken_eq_excl=function readToken_eq_excl(code){var next=this.input.charCodeAt(this.state.pos+1);if(next===61)return this.finishOp(_types.types.equality,this.input.charCodeAt(this.state.pos+2)===61?3:2);if(code===61&&next===62){this.state.pos+=2;return this.finishToken(_types.types.arrow)}return this.finishOp(code===61?_types.types.eq:_types.types.prefix,1)};Tokenizer.prototype.getTokenFromCode=function getTokenFromCode(code){switch(code){case 46:return this.readToken_dot();case 40:++this.state.pos;return this.finishToken(_types.types.parenL);case 41:++this.state.pos;return this.finishToken(_types.types.parenR);case 59:++this.state.pos;return this.finishToken(_types.types.semi);case 44:++this.state.pos;return this.finishToken(_types.types.comma);case 91:++this.state.pos;return this.finishToken(_types.types.bracketL);case 93:++this.state.pos;return this.finishToken(_types.types.bracketR);case 123:if(this.hasPlugin("flow")&&this.input.charCodeAt(this.state.pos+1)===124){return this.finishOp(_types.types.braceBarL,2)}else{++this.state.pos;return this.finishToken(_types.types.braceL)}case 125:++this.state.pos;return this.finishToken(_types.types.braceR);case 58:if(this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58){return this.finishOp(_types.types.doubleColon,2)}else{++this.state.pos;return this.finishToken(_types.types.colon)}case 63:++this.state.pos;return this.finishToken(_types.types.question);case 64:++this.state.pos;return this.finishToken(_types.types.at);case 96:++this.state.pos;return this.finishToken(_types.types.backQuote);case 48:var next=this.input.charCodeAt(this.state.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 126:return this.finishOp(_types.types.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+codePointToString(code)+"'")};Tokenizer.prototype.finishOp=function finishOp(type,size){var str=this.input.slice(this.state.pos,this.state.pos+size);this.state.pos+=size;return this.finishToken(type,str)};Tokenizer.prototype.readRegexp=function readRegexp(){var escaped=void 0,inClass=void 0,start=this.state.pos;for(;;){if(this.state.pos>=this.input.length)this.raise(start,"Unterminated regular expression");var ch=this.input.charAt(this.state.pos);if(_whitespace.lineBreak.test(ch)){this.raise(start,"Unterminated regular expression")}if(escaped){escaped=false}else{if(ch==="["){inClass=true}else if(ch==="]"&&inClass){inClass=false}else if(ch==="/"&&!inClass){break}escaped=ch==="\\"}++this.state.pos}var content=this.input.slice(start,this.state.pos); -++this.state.pos;var mods=this.readWord1();if(mods){var validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag")}return this.finishToken(_types.types.regexp,{pattern:content,flags:mods})};Tokenizer.prototype.readInt=function readInt(radix,len){var start=this.state.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97){val=code-97+10}else if(code>=65){val=code-65+10}else if(code>=48&&code<=57){val=code-48}else{val=Infinity}if(val>=radix)break;++this.state.pos;total=total*radix+val}if(this.state.pos===start||len!=null&&this.state.pos-start!==len)return null;return total};Tokenizer.prototype.readRadixNumber=function readRadixNumber(radix){this.state.pos+=2;var val=this.readInt(radix);if(val==null)this.raise(this.state.start+2,"Expected number in radix "+radix);if((0,_identifier.isIdentifierStart)(this.fullCharCodeAtPos()))this.raise(this.state.pos,"Identifier directly after number");return this.finishToken(_types.types.num,val)};Tokenizer.prototype.readNumber=function readNumber(startsWithDot){var start=this.state.pos,isFloat=false,octal=this.input.charCodeAt(this.state.pos)===48;if(!startsWithDot&&this.readInt(10)===null)this.raise(start,"Invalid number");var next=this.input.charCodeAt(this.state.pos);if(next===46){++this.state.pos;this.readInt(10);isFloat=true;next=this.input.charCodeAt(this.state.pos)}if(next===69||next===101){next=this.input.charCodeAt(++this.state.pos);if(next===43||next===45)++this.state.pos;if(this.readInt(10)===null)this.raise(start,"Invalid number");isFloat=true}if((0,_identifier.isIdentifierStart)(this.fullCharCodeAtPos()))this.raise(this.state.pos,"Identifier directly after number");var str=this.input.slice(start,this.state.pos),val=void 0;if(isFloat){val=parseFloat(str)}else if(!octal||str.length===1){val=parseInt(str,10)}else if(/[89]/.test(str)||this.state.strict){this.raise(start,"Invalid number")}else{val=parseInt(str,8)}return this.finishToken(_types.types.num,val)};Tokenizer.prototype.readCodePoint=function readCodePoint(){var ch=this.input.charCodeAt(this.state.pos),code=void 0;if(ch===123){var codePos=++this.state.pos;code=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos);++this.state.pos;if(code>1114111)this.raise(codePos,"Code point out of bounds")}else{code=this.readHexChar(4)}return code};Tokenizer.prototype.readString=function readString(quote){var out="",chunkStart=++this.state.pos;for(;;){if(this.state.pos>=this.input.length)this.raise(this.state.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.state.pos);if(ch===quote)break;if(ch===92){out+=this.input.slice(chunkStart,this.state.pos);out+=this.readEscapedChar(false);chunkStart=this.state.pos}else{if((0,_whitespace.isNewLine)(ch))this.raise(this.state.start,"Unterminated string constant");++this.state.pos}}out+=this.input.slice(chunkStart,this.state.pos++);return this.finishToken(_types.types.string,out)};Tokenizer.prototype.readTmplToken=function readTmplToken(){var out="",chunkStart=this.state.pos;for(;;){if(this.state.pos>=this.input.length)this.raise(this.state.start,"Unterminated template");var ch=this.input.charCodeAt(this.state.pos);if(ch===96||ch===36&&this.input.charCodeAt(this.state.pos+1)===123){if(this.state.pos===this.state.start&&this.match(_types.types.template)){if(ch===36){this.state.pos+=2;return this.finishToken(_types.types.dollarBraceL)}else{++this.state.pos;return this.finishToken(_types.types.backQuote)}}out+=this.input.slice(chunkStart,this.state.pos);return this.finishToken(_types.types.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.state.pos);out+=this.readEscapedChar(true);chunkStart=this.state.pos}else if((0,_whitespace.isNewLine)(ch)){out+=this.input.slice(chunkStart,this.state.pos);++this.state.pos;switch(ch){case 13:if(this.input.charCodeAt(this.state.pos)===10)++this.state.pos;case 10:out+="\n";break;default:out+=String.fromCharCode(ch);break}++this.state.curLine;this.state.lineStart=this.state.pos;chunkStart=this.state.pos}else{++this.state.pos}}};Tokenizer.prototype.readEscapedChar=function readEscapedChar(inTemplate){var ch=this.input.charCodeAt(++this.state.pos);++this.state.pos;switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.state.pos)===10)++this.state.pos;case 10:this.state.lineStart=this.state.pos;++this.state.curLine;return"";default:if(ch>=48&&ch<=55){var octalStr=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0];var octal=parseInt(octalStr,8);if(octal>255){octalStr=octalStr.slice(0,-1);octal=parseInt(octalStr,8)}if(octal>0){if(!this.state.containsOctal){this.state.containsOctal=true;this.state.octalPosition=this.state.pos-2}if(this.state.strict||inTemplate){this.raise(this.state.pos-2,"Octal literal in strict mode")}}this.state.pos+=octalStr.length-1;return String.fromCharCode(octal)}return String.fromCharCode(ch)}};Tokenizer.prototype.readHexChar=function readHexChar(len){var codePos=this.state.pos;var n=this.readInt(16,len);if(n===null)this.raise(codePos,"Bad character escape sequence");return n};Tokenizer.prototype.readWord1=function readWord1(){this.state.containsEsc=false;var word="",first=true,chunkStart=this.state.pos;while(this.state.pos",beforeExpr),template:new TokenType("template"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:true,startsExpr:true}),at:new TokenType("@"),eq:new TokenType("=",{beforeExpr:true,isAssign:true}),assign:new TokenType("_=",{beforeExpr:true,isAssign:true}),incDec:new TokenType("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new TokenType("prefix",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=",6),relational:binop("",7),bitShift:binop("<>",8),plusMin:new TokenType("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};var keywords=exports.keywords={};function kw(name){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];options.keyword=name;keywords[name]=types["_"+name]=new TokenType(name,options)}kw("break");kw("case",beforeExpr);kw("catch");kw("continue");kw("debugger");kw("default",beforeExpr);kw("do",{isLoop:true,beforeExpr:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function",startsExpr);kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");kw("const");kw("while",{isLoop:true});kw("with");kw("new",{beforeExpr:true,startsExpr:true});kw("this",startsExpr);kw("super",startsExpr);kw("class");kw("extends",beforeExpr);kw("export");kw("import");kw("yield",{beforeExpr:true,startsExpr:true});kw("null",startsExpr);kw("true",startsExpr);kw("false",startsExpr);kw("in",{beforeExpr:true,binop:7});kw("instanceof",{beforeExpr:true,binop:7});kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true});kw("void",{beforeExpr:true,prefix:true,startsExpr:true});kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})},{}],215:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;function makePredicate(words){words=words.split(" ");return function(str){return words.indexOf(str)>=0}}var reservedWords=exports.reservedWords={6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};var isKeyword=exports.isKeyword=makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");nonASCIIidentifierStartChars=nonASCIIidentifierChars=null;var astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541];var astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}function isIdentifierStart(code){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;if(code<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));return isInAstralSet(code,astralIdentifierStartCodes)}function isIdentifierChar(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;if(code<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],216:[function(require,module,exports){"use strict";exports.__esModule=true;exports.SourceLocation=exports.Position=undefined;exports.getLineInfo=getLineInfo;var _whitespace=require("./whitespace");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Position=exports.Position=function Position(line,col){_classCallCheck(this,Position);this.line=line;this.column=col};var SourceLocation=exports.SourceLocation=function SourceLocation(start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end};function getLineInfo(input,offset){for(var line=1,cur=0;;){_whitespace.lineBreakG.lastIndex=cur;var match=_whitespace.lineBreakG.exec(input);if(match&&match.index=0&&bi>0){begs=[];left=str.length;while(i>=0&&!result){if(i==ai){begs.push(i);ai=str.indexOf(a,i+1)}else if(begs.length==1){result=[begs.pop(),bi]}else{beg=begs.pop();if(beg=0?ai:bi}if(begs.length){result=[left,right]}}return result}},{}],219:[function(require,module,exports){"use strict";exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}return b64[len-2]==="="?2:b64[len-1]==="="?1:0}function byteLength(b64){return b64.length*3/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr;var len=b64.length;placeHolders=placeHoldersCount(b64);arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],220:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\0SLASH"+Math.random()+"\0";var escOpen="\0OPEN"+Math.random()+"\0";var escClose="\0CLOSE"+Math.random()+"\0";var escComma="\0COMMA"+Math.random()+"\0";var escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];if(str.substr(0,2)==="{}"){str="\\{\\}"+str.substr(2)}return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*\}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){ -start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":219,ieee754:647,isarray:650}],223:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;var isSimpleWindowsTerm=process.platform==="win32"&&!/^xterm/i.test(process.env.TERM);function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(isSimpleWindowsTerm){ansiStyles.blue.open=""}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function build(_styles){var builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a=0;i--){var cur=ranges[i].head;cm.replaceRange("",Pos(cur.line,cur.ch-1),Pos(cur.line,cur.ch+1),"+delete")}}function handleEnter(cm){var conf=getConfig(cm);var explode=conf&&getOption(conf,"explode");if(!explode||cm.getOption("disableInput"))return CodeMirror.Pass;var ranges=cm.listSelections();for(var i=0;i0;return{anchor:new Pos(sel.anchor.line,sel.anchor.ch+(inverted?-1:1)),head:new Pos(sel.head.line,sel.head.ch+(inverted?1:-1))}}function handleChar(cm,ch){var conf=getConfig(cm);if(!conf||cm.getOption("disableInput"))return CodeMirror.Pass;var pairs=getOption(conf,"pairs");var pos=pairs.indexOf(ch);if(pos==-1)return CodeMirror.Pass;var triples=getOption(conf,"triples");var identical=pairs.charAt(pos+1)==ch;var ranges=cm.listSelections();var opening=pos%2==0;var type;for(var i=0;i=0&&cm.getRange(cur,Pos(cur.line,cur.ch+3))==ch+ch+ch)curType="skipThree";else curType="skip"}else if(identical&&cur.ch>1&&triples.indexOf(ch)>=0&&cm.getRange(Pos(cur.line,cur.ch-2),cur)==ch+ch&&(cur.ch<=2||cm.getRange(Pos(cur.line,cur.ch-3),Pos(cur.line,cur.ch-2))!=ch)){curType="addFour"}else if(identical){if(!CodeMirror.isWordChar(next)&&enteringString(cm,cur,ch))curType="both";else return CodeMirror.Pass}else if(opening&&(cm.getLine(cur.line).length==cur.ch||isClosingBracket(next,pairs)||/\s/.test(next))){curType="both"}else{return CodeMirror.Pass}if(!type)type=curType;else if(type!=curType)return CodeMirror.Pass}var left=pos%2?pairs.charAt(pos-1):ch;var right=pos%2?ch:pairs.charAt(pos+1);cm.operation(function(){if(type=="skip"){cm.execCommand("goCharRight")}else if(type=="skipThree"){for(var i=0;i<3;i++)cm.execCommand("goCharRight")}else if(type=="surround"){var sels=cm.getSelections();for(var i=0;i-1&&pos%2==1}function charsAround(cm,pos){var str=cm.getRange(Pos(pos.line,pos.ch-1),Pos(pos.line,pos.ch+1)); -return str.length==2?str:null}function enteringString(cm,pos,ch){var line=cm.getLine(pos.line);var token=cm.getTokenAt(pos);if(/\bstring2?\b/.test(token.type)||stringStartsAfter(cm,pos))return false;var stream=new CodeMirror.StringStream(line.slice(0,pos.ch)+ch+line.slice(pos.ch),4);stream.pos=stream.start=token.start;for(;;){var type1=cm.getMode().token(stream,token.state);if(stream.pos>=pos.ch+1)return/\bstring2?\b/.test(type1);stream.start=stream.pos}}function stringStartsAfter(cm,pos){var token=cm.getTokenAt(Pos(pos.line,pos.ch+1));return/\bstring/.test(token.type)&&token.start==pos.ch}})},{"../../lib/codemirror":227}],225:[function(require,module,exports){(function(mod){if(typeof exports=="object"&&typeof module=="object")mod(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],mod);else mod(CodeMirror)})(function(CodeMirror){var Pos=CodeMirror.Pos;function forEach(arr,f){for(var i=0,e=arr.length;icur.ch){token.end=cur.ch;token.string=token.string.slice(0,cur.ch-token.start)}var tprop=token;while(tprop.type=="property"){tprop=getToken(editor,Pos(cur.line,tprop.start));if(tprop.string!=".")return;tprop=getToken(editor,Pos(cur.line,tprop.start));if(!context)var context=[];context.push(tprop)}return{list:getCompletions(token,context,keywords,options),from:Pos(cur.line,token.start),to:Pos(cur.line,token.end)}}function javascriptHint(editor,options){return scriptHint(editor,javascriptKeywords,function(e,cur){return e.getTokenAt(cur)},options)}CodeMirror.registerHelper("hint","javascript",javascriptHint);function getCoffeeScriptToken(editor,cur){var token=editor.getTokenAt(cur);if(cur.ch==token.start+1&&token.string.charAt(0)=="."){token.end=token.start;token.string=".";token.type="property"}else if(/^\.[\w$_]*$/.test(token.string)){token.type="property";token.start++;token.string=token.string.replace(/\./,"")}return token}function coffeescriptHint(editor,options){return scriptHint(editor,coffeescriptKeywords,getCoffeeScriptToken,options)}CodeMirror.registerHelper("hint","coffeescript",coffeescriptHint);var stringProps=("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight "+"toUpperCase toLowerCase split concat match replace search").split(" ");var arrayProps=("length concat join splice push pop shift unshift slice reverse sort indexOf "+"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");var funcProps="prototype apply call bind".split(" ");var javascriptKeywords=("break case catch continue debugger default delete do else false finally for function "+"if in instanceof new null return switch throw true try typeof var void while with").split(" ");var coffeescriptKeywords=("and break catch class continue delete do else extends false finally for "+"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");function forAllProps(obj,callback){if(!Object.getOwnPropertyNames||!Object.getPrototypeOf){for(var name in obj)callback(name)}else{for(var o=obj;o;o=Object.getPrototypeOf(o))Object.getOwnPropertyNames(o).forEach(callback)}}function getCompletions(token,context,keywords,options){var found=[],start=token.string,global=options&&options.globalScope||window;function maybeAdd(str){if(str.lastIndexOf(start,0)==0&&!arrayContains(found,str))found.push(str)}function gatherCompletions(obj){if(typeof obj=="string")forEach(stringProps,maybeAdd);else if(obj instanceof Array)forEach(arrayProps,maybeAdd);else if(obj instanceof Function)forEach(funcProps,maybeAdd);forAllProps(obj,maybeAdd)}if(context&&context.length){var obj=context.pop(),base;if(obj.type&&obj.type.indexOf("variable")===0){if(options&&options.additionalContext)base=options.additionalContext[obj.string];if(!options||options.useGlobalScope!==false)base=base||global[obj.string]}else if(obj.type=="string"){base=""}else if(obj.type=="atom"){base=1}else if(obj.type=="function"){if(global.jQuery!=null&&(obj.string=="$"||obj.string=="jQuery")&&typeof global.jQuery=="function")base=global.jQuery();else if(global._!=null&&obj.string=="_"&&typeof global._=="function")base=global._()}while(base!=null&&context.length)base=base[context.pop().string];if(base!=null)gatherCompletions(base)}else{for(var v=token.state.localVars;v;v=v.next)maybeAdd(v.name);for(var v=token.state.globalVars;v;v=v.next)maybeAdd(v.name);if(!options||options.useGlobalScope!==false)gatherCompletions(global);forEach(keywords,maybeAdd)}return found}})},{"../../lib/codemirror":227}],226:[function(require,module,exports){(function(mod){if(typeof exports=="object"&&typeof module=="object")mod(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],mod);else mod(CodeMirror)})(function(CodeMirror){"use strict";var HINT_ELEMENT_CLASS="CodeMirror-hint";var ACTIVE_HINT_ELEMENT_CLASS="CodeMirror-hint-active";CodeMirror.showHint=function(cm,getHints,options){if(!getHints)return cm.showHint(options);if(options&&options.async)getHints.async=true;var newOpts={hint:getHints};if(options)for(var prop in options)newOpts[prop]=options[prop];return cm.showHint(newOpts)};CodeMirror.defineExtension("showHint",function(options){options=parseOptions(this,this.getCursor("start"),options);var selections=this.listSelections();if(selections.length>1)return;if(this.somethingSelected()){if(!options.hint.supportsSelection)return;for(var i=0;i0&&old.to.ch-old.from.ch!=nw.to.ch-nw.from.ch}function parseOptions(cm,pos,options){var editor=cm.options.hintOptions;var out={};for(var prop in defaultOptions)out[prop]=defaultOptions[prop];if(editor)for(var prop in editor)if(editor[prop]!==undefined)out[prop]=editor[prop];if(options)for(var prop in options)if(options[prop]!==undefined)out[prop]=options[prop];if(out.hint.resolve)out.hint=out.hint.resolve(cm,pos);return out}function getText(completion){if(typeof completion=="string")return completion;else return completion.text}function buildKeyMap(completion,handle){var baseMap={Up:function(){handle.moveFocus(-1)},Down:function(){handle.moveFocus(1)},PageUp:function(){handle.moveFocus(-handle.menuSize()+1,true)},PageDown:function(){handle.moveFocus(handle.menuSize()-1,true)},Home:function(){handle.setFocus(0)},End:function(){handle.setFocus(handle.length-1)},Enter:handle.pick,Tab:handle.pick,Esc:handle.close};var custom=completion.options.customKeys;var ourMap=custom?{}:baseMap;function addBinding(key,val){var bound;if(typeof val!="string")bound=function(cm){return val(cm,handle)};else if(baseMap.hasOwnProperty(val))bound=baseMap[val];else bound=val;ourMap[key]=bound}if(custom)for(var key in custom)if(custom.hasOwnProperty(key))addBinding(key,custom[key]);var extra=completion.options.extraKeys;if(extra)for(var key in extra)if(extra.hasOwnProperty(key))addBinding(key,extra[key]);return ourMap}function getHintElement(hintsElement,el){while(el&&el!=hintsElement){if(el.nodeName.toUpperCase()==="LI"&&el.parentNode==hintsElement)return el;el=el.parentNode}}function Widget(completion,data){this.completion=completion;this.data=data;this.picked=false;var widget=this,cm=completion.cm;var hints=this.hints=document.createElement("ul");hints.className="CodeMirror-hints";this.selectedHint=data.selectedHint||0;var completions=data.list;for(var i=0;ihints.clientHeight+1;var startScroll=cm.getScrollInfo();if(overlapY>0){var height=box.bottom-box.top,curTop=pos.top-(pos.bottom-box.top);if(curTop-height>0){hints.style.top=(top=pos.top-height)+"px";below=false}else if(height>winH){hints.style.height=winH-5+"px";hints.style.top=(top=pos.bottom-box.top)+"px";var cursor=cm.getCursor();if(data.from.ch!=cursor.ch){pos=cm.cursorCoords(cursor);hints.style.left=(left=pos.left)+"px";box=hints.getBoundingClientRect()}}}var overlapX=box.right-winW;if(overlapX>0){if(box.right-box.left>winW){hints.style.width=winW-5+"px";overlapX-=box.right-box.left-winW}hints.style.left=(left=pos.left-overlapX)+"px"}if(scrolls)for(var node=hints.firstChild;node;node=node.nextSibling)node.style.paddingRight=cm.display.nativeBarWidth+"px";cm.addKeyMap(this.keyMap=buildKeyMap(completion,{moveFocus:function(n,avoidWrap){widget.changeActive(widget.selectedHint+n,avoidWrap)},setFocus:function(n){widget.changeActive(n)},menuSize:function(){return widget.screenAmount()},length:completions.length,close:function(){completion.close()},pick:function(){widget.pick()},data:data}));if(completion.options.closeOnUnfocus){var closingOnBlur;cm.on("blur",this.onBlur=function(){closingOnBlur=setTimeout(function(){completion.close()},100)});cm.on("focus",this.onFocus=function(){clearTimeout(closingOnBlur)})}cm.on("scroll",this.onScroll=function(){var curScroll=cm.getScrollInfo(),editor=cm.getWrapperElement().getBoundingClientRect();var newTop=top+startScroll.top-curScroll.top;var point=newTop-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(!below)point+=hints.offsetHeight;if(point<=editor.top||point>=editor.bottom)return completion.close();hints.style.top=newTop+"px";hints.style.left=left+startScroll.left-curScroll.left+"px"});CodeMirror.on(hints,"dblclick",function(e){var t=getHintElement(hints,e.target||e.srcElement);if(t&&t.hintId!=null){widget.changeActive(t.hintId);widget.pick()}});CodeMirror.on(hints,"click",function(e){var t=getHintElement(hints,e.target||e.srcElement);if(t&&t.hintId!=null){widget.changeActive(t.hintId);if(completion.options.completeOnSingleClick)widget.pick()}});CodeMirror.on(hints,"mousedown",function(){setTimeout(function(){cm.focus()},20)});CodeMirror.signal(data,"select",completions[0],hints.firstChild);return true}Widget.prototype={close:function(){if(this.completion.widget!=this)return;this.completion.widget=null;this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);var cm=this.completion.cm;if(this.completion.options.closeOnUnfocus){cm.off("blur",this.onBlur);cm.off("focus",this.onFocus)}cm.off("scroll",this.onScroll)},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var widget=this;this.keyMap={Enter:function(){widget.picked=true}};this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(i,avoidWrap){if(i>=this.data.list.length)i=avoidWrap?this.data.list.length-1:0;else if(i<0)i=avoidWrap?0:this.data.list.length-1;if(this.selectedHint==i)return;var node=this.hints.childNodes[this.selectedHint];node.className=node.className.replace(" "+ACTIVE_HINT_ELEMENT_CLASS,"");node=this.hints.childNodes[this.selectedHint=i];node.className+=" "+ACTIVE_HINT_ELEMENT_CLASS;if(node.offsetTopthis.hints.scrollTop+this.hints.clientHeight)this.hints.scrollTop=node.offsetTop+node.offsetHeight-this.hints.clientHeight+3;CodeMirror.signal(this.data,"select",this.data.list[this.selectedHint],node)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};function applicableHelpers(cm,helpers){if(!cm.somethingSelected())return helpers;var result=[];for(var i=0;i0)callback(result);else run(i+1)})}run(0)};resolved.async=true;resolved.supportsSelection=true;return resolved}else if(words=cm.getHelper(cm.getCursor(),"hintWords")){return function(cm){return CodeMirror.hint.fromList(cm,{words:words})}}else if(CodeMirror.hint.anyword){return function(cm,options){return CodeMirror.hint.anyword(cm,options)}}else{return function(){}}}CodeMirror.registerHelper("hint","auto",{resolve:resolveAutoHints});CodeMirror.registerHelper("hint","fromList",function(cm,options){var cur=cm.getCursor(),token=cm.getTokenAt(cur);var to=CodeMirror.Pos(cur.line,token.end);if(token.string&&/\w/.test(token.string[token.string.length-1])){var term=token.string,from=CodeMirror.Pos(cur.line,token.start)}else{var term="",from=to}var found=[];for(var i=0;i,]/,closeOnUnfocus:true,completeOnSingleClick:true,container:null,customKeys:null,extraKeys:null};CodeMirror.defineOption("hintOptions",null)})},{"../../lib/codemirror":227}],227:[function(require,module,exports){(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):global.CodeMirror=factory()})(this,function(){"use strict";var userAgent=navigator.userAgent;var platform=navigator.platform;var gecko=/gecko\/\d/i.test(userAgent);var ie_upto10=/MSIE \d/.test(userAgent);var ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);var edge=/Edge\/(\d+)/.exec(userAgent);var ie=ie_upto10||ie_11up||edge;var ie_version=ie&&(ie_upto10?document.documentMode||6:+(edge||ie_11up)[1]);var webkit=!edge&&/WebKit\//.test(userAgent);var qtwebkit=webkit&&/Qt\/\d+\.\d+/.test(userAgent);var chrome=!edge&&/Chrome\//.test(userAgent);var presto=/Opera\//.test(userAgent);var safari=/Apple Computer/.test(navigator.vendor);var mac_geMountainLion=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);var phantom=/PhantomJS/.test(userAgent);var ios=!edge&&/AppleWebKit/.test(userAgent)&&/Mobile\/\w+/.test(userAgent);var android=/Android/.test(userAgent);var mobile=ios||android||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);var mac=ios||/Mac/.test(platform);var chromeOS=/\bCrOS\b/.test(userAgent);var windows=/win/i.test(platform);var presto_version=presto&&userAgent.match(/Version\/(\d*\.\d*)/);if(presto_version){presto_version=Number(presto_version[1])}if(presto_version&&presto_version>=15){presto=false;webkit=true}var flipCtrlCmd=mac&&(qtwebkit||presto&&(presto_version==null||presto_version<12.11));var captureRightClick=gecko||ie&&ie_version>=9;function classTest(cls){return new RegExp("(^|\\s)"+cls+"(?:$|\\s)\\s*")}var rmClass=function(node,cls){var current=node.className;var match=classTest(cls).exec(current);if(match){var after=current.slice(match.index+match[0].length);node.className=current.slice(0,match.index)+(after?match[1]+after:"")}};function removeChildren(e){for(var count=e.childNodes.length;count>0;--count){e.removeChild(e.firstChild)}return e}function removeChildrenAndAdd(parent,e){return removeChildren(parent).appendChild(e)}function elt(tag,content,className,style){var e=document.createElement(tag);if(className){e.className=className}if(style){e.style.cssText=style}if(typeof content=="string"){e.appendChild(document.createTextNode(content))}else if(content){for(var i=0;i=end){return n+(end-i)}n+=nextTab-i;n+=tabSize-n%tabSize;i=nextTab+1}}var Delayed=function(){this.id=null};Delayed.prototype.set=function(ms,f){clearTimeout(this.id);this.id=setTimeout(f,ms)};function indexOf(array,elt){for(var i=0;i=goal){return pos+Math.min(skipped,goal-col)}col+=nextTab-pos;col+=tabSize-col%tabSize;pos=nextTab+1;if(col>=goal){return pos}}}var spaceStrs=[""];function spaceStr(n){while(spaceStrs.length<=n){spaceStrs.push(lst(spaceStrs)+" ")}return spaceStrs[n]}function lst(arr){return arr[arr.length-1]}function map(array,f){var out=[];for(var i=0;i"€"&&(ch.toUpperCase()!=ch.toLowerCase()||nonASCIISingleCaseWordChar.test(ch))}function isWordChar(ch,helper){if(!helper){return isWordCharBasic(ch)}if(helper.source.indexOf("\\w")>-1&&isWordCharBasic(ch)){return true}return helper.test(ch)}function isEmpty(obj){for(var n in obj){if(obj.hasOwnProperty(n)&&obj[n]){return false}}return true}var extendingChars=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function isExtendingChar(ch){return ch.charCodeAt(0)>=768&&extendingChars.test(ch)}function skipExtendingChars(str,pos,dir){while((dir<0?pos>0:pos=doc.size){throw new Error("There is no line "+(n+doc.first)+" in the document.")}var chunk=doc;while(!chunk.lines){for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(n=doc.first&&llast){return Pos(last,getLine(doc,last).text.length)}return clipToLen(pos,getLine(doc,pos.line).text.length)}function clipToLen(pos,linelen){var ch=pos.ch;if(ch==null||ch>linelen){return Pos(pos.line,linelen)}else if(ch<0){return Pos(pos.line,0)}else{return pos}}function clipPosArray(doc,array){var out=[];for(var i=0;i=startCh:span.to>startCh);(nw||(nw=[])).push(new MarkedSpan(marker,span.from,endsAfter?null:span.to))}}}return nw}function markedSpansAfter(old,endCh,isInsert){var nw;if(old){for(var i=0;i=endCh:span.to>endCh);if(endsAfter||span.from==endCh&&marker.type=="bookmark"&&(!isInsert||span.marker.insertLeft)){var startsBefore=span.from==null||(marker.inclusiveLeft?span.from<=endCh:span.from0&&first){for(var i$2=0;i$20){continue}var newParts=[j,1],dfrom=cmp(p.from,m.from),dto=cmp(p.to,m.to);if(dfrom<0||!mk.inclusiveLeft&&!dfrom){newParts.push({from:p.from,to:m.from})}if(dto>0||!mk.inclusiveRight&&!dto){newParts.push({from:m.to,to:p.to})}parts.splice.apply(parts,newParts);j+=newParts.length-3}}return parts}function detachMarkedSpans(line){var spans=line.markedSpans;if(!spans){return}for(var i=0;i=0&&toCmp<=0||fromCmp<=0&&toCmp>=0){continue}if(fromCmp<=0&&(sp.marker.inclusiveRight&&marker.inclusiveLeft?cmp(found.to,from)>=0:cmp(found.to,from)>0)||fromCmp>=0&&(sp.marker.inclusiveRight&&marker.inclusiveLeft?cmp(found.from,to)<=0:cmp(found.from,to)<0)){return true}}}}function visualLine(line){var merged;while(merged=collapsedSpanAtStart(line)){line=merged.find(-1,true).line}return line}function visualLineEnd(line){var merged;while(merged=collapsedSpanAtEnd(line)){line=merged.find(1,true).line}return line}function visualLineContinued(line){var merged,lines;while(merged=collapsedSpanAtEnd(line)){line=merged.find(1,true).line;(lines||(lines=[])).push(line)}return lines}function visualLineNo(doc,lineN){var line=getLine(doc,lineN),vis=visualLine(line);if(line==vis){return lineN}return lineNo(vis)}function visualLineEndNo(doc,lineN){if(lineN>doc.lastLine()){return lineN}var line=getLine(doc,lineN),merged;if(!lineIsHidden(doc,line)){return lineN}while(merged=collapsedSpanAtEnd(line)){line=merged.find(1,true).line}return lineNo(line)+1}function lineIsHidden(doc,line){var sps=sawCollapsedSpans&&line.markedSpans;if(sps){for(var sp=void 0,i=0;id.maxLineLength){d.maxLineLength=len;d.maxLine=line}})}function iterateBidiSections(order,from,to,f){if(!order){return f(from,to,"ltr")}var found=false;for(var i=0;ifrom||from==to&&part.to==from){f(Math.max(part.from,from),Math.min(part.to,to),part.level==1?"rtl":"ltr");found=true}}if(!found){f(from,to,"ltr")}}var bidiOther=null;function getBidiPartAt(order,ch,sticky){var found;bidiOther=null;for(var i=0;ich){return i}if(cur.to==ch){if(cur.from!=cur.to&&sticky=="before"){found=i}else{bidiOther=i}}if(cur.from==ch){if(cur.from!=cur.to&&sticky!="before"){found=i}else{bidiOther=i}}}return found!=null?found:bidiOther}var bidiOrdering=function(){var lowTypes="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var arabicTypes="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function charType(code){if(code<=247){return lowTypes.charAt(code)}else if(1424<=code&&code<=1524){return"R"}else if(1536<=code&&code<=1785){return arabicTypes.charAt(code-1536)}else if(1774<=code&&code<=2220){return"r"}else if(8192<=code&&code<=8203){return"w"}else if(code==8204){return"b"}else{return"L"}}var bidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var isNeutral=/[stwN]/,isStrong=/[LRr]/,countsAsLeft=/[Lb1n]/,countsAsNum=/[1n]/;function BidiSpan(level,from,to){this.level=level;this.from=from;this.to=to}return function(str,direction){var outerType=direction=="ltr"?"L":"R";if(str.length==0||direction=="ltr"&&!bidiRE.test(str)){return false}var len=str.length,types=[];for(var i=0;iline.text.length?null:target}function moveLogically(line,start,dir){var ch=moveCharLogically(line,start.ch,dir);return ch==null?null:new Pos(start.line,ch,dir<0?"after":"before")}function endOfLine(visually,cm,lineObj,lineNo,dir){if(visually){var order=getOrder(lineObj,cm.doc.direction);if(order){var part=dir<0?lst(order):order[0];var moveInStorageOrder=dir<0==(part.level==1);var sticky=moveInStorageOrder?"after":"before";var ch;if(part.level>0){var prep=prepareMeasureForLine(cm,lineObj);ch=dir<0?lineObj.text.length-1:0;var targetTop=measureCharPrepared(cm,prep,ch).top;ch=findFirst(function(ch){return measureCharPrepared(cm,prep,ch).top==targetTop},dir<0==(part.level==1)?part.from:part.to-1,ch);if(sticky=="before"){ch=moveCharLogically(lineObj,ch,1)}}else{ch=dir<0?part.to:part.from}return new Pos(lineNo,ch,sticky)}}return new Pos(lineNo,dir<0?lineObj.text.length:0,dir<0?"before":"after")}function moveVisually(cm,line,start,dir){var bidi=getOrder(line,cm.doc.direction);if(!bidi){return moveLogically(line,start,dir)}if(start.ch>=line.text.length){start.ch=line.text.length;start.sticky="before"}else if(start.ch<=0){start.ch=0;start.sticky="after"}var partPos=getBidiPartAt(bidi,start.ch,start.sticky),part=bidi[partPos];if(cm.doc.direction=="ltr"&&part.level%2==0&&(dir>0?part.to>start.ch:part.from=part.from&&ch>=wrappedLineExtent.begin:ch<=part.to&&ch<=wrappedLineExtent.end)){var sticky=moveInStorageOrder?"before":"after";return new Pos(start.line,ch,sticky)}}var searchInVisualLine=function(partPos,dir,wrappedLineExtent){var getRes=function(ch,moveInStorageOrder){return moveInStorageOrder?new Pos(start.line,mv(ch,1),"before"):new Pos(start.line,ch,"after")};for(;partPos>=0&&partPos0==(part.level!=1);var ch=moveInStorageOrder?wrappedLineExtent.begin:mv(wrappedLineExtent.end,-1);if(part.from<=ch&&ch0?wrappedLineExtent.end:mv(wrappedLineExtent.begin,-1);if(nextCh!=null&&!(dir>0&&nextCh==line.text.length)){res=searchInVisualLine(dir>0?0:bidi.length-1,dir,getWrappedLineExtent(nextCh));if(res){return res}}return null}var noHandlers=[];var on=function(emitter,type,f){if(emitter.addEventListener){emitter.addEventListener(type,f,false)}else if(emitter.attachEvent){emitter.attachEvent("on"+type,f)}else{var map$$1=emitter._handlers||(emitter._handlers={});map$$1[type]=(map$$1[type]||noHandlers).concat(f)}};function getHandlers(emitter,type){return emitter._handlers&&emitter._handlers[type]||noHandlers}function off(emitter,type,f){if(emitter.removeEventListener){emitter.removeEventListener(type,f,false)}else if(emitter.detachEvent){emitter.detachEvent("on"+type,f)}else{var map$$1=emitter._handlers,arr=map$$1&&map$$1[type];if(arr){var index=indexOf(arr,f);if(index>-1){map$$1[type]=arr.slice(0,index).concat(arr.slice(index+1))}}}}function signal(emitter,type){var handlers=getHandlers(emitter,type);if(!handlers.length){return}var args=Array.prototype.slice.call(arguments,2);for(var i=0;i0}function eventMixin(ctor){ctor.prototype.on=function(type,f){on(this,type,f)};ctor.prototype.off=function(type,f){off(this,type,f)}}function e_preventDefault(e){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}}function e_stopPropagation(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}function e_defaultPrevented(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==false}function e_stop(e){e_preventDefault(e);e_stopPropagation(e)}function e_target(e){return e.target||e.srcElement}function e_button(e){var b=e.which;if(b==null){if(e.button&1){b=1}else if(e.button&2){b=3}else if(e.button&4){b=2}}if(mac&&e.ctrlKey&&b==1){b=3}return b}var dragAndDrop=function(){if(ie&&ie_version<9){return false}var div=elt("div");return"draggable"in div||"dragDrop"in div}();var zwspSupported;function zeroWidthElement(measure){if(zwspSupported==null){var test=elt("span","​");removeChildrenAndAdd(measure,elt("span",[test,document.createTextNode("x")]));if(measure.firstChild.offsetHeight!=0){zwspSupported=test.offsetWidth<=1&&test.offsetHeight>2&&!(ie&&ie_version<8)}}var node=zwspSupported?elt("span","​"):elt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");node.setAttribute("cm-text","");return node}var badBidiRects;function hasBadBidiRects(measure){if(badBidiRects!=null){return badBidiRects}var txt=removeChildrenAndAdd(measure,document.createTextNode("AخA"));var r0=range(txt,0,1).getBoundingClientRect();var r1=range(txt,1,2).getBoundingClientRect();removeChildren(measure);if(!r0||r0.left==r0.right){return false}return badBidiRects=r1.right-r0.right<3}var splitLinesAuto="\n\nb".split(/\n/).length!=3?function(string){var pos=0,result=[],l=string.length;while(pos<=l){var nl=string.indexOf("\n",pos);if(nl==-1){nl=string.length}var line=string.slice(pos,string.charAt(nl-1)=="\r"?nl-1:nl);var rt=line.indexOf("\r");if(rt!=-1){result.push(line.slice(0,rt));pos+=rt+1}else{result.push(line);pos=nl+1}}return result}:function(string){return string.split(/\r\n?|\n/)};var hasSelection=window.getSelection?function(te){try{return te.selectionStart!=te.selectionEnd}catch(e){return false}}:function(te){var range$$1;try{range$$1=te.ownerDocument.selection.createRange()}catch(e){}if(!range$$1||range$$1.parentElement()!=te){return false}return range$$1.compareEndPoints("StartToEnd",range$$1)!=0};var hasCopyEvent=function(){var e=elt("div");if("oncopy"in e){return true}e.setAttribute("oncopy","return;");return typeof e.oncopy=="function"}();var badZoomedRects=null;function hasBadZoomedRects(measure){if(badZoomedRects!=null){return badZoomedRects}var node=removeChildrenAndAdd(measure,elt("span","x"));var normal=node.getBoundingClientRect();var fromRange=range(node,0,1).getBoundingClientRect();return badZoomedRects=Math.abs(normal.left-fromRange.left)>1}var modes={};var mimeModes={};function defineMode(name,mode){if(arguments.length>2){mode.dependencies=Array.prototype.slice.call(arguments,2)}modes[name]=mode}function defineMIME(mime,spec){mimeModes[mime]=spec}function resolveMode(spec){if(typeof spec=="string"&&mimeModes.hasOwnProperty(spec)){spec=mimeModes[spec]}else if(spec&&typeof spec.name=="string"&&mimeModes.hasOwnProperty(spec.name)){var found=mimeModes[spec.name];if(typeof found=="string"){found={name:found}}spec=createObj(found,spec);spec.name=found.name}else if(typeof spec=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(spec)){return resolveMode("application/xml")}else if(typeof spec=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(spec)){return resolveMode("application/json")}if(typeof spec=="string"){return{name:spec}}else{return spec||{name:"null"}}}function getMode(options,spec){spec=resolveMode(spec);var mfactory=modes[spec.name];if(!mfactory){return getMode(options,"text/plain")}var modeObj=mfactory(options,spec);if(modeExtensions.hasOwnProperty(spec.name)){var exts=modeExtensions[spec.name];for(var prop in exts){if(!exts.hasOwnProperty(prop)){continue}if(modeObj.hasOwnProperty(prop)){modeObj["_"+prop]=modeObj[prop]}modeObj[prop]=exts[prop]}}modeObj.name=spec.name;if(spec.helperType){modeObj.helperType=spec.helperType}if(spec.modeProps){for(var prop$1 in spec.modeProps){modeObj[prop$1]=spec.modeProps[prop$1]}}return modeObj}var modeExtensions={};function extendMode(mode,properties){var exts=modeExtensions.hasOwnProperty(mode)?modeExtensions[mode]:modeExtensions[mode]={};copyObj(properties,exts)}function copyState(mode,state){if(state===true){return state}if(mode.copyState){return mode.copyState(state)}var nstate={};for(var n in state){var val=state[n];if(val instanceof Array){val=val.concat([])}nstate[n]=val}return nstate}function innerMode(mode,state){var info;while(mode.innerMode){info=mode.innerMode(state);if(!info||info.mode==mode){break}state=info.state;mode=info.mode}return info||{mode:mode,state:state}}function startState(mode,a1,a2){return mode.startState?mode.startState(a1,a2):true}var StringStream=function(string,tabSize,lineOracle){this.pos=this.start=0;this.string=string;this.tabSize=tabSize||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0;this.lineOracle=lineOracle};StringStream.prototype.eol=function(){return this.pos>=this.string.length};StringStream.prototype.sol=function(){return this.pos==this.lineStart};StringStream.prototype.peek=function(){return this.string.charAt(this.pos)||undefined};StringStream.prototype.next=function(){if(this.posstart};StringStream.prototype.eatSpace=function(){var this$1=this;var start=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this$1.pos}return this.pos>start};StringStream.prototype.skipToEnd=function(){this.pos=this.string.length};StringStream.prototype.skipTo=function(ch){var found=this.string.indexOf(ch,this.pos);if(found>-1){this.pos=found;return true}};StringStream.prototype.backUp=function(n){this.pos-=n};StringStream.prototype.column=function(){if(this.lastColumnPos0){return null}if(match&&consume!==false){this.pos+=match[0].length}return match}};StringStream.prototype.current=function(){return this.string.slice(this.start,this.pos)};StringStream.prototype.hideFirstChars=function(n,inner){this.lineStart+=n;try{return inner()}finally{this.lineStart-=n}};StringStream.prototype.lookAhead=function(n){var oracle=this.lineOracle;return oracle&&oracle.lookAhead(n)};var SavedContext=function(state,lookAhead){this.state=state;this.lookAhead=lookAhead};var Context=function(doc,state,line,lookAhead){this.state=state;this.doc=doc;this.line=line;this.maxLookAhead=lookAhead||0};Context.prototype.lookAhead=function(n){var line=this.doc.getLine(this.line+n);if(line!=null&&n>this.maxLookAhead){this.maxLookAhead=n}return line};Context.prototype.nextLine=function(){this.line++;if(this.maxLookAhead>0){this.maxLookAhead--}};Context.fromSaved=function(doc,saved,line){if(saved instanceof SavedContext){return new Context(doc,copyState(doc.mode,saved.state),line,saved.lookAhead)}else{return new Context(doc,copyState(doc.mode,saved),line)}};Context.prototype.save=function(copy){var state=copy!==false?copyState(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new SavedContext(state,this.maxLookAhead):state};function highlightLine(cm,line,context,forceToEnd){var st=[cm.state.modeGen],lineClasses={};runMode(cm,line.text,cm.doc.mode,context,function(end,style){return st.push(end,style)},lineClasses,forceToEnd);var state=context.state;var loop=function(o){var overlay=cm.state.overlays[o],i=1,at=0;context.state=true;runMode(cm,line.text,overlay.mode,context,function(end,style){var start=i;while(atend){st.splice(i,1,end,st[i+1],i_end)}i+=2;at=Math.min(end,i_end)}if(!style){return}if(overlay.opaque){st.splice(start,i-start,end,"overlay "+style);i=start+2}else{for(;startcm.options.maxHighlightLength&©State(cm.doc.mode,context.state);var result=highlightLine(cm,line,context);if(resetState){context.state=resetState}line.stateAfter=context.save(!resetState);line.styles=result.styles;if(result.classes){line.styleClasses=result.classes}else if(line.styleClasses){line.styleClasses=null}if(updateFrontier===cm.doc.highlightFrontier){cm.doc.modeFrontier=Math.max(cm.doc.modeFrontier,++cm.doc.highlightFrontier)}}return line.styles}function getContextBefore(cm,n,precise){var doc=cm.doc,display=cm.display;if(!doc.mode.startState){return new Context(doc,true,n)}var start=findStartLine(cm,n,precise);var saved=start>doc.first&&getLine(doc,start-1).stateAfter;var context=saved?Context.fromSaved(doc,saved,start):new Context(doc,startState(doc.mode),start);doc.iter(start,n,function(line){processLine(cm,line.text,context);var pos=context.line;line.stateAfter=pos==n-1||pos%5==0||pos>=display.viewFrom&&posstream.start){return style}}throw new Error("Mode "+mode.name+" failed to advance stream.")}var Token=function(stream,type,state){this.start=stream.start;this.end=stream.pos;this.string=stream.current();this.type=type||null;this.state=state};function takeToken(cm,pos,precise,asArray){var doc=cm.doc,mode=doc.mode,style;pos=clipPos(doc,pos);var line=getLine(doc,pos.line),context=getContextBefore(cm,pos.line,precise);var stream=new StringStream(line.text,cm.options.tabSize,context),tokens;if(asArray){tokens=[]}while((asArray||stream.poscm.options.maxHighlightLength){flattenSpans=false;if(forceToEnd){processLine(cm,text,context,stream.pos)}stream.pos=text.length;style=null}else{style=extractLineClasses(readToken(mode,stream,context.state,inner),lineClasses)}if(inner){var mName=inner[0].name;if(mName){style="m-"+(style?mName+" "+style:mName)}}if(!flattenSpans||curStyle!=style){while(curStartlim;--search){if(search<=doc.first){return doc.first}var line=getLine(doc,search-1),after=line.stateAfter;if(after&&(!precise||search+(after instanceof SavedContext?after.lookAhead:0)<=doc.modeFrontier)){return search}var indented=countColumn(line.text,null,cm.options.tabSize);if(minline==null||minindent>indented){minline=search-1;minindent=indented}}return minline}function retreatFrontier(doc,n){doc.modeFrontier=Math.min(doc.modeFrontier,n);if(doc.highlightFrontierstart;line--){var saved=getLine(doc,line).stateAfter;if(saved&&(!(saved instanceof SavedContext)||line+saved.lookAhead1&&!/ /.test(text)){return text}var spaceBefore=trailingBefore,result="";for(var i=0;istart&&part.from<=start){break}}if(part.to>=end){return inner(builder,text,style,startStyle,endStyle,title,css)}inner(builder,text.slice(0,part.to-start),style,startStyle,null,title,css);startStyle=null;text=text.slice(part.to-start);start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;if(widget){builder.map.push(builder.pos,builder.pos+size,widget)}if(!ignoreWidget&&builder.cm.display.input.needsContentAttribute){if(!widget){widget=builder.content.appendChild(document.createElement("span"))}widget.setAttribute("cm-marker",marker.id)}if(widget){builder.cm.display.input.setUneditable(widget);builder.content.appendChild(widget)}builder.pos+=size;builder.trailingSpace=false}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(!spans){for(var i$1=1;i$1pos||m.collapsed&&sp.to==pos&&sp.from==pos)){if(sp.to!=null&&sp.to!=pos&&nextChange>sp.to){nextChange=sp.to;spanEndStyle=""}if(m.className){spanStyle+=" "+m.className}if(m.css){css=(css?css+";":"")+m.css}if(m.startStyle&&sp.from==pos){spanStartStyle+=" "+m.startStyle}if(m.endStyle&&sp.to==nextChange){(endStyles||(endStyles=[])).push(m.endStyle,sp.to)}if(m.title&&!title){title=m.title}if(m.collapsed&&(!collapsed||compareCollapsedMarkers(collapsed.marker,m)<0)){collapsed=sp}}else if(sp.from>pos&&nextChange>sp.from){nextChange=sp.from}}if(endStyles){for(var j$1=0;j$1=len){break}var upto=Math.min(len,nextChange);while(true){if(text){var end=pos+text.length;if(!collapsed){var tokenText=end>upto?text.slice(0,upto-pos):text;builder.addToken(builder,tokenText,style?style+spanStyle:spanStyle,spanStartStyle,pos+tokenText.length==nextChange?spanEndStyle:"",title,css)}if(end>=upto){text=text.slice(upto-pos);pos=upto;break}pos=end;spanStartStyle=""}text=allText.slice(at,at=styles[i++]);style=interpretTokenStyle(styles[i++],builder.cm.options)}}}function LineView(doc,line,lineN){this.line=line;this.rest=visualLineContinued(line);this.size=this.rest?lineNo(lst(this.rest))-lineN+1:1;this.node=this.text=null;this.hidden=lineIsHidden(doc,line)}function buildViewArray(cm,from,to){var array=[],nextPos;for(var pos=from;pos2){heights.push((cur.bottom+next.top)/2-rect.top)}}}heights.push(rect.bottom-rect.top)}}function mapFromLineView(lineView,line,lineN){if(lineView.line==line){return{map:lineView.measure.map,cache:lineView.measure.cache}}for(var i=0;ilineN){return{map:lineView.measure.maps[i$1],cache:lineView.measure.caches[i$1],before:true}}}}function updateExternalMeasurement(cm,line){line=visualLine(line);var lineN=lineNo(line);var view=cm.display.externalMeasured=new LineView(cm.doc,line,lineN);view.lineN=lineN;var built=view.built=buildLineContent(cm,view);view.text=built.pre;removeChildrenAndAdd(cm.display.lineMeasure,built.pre);return view}function measureChar(cm,line,ch,bias){return measureCharPrepared(cm,prepareMeasureForLine(cm,line),ch,bias)}function findViewForLine(cm,lineN){if(lineN>=cm.display.viewFrom&&lineN=ext.lineN&&lineNch){end=mEnd-mStart;start=end-1;if(ch>=mEnd){collapse="right"}}if(start!=null){node=map$$1[i+2];if(mStart==mEnd&&bias==(node.insertLeft?"left":"right")){collapse=bias}if(bias=="left"&&start==0){while(i&&map$$1[i-2]==map$$1[i-3]&&map$$1[i-1].insertLeft){node=map$$1[(i-=3)+2];collapse="left"}}if(bias=="right"&&start==mEnd-mStart){while(i=0;i$1--){if((rect=rects[i$1]).left!=rect.right){break}}}return rect}function measureCharInner(cm,prepared,ch,bias){var place=nodeAndOffsetInLineMap(prepared.map,ch,bias);var node=place.node,start=place.start,end=place.end,collapse=place.collapse;var rect;if(node.nodeType==3){for(var i$1=0;i$1<4;i$1++){while(start&&isExtendingChar(prepared.line.text.charAt(place.coverStart+start))){--start}while(place.coverStart+end0){collapse=bias="right"}var rects;if(cm.options.lineWrapping&&(rects=node.getClientRects()).length>1){rect=rects[bias=="right"?rects.length-1:0]}else{rect=node.getBoundingClientRect()}}if(ie&&ie_version<9&&!start&&(!rect||!rect.left&&!rect.right)){var rSpan=node.parentNode.getClientRects()[0];if(rSpan){rect={left:rSpan.left,right:rSpan.left+charWidth(cm.display),top:rSpan.top,bottom:rSpan.bottom}}else{rect=nullRect}}var rtop=rect.top-prepared.rect.top,rbot=rect.bottom-prepared.rect.top;var mid=(rtop+rbot)/2;var heights=prepared.view.measure.heights;var i=0;for(;i=lineObj.text.length){ch=lineObj.text.length;sticky="before"}else if(ch<=0){ch=0;sticky="after"}if(!order){return get(sticky=="before"?ch-1:ch,sticky=="before")}function getBidi(ch,partPos,invert){var part=order[partPos],right=part.level%2!=0;return get(invert?ch-1:ch,right!=invert)}var partPos=getBidiPartAt(order,ch,sticky);var other=bidiOther;var val=getBidi(ch,partPos,sticky=="before");if(other!=null){val.other=getBidi(ch,other,sticky!="before")}return val}function estimateCoords(cm,pos){var left=0;pos=clipPos(cm.doc,pos);if(!cm.options.lineWrapping){left=charWidth(cm.display)*pos.ch}var lineObj=getLine(cm.doc,pos.line);var top=heightAtLine(lineObj)+paddingTop(cm.display);return{left:left,right:left,top:top,bottom:top+lineObj.height}}function PosWithInfo(line,ch,sticky,outside,xRel){var pos=Pos(line,ch,sticky);pos.xRel=xRel;if(outside){pos.outside=true}return pos}function coordsChar(cm,x,y){var doc=cm.doc;y+=cm.display.viewOffset;if(y<0){return PosWithInfo(doc.first,0,null,true,-1)}var lineN=lineAtHeight(doc,y),last=doc.first+doc.size-1;if(lineN>last){return PosWithInfo(doc.first+doc.size-1,getLine(doc,last).text.length,null,true,1)}if(x<0){x=0}var lineObj=getLine(doc,lineN);for(;;){var found=coordsCharInner(cm,lineObj,lineN,x,y);var merged=collapsedSpanAtEnd(lineObj);var mergedPos=merged&&merged.find(0,true);if(merged&&(found.ch>mergedPos.from.ch||found.ch==mergedPos.from.ch&&found.xRel>0)){lineN=lineNo(lineObj=mergedPos.to.line)}else{return found}}}function wrappedLineExtent(cm,lineObj,preparedMeasure,y){var measure=function(ch){return intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,ch),"line")};var end=lineObj.text.length;var begin=findFirst(function(ch){return measure(ch-1).bottom<=y},end,0);end=findFirst(function(ch){return measure(ch).top>y},begin,end);return{begin:begin,end:end}}function wrappedLineExtentChar(cm,lineObj,preparedMeasure,target){var targetTop=intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,target),"line").top;return wrappedLineExtent(cm,lineObj,preparedMeasure,targetTop)}function coordsCharInner(cm,lineObj,lineNo$$1,x,y){y-=heightAtLine(lineObj);var begin=0,end=lineObj.text.length;var preparedMeasure=prepareMeasureForLine(cm,lineObj);var pos;var order=getOrder(lineObj,cm.doc.direction);if(order){if(cm.options.lineWrapping){var assign;assign=wrappedLineExtent(cm,lineObj,preparedMeasure,y),begin=assign.begin,end=assign.end,assign}pos=new Pos(lineNo$$1,Math.floor(begin+(end-begin)/2));var beginLeft=cursorCoords(cm,pos,"line",lineObj,preparedMeasure).left;var dir=beginLeft1){var diff_change_per_step=Math.abs(diff-prevDiff)/steps;steps=Math.min(steps,Math.ceil(Math.abs(diff)/diff_change_per_step));dir=diff<0?1:-1}}while(diff!=0&&(steps>1||dir<0!=diff<0&&Math.abs(diff)<=Math.abs(prevDiff)));if(Math.abs(diff)>Math.abs(prevDiff)){if(diff<0==prevDiff<0){throw new Error("Broke out of infinite loop in coordsCharInner")}pos=prevPos}}else{var ch=findFirst(function(ch){var box=intoCoordSystem(cm,lineObj,measureCharPrepared(cm,preparedMeasure,ch),"line");if(box.top>y){end=Math.min(ch,end);return true}else if(box.bottom<=y){return false}else if(box.left>x){return true}else if(box.rightcoords.right?1:0;return pos}var measureText;function textHeight(display){if(display.cachedTextHeight!=null){return display.cachedTextHeight}if(measureText==null){measureText=elt("pre");for(var i=0;i<49;++i){measureText.appendChild(document.createTextNode("x"));measureText.appendChild(elt("br"))}measureText.appendChild(document.createTextNode("x"))}removeChildrenAndAdd(display.measure,measureText);var height=measureText.offsetHeight/50;if(height>3){display.cachedTextHeight=height}removeChildren(display.measure);return height||1}function charWidth(display){if(display.cachedCharWidth!=null){return display.cachedCharWidth}var anchor=elt("span","xxxxxxxxxx");var pre=elt("pre",[anchor]);removeChildrenAndAdd(display.measure,pre);var rect=anchor.getBoundingClientRect(),width=(rect.right-rect.left)/10;if(width>2){display.cachedCharWidth=width}return width||10}function getDimensions(cm){var d=cm.display,left={},width={};var gutterLeft=d.gutters.clientLeft;for(var n=d.gutters.firstChild,i=0;n;n=n.nextSibling,++i){left[cm.options.gutters[i]]=n.offsetLeft+n.clientLeft+gutterLeft;width[cm.options.gutters[i]]=n.clientWidth}return{fixedPos:compensateForHScroll(d),gutterTotalWidth:d.gutters.offsetWidth,gutterLeft:left,gutterWidth:width,wrapperWidth:d.wrapper.clientWidth}}function compensateForHScroll(display){return display.scroller.getBoundingClientRect().left-display.sizer.getBoundingClientRect().left}function estimateHeight(cm){var th=textHeight(cm.display),wrapping=cm.options.lineWrapping;var perLine=wrapping&&Math.max(5,cm.display.scroller.clientWidth/charWidth(cm.display)-3);return function(line){if(lineIsHidden(cm.doc,line)){return 0}var widgetsHeight=0;if(line.widgets){for(var i=0;i=cm.display.viewTo){return null}n-=cm.display.viewFrom;if(n<0){return null}var view=cm.display.view;for(var i=0;i=cm.display.viewTo||range$$1.to().line3){add(left,leftPos.top,null,leftPos.bottom);left=leftSide;if(leftPos.bottomend.bottom||rightPos.bottom==end.bottom&&rightPos.right>end.right){end=rightPos}if(left0){display.blinker=setInterval(function(){return display.cursorDiv.style.visibility=(on=!on)?"":"hidden"},cm.options.cursorBlinkRate)}else if(cm.options.cursorBlinkRate<0){display.cursorDiv.style.visibility="hidden"}}function ensureFocus(cm){if(!cm.state.focused){cm.display.input.focus();onFocus(cm)}}function delayBlurEvent(cm){cm.state.delayingBlurEvent=true;setTimeout(function(){if(cm.state.delayingBlurEvent){cm.state.delayingBlurEvent=false;onBlur(cm)}},100)}function onFocus(cm,e){if(cm.state.delayingBlurEvent){cm.state.delayingBlurEvent=false}if(cm.options.readOnly=="nocursor"){return}if(!cm.state.focused){signal(cm,"focus",cm,e);cm.state.focused=true;addClass(cm.display.wrapper,"CodeMirror-focused");if(!cm.curOp&&cm.display.selForContextMenu!=cm.doc.sel){cm.display.input.reset();if(webkit){setTimeout(function(){return cm.display.input.reset(true)},20)}}cm.display.input.receivedFocus()}restartBlink(cm)}function onBlur(cm,e){if(cm.state.delayingBlurEvent){return}if(cm.state.focused){signal(cm,"blur",cm,e);cm.state.focused=false;rmClass(cm.display.wrapper,"CodeMirror-focused")}clearInterval(cm.display.blinker);setTimeout(function(){if(!cm.state.focused){cm.display.shift=false}},150)}function updateHeightsInViewport(cm){var display=cm.display;var prevBottom=display.lineDiv.offsetTop;for(var i=0;i.005||diff<-.005){updateLineHeight(cur.line,height);updateWidgetHeight(cur.line);if(cur.rest){for(var j=0;j=to){from=lineAtHeight(doc,heightAtLine(getLine(doc,ensureTo))-display.wrapper.clientHeight);to=ensureTo}}return{from:from,to:Math.max(to,from+1)}}function alignHorizontally(cm){var display=cm.display,view=display.view;if(!display.alignWidgets&&(!display.gutters.firstChild||!cm.options.fixedGutter)){return}var comp=compensateForHScroll(display)-display.scroller.scrollLeft+cm.doc.scrollLeft;var gutterW=display.gutters.offsetWidth,left=comp+"px";for(var i=0;i(window.innerHeight||document.documentElement.clientHeight)){doScroll=false}if(doScroll!=null&&!phantom){var scrollNode=elt("div","​",null,"position: absolute;\n top: "+(rect.top-display.viewOffset-paddingTop(cm.display))+"px;\n height: "+(rect.bottom-rect.top+scrollGap(cm)+display.barHeight)+"px;\n left: "+rect.left+"px; width: "+Math.max(2,rect.right-rect.left)+"px;");cm.display.lineSpace.appendChild(scrollNode);scrollNode.scrollIntoView(doScroll);cm.display.lineSpace.removeChild(scrollNode)}}function scrollPosIntoView(cm,pos,end,margin){if(margin==null){margin=0}var rect;if(!cm.options.lineWrapping&&pos==end){pos=pos.ch?Pos(pos.line,pos.sticky=="before"?pos.ch-1:pos.ch,"after"):pos;end=pos.sticky=="before"?Pos(pos.line,pos.ch+1,"before"):pos}for(var limit=0;limit<5;limit++){var changed=false;var coords=cursorCoords(cm,pos);var endCoords=!end||end==pos?coords:cursorCoords(cm,end);rect={left:Math.min(coords.left,endCoords.left),top:Math.min(coords.top,endCoords.top)-margin,right:Math.max(coords.left,endCoords.left),bottom:Math.max(coords.bottom,endCoords.bottom)+margin};var scrollPos=calculateScrollPos(cm,rect);var startTop=cm.doc.scrollTop,startLeft=cm.doc.scrollLeft;if(scrollPos.scrollTop!=null){updateScrollTop(cm,scrollPos.scrollTop);if(Math.abs(cm.doc.scrollTop-startTop)>1){changed=true}}if(scrollPos.scrollLeft!=null){setScrollLeft(cm,scrollPos.scrollLeft);if(Math.abs(cm.doc.scrollLeft-startLeft)>1){changed=true}}if(!changed){break}}return rect}function scrollIntoView(cm,rect){var scrollPos=calculateScrollPos(cm,rect);if(scrollPos.scrollTop!=null){updateScrollTop(cm,scrollPos.scrollTop)}if(scrollPos.scrollLeft!=null){setScrollLeft(cm,scrollPos.scrollLeft)}}function calculateScrollPos(cm,rect){var display=cm.display,snapMargin=textHeight(cm.display);if(rect.top<0){rect.top=0}var screentop=cm.curOp&&cm.curOp.scrollTop!=null?cm.curOp.scrollTop:display.scroller.scrollTop;var screen=displayHeight(cm),result={};if(rect.bottom-rect.top>screen){rect.bottom=rect.top+screen}var docBottom=cm.doc.height+paddingVert(display);var atTop=rect.topdocBottom-snapMargin;if(rect.topscreentop+screen){var newTop=Math.min(rect.top,(atBottom?docBottom:rect.bottom)-screen);if(newTop!=screentop){result.scrollTop=newTop}}var screenleft=cm.curOp&&cm.curOp.scrollLeft!=null?cm.curOp.scrollLeft:display.scroller.scrollLeft;var screenw=displayWidth(cm)-(cm.options.fixedGutter?display.gutters.offsetWidth:0);var tooWide=rect.right-rect.left>screenw;if(tooWide){rect.right=rect.left+screenw}if(rect.left<10){result.scrollLeft=0}else if(rect.leftscreenw+screenleft-3){result.scrollLeft=rect.right+(tooWide?0:10)-screenw}return result}function addToScrollTop(cm,top){if(top==null){return}resolveScrollToPos(cm);cm.curOp.scrollTop=(cm.curOp.scrollTop==null?cm.doc.scrollTop:cm.curOp.scrollTop)+top}function ensureCursorVisible(cm){resolveScrollToPos(cm);var cur=cm.getCursor();cm.curOp.scrollToPos={from:cur,to:cur,margin:cm.options.cursorScrollMargin}}function scrollToCoords(cm,x,y){if(x!=null||y!=null){resolveScrollToPos(cm)}if(x!=null){cm.curOp.scrollLeft=x}if(y!=null){cm.curOp.scrollTop=y}}function scrollToRange(cm,range$$1){resolveScrollToPos(cm);cm.curOp.scrollToPos=range$$1}function resolveScrollToPos(cm){var range$$1=cm.curOp.scrollToPos;if(range$$1){cm.curOp.scrollToPos=null;var from=estimateCoords(cm,range$$1.from),to=estimateCoords(cm,range$$1.to);scrollToCoordsRange(cm,from,to,range$$1.margin)}}function scrollToCoordsRange(cm,from,to,margin){var sPos=calculateScrollPos(cm,{left:Math.min(from.left,to.left),top:Math.min(from.top,to.top)-margin,right:Math.max(from.right,to.right),bottom:Math.max(from.bottom,to.bottom)+margin});scrollToCoords(cm,sPos.scrollLeft,sPos.scrollTop)}function updateScrollTop(cm,val){if(Math.abs(cm.doc.scrollTop-val)<2){return}if(!gecko){updateDisplaySimple(cm,{top:val})}setScrollTop(cm,val,true);if(gecko){updateDisplaySimple(cm)}startWorker(cm,100)}function setScrollTop(cm,val,forceScroll){val=Math.min(cm.display.scroller.scrollHeight-cm.display.scroller.clientHeight,val);if(cm.display.scroller.scrollTop==val&&!forceScroll){return}cm.doc.scrollTop=val;cm.display.scrollbars.setScrollTop(val);if(cm.display.scroller.scrollTop!=val){cm.display.scroller.scrollTop=val}}function setScrollLeft(cm,val,isScroller,forceScroll){val=Math.min(val,cm.display.scroller.scrollWidth-cm.display.scroller.clientWidth);if((isScroller?val==cm.doc.scrollLeft:Math.abs(cm.doc.scrollLeft-val)<2)&&!forceScroll){return}cm.doc.scrollLeft=val;alignHorizontally(cm);if(cm.display.scroller.scrollLeft!=val){cm.display.scroller.scrollLeft=val}cm.display.scrollbars.setScrollLeft(val)}function measureForScrollbars(cm){var d=cm.display,gutterW=d.gutters.offsetWidth;var docH=Math.round(cm.doc.height+paddingVert(cm.display));return{clientHeight:d.scroller.clientHeight,viewHeight:d.wrapper.clientHeight,scrollWidth:d.scroller.scrollWidth,clientWidth:d.scroller.clientWidth,viewWidth:d.wrapper.clientWidth,barLeft:cm.options.fixedGutter?gutterW:0,docHeight:docH,scrollHeight:docH+scrollGap(cm)+d.barHeight,nativeBarWidth:d.nativeBarWidth,gutterWidth:gutterW}}var NativeScrollbars=function(place,scroll,cm){this.cm=cm;var vert=this.vert=elt("div",[elt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var horiz=this.horiz=elt("div",[elt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");place(vert);place(horiz);on(vert,"scroll",function(){if(vert.clientHeight){scroll(vert.scrollTop,"vertical")}});on(horiz,"scroll",function(){if(horiz.clientWidth){scroll(horiz.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(ie&&ie_version<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}};NativeScrollbars.prototype.update=function(measure){var needsH=measure.scrollWidth>measure.clientWidth+1;var needsV=measure.scrollHeight>measure.clientHeight+1;var sWidth=measure.nativeBarWidth;if(needsV){this.vert.style.display="block";this.vert.style.bottom=needsH?sWidth+"px":"0";var totalHeight=measure.viewHeight-(needsH?sWidth:0);this.vert.firstChild.style.height=Math.max(0,measure.scrollHeight-measure.clientHeight+totalHeight)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(needsH){this.horiz.style.display="block";this.horiz.style.right=needsV?sWidth+"px":"0";this.horiz.style.left=measure.barLeft+"px";var totalWidth=measure.viewWidth-measure.barLeft-(needsV?sWidth:0);this.horiz.firstChild.style.width=Math.max(0,measure.scrollWidth-measure.clientWidth+totalWidth)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&measure.clientHeight>0){if(sWidth==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:needsV?sWidth:0,bottom:needsH?sWidth:0}};NativeScrollbars.prototype.setScrollLeft=function(pos){if(this.horiz.scrollLeft!=pos){this.horiz.scrollLeft=pos}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")}};NativeScrollbars.prototype.setScrollTop=function(pos){if(this.vert.scrollTop!=pos){this.vert.scrollTop=pos}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert,"vert")}};NativeScrollbars.prototype.zeroWidthHack=function(){var w=mac&&!mac_geMountainLion?"12px":"18px";this.horiz.style.height=this.vert.style.width=w;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new Delayed;this.disableVert=new Delayed};NativeScrollbars.prototype.enableZeroWidthBar=function(bar,delay,type){bar.style.pointerEvents="auto";function maybeDisable(){var box=bar.getBoundingClientRect();var elt$$1=type=="vert"?document.elementFromPoint(box.right-1,(box.top+box.bottom)/2):document.elementFromPoint((box.right+box.left)/2,box.bottom-1);if(elt$$1!=bar){bar.style.pointerEvents="none"}else{delay.set(1e3,maybeDisable)}}delay.set(1e3,maybeDisable)};NativeScrollbars.prototype.clear=function(){var parent=this.horiz.parentNode;parent.removeChild(this.horiz);parent.removeChild(this.vert)};var NullScrollbars=function(){};NullScrollbars.prototype.update=function(){return{bottom:0,right:0}};NullScrollbars.prototype.setScrollLeft=function(){};NullScrollbars.prototype.setScrollTop=function(){};NullScrollbars.prototype.clear=function(){};function updateScrollbars(cm,measure){if(!measure){measure=measureForScrollbars(cm)}var startWidth=cm.display.barWidth,startHeight=cm.display.barHeight;updateScrollbarsInner(cm,measure);for(var i=0;i<4&&startWidth!=cm.display.barWidth||startHeight!=cm.display.barHeight;i++){if(startWidth!=cm.display.barWidth&&cm.options.lineWrapping){updateHeightsInViewport(cm)}updateScrollbarsInner(cm,measureForScrollbars(cm));startWidth=cm.display.barWidth;startHeight=cm.display.barHeight}}function updateScrollbarsInner(cm,measure){var d=cm.display;var sizes=d.scrollbars.update(measure);d.sizer.style.paddingRight=(d.barWidth=sizes.right)+"px";d.sizer.style.paddingBottom=(d.barHeight=sizes.bottom)+"px";d.heightForcer.style.borderBottom=sizes.bottom+"px solid transparent";if(sizes.right&&sizes.bottom){d.scrollbarFiller.style.display="block";d.scrollbarFiller.style.height=sizes.bottom+"px";d.scrollbarFiller.style.width=sizes.right+"px"}else{d.scrollbarFiller.style.display=""}if(sizes.bottom&&cm.options.coverGutterNextToScrollbar&&cm.options.fixedGutter){d.gutterFiller.style.display="block";d.gutterFiller.style.height=sizes.bottom+"px";d.gutterFiller.style.width=measure.gutterWidth+"px"}else{d.gutterFiller.style.display=""}}var scrollbarModel={native:NativeScrollbars,null:NullScrollbars};function initScrollbars(cm){if(cm.display.scrollbars){cm.display.scrollbars.clear();if(cm.display.scrollbars.addClass){rmClass(cm.display.wrapper,cm.display.scrollbars.addClass)}}cm.display.scrollbars=new scrollbarModel[cm.options.scrollbarStyle](function(node){cm.display.wrapper.insertBefore(node,cm.display.scrollbarFiller);on(node,"mousedown",function(){if(cm.state.focused){setTimeout(function(){return cm.display.input.focus()},0)}});node.setAttribute("cm-not-content","true")},function(pos,axis){if(axis=="horizontal"){setScrollLeft(cm,pos)}else{updateScrollTop(cm,pos)}},cm);if(cm.display.scrollbars.addClass){addClass(cm.display.wrapper,cm.display.scrollbars.addClass)}}var nextOpId=0;function startOperation(cm){cm.curOp={cm:cm,viewChanged:false,startHeight:cm.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++nextOpId};pushOperation(cm.curOp)}function endOperation(cm){var op=cm.curOp;finishOperation(op,function(group){for(var i=0;i=display.viewTo)||display.maxLineChanged&&cm.options.lineWrapping;op.update=op.mustUpdate&&new DisplayUpdate(cm,op.mustUpdate&&{top:op.scrollTop,ensure:op.scrollToPos},op.forceUpdate)}function endOperation_W1(op){op.updatedDisplay=op.mustUpdate&&updateDisplayIfNeeded(op.cm,op.update)}function endOperation_R2(op){var cm=op.cm,display=cm.display;if(op.updatedDisplay){updateHeightsInViewport(cm)}op.barMeasure=measureForScrollbars(cm);if(display.maxLineChanged&&!cm.options.lineWrapping){op.adjustWidthTo=measureChar(cm,display.maxLine,display.maxLine.text.length).left+3;cm.display.sizerWidth=op.adjustWidthTo;op.barMeasure.scrollWidth=Math.max(display.scroller.clientWidth,display.sizer.offsetLeft+op.adjustWidthTo+scrollGap(cm)+cm.display.barWidth);op.maxScrollLeft=Math.max(0,display.sizer.offsetLeft+op.adjustWidthTo-displayWidth(cm))}if(op.updatedDisplay||op.selectionChanged){op.preparedSelection=display.input.prepareSelection(op.focus)}}function endOperation_W2(op){var cm=op.cm;if(op.adjustWidthTo!=null){cm.display.sizer.style.minWidth=op.adjustWidthTo+"px";if(op.maxScrollLeft