voluptasvelit
Version:
JavaScript obfuscator
24 lines (21 loc) • 1.39 MB
JavaScript
/*!
Copyright (C) 2016-2018 Timofey Kachalov <sanex3339@yandex.ru>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JavaScriptObfuscator=t():e.JavaScriptObfuscator=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=110)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17);t.METADATA_KEY=r;var i=n(114);t.Container=i.Container;var a=n(23);t.BindingScopeEnum=a.BindingScopeEnum,t.BindingTypeEnum=a.BindingTypeEnum,t.TargetTypeEnum=a.TargetTypeEnum;var o=n(130);t.AsyncContainerModule=o.AsyncContainerModule,t.ContainerModule=o.ContainerModule;var s=n(131);t.injectable=s.injectable;var u=n(132);t.tagged=u.tagged;var d=n(133);t.named=d.named;var l=n(74);t.inject=l.inject,t.LazyServiceIdentifer=l.LazyServiceIdentifer;var c=n(134);t.optional=c.optional;var p=n(135);t.unmanaged=p.unmanaged;var f=n(136);t.multiInject=f.multiInject;var h=n(137);t.targetName=h.targetName;var g=n(138);t.postConstruct=g.postConstruct;var m=n(72);t.MetadataReader=m.MetadataReader;var y=n(29);t.id=y.id;var b=n(27);t.decorate=b.decorate;var v=n(77);t.traverseAncerstors=v.traverseAncerstors,t.taggedConstraint=v.taggedConstraint,t.namedConstraint=v.namedConstraint,t.typeConstraint=v.typeConstraint;var C=n(43);t.getServiceIdentifierAsString=C.getServiceIdentifierAsString;var S=n(139);t.multiBindToService=S.multiBindToService},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Factory__ICalleeDataExtractor="Factory<ICalleeDataExtractor>",e.Factory__IControlFlowCustomNode="Factory<IControlFlowCustomNode>",e.Factory__IControlFlowReplacer="Factory<IControlFlowReplacer>",e.Factory__ICustomNode="Factory<ICustomNode>",e.Factory__ICustomNodeGroup="Factory<ICustomNodeGroup>",e.Factory__IDeadCodeInjectionCustomNode="Factory<IDeadCodeInjectionCustomNode>",e.Factory__IIdentifierNamesGenerator="Factory<IIdentifierNamesGenerator>",e.Factory__IIdentifierObfuscatingReplacer="Factory<IIdentifierObfuscatingReplacer>",e.Factory__INodeGuard="Factory<INodeGuard>",e.Factory__INodeTransformer="Factory<INodeTransformer[]>",e.Factory__IObfuscatedCode="Factory<IObfuscatedCode>",e.Factory__IObfuscatingReplacer="Factory<IObfuscatingReplacer>",e.Factory__IPropertiesExtractor="Factory<IPropertiesExtractor>",e.Factory__TControlFlowStorage="Factory<TControlFlowStorage>",e.IArrayUtils="IArrayUtils",e.ICalleeDataExtractor="ICalleeDataExtractor",e.ICryptUtils="ICryptUtils",e.ICustomNode="ICustomNode",e.ICustomNodeGroup="ICustomNodeGroup",e.IControlFlowReplacer="IControlFlowReplacer",e.IEscapeSequenceEncoder="IEscapeSequenceEncoder",e.IIdentifierNamesGenerator="IIdentifierNamesGenerator",e.IIdentifierObfuscatingReplacer="IIdentifierObfuscatingReplacer",e.IJavaScriptObfuscator="IJavaScriptObfuscator",e.ILogger="ILogger",e.INodeGuard="INodeGuard",e.INodeTransformer="INodeTransformer",e.IObfuscationEventEmitter="IObfuscationEventEmitter",e.IObfuscatedCode="IObfuscatedCode",e.IOptions="IOptions",e.IOptionsNormalizer="IOptionsNormalizer",e.IObfuscatingReplacer="IObfuscatingReplacer",e.IPropertiesExtractor="IPropertiesExtractor",e.IRandomGenerator="IRandomGenerator",e.ISourceCode="ISourceCode",e.ISourceMapCorrector="ISourceMapCorrector",e.IStackTraceAnalyzer="IStackTraceAnalyzer",e.ITransformersRunner="ITransformersRunner",e.Newable__ICustomNode="Newable<ICustomNode>",e.Newable__TControlFlowStorage="Newable<TControlFlowStorage>",e.TCustomNodeGroupStorage="TCustomNodeGroupStorage",e.TInputOptions="TInputOptions",e.TStringArrayStorage="TStringArrayStorage"}(t.ServiceIdentifiers||(t.ServiceIdentifiers={}))},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t;throw t=null===e?"null":"object"===(t=r(e))&&e.constructor&&e.constructor.hasOwnProperty("name")?e.constructor.name:"a ".concat(t),new TypeError("Expected string but received ".concat(t,"."))}},e.exports=t.default,e.exports.default=t.default},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(5),i=n(142);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t,n){var r=n(71);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(3));Object.defineProperty(t,"__esModule",{value:!0});var o=n(24),s=function(){function e(){(0,i.default)(this,e)}return(0,a.default)(e,null,[{key:"isArrayPatternNode",value:function(e){return e.type===o.NodeType.ArrayPattern}},{key:"isArrowFunctionExpressionNode",value:function(e){return e.type===o.NodeType.ArrowFunctionExpression}},{key:"isAssignmentPatternNode",value:function(e){return e.type===o.NodeType.AssignmentPattern}},{key:"isAwaitExpressionNode",value:function(e){return e.type===o.NodeType.AwaitExpression}},{key:"isBlockStatementNode",value:function(e){return e.type===o.NodeType.BlockStatement}},{key:"isBreakStatementNode",value:function(e){return e.type===o.NodeType.BreakStatement}},{key:"isCallExpressionNode",value:function(e){return e.type===o.NodeType.CallExpression}},{key:"isCatchClauseNode",value:function(e){return e.type===o.NodeType.CatchClause}},{key:"isClassDeclarationNode",value:function(e){return e.type===o.NodeType.ClassDeclaration}},{key:"isContinueStatementNode",value:function(e){return e.type===o.NodeType.ContinueStatement}},{key:"isExportNamedDeclarationNode",value:function(e){return e.type===o.NodeType.ExportNamedDeclaration}},{key:"isExpressionStatementNode",value:function(e){return e.type===o.NodeType.ExpressionStatement}},{key:"isFunctionNode",value:function(t){return e.isFunctionDeclarationNode(t)||e.isFunctionExpressionNode(t)||e.isArrowFunctionExpressionNode(t)}},{key:"isFunctionDeclarationNode",value:function(e){return e.type===o.NodeType.FunctionDeclaration}},{key:"isFunctionExpressionNode",value:function(e){return e.type===o.NodeType.FunctionExpression}},{key:"isIdentifierNode",value:function(e){return e.type===o.NodeType.Identifier}},{key:"isImportDeclarationNode",value:function(e){return e.type===o.NodeType.ImportDeclaration}},{key:"isImportSpecifierNode",value:function(e){return e.type===o.NodeType.ImportSpecifier}},{key:"isLabelIdentifierNode",value:function(t,n){var r=e.isLabeledStatementNode(n)&&n.label===t,i=e.isContinueStatementNode(n)&&n.label===t,a=e.isBreakStatementNode(n)&&n.label===t;return r||i||a}},{key:"isLabeledStatementNode",value:function(e){return e.type===o.NodeType.LabeledStatement}},{key:"isLiteralNode",value:function(e){return e.type===o.NodeType.Literal}},{key:"isMemberExpressionNode",value:function(e){return e.type===o.NodeType.MemberExpression}},{key:"isMethodDefinitionNode",value:function(e){return e.type===o.NodeType.MethodDefinition}},{key:"isNode",value:function(e){return e&&void 0!==!e.type}},{key:"isNodeWithLexicalScope",value:function(t){return e.isProgramNode(t)||e.isFunctionNode(t)}},{key:"isNodeWithBlockLexicalScope",value:function(t){return e.isNodeWithLexicalScope(t)||e.isBlockStatementNode(t)}},{key:"isNodeWithLexicalScopeStatements",value:function(t,n){return e.isProgramNode(t)||e.isBlockStatementNode(t)&&e.nodesWithLexicalStatements.includes(n.type)}},{key:"isNodeWithStatements",value:function(t){return e.isProgramNode(t)||e.isBlockStatementNode(t)||e.isSwitchCaseNode(t)}},{key:"isNodeWithComments",value:function(e){return Boolean(e.leadingComments)||Boolean(e.trailingComments)}},{key:"isObjectPatternNode",value:function(e){return e.type===o.NodeType.ObjectPattern}},{key:"isObjectExpressionNode",value:function(e){return e.type===o.NodeType.ObjectExpression}},{key:"isProgramNode",value:function(e){return e.type===o.NodeType.Program}},{key:"isPropertyNode",value:function(e){return e.type===o.NodeType.Property}},{key:"parentNodeIsPropertyNode",value:function(t,n){return e.isPropertyNode(n)&&!n.computed&&n.key===t}},{key:"parentNodeIsMemberExpressionNode",value:function(t,n){return e.isMemberExpressionNode(n)&&!n.computed&&n.property===t}},{key:"parentNodeIsMethodDefinitionNode",value:function(t,n){return e.isMethodDefinitionNode(n)&&!n.computed}},{key:"isReplaceableIdentifierNode",value:function(t,n){return e.isIdentifierNode(t)&&!e.parentNodeIsPropertyNode(t,n)&&!e.parentNodeIsMemberExpressionNode(t,n)&&!e.parentNodeIsMethodDefinitionNode(t,n)&&!e.isLabelIdentifierNode(t,n)}},{key:"isRestElementNode",value:function(e){return e.type===o.NodeType.RestElement}},{key:"isReturnStatementNode",value:function(e){return e.type===o.NodeType.ReturnStatement}},{key:"isSuperNode",value:function(e){return e.type===o.NodeType.Super}},{key:"isSwitchCaseNode",value:function(e){return e.type===o.NodeType.SwitchCase}},{key:"isTaggedTemplateExpressionNode",value:function(e){return e.type===o.NodeType.TaggedTemplateExpression}},{key:"isTemplateLiteralNode",value:function(e){return e.type===o.NodeType.TemplateLiteral}},{key:"isUnaryExpressionNode",value:function(e){return e.type===o.NodeType.UnaryExpression}},{key:"isUseStrictOperator",value:function(e){return e.type===o.NodeType.ExpressionStatement&&"use strict"===e.directive}},{key:"isVariableDeclarationNode",value:function(e){return e.type===o.NodeType.VariableDeclaration}},{key:"isVariableDeclaratorNode",value:function(e){return e.type===o.NodeType.VariableDeclarator}},{key:"isWhileStatementNode",value:function(e){return e.type===o.NodeType.WhileStatement}}]),e}();t.NodeGuards=s,s.nodesWithLexicalStatements=[o.NodeType.ArrowFunctionExpression,o.NodeType.FunctionDeclaration,o.NodeType.FunctionExpression,o.NodeType.MethodDefinition]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={configurable:!0,enumerable:!0},i="_initialized",a="_initializablePropertiesSet",o="_wrappedMethodsSet",s="constructor";function u(e,t,n){Reflect.hasMetadata(e,n)||Reflect.defineMetadata(e,t,n)}t.initializable=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initialize",t=Object.keys(this)[0];return function(n,d){var l=n[e];if(!l||"function"!=typeof l)throw new Error("`".concat(e,"` method with initialization logic not ")+"found. `@".concat(t,"` decorator requires `").concat(e,"` method"));return u(i,!1,n),u(a,new Set,n),u(o,new Set,n),function(e,t){var n=Object.getOwnPropertyNames(e),u=[t,s];n.forEach((function(n){var s=Reflect.getMetadata(a,e),d=Reflect.getMetadata(o,e);if(!(u.includes(n)||s.has(n)||d.has(n))&&"function"==typeof e[n]){var l=Object.getOwnPropertyDescriptor(e,n)||r,c=l.value;Object.defineProperty(e,n,Object.assign(Object.assign({},l),{value:function(){if(!Reflect.getMetadata(i,this))throw new Error("Class should be initialized with `".concat(t,"()` method"));return c.apply(this,arguments)}})),d.add(n)}}))}(n,e),function(e,t,n){var a=Object.getOwnPropertyDescriptor(e,t)||r,o=a.value;Object.defineProperty(e,t,Object.assign(Object.assign({},a),{value:function(){Reflect.defineMetadata(i,!0,this);var e=o.apply(this,arguments);return this[n],e}}))}(n,e,d),function(e,t){Reflect.getMetadata(a,e).add(t);var n="_".concat(t.toString()),i=Object.getOwnPropertyDescriptor(e,n)||r;return Object.defineProperty(e,t,Object.assign(Object.assign({},i),{get:function(){if(void 0===this[n])throw new Error("Property `".concat(t.toString(),"` is not initialized! Initialize it first!"));return this[n]},set:function(e){this[n]=e}})),i}(n,d)}}},function(e,t,n){"use strict";var r=n(0),i=r(n(5)),a=r(n(1)),o=r(n(3)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(62)),d=s(n(82)),l=s(n(18)),c=n(10),p=n(20),f=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"addXVerbatimPropertyTo",value:function(e){return e["x-verbatim-property"]={content:e.raw,precedence:u.Precedence.Primary},e}},{key:"clone",value:function(t){return e.parentizeAst(e.cloneRecursive(t))}},{key:"convertCodeToStructure",value:function(t){var n=d.parse(t,{sourceType:"script"});return l.replace(n,{enter:function(t,n){return e.parentizeNode(t,n),c.NodeGuards.isLiteralNode(t)&&e.addXVerbatimPropertyTo(t),p.NodeMetadata.set(t,{ignoredNode:!1}),t}}),n.body}},{key:"convertStructureToCode",value:function(e){return e.reduce((function(e,t){return e+u.generate(t,{sourceMapWithCode:!0}).code}),"")}},{key:"getUnaryExpressionArgumentNode",value:function(t){return c.NodeGuards.isUnaryExpressionNode(t.argument)?e.getUnaryExpressionArgumentNode(t.argument):t.argument}},{key:"parentizeAst",value:function(t){return l.replace(t,{enter:e.parentizeNode}),t}},{key:"parentizeNode",value:function(e,t){return e.parentNode=t||e,e}},{key:"cloneRecursive",value:function(t){if(null===t)return t;var n={};return Object.keys(t).forEach((function(r){if("parentNode"!==r){var a,o=t[r];a=null===o||o instanceof RegExp?o:Array.isArray(o)?o.map(e.cloneRecursive):"object"===(0,i.default)(o)?e.cloneRecursive(o):o,n[r]=a}})),n}}]),e}();t.NodeUtils=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Initializing="Initializing",e.Preparing="Preparing",e.DeadCodeInjection="DeadCodeInjection",e.ControlFlowFlattening="ControlFlowFlattening",e.Converting="Converting",e.Obfuscating="Obfuscating",e.Finalizing="Finalizing"}(t.TransformationStage||(t.TransformationStage={}))},function(e,t,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(5)),o=function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":(0,a.default)(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":(0,a.default)(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var d=n(2),l=n(4),c=function e(t,n){(0,i.default)(this,e),this.randomGenerator=t,this.options=n};c=o([d.injectable(),u(0,d.inject(l.ServiceIdentifiers.IRandomGenerator)),u(1,d.inject(l.ServiceIdentifiers.IOptions)),s("design:paramtypes",[Object,Object])],c),t.AbstractNodeTransformer=c},function(e,t,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(3)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(62)),u=n(24),d=function(){function e(){(0,i.default)(this,e)}return(0,a.default)(e,null,[{key:"programNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:u.NodeType.Program,body:e,sourceType:"script",metadata:{ignoredNode:!1}}}},{key:"arrayExpressionNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:u.NodeType.ArrayExpression,elements:e,metadata:{ignoredNode:!1}}}},{key:"assignmentExpressionNode",value:function(e,t,n){return{type:u.NodeType.AssignmentExpression,operator:e,left:t,right:n,metadata:{ignoredNode:!1}}}},{key:"binaryExpressionNode",value:function(e,t,n){return{type:u.NodeType.BinaryExpression,operator:e,left:t,right:n,metadata:{ignoredNode:!1}}}},{key:"blockStatementNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:u.NodeType.BlockStatement,body:e,metadata:{ignoredNode:!1}}}},{key:"breakStatement",value:function(e){return{type:u.NodeType.BreakStatement,label:e,metadata:{ignoredNode:!1}}}},{key:"callExpressionNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{type:u.NodeType.CallExpression,callee:e,arguments:t,metadata:{ignoredNode:!1}}}},{key:"continueStatement",value:function(e){return{type:u.NodeType.ContinueStatement,label:e,metadata:{ignoredNode:!1}}}},{key:"expressionStatementNode",value:function(e){return{type:u.NodeType.ExpressionStatement,expression:e,metadata:{ignoredNode:!1}}}},{key:"functionDeclarationNode",value:function(t,n,r){return{type:u.NodeType.FunctionDeclaration,id:e.identifierNode(t),params:n,body:r,generator:!1,metadata:{ignoredNode:!1}}}},{key:"functionExpressionNode",value:function(e,t){return{type:u.NodeType.FunctionExpression,params:e,body:t,generator:!1,metadata:{ignoredNode:!1}}}},{key:"ifStatementNode",value:function(e,t,n){return Object.assign(Object.assign({type:u.NodeType.IfStatement,test:e,consequent:t},n&&{alternate:n}),{metadata:{ignoredNode:!1}})}},{key:"identifierNode",value:function(e){return{type:u.NodeType.Identifier,name:e,metadata:{ignoredNode:!1}}}},{key:"literalNode",value:function(e,t){return t=void 0!==t?t:"'".concat(e,"'"),{type:u.NodeType.Literal,value:e,raw:t,"x-verbatim-property":{content:t,precedence:s.Precedence.Primary},metadata:{ignoredNode:!1}}}},{key:"logicalExpressionNode",value:function(e,t,n){return{type:u.NodeType.LogicalExpression,operator:e,left:t,right:n,metadata:{ignoredNode:!1}}}},{key:"memberExpressionNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:u.NodeType.MemberExpression,computed:n,object:e,property:t,metadata:{ignoredNode:!1}}}},{key:"methodDefinitionNode",value:function(e,t,n,r){return{type:u.NodeType.MethodDefinition,key:e,value:t,kind:n,computed:r,static:!1,metadata:{ignoredNode:!1}}}},{key:"objectExpressionNode",value:function(e){return{type:u.NodeType.ObjectExpression,properties:e,metadata:{ignoredNode:!1}}}},{key:"propertyNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:u.NodeType.Property,key:e,value:t,kind:"init",method:!1,shorthand:!1,computed:n,metadata:{ignoredNode:!1}}}},{key:"returnStatementNode",value:function(e){return{type:u.NodeType.ReturnStatement,argument:e,metadata:{ignoredNode:!1}}}},{key:"switchStatementNode",value:function(e,t){return{type:u.NodeType.SwitchStatement,discriminant:e,cases:t,metadata:{ignoredNode:!1}}}},{key:"switchCaseNode",value:function(e,t){return{type:u.NodeType.SwitchCase,test:e,consequent:t,metadata:{ignoredNode:!1}}}},{key:"unaryExpressionNode",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:u.NodeType.UnaryExpression,operator:e,argument:t,prefix:n,metadata:{ignoredNode:!1}}}},{key:"updateExpressionNode",value:function(e,t){return{type:u.NodeType.UpdateExpression,operator:e,argument:t,prefix:!1,metadata:{ignoredNode:!1}}}},{key:"variableDeclarationNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"var";return{type:u.NodeType.VariableDeclaration,declarations:e,kind:t,metadata:{ignoredNode:!1}}}},{key:"variableDeclaratorNode",value:function(e,t){return{type:u.NodeType.VariableDeclarator,id:e,init:t,metadata:{ignoredNode:!1}}}},{key:"whileStatementNode",value:function(e,t){return{type:u.NodeType.WhileStatement,test:e,body:t,metadata:{ignoredNode:!1}}}}]),e}();t.NodeFactory=d},function(e,t,n){"use strict";var r,i=n(0),a=i(n(1)),o=i(n(3)),s=i(n(5)),u=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":(0,s.default)(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},d=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":(0,s.default)(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},l=function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(2),p=n(4),f=n(193),h=n(194),g=r=function(){function e(t,n,r){(0,a.default)(this,e),this.cachedNode=null,this.identifierNamesGenerator=t(r),this.randomGenerator=n,this.options=r}return(0,o.default)(e,[{key:"getNode",value:function(){return this.cachedNode||(this.cachedNode=this.getNodeStructure()),this.cachedNode}},{key:"getGlobalVariableTemplate",value:function(){return this.randomGenerator.getRandomGenerator().pickone(r.globalVariableTemplateFunctions)}}]),e}();g.globalVariableTemplateFunctions=[f.GlobalVariableTemplate1(),h.GlobalVariableTemplate2()],g=r=u([c.injectable(),l(0,c.inject(p.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),l(1,c.inject(p.ServiceIdentifiers.IRandomGenerator)),l(2,c.inject(p.ServiceIdentifiers.IOptions)),d("design:paramtypes",[Function,Object,Object])],g),t.AbstractCustomNode=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct"},function(e,t,n){!function e(t){"use strict";var r,i,a,o,s,u;function d(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],r[t]="object"==typeof n&&null!==n?d(n):n);return r}function l(e,t){this.parent=e,this.key=t}function c(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function p(){}function f(e){return null!=e&&("object"==typeof e&&"string"==typeof e.type)}function h(e,t){return(e===r.ObjectExpression||e===r.ObjectPattern)&&"properties"===t}function g(e,t){return(new p).traverse(e,t)}function m(e,t){var n;return n=function(e,t){var n,r,i,a;for(r=e.length,i=0;r;)t(e[a=i+(n=r>>>1)])?r=n:(i=a+1,r-=n+1);return i}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:o={},Skip:s={},Remove:u={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){var e,t,n,r,i;function a(e,t){if(Array.isArray(t))for(n=0,r=t.length;n<r;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(i=[],e=2,t=this.__leavelist.length;e<t;++e)a(i,this.__leavelist[e].path);return a(i,this.__current.path),i},p.prototype.type=function(){return this.current().type||this.__current.wrap},p.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},p.prototype.current=function(){return this.__current.node},p.prototype.__execute=function(e,t){var n,r;return r=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(r=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,r},p.prototype.notify=function(e){this.__state=e},p.prototype.skip=function(){this.notify(s)},p.prototype.break=function(){this.notify(o)},p.prototype.remove=function(){this.notify(u)},p.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=a,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},p.prototype.traverse=function(e,t){var n,r,i,a,u,d,l,p,g,m,y,b;for(this.__initialize(e,t),b={},n=this.__worklist,r=this.__leavelist,n.push(new c(e,null,null,null)),r.push(new c(null,null,null,null));n.length;)if((i=n.pop())!==b){if(i.node){if(d=this.__execute(t.enter,i),this.__state===o||d===o)return;if(n.push(b),r.push(i),this.__state===s||d===s)continue;if(u=(a=i.node).type||i.wrap,!(m=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");m=this.__fallback(a)}for(p=m.length;(p-=1)>=0;)if(y=a[l=m[p]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]){if(h(u,m[p]))i=new c(y[g],[l,g],"Property",null);else{if(!f(y[g]))continue;i=new c(y[g],[l,g],null,null)}n.push(i)}}else f(y)&&n.push(new c(y,l,null,null))}}else if(i=r.pop(),d=this.__execute(t.leave,i),this.__state===o||d===o)return},p.prototype.replace=function(e,t){var n,r,i,a,d,p,g,m,y,b,v,C,S;function N(e){var t,r,i,a;if(e.ref.remove())for(r=e.ref.key,a=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===a){if(i.ref.key<r)break;--i.ref.key}}for(this.__initialize(e,t),v={},n=this.__worklist,r=this.__leavelist,p=new c(e,null,null,new l(C={root:e},"root")),n.push(p),r.push(p);n.length;)if((p=n.pop())!==v){if(void 0!==(d=this.__execute(t.enter,p))&&d!==o&&d!==s&&d!==u&&(p.ref.replace(d),p.node=d),this.__state!==u&&d!==u||(N(p),p.node=null),this.__state===o||d===o)return C.root;if((i=p.node)&&(n.push(v),r.push(p),this.__state!==s&&d!==s)){if(a=i.type||p.wrap,!(y=this.__keys[a])){if(!this.__fallback)throw new Error("Unknown node type "+a+".");y=this.__fallback(i)}for(g=y.length;(g-=1)>=0;)if(b=i[S=y[g]])if(Array.isArray(b)){for(m=b.length;(m-=1)>=0;)if(b[m]){if(h(a,y[g]))p=new c(b[m],[S,m],"Property",new l(b,m));else{if(!f(b[m]))continue;p=new c(b[m],[S,m],null,new l(b,m))}n.push(p)}}else f(b)&&n.push(new c(b,S,null,new l(i,S)))}}else if(p=r.pop(),void 0!==(d=this.__execute(t.leave,p))&&d!==o&&d!==s&&d!==u&&p.ref.replace(d),this.__state!==u&&d!==u||N(p),this.__state===o||d===o)return C.root;return C.root},t.version=n(143).version,t.Syntax=r,t.traverse=g,t.replace=function(e,t){return(new p).replace(e,t)},t.attachComments=function(e,t,n){var r,a,o,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(o=0,a=t.length;o<a;o+=1)(r=d(t[o])).extendedRange=[0,e.range[0]],u.push(r);e.leadingComments=u}return e}for(o=0,a=t.length;o<a;o+=1)u.push(m(d(t[o]),n));return s=0,g(e,{enter:function(e){for(var t;s<u.length&&!((t=u[s]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?i.Break:u[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),s=0,g(e,{leave:function(e){for(var t;s<u.length&&(t=u[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?i.Break:u[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=a,t.VisitorOption=i,t.Controller=p,t.cloneEnvironment=function(){return e({})},t}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+e[0]+" must be >= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"@postConstruct error in class "+e[0]+": "+e[1]},t.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"It looks like there is a circular dependency in one of the '"+e[0]+"' bindings. Please investigate bindings withservice identifier '"+e[1]+"'."},t.STACK_OVERFLOW="Maximum call stack size exceeded"},function(e,t,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(3));Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){(0,i.default)(this,e)}return(0,a.default)(e,null,[{key:"set",value:function(e,t){e.metadata=Object.assign(e.metadata||{},t)}},{key:"get",value:function(e,t){return void 0!==e.metadata?e.metadata[t]:void 0}},{key:"isIgnoredNode",value:function(t){return!0===e.get(t,"ignoredNode")}},{key:"isRenamedIdentifier",value:function(t){return!0===e.get(t,"renamedIdentifier")}},{key:"isReplacedLiteral",value:function(t){return!0===e.get(t,"replacedLiteral")}}]),e}();t.NodeMetadata=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=i},function(e,t){var n=/\{([0-9a-zA-Z_]+)\}/g;e.exports=function(e){var t;if(2===arguments.length&&"object"==typeof arguments[1])t=arguments[1];else{t=new Array(arguments.length-1);for(var r=1;r<arguments.length;++r)t[r-1]=arguments[r]}t&&t.hasOwnProperty||(t={});return e.replace(n,(function(n,r,i){var a;return"{"===e[i-1]&&"}"===e[i+n.length]?r:null==(a=t.hasOwnProperty(r)?t[r]:null)?"":a}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassDeclaration="ClassDeclaration",e.ContinueStatement="ContinueStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExpressionStatement="ExpressionStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MethodDefinition="MethodDefinition",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateLiteral="TemplateLiteral",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement"}(t.NodeType||(t.NodeType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BaseIdentifierObfuscatingReplacer="BaseIdentifierObfuscatingReplacer"}(t.IdentifierObfuscatingReplacer||(t.IdentifierObfuscatingReplacer={}))},function(e,t,n){"use strict";var r=n(0),i=r(n(113)),a=r(n(1)),o=r(n(3));Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),u=n(4),d=n(140),l=n(147),c=n(175),p=n(186),f=n(233),h=n(234),g=n(237),m=n(238),y=n(252),b=n(340),v=n(350),C=n(355),S=n(367),N=n(377),A=n(379),_=n(381),E=n(382),I=n(383),T=function(){function e(){(0,a.default)(this,e),this.container=new s.Container}return(0,o.default)(e,[{key:"get",value:function(e){return this.container.get(e)}},{key:"getNamed",value:function(e,t){return this.container.getNamed(e,t)}},{key:"load",value:function(e,t,n){this.container.bind(u.ServiceIdentifiers.ISourceCode).toDynamicValue((function(){return new E.SourceCode(e,t)})).inSingletonScope(),this.container.bind(u.ServiceIdentifiers.TInputOptions).toDynamicValue((function(){return n})).inSingletonScope(),this.container.bind(u.ServiceIdentifiers.ILogger).to(N.Logger).inSingletonScope(),this.container.bind(u.ServiceIdentifiers.IJavaScriptObfuscator).to(S.JavaScriptObfuscator).inSingletonScope(),this.container.bind(u.ServiceIdentifiers.ITransformersRunner).to(I.TransformersRunner).inSingletonScope(),this.container.bind(u.ServiceIdentifiers.IObfuscatedCode).to(_.ObfuscatedCode),this.container.bind(u.ServiceIdentifiers.Factory__IObfuscatedCode).toFactory((function(e){return function(t,n){var r=e.container.get(u.ServiceIdentifiers.IObfuscatedCode);return r.initialize(t,n),r}})),this.container.bind(u.ServiceIdentifiers.IObfuscationEventEmitter).to(A.ObfuscationEventEmitter).inSingletonScope(),this.container.load(d.analyzersModule),this.container.load(l.controlFlowTransformersModule),this.container.load(c.convertingTransformersModule),this.container.load(p.customNodesModule),this.container.load(f.finalizingTransformersModule),this.container.load(h.generatorsModule),this.container.load(g.nodeTransformersModule),this.container.load(m.obfuscatingTransformersModule),this.container.load(y.optionsModule),this.container.load(b.preparingTransformersModule),this.container.load(v.storagesModule),this.container.load(C.utilsModule)}},{key:"unload",value:function(){this.container.unbindAll()}}],[{key:"getFactory",value:function(e){return function(t){return function(n){return t.container.getNamed(e,n)}}}},{key:"getCacheFactory",value:function(e){return function(t){var n=new Map;return function(r){if(n.has(r))return n.get(r);var i=t.container.getNamed(e,r);return n.set(r,i),i}}}},{key:"getConstructorFactory",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(t){var r=new Map,a=[];return function(o){if(n.forEach((function(e,n){a[n]||(a[n]=t.container.get(e))})),r.has(o))return(0,i.default)(r.get(o),a);var s=t.container.getNamed(e,o);return r.set(o,s),(0,i.default)(s,a)}}}}]),e}();t.InversifyContainerFacade=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),i=n(17);function a(e,t,n,i,a){var o={},s="number"==typeof a,u=void 0!==a&&s?a.toString():n;if(s&&void 0!==n)throw new Error(r.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(o=Reflect.getMetadata(e,t));var d=o[u];if(Array.isArray(d))for(var l=0,c=d;l<c.length;l++){var p=c[l];if(p.key===i.key)throw new Error(r.DUPLICATED_METADATA+" "+p.key.toString())}else d=[];d.push(i),o[u]=d,Reflect.defineMetadata(e,o,t)}function o(e,t){Reflect.decorate(e,t)}function s(e,t){return function(n,r){t(n,r,e)}}t.tagParameter=function(e,t,n,r){a(i.TAGGED,e,t,r,n)},t.tagProperty=function(e,t,n){a(i.TAGGED_PROP,e.constructor,t,n)},t.decorate=function(e,t,n){"number"==typeof n?o([s(n,e)],t):"string"==typeof n?Reflect.decorate([e],t,n):o([e],t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BinaryExpressionFunctionNode="BinaryExpressionFunctionNode",e.BlockStatementControlFlowFlatteningNode="BlockStatementControlFlowFlatteningNode",e.CallExpressionControlFlowStorageCallNode="CallExpressionControlFlowStorageCallNode",e.CallExpressionFunctionNode="CallExpressionFunctionNode",e.ControlFlowStorageNode="ControlFlowStorageNode",e.ExpressionWithOperatorControlFlowStorageCallNode="ExpressionWithOperatorControlFlowStorageCallNode",e.LogicalExpressionFunctionNode="LogicalExpressionFunctionNode",e.StringLiteralControlFlowStorageCallNode="StringLiteralControlFlowStorageCallNode",e.StringLiteralNode="StringLiteralNode"}(t.ControlFlowCustomNode||(t.ControlFlowCustomNode={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.id=function(){return r++}},function(e,t,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(3));Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),s=function(){function e(){(0,i.default)(this,e)}return(0,a.default)(e,null,[{key:"getParentNodeWithStatements",value:function(t){return e.getParentNodesWithStatementsRecursive(t,1)[0]}},{key:"getParentNodesWithStatements",value:function(t){return e.getParentNodesWithStatementsRecursive(t)}},{key:"getNextSiblingStatement",value:function(t){return e.getSiblingStatementByOffset(t,1)}},{key:"getPreviousSiblingStatement",value:function(t){return e.getSiblingStatementByOffset(t,-1)}},{key:"getRootStatementOfNode",value:function(t){if(o.NodeGuards.isProgramNode(t))throw new Error("Unable to find root statement for `Program` node");var n=t.parentNode;if(!n)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithStatements(n)?t:e.getRootStatementOfNode(n)}},{key:"getScopeOfNode",value:function(t){var n=t.parentNode;if(!n)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithStatements(n)?n:e.getScopeOfNode(n)}},{key:"getParentNodesWithStatementsRecursive",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(r.length>=n)return r;var a=t.parentNode;if(!a)throw new ReferenceError("`parentNode` property of given node is `undefined`");return(o.NodeGuards.isProgramNode(t)||o.NodeGuards.isNodeWithLexicalScopeStatements(t,a)&&i>0)&&r.push(t),t!==a?e.getParentNodesWithStatementsRecursive(a,n,r,++i):r}},{key:"getSiblingStatementByOffset",value:function(t,n){var r=e.getScopeOfNode(t),i=o.NodeGuards.isSwitchCaseNode(r)?r.consequent:r.body,a=i.indexOf(t);return i[a+n]||null}}]),e}();t.NodeStatementUtils=s},function(e,t,n){"use strict";var r=n(0),i=r(n(37)),a=r(n(1)),o=r(n(3));Object.defineProperty(t,"__esModule",{value:!0});var s=n(10),u=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"append",value:function(t,n){n=e.parentizeScopeStatementsBeforeAppend(t,n),e.setScopeStatements(t,[].concat((0,i.default)(e.getScopeStatements(t)),(0,i.default)(n)))}},{key:"appendToOptimalBlockScope",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=t.length?e.getOptimalBlockScope(t,i):n;e.prepend(a,r)}},{key:"getOptimalBlockScope",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=t[n];if(r<=0)throw new Error("Invalid `deep` argument value. Value should be bigger then 0.");return r>1&&i.stackTrace.length?e.getOptimalBlockScope(i.stackTrace,0,--r):i.callee}},{key:"insertAfter",value:function(t,n,r){var i=e.getScopeStatements(t).indexOf(r);e.insertAtIndex(t,n,i+1)}},{key:"insertAtIndex",value:function(t,n,r){n=e.parentizeScopeStatementsBeforeAppend(t,n),e.setScopeStatements(t,[].concat((0,i.default)(e.getScopeStatements(t).slice(0,r)),(0,i.default)(n),(0,i.default)(e.getScopeStatements(t).slice(r))))}},{key:"prepend",value:function(t,n){n=e.parentizeScopeStatementsBeforeAppend(t,n),e.setScopeStatements(t,[].concat((0,i.default)(n),(0,i.default)(e.getScopeStatements(t))))}},{key:"getScopeStatements",value:function(e){return s.NodeGuards.isSwitchCaseNode(e)?e.consequent:e.body}},{key:"parentizeScopeStatementsBeforeAppend",value:function(e,t){return t.forEach((function(t){t.parentNode=e})),t}},{key:"setScopeStatements",value:function(e,t){s.NodeGuards.isSwitchCaseNode(e)?e.consequent=t:e.body=t}}]),e}();t.NodeAppender=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AfterObfuscation="afterObfuscation",e.BeforeObfuscati