UNPKG

l7eval5

Version:

中文 | [English](./README-en_US.md)

6 lines 134 kB
/*! * @license l7eval5 v0.0.3 * Copyright (c) 2019-2020 nobo (MIT Licensed) * https://github.com/bplok20010/eval5 */ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.eval5=t():e.eval5=t()}(this,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createContext=function(e){void 0===e&&(e=Object.create(null));return e},t.compileFunction=function(e,t,r){void 0===t&&(t=[]);void 0===r&&(r={});var n=r.parsingContext,s=void 0===r.timeout?0:r.timeout,a="\n (function anonymous("+t.join(",")+"){\n "+e+"\n });\n ";return new i.Interpreter(n,{ecmaVersion:r.ecmaVersion,timeout:s,rootContext:r.rootContext,globalContextInFunction:r.globalContextInFunction}).evaluate(a)},t.runInContext=n,t.Script=t.runInNewContext=void 0;var i=r(2);function n(e,t,r){return new i.Interpreter(t,r).evaluate(e)}var s=n;t.runInNewContext=s;var a=function(){function e(e){this._code=e}var t=e.prototype;return t.runInContext=function(e){return n(this._code,e)},t.runInNewContext=function(e){return n(this._code,e)},e}();t.Script=a},function(e,t,r){"use strict";var i=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Interpreter=void 0;var n=i(r(3)),s=i(r(9)),a=r(10),o=r(11);function h(e,t){Object.defineProperty(e,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}var c=Object.prototype.hasOwnProperty,u=Symbol("Break"),p=Symbol("Continue"),l=Symbol("DefaultCase"),d=Symbol("EmptyStatementReturn"),f=Symbol("WithScopeName"),m=Symbol("SuperScopeName"),g=Symbol("RootScopeName"),x=Symbol("GlobalScopeName");function y(e){return"function"===typeof e}var v=function(){function e(e){this.interpreter=e}return e.prototype.generator=function(){var e=this.interpreter;return{getOptions:e.getOptions.bind(e),getCurrentScope:function(){return this.getCurrentScope()}.bind(e),getGlobalScope:function(){return this.getGlobalScope()}.bind(e),getCurrentContext:function(){return this.getCurrentContext()}.bind(e),getExecStartTime:e.getExecStartTime.bind(e)}},e}();function b(e,t,r){if(void 0===r&&(r=!0),!(e instanceof v))throw new Error("Illegal call");if("string"!==typeof t)return t;if(t){var i=e.generator(),n={timeout:i.getOptions().timeout,_initEnv:function(){r||this.setCurrentContext(i.getCurrentContext()),this.execStartTime=i.getExecStartTime(),this.execEndTime=this.execStartTime}},s=r?i.getGlobalScope():i.getCurrentScope();return new T(s,n).evaluate(t)}}function S(e){if(!(e instanceof v))throw new Error("Illegal call");for(var t=e.generator(),r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];var s=i.pop(),a=new T(t.getGlobalScope(),t.getOptions()),o="\n\t\t (function anonymous("+i.join(",")+"){\n\t\t "+s+"\n\t\t });\n\t\t ";return a.evaluate(o)}Object.defineProperty(b,"__IS_EVAL_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(S,"__IS_FUNCTION_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1});var _=function(e){this.value=e},C=function(e){this.value=e},k=function(e){this.value=e},E=function(e,t,r){void 0===t&&(t=null),this.name=r,this.parent=t,this.data=e,this.labelStack=[]};function w(){}function I(e,t){return void 0===e&&(e=null),new E(Object.create(null),e,t)}var A={NaN:NaN,Infinity:1/0,undefined:void 0,Object:Object,Array:Array,String:String,Boolean:Boolean,Number:Number,Date:Date,RegExp:RegExp,Error:Error,URIError:URIError,TypeError:TypeError,RangeError:RangeError,SyntaxError:SyntaxError,ReferenceError:ReferenceError,Float32Array:Float32Array,Float64Array:Float64Array,Uint32Array:Uint32Array,Math:Math,parseInt:parseInt,parseFloat:parseFloat,isNaN:isNaN,isFinite:isFinite,decodeURI:decodeURI,decodeURIComponent:decodeURIComponent,encodeURI:encodeURI,encodeURIComponent:encodeURIComponent,escape:escape,unescape:unescape,eval:b,Function:S};"undefined"!==typeof JSON&&(A.JSON=JSON),"undefined"!==typeof Promise&&(A.Promise=Promise),"undefined"!==typeof Set&&(A.Set=Set),"undefined"!==typeof Map&&(A.Map=Map),"undefined"!==typeof Symbol&&(A.Symbol=Symbol),"undefined"!==typeof Proxy&&(A.Proxy=Proxy),"undefined"!==typeof WeakMap&&(A.WeakMap=WeakMap),"undefined"!==typeof WeakSet&&(A.WeakSet=WeakSet),"undefined"!==typeof Reflect&&(A.Reflect=Reflect);var T=function(){function e(t,r){void 0===t&&(t=e.global),void 0===r&&(r={}),this.sourceList=[],this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.isVarDeclMode=!1,this.lastExecNode=null,this.isRunning=!1,this.options={ecmaVersion:r.ecmaVersion||e.ecmaVersion,timeout:r.timeout||0,rootContext:r.rootContext,globalContextInFunction:void 0===r.globalContextInFunction?e.globalContextInFunction:r.globalContextInFunction,_initEnv:r._initEnv},this.context=t||Object.create(null),this.callStack=[],this.initEnvironment(this.context)}var t=e.prototype;return t.initEnvironment=function(e){var t,r;if(e instanceof E)t=e;else{var i=null,n=this.createSuperScope(e);this.options.rootContext&&(i=new E((r=this.options.rootContext,Object.create(r)),n,g)),t=new E(e,i||n,x)}this.globalScope=t,this.currentScope=this.globalScope,this.globalContext=t.data,this.currentContext=t.data,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.execStartTime=Date.now(),this.execEndTime=this.execStartTime;var s=this.options._initEnv;s&&s.call(this)},t.getExecStartTime=function(){return this.execStartTime},t.getExecutionTime=function(){return this.execEndTime-this.execStartTime},t.setExecTimeout=function(e){void 0===e&&(e=0),this.options.timeout=e},t.getOptions=function(){return this.options},t.getGlobalScope=function(){return this.globalScope},t.getCurrentScope=function(){return this.currentScope},t.getCurrentContext=function(){return this.currentContext},t.isInterruptThrow=function(e){return e instanceof o.InterruptThrowError||e instanceof o.InterruptThrowReferenceError||e instanceof o.InterruptThrowSyntaxError},t.createSuperScope=function(e){var t=(0,s.default)({},A);return Object.keys(t).forEach((function(r){r in e&&delete t[r]})),new E(t,null,m)},t.setCurrentContext=function(e){this.currentContext=e},t.setCurrentScope=function(e){this.currentScope=e},t.evaluate=function(t){var r;if(void 0===t&&(t=""),t)return r=(0,a.parse)(t,{ranges:!0,locations:!0,ecmaVersion:this.options.ecmaVersion||e.ecmaVersion}),this.evaluateNode(r,t)},t.appendCode=function(e){return this.evaluate(e)},t.evaluateNode=function(e,t){var r=this;void 0===t&&(t=""),this.value=void 0,this.source=t,this.sourceList.push(t),this.isRunning=!0,this.execStartTime=Date.now(),this.execEndTime=this.execStartTime,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);var i=this.getCurrentScope(),n=this.getCurrentContext(),s=i.labelStack.concat([]),a=this.callStack.concat([]);try{var o=this.createClosure(e);this.addDeclarationsToScope(this.collectDeclVars,this.collectDeclFuncs,this.getCurrentScope()),o()}catch(h){throw h}finally{r.setCurrentScope(i),r.setCurrentContext(n),i.labelStack=s,r.callStack=a,this.execEndTime=Date.now()}return this.isRunning=!1,this.getValue()},t.createErrorMessage=function(e,t,r){var i=e[1].replace("%0",String(t));return null!==r&&(i+=this.getNodePosition(r||this.lastExecNode)),i},t.createError=function(e,t){return new t(e)},t.createThrowError=function(e,t){return this.createError(e,t)},t.createInternalThrowError=function(e,t,r){return this.createError(this.createErrorMessage(e,t,r),e[2])},t.checkTimeout=function(){if(!this.isRunning)return!1;var e=this.options.timeout||0;return Date.now()-this.execStartTime>e},t.getNodePosition=function(e){if(e){return e.loc?" ["+e.loc.start.line+":"+e.loc.start.column+"]":""}return""},t.createClosure=function(e){var t,r=this;switch(e.type){case"BinaryExpression":t=this.binaryExpressionHandler(e);break;case"LogicalExpression":t=this.logicalExpressionHandler(e);break;case"UnaryExpression":t=this.unaryExpressionHandler(e);break;case"UpdateExpression":t=this.updateExpressionHandler(e);break;case"ObjectExpression":t=this.objectExpressionHandler(e);break;case"ArrayExpression":t=this.arrayExpressionHandler(e);break;case"CallExpression":t=this.callExpressionHandler(e);break;case"NewExpression":t=this.newExpressionHandler(e);break;case"MemberExpression":t=this.memberExpressionHandler(e);break;case"ThisExpression":t=this.thisExpressionHandler(e);break;case"SequenceExpression":t=this.sequenceExpressionHandler(e);break;case"Literal":t=this.literalHandler(e);break;case"Identifier":t=this.identifierHandler(e);break;case"AssignmentExpression":t=this.assignmentExpressionHandler(e);break;case"FunctionDeclaration":t=this.functionDeclarationHandler(e);break;case"VariableDeclaration":t=this.variableDeclarationHandler(e);break;case"BlockStatement":case"Program":t=this.programHandler(e);break;case"ExpressionStatement":t=this.expressionStatementHandler(e);break;case"EmptyStatement":t=this.emptyStatementHandler(e);break;case"ReturnStatement":t=this.returnStatementHandler(e);break;case"FunctionExpression":t=this.functionExpressionHandler(e);break;case"IfStatement":t=this.ifStatementHandler(e);break;case"ConditionalExpression":t=this.conditionalExpressionHandler(e);break;case"ForStatement":t=this.forStatementHandler(e);break;case"WhileStatement":t=this.whileStatementHandler(e);break;case"DoWhileStatement":t=this.doWhileStatementHandler(e);break;case"ForInStatement":t=this.forInStatementHandler(e);break;case"WithStatement":t=this.withStatementHandler(e);break;case"ThrowStatement":t=this.throwStatementHandler(e);break;case"TryStatement":t=this.tryStatementHandler(e);break;case"ContinueStatement":t=this.continueStatementHandler(e);break;case"BreakStatement":t=this.breakStatementHandler(e);break;case"SwitchStatement":t=this.switchStatementHandler(e);break;case"LabeledStatement":t=this.labeledStatementHandler(e);break;case"DebuggerStatement":t=this.debuggerStatementHandler(e);break;default:throw this.createInternalThrowError(o.Messages.NodeTypeSyntaxError,e.type,e)}return function(){var i=r.options.timeout;if(i&&i>0&&r.checkTimeout())throw r.createInternalThrowError(o.Messages.ExecutionTimeOutError,i,null);return r.lastExecNode=e,t.apply(void 0,arguments)}},t.binaryExpressionHandler=function(e){var t=this,r=this.createClosure(e.left),i=this.createClosure(e.right);return function(){var n=r(),s=i();switch(e.operator){case"==":return n==s;case"!=":return n!=s;case"===":return n===s;case"!==":return n!==s;case"<":return n<s;case"<=":return n<=s;case">":return n>s;case">=":return n>=s;case"<<":return n<<s;case">>":return n>>s;case">>>":return n>>>s;case"+":return n+s;case"-":return n-s;case"*":return n*s;case"**":return Math.pow(n,s);case"/":return n/s;case"%":return n%s;case"|":return n|s;case"^":return n^s;case"&":return n&s;case"in":return n in s;case"instanceof":return n instanceof s;default:throw t.createInternalThrowError(o.Messages.BinaryOperatorSyntaxError,e.operator,e)}}},t.logicalExpressionHandler=function(e){var t=this,r=this.createClosure(e.left),i=this.createClosure(e.right);return function(){switch(e.operator){case"||":return r()||i();case"&&":return r()&&i();default:throw t.createInternalThrowError(o.Messages.LogicalOperatorSyntaxError,e.operator,e)}}},t.unaryExpressionHandler=function(e){var t=this;switch(e.operator){case"delete":var r=this.createObjectGetter(e.argument),i=this.createNameGetter(e.argument);return function(){return delete r()[i()]};default:var n;if("typeof"===e.operator&&"Identifier"===e.argument.type){var s=this.createObjectGetter(e.argument),a=this.createNameGetter(e.argument);n=function(){return s()[a()]}}else n=this.createClosure(e.argument);return function(){var r=n();switch(e.operator){case"-":return-r;case"+":return+r;case"!":return!r;case"~":return~r;case"void":return;case"typeof":return typeof r;default:throw t.createInternalThrowError(o.Messages.UnaryOperatorSyntaxError,e.operator,e)}}}},t.updateExpressionHandler=function(e){var t=this,r=this.createObjectGetter(e.argument),i=this.createNameGetter(e.argument);return function(){var n=r(),s=i();switch(t.assertVariable(n,s,e),e.operator){case"++":return e.prefix?++n[s]:n[s]++;case"--":return e.prefix?--n[s]:n[s]--;default:throw t.createInternalThrowError(o.Messages.UpdateOperatorSyntaxError,e.operator,e)}}},t.objectExpressionHandler=function(e){var t=this,r=[];var i=Object.create(null);return e.properties.forEach((function(e){var n=e.kind,s=function(e){return"Identifier"===e.type?e.name:"Literal"===e.type?e.value:this.throwError(o.Messages.ObjectStructureSyntaxError,e.type,e)}(e.key);i[s]&&"init"!==n||(i[s]={}),i[s][n]=t.createClosure(e.value),r.push({key:s,property:e})})),function(){for(var e={},t=r.length,n=0;n<t;n++){var s=r[n],a=s.key,o=i[a],c=o.init?o.init():void 0,u=o.get?o.get():function(){},p=o.set?o.set():function(e){};if("set"in o||"get"in o){var l={configurable:!0,enumerable:!0,get:u,set:p};Object.defineProperty(e,a,l)}else{var d=s.property,f=d.kind;"Identifier"!==d.key.type||"FunctionExpression"!==d.value.type||"init"!==f||d.value.id||h(c,d.key.name),e[a]=c}}return e}},t.arrayExpressionHandler=function(e){var t=this,r=e.elements.map((function(e){return e?t.createClosure(e):e}));return function(){for(var e=r.length,t=Array(e),i=0;i<e;i++){var n=r[i];n&&(t[i]=n())}return t}},t.safeObjectGet=function(e,t,r){return e[t]},t.createCallFunctionGetter=function(e){var t=this;switch(e.type){case"MemberExpression":var r=this.createClosure(e.object),i=this.createMemberKeyGetter(e),n=this.source;return function(){var s=r(),a=i(),h=t.safeObjectGet(s,a,e);if(!h||!y(h)){var c=n.slice(e.start,e.end);throw t.createInternalThrowError(o.Messages.FunctionUndefinedReferenceError,c,e)}return h.__IS_EVAL_FUNC?function(e){return h(new v(t),e,!0)}:h.__IS_FUNCTION_FUNC?function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return h.apply(void 0,[new v(t)].concat(r))}:h.bind(s)};default:var s=this.createClosure(e);return function(){var r="";"Identifier"===e.type&&(r=e.name);var i=s();if(!i||!y(i))throw t.createInternalThrowError(o.Messages.FunctionUndefinedReferenceError,r,e);if("Identifier"===e.type&&i.__IS_EVAL_FUNC&&"eval"===r)return function(e){var n=t.getScopeFromName(r,t.getCurrentScope()),s=n.name===m||n.name===x||n.name===g;return i(new v(t),e,!s)};if(i.__IS_EVAL_FUNC)return function(e){return i(new v(t),e,!0)};if(i.__IS_FUNCTION_FUNC)return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return i.apply(void 0,[new v(t)].concat(r))};var n=t.options.globalContextInFunction;if("Identifier"===e.type){var a=t.getIdentifierScope(e);a.name===f&&(n=a.data)}return i.bind(n)}}},t.callExpressionHandler=function(e){var t=this,r=this.createCallFunctionGetter(e.callee),i=e.arguments.map((function(e){return t.createClosure(e)}));return function(){return r().apply(void 0,i.map((function(e){return e()})))}},t.functionExpressionHandler=function(e){var t=this,r=this,i=this.source,n=this.collectDeclVars,s=this.collectDeclFuncs;this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);var a=e.id?e.id.name:"",o=e.params.length,c=e.params.map((function(e){return t.createParamNameGetter(e)})),u=this.createClosure(e.body),p=this.collectDeclVars,l=this.collectDeclFuncs;return this.collectDeclVars=n,this.collectDeclFuncs=s,function(){var t=r.getCurrentScope(),n=function e(){for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];r.callStack.push(""+a);var o=r.getCurrentScope(),h=I(t,"FunctionScope("+a+")");r.setCurrentScope(h),r.addDeclarationsToScope(p,l,h),a&&(h.data[a]=e),h.data.arguments=arguments,c.forEach((function(e,t){h.data[e()]=n[t]}));var d=r.getCurrentContext();r.setCurrentContext(this);var f=u();if(r.setCurrentContext(d),r.setCurrentScope(o),r.callStack.pop(),f instanceof _)return f.value};return h(n,a),Object.defineProperty(n,"length",{value:o,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(n,"toString",{value:function(){return i.slice(e.start,e.end)},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(n,"valueOf",{value:function(){return i.slice(e.start,e.end)},writable:!0,configurable:!0,enumerable:!1}),n}},t.newExpressionHandler=function(e){var t=this,r=this.source,i=this.createClosure(e.callee),s=e.arguments.map((function(e){return t.createClosure(e)}));return function(){var a=i();if(!y(a)||a.__IS_EVAL_FUNC){var h=e.callee,c=r.slice(h.start,h.end);throw t.createInternalThrowError(o.Messages.IsNotConstructor,c,e)}return a.__IS_FUNCTION_FUNC?a.apply(void 0,[new v(t)].concat(s.map((function(e){return e()})))):(0,n.default)(a,s.map((function(e){return e()})))}},t.memberExpressionHandler=function(e){var t=this.createClosure(e.object),r=this.createMemberKeyGetter(e);return function(){return t()[r()]}},t.thisExpressionHandler=function(e){var t=this;return function(){return t.getCurrentContext()}},t.sequenceExpressionHandler=function(e){var t=this,r=e.expressions.map((function(e){return t.createClosure(e)}));return function(){for(var e,t=r.length,i=0;i<t;i++){e=(0,r[i])()}return e}},t.literalHandler=function(e){return function(){return e.regex?new RegExp(e.regex.pattern,e.regex.flags):e.value}},t.identifierHandler=function(e){var t=this;return function(){var r=t.getCurrentScope(),i=t.getScopeDataFromName(e.name,r);return t.assertVariable(i,e.name,e),i[e.name]}},t.getIdentifierScope=function(e){var t=this.getCurrentScope();return this.getScopeFromName(e.name,t)},t.assignmentExpressionHandler=function(e){var t=this;"Identifier"!==e.left.type||"FunctionExpression"!==e.right.type||e.right.id||(e.right.id={type:"Identifier",name:e.left.name});var r=this.createObjectGetter(e.left),i=this.createNameGetter(e.left),n=this.createClosure(e.right);return function(){var s=r(),a=i(),h=n();switch("="!==e.operator&&t.assertVariable(s,a,e),e.operator){case"=":return s[a]=h;case"+=":return s[a]+=h;case"-=":return s[a]-=h;case"*=":return s[a]*=h;case"**=":return s[a]=Math.pow(s[a],h);case"/=":return s[a]/=h;case"%=":return s[a]%=h;case"<<=":return s[a]<<=h;case">>=":return s[a]>>=h;case">>>=":return s[a]>>>=h;case"&=":return s[a]&=h;case"^=":return s[a]^=h;case"|=":return s[a]|=h;default:throw t.createInternalThrowError(o.Messages.AssignmentExpressionSyntaxError,e.type,e)}}},t.functionDeclarationHandler=function(e){if(e.id){var t=this.functionExpressionHandler(e);Object.defineProperty(t,"isFunctionDeclareClosure",{value:!0,writable:!1,configurable:!1,enumerable:!1}),this.funcDeclaration(e.id.name,t)}return function(){return d}},t.getVariableName=function(e){if("Identifier"===e.type)return e.name;throw this.createInternalThrowError(o.Messages.VariableTypeSyntaxError,e.type,e)},t.variableDeclarationHandler=function(e){for(var t,r=this,i=[],n=0;n<e.declarations.length;n++){var s=e.declarations[n];this.varDeclaration(this.getVariableName(s.id)),s.init&&i.push({type:"AssignmentExpression",operator:"=",left:s.id,right:s.init})}return i.length&&(t=this.createClosure({type:"BlockStatement",body:i})),function(){if(t){var e=r.isVarDeclMode;r.isVarDeclMode=!0,t(),r.isVarDeclMode=e}return d}},t.assertVariable=function(e,t,r){if(e===this.globalScope.data&&!(t in e))throw this.createInternalThrowError(o.Messages.VariableUndefinedReferenceError,t,r)},t.programHandler=function(e){var t=this,r=e.body.map((function(e){return t.createClosure(e)}));return function(){for(var e=d,i=0;i<r.length;i++){var n=r[i],s=t.setValue(n());if(s!==d&&((e=s)instanceof _||e instanceof C||e instanceof k||e===u||e===p))break}return e}},t.expressionStatementHandler=function(e){return this.createClosure(e.expression)},t.emptyStatementHandler=function(e){return function(){return d}},t.returnStatementHandler=function(e){var t=e.argument?this.createClosure(e.argument):w;return function(){return new _(t())}},t.ifStatementHandler=function(e){var t=this.createClosure(e.test),r=this.createClosure(e.consequent),i=e.alternate?this.createClosure(e.alternate):function(){return d};return function(){return t()?r():i()}},t.conditionalExpressionHandler=function(e){return this.ifStatementHandler(e)},t.forStatementHandler=function(e){var t=this,r=w,i=e.test?this.createClosure(e.test):function(){return!0},n=w,s=this.createClosure(e.body);return"ForStatement"===e.type&&(r=e.init?this.createClosure(e.init):r,n=e.update?this.createClosure(e.update):w),function(a){var o,h=d,c="DoWhileStatement"===e.type;for(a&&"LabeledStatement"===a.type&&(o=a.label.name),r();c||i();n()){c=!1;var l=t.setValue(s());if(l!==d&&l!==p){if(l===u)break;if((h=l)instanceof k&&h.value===o)h=d;else if(h instanceof _||h instanceof C||h instanceof k)break}}return h}},t.whileStatementHandler=function(e){return this.forStatementHandler(e)},t.doWhileStatementHandler=function(e){return this.forStatementHandler(e)},t.forInStatementHandler=function(e){var t=this,r=e.left,i=this.createClosure(e.right),n=this.createClosure(e.body);return"VariableDeclaration"===e.left.type&&(this.createClosure(e.left)(),r=e.left.declarations[0].id),function(e){var s,a,o=d;e&&"LabeledStatement"===e.type&&(s=e.label.name);var h=i();for(a in h){t.assignmentExpressionHandler({type:"AssignmentExpression",operator:"=",left:r,right:{type:"Literal",value:a}})();var c=t.setValue(n());if(c!==d&&c!==p){if(c===u)break;if((o=c)instanceof k&&o.value===s)o=d;else if(o instanceof _||o instanceof C||o instanceof k)break}}return o}},t.withStatementHandler=function(e){var t=this,r=this.createClosure(e.object),i=this.createClosure(e.body);return function(){var e=r(),n=t.getCurrentScope(),s=new E(e,n,f);t.setCurrentScope(s);var a=t.setValue(i());return t.setCurrentScope(n),a}},t.throwStatementHandler=function(e){var t=this,r=this.createClosure(e.argument);return function(){throw t.setValue(void 0),r()}},t.tryStatementHandler=function(e){var t=this,r=this.createClosure(e.block),i=e.handler?this.catchClauseHandler(e.handler):null,n=e.finalizer?this.createClosure(e.finalizer):null;return function(){var e,s,a=t.getCurrentScope(),o=t.getCurrentContext(),h=a.labelStack.concat([]),c=t.callStack.concat([]),u=d,p=function(){t.setCurrentScope(a),t.setCurrentContext(o),a.labelStack=h,t.callStack=c};try{(u=t.setValue(r()))instanceof _&&(e=u)}catch(l){if(p(),t.isInterruptThrow(l))throw l;if(i)try{(u=t.setValue(i(l)))instanceof _&&(e=u)}catch(l){if(p(),t.isInterruptThrow(l))throw l;s=l}}if(n)try{(u=n())instanceof _&&(e=u)}catch(l){if(p(),t.isInterruptThrow(l))throw l;s=l}if(s)throw s;return e||u}},t.catchClauseHandler=function(e){var t=this,r=this.createParamNameGetter(e.param),i=this.createClosure(e.body);return function(e){var n,s=t.getCurrentScope().data,a=r(),o=c.call(s,a),h=s[a];return s[a]=e,n=i(),o?s[a]=h:delete s[a],n}},t.continueStatementHandler=function(e){return function(){return e.label?new k(e.label.name):p}},t.breakStatementHandler=function(e){return function(){return e.label?new C(e.label.name):u}},t.switchStatementHandler=function(e){var t=this,r=this.createClosure(e.discriminant),i=e.cases.map((function(e){return t.switchCaseHandler(e)}));return function(){for(var e,n,s,a=r(),o=!1,h=0;h<i.length;h++){var c=i[h](),f=c.testClosure();if(f!==l){if(o||f===a){if(o=!0,(n=t.setValue(c.bodyClosure()))===d)continue;if(n===u)break;if((e=n)instanceof _||e instanceof C||e instanceof k||e===p)break}}else s=c}!o&&s&&((n=t.setValue(s.bodyClosure()))===d||n===u||n===p||(e=n));return e}},t.switchCaseHandler=function(e){var t=e.test?this.createClosure(e.test):function(){return l},r=this.createClosure({type:"BlockStatement",body:e.consequent});return function(){return{testClosure:t,bodyClosure:r}}},t.labeledStatementHandler=function(e){var t=this,r=e.label.name,i=this.createClosure(e.body);return function(){var n,s=t.getCurrentScope();return s.labelStack.push(r),(n=i(e))instanceof C&&n.value===r&&(n=d),s.labelStack.pop(),n}},t.debuggerStatementHandler=function(e){return function(){return d}},t.createParamNameGetter=function(e){if("Identifier"===e.type)return function(){return e.name};throw this.createInternalThrowError(o.Messages.ParamTypeSyntaxError,e.type,e)},t.createObjectKeyGetter=function(e){var t;return t="Identifier"===e.type?function(){return e.name}:this.createClosure(e),function(){return t()}},t.createMemberKeyGetter=function(e){return e.computed?this.createClosure(e.property):this.createObjectKeyGetter(e.property)},t.createObjectGetter=function(e){var t=this;switch(e.type){case"Identifier":return function(){return t.getScopeDataFromName(e.name,t.getCurrentScope())};case"MemberExpression":return this.createClosure(e.object);default:throw this.createInternalThrowError(o.Messages.AssignmentTypeSyntaxError,e.type,e)}},t.createNameGetter=function(e){switch(e.type){case"Identifier":return function(){return e.name};case"MemberExpression":return this.createMemberKeyGetter(e);default:throw this.createInternalThrowError(o.Messages.AssignmentTypeSyntaxError,e.type,e)}},t.varDeclaration=function(e){this.collectDeclVars[e]=void 0},t.funcDeclaration=function(e,t){this.collectDeclFuncs[e]=t},t.addDeclarationsToScope=function(e,t,r){var i=r.data;for(var n in t){var s=t[n];i[n]=s?s():s}for(var a in e)a in i||(i[a]=void 0)},t.getScopeValue=function(e,t){return this.getScopeFromName(e,t).data[e]},t.getScopeDataFromName=function(e,t){return this.getScopeFromName(e,t).data},t.getScopeFromName=function(e,t){var r=t;do{if(e in r.data)return r}while(r=r.parent);return this.globalScope},t.setValue=function(e){var t=this.callStack.length;return this.isVarDeclMode||t||e===d||e===u||e===p||e instanceof C||e instanceof k?e:(this.value=e instanceof _?e.value:e,e)},t.getValue=function(){return this.value},e}();t.Interpreter=T,T.version="0.0.3",T.eval=b,T.Function=S,T.ecmaVersion=5,T.globalContextInFunction=void 0,T.global=Object.create(null)},function(e,t,r){var i=r(4);function n(t,r,s){return!function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?e.exports=n=function(e,t,r){var n=[null];n.push.apply(n,t);var s=new(Function.bind.apply(e,n));return r&&i(s,r.prototype),s}:e.exports=n=Reflect.construct,n.apply(null,arguments)}e.exports=n},function(e,t){function r(t,i){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,i)}e.exports=r},function(e,t,r){e.exports=r(6)},function(e,t,r){"use strict";var i=r(0),n=r(7);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Interpreter",{enumerable:!0,get:function(){return s.Interpreter}}),Object.defineProperty(t,"evaluate",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Function",{enumerable:!0,get:function(){return h.default}}),t.vm=t.default=void 0;var s=r(2),a=n(r(1));t.vm=a;var o=i(r(16)),h=i(r(17)),c=o.default;t.default=c},function(e,t,r){var i=r(8);function n(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!==typeof e)return{default:e};var t=n();if(t&&t.has(e))return t.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=s?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}},function(e,t){function r(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},r.apply(this,arguments)}e.exports=r},function(e,t,r){"use strict";r.r(t),r.d(t,"Node",(function(){return oe})),r.d(t,"Parser",(function(){return W})),r.d(t,"Position",(function(){return O})),r.d(t,"SourceLocation",(function(){return M})),r.d(t,"TokContext",(function(){return ue})),r.d(t,"Token",(function(){return Le})),r.d(t,"TokenType",(function(){return g})),r.d(t,"defaultOptions",(function(){return D})),r.d(t,"getLineInfo",(function(){return R})),r.d(t,"isIdentifierChar",(function(){return m})),r.d(t,"isIdentifierStart",(function(){return f})),r.d(t,"isNewLine",(function(){return E})),r.d(t,"keywordTypes",(function(){return b})),r.d(t,"lineBreak",(function(){return C})),r.d(t,"lineBreakG",(function(){return k})),r.d(t,"nonASCIIwhitespace",(function(){return w})),r.d(t,"parse",(function(){return Be})),r.d(t,"parseExpressionAt",(function(){return Fe})),r.d(t,"tokContexts",(function(){return pe})),r.d(t,"tokTypes",(function(){return _})),r.d(t,"tokenizer",(function(){return He})),r.d(t,"version",(function(){return De}));var i={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},n="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",s={5:n,"5module":n+" export import",6:n+" const class extends export import super"},a=/^in(stanceof)?$/,o="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",h="\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f",c=new RegExp("["+o+"]"),u=new RegExp("["+o+h+"]");o=h=null;var p=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],l=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,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,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function d(e,t){for(var r=65536,i=0;i<t.length;i+=2){if((r+=t[i])>e)return!1;if((r+=t[i+1])>=e)return!0}}function f(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==t&&d(e,p)))}function m(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==t&&(d(e,p)||d(e,l)))))}var g=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function x(e,t){return new g(e,{beforeExpr:!0,binop:t})}var y={beforeExpr:!0},v={startsExpr:!0},b={};function S(e,t){return void 0===t&&(t={}),t.keyword=e,b[e]=new g(e,t)}var _={num:new g("num",v),regexp:new g("regexp",v),string:new g("string",v),name:new g("name",v),eof:new g("eof"),bracketL:new g("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new g("]"),braceL:new g("{",{beforeExpr:!0,startsExpr:!0}),braceR:new g("}"),parenL:new g("(",{beforeExpr:!0,startsExpr:!0}),parenR:new g(")"),comma:new g(",",y),semi:new g(";",y),colon:new g(":",y),dot:new g("."),question:new g("?",y),arrow:new g("=>",y),template:new g("template"),invalidTemplate:new g("invalidTemplate"),ellipsis:new g("...",y),backQuote:new g("`",v),dollarBraceL:new g("${",{beforeExpr:!0,startsExpr:!0}),eq:new g("=",{beforeExpr:!0,isAssign:!0}),assign:new g("_=",{beforeExpr:!0,isAssign:!0}),incDec:new g("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new g("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:x("||",1),logicalAND:x("&&",2),bitwiseOR:x("|",3),bitwiseXOR:x("^",4),bitwiseAND:x("&",5),equality:x("==/!=/===/!==",6),relational:x("</>/<=/>=",7),bitShift:x("<</>>/>>>",8),plusMin:new g("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:x("%",10),star:x("*",10),slash:x("/",10),starstar:new g("**",{beforeExpr:!0}),_break:S("break"),_case:S("case",y),_catch:S("catch"),_continue:S("continue"),_debugger:S("debugger"),_default:S("default",y),_do:S("do",{isLoop:!0,beforeExpr:!0}),_else:S("else",y),_finally:S("finally"),_for:S("for",{isLoop:!0}),_function:S("function",v),_if:S("if"),_return:S("return",y),_switch:S("switch"),_throw:S("throw",y),_try:S("try"),_var:S("var"),_const:S("const"),_while:S("while",{isLoop:!0}),_with:S("with"),_new:S("new",{beforeExpr:!0,startsExpr:!0}),_this:S("this",v),_super:S("super",v),_class:S("class",v),_extends:S("extends",y),_export:S("export"),_import:S("import",v),_null:S("null",v),_true:S("true",v),_false:S("false",v),_in:S("in",{beforeExpr:!0,binop:7}),_instanceof:S("instanceof",{beforeExpr:!0,binop:7}),_typeof:S("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:S("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:S("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},C=/\r\n?|\n|\u2028|\u2029/,k=new RegExp(C.source,"g");function E(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var w=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,I=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,A=Object.prototype,T=A.hasOwnProperty,P=A.toString;function N(e,t){return T.call(e,t)}var V=Array.isArray||function(e){return"[object Array]"===P.call(e)};function L(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var O=function(e,t){this.line=e,this.column=t};O.prototype.offset=function(e){return new O(this.line,this.column+e)};var M=function(e,t,r){this.start=t,this.end=r,null!==e.sourceFile&&(this.source=e.sourceFile)};function R(e,t){for(var r=1,i=0;;){k.lastIndex=i;var n=k.exec(e);if(!(n&&n.index<t))return new O(r,t-i);++r,i=n.index+n[0].length}}var D={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function B(e){var t={};for(var r in D)t[r]=e&&N(e,r)?e[r]:D[r];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),V(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return V(t.onComment)&&(t.onComment=function(e,t){return function(r,i,n,s,a,o){var h={type:r?"Block":"Line",value:i,start:n,end:s};e.locations&&(h.loc=new M(this,a,o)),e.ranges&&(h.range=[n,s]),t.push(h)}}(t,t.onComment)),t}var F=2,H=1|F,U=4,j=8;function G(e,t){return F|(e?U:0)|(t?j:0)}var W=function(e,t,r){this.options=e=B(e),this.sourceFile=e.sourceFile,this.keywords=L(s[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var n="";if(!0!==e.allowReserved){for(var a=e.ecmaVersion;!(n=i[a]);a--);"module"===e.sourceType&&(n+=" await")}this.reservedWords=L(n);var o=(n?n+" ":"")+i.strict;this.reservedWordsStrict=L(o),this.reservedWordsStrictBind=L(o+" "+i.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf("\n",r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(C).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=_.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},q={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};W.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},q.inFunction.get=function(){return(this.currentVarScope().flags&F)>0},q.inGenerator.get=function(){return(this.currentVarScope().flags&j)>0},q.inAsync.get=function(){return(this.currentVarScope().flags&U)>0},q.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},q.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},q.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},W.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&F)>0},W.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,i=0;i<e.length;i++)r=e[i](r);return r},W.parse=function(e,t){return new this(t,e).parse()},W.parseExpressionAt=function(e,t,r){var i=new this(r,e,t);return i.nextToken(),i.parseExpression()},W.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(W.prototype,q);var K=W.prototype,z=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/;function Q(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}K.strictDirective=function(e){for(;;){I.lastIndex=e,e+=I.exec(this.input)[0].length;var t=z.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2]))return!0;e+=t[0].length,I.lastIndex=e,e+=I.exec(this.input)[0].length,";"===this.input[e]&&e++}},K.eat=function(e){return this.type===e&&(this.next(),!0)},K.isContextual=function(e){return this.type===_.name&&this.value===e&&!this.containsEsc},K.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},K.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},K.canInsertSemicolon=function(){return this.type===_.eof||this.type===_.braceR||C.test(this.input.slice(this.lastTokEnd,this.start))},K.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},K.semicolon=function(){this.eat(_.semi)||this.insertSemicolon()||this.unexpected()},K.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},K.expect=function(e){this.eat(e)||this.unexpected()},K.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},K.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}},K.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,i=e.doubleProto;if(!t)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},K.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},K.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var X=W.prototype;X.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==_.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i+=1){var s=n[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Z={kind:"loop"},Y={kind:"switch"};X.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;I.lastIndex=this.pos;var t=I.exec(this.input),r=this.pos+t[0].length,i=this.input.charCodeAt(r);if(91===i)return!0;if(e)return!1;if(123===i)return!0;if(f(i,!0)){for(var n=r+1;m(this.input.charCodeAt(n),!0);)++n;var s=this.input.slice(r,n);if(!a.test(s))return!0}return!1},X.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;I.lastIndex=this.pos;var e=I.exec(this.input),t=this.pos+e[0].length;return!C.test(this.input.slice(this.pos,t))&&"function"===this.input.slice(t,t+8)&&(t+8===this.input.length||!m(this.input.charAt(t+8)))},X.parseStatement=function(e,t,r){var i,n=this.type,s=this.startNode();switch(this.isLet(e)&&(n