UNPKG

anobis

Version:
24 lines (21 loc) 231 kB
/*! Copyright (C) 2017 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. */ require("source-map-support").install(),module.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=40)}([function(e,t){e.exports=require("inversify")},function(e,t,r){"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__IIdentifierObfuscatingReplacer="Factory<IIdentifierObfuscatingReplacer>",e.Factory__INodeTransformer="Factory<INodeTransformer[]>",e.Factory__IObfuscationResult="Factory<IObfuscationResult>",e.Factory__IObfuscatingReplacer="Factory<IObfuscatingReplacer>",e.Factory__TControlFlowStorage="Factory<TControlFlowStorage>",e.IArrayUtils="IArrayUtils",e.ICalleeDataExtractor="ICalleeDataExtractor",e.ICryptUtils="ICryptUtils",e.ICustomNode="ICustomNode",e.ICustomNodeGroup="ICustomNodeGroup",e.IControlFlowReplacer="IControlFlowReplacer",e.IDeadCodeInjectionReplacer="IDeadCodeInjectionReplacer",e.IEscapeSequenceEncoder="IEscapeSequenceEncoder",e.IIdentifierObfuscatingReplacer="IIdentifierObfuscatingReplacer",e.IJavaScriptObfuscator="IJavaScriptObfuscator",e.ILogger="ILogger",e.INodeTransformer="INodeTransformer",e.IObfuscationEventEmitter="IObfuscationEventEmitter",e.IObfuscationResult="IObfuscationResult",e.IObfuscator="IObfuscator",e.IOptions="IOptions",e.IObfuscatingReplacer="IObfuscatingReplacer",e.IRandomGenerator="IRandomGenerator",e.ISourceCode="ISourceCode",e.ISourceMapCorrector="ISourceMapCorrector",e.IStackTraceAnalyzer="IStackTraceAnalyzer",e.Newable__ICustomNode="Newable<ICustomNode>",e.Newable__TControlFlowStorage="Newable<TControlFlowStorage>",e.TCustomNodeGroupStorage="TCustomNodeGroupStorage",e.TStringArrayStorage="TStringArrayStorage"}(t.ServiceIdentifiers||(t.ServiceIdentifiers={}))},function(e,t){e.exports=require("tslib")},function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initialize",t=Object.keys(this)[0];return function(r,n){var o={configurable:!0,enumerable:!0},a=r[e];if(!a||"function"!=typeof a)throw new Error("`"+e+"` method with initialization logic not found. `@"+t+"` decorator requires `"+e+"` method");var i="_"+n,c=Object.getOwnPropertyDescriptor(r,i)||o,s=Object.getOwnPropertyDescriptor(r,e)||o,u=s.value;return Object.defineProperty(r,n,Object.assign({},c,{get:function(){if(void 0===this[i])throw new Error("Property `"+n+"` is not initialized! Initialize it first!");return this[i]},set:function(e){this[i]=e}})),Object.defineProperty(r,e,Object.assign({},s,{value:function(){u.apply(this,arguments),this[n]}})),c}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializable=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o="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},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(25),c=r(32),s=r(8),u=r(10),l=r(5),d=r(7),f=function(){function e(){n(this,e)}return a(e,null,[{key:"addXVerbatimPropertyToLiterals",value:function(t){return e.typedReplace(t,u.NodeType.Literal,{leave:function(e){e["x-verbatim-property"]={content:e.raw,precedence:i.Precedence.Primary}}}),t}},{key:"clone",value:function(t){return e.parentize(function e(t){if(null===t)return t;var r={};return Object.keys(t).filter(function(e){return"parentNode"!==e}).forEach(function(n){var a=t[n],i=void 0;i=null===a||a instanceof RegExp?a:Array.isArray(a)?a.map(e):"object"===(void 0===a?"undefined":o(a))?e(a):a,r[n]=i}),r}(t))}},{key:"convertCodeToStructure",value:function(t){var r=c.parseScript(t);return r=e.addXVerbatimPropertyToLiterals(r),r=e.parentize(r),r.body}},{key:"convertStructureToCode",value:function(e){var t="";return e.forEach(function(e){t+=i.generate(e,{sourceMapWithCode:!0}).code}),t}},{key:"getBlockStatementNodeByIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(l.Node.isNodeHasBlockStatement(e)){if(void 0===e.body[t])throw new ReferenceError("Wrong index `"+t+"`. Block-statement body length is `"+e.body.length+"`");return e.body[t]}throw new TypeError("The specified node have no a block-statement")}},{key:"getBlockScopesOfNode",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.parentNode;if(!n)throw new ReferenceError("`parentNode` property of given node is `undefined`");if(l.Node.isBlockStatementNode(n)){if(!n.parentNode)throw new ReferenceError("`parentNode` property of `parentNode` of given node is `undefined`");-1!==e.nodesWithBlockScope.indexOf(n.parentNode.type)&&r.push(n)}return l.Node.isProgramNode(n)?(r.push(n),r):e.getBlockScopesOfNode(n,r)}},{key:"getNodeBlockScopeDepth",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.parentNode;if(!n)throw new ReferenceError("`parentNode` property of given node is `undefined`");return l.Node.isProgramNode(n)?r:l.Node.isBlockStatementNode(t)&&-1!==e.nodesWithBlockScope.indexOf(n.type)?e.getNodeBlockScopeDepth(n,++r):e.getNodeBlockScopeDepth(n,r)}},{key:"getUnaryExpressionArgumentNode",value:function(t){return l.Node.isUnaryExpressionNode(t.argument)?e.getUnaryExpressionArgumentNode(t.argument):t.argument}},{key:"parentize",value:function(e){var t=!0;return s.traverse(e,{enter:function(e,r){var n=void 0;t?(e.type===u.NodeType.Program?n=e:(n=d.Nodes.getProgramNode([e]),n.parentNode=n),t=!1):n=r||e,e.parentNode=n,e.obfuscatedNode=!1}}),e}},{key:"typedReplace",value:function(t,r,n){e.typedTraverse(t,r,n,"replace")}},{key:"typedTraverse",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"traverse";s[n](e,{enter:function(e,n){if(e.type===t&&r.enter)return r.enter(e,n)},leave:function(e,n){if(e.type===t&&r.leave)return r.leave(e,n)}})}}]),e}();f.nodesWithBlockScope=[u.NodeType.ArrowFunctionExpression,u.NodeType.FunctionDeclaration,u.NodeType.FunctionExpression,u.NodeType.MethodDefinition,u.NodeType.Program],t.NodeUtils=f},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(10),i=function(){function e(){n(this,e)}return o(e,null,[{key:"isArrowFunctionExpressionNode",value:function(e){return e.type===a.NodeType.ArrowFunctionExpression}},{key:"isAssignmentPatternNode",value:function(e){return e.type===a.NodeType.AssignmentPattern}},{key:"isBlockStatementNode",value:function(e){return e.type===a.NodeType.BlockStatement}},{key:"isBreakStatementNode",value:function(e){return e.type===a.NodeType.BreakStatement}},{key:"isCallExpressionNode",value:function(e){return e.type===a.NodeType.CallExpression}},{key:"isCatchClauseNode",value:function(e){return e.type===a.NodeType.CatchClause}},{key:"isContinueStatementNode",value:function(e){return e.type===a.NodeType.ContinueStatement}},{key:"isExpressionStatementNode",value:function(e){return e.type===a.NodeType.ExpressionStatement}},{key:"isFunctionDeclarationNode",value:function(e){return e.type===a.NodeType.FunctionDeclaration}},{key:"isFunctionExpressionNode",value:function(e){return e.type===a.NodeType.FunctionExpression}},{key:"isIdentifierNode",value:function(e){return e.type===a.NodeType.Identifier}},{key:"isIfStatementNode",value:function(e){return e.type===a.NodeType.IfStatement}},{key:"isLabelIdentifierNode",value:function(t,r){var n=e.isLabeledStatementNode(r)&&r.label===t,o=e.isContinueStatementNode(r)&&r.label===t,a=e.isBreakStatementNode(r)&&r.label===t;return n||o||a}},{key:"isLabeledStatementNode",value:function(e){return e.type===a.NodeType.LabeledStatement}},{key:"isLiteralNode",value:function(e){return e.type===a.NodeType.Literal}},{key:"isMemberExpressionNode",value:function(e){return e.type===a.NodeType.MemberExpression}},{key:"isMethodDefinitionNode",value:function(e){return e.type===a.NodeType.MethodDefinition}},{key:"isNode",value:function(e){return e&&void 0!==!e.type}},{key:"isNodeHasBlockStatement",value:function(e){return Array.isArray(e.body)}},{key:"isObjectPatternNode",value:function(e){return e.type===a.NodeType.ObjectPattern}},{key:"isObjectExpressionNode",value:function(e){return e.type===a.NodeType.ObjectExpression}},{key:"isProgramNode",value:function(e){return e.type===a.NodeType.Program}},{key:"isPropertyNode",value:function(e){return e.type===a.NodeType.Property}},{key:"isReplaceableIdentifierNode",value:function(t,r){if(!e.isIdentifierNode(t))return!1;var n=e.isPropertyNode(r)&&r.key===t,o=e.isMemberExpressionNode(r)&&!1===r.computed&&r.property===t;return!n&&!o&&!e.isLabelIdentifierNode(t,r)}},{key:"isTemplateLiteralNode",value:function(e){return e.type===a.NodeType.TemplateLiteral}},{key:"isUnaryExpressionNode",value:function(e){return e.type===a.NodeType.UnaryExpression}},{key:"isUseStrictOperator",value:function(e){return e.type===a.NodeType.ExpressionStatement&&"use strict"===e.directive}},{key:"isVariableDeclarationNode",value:function(e){return e.type===a.NodeType.VariableDeclaration}},{key:"isVariableDeclaratorNode",value:function(e){return e.type===a.NodeType.VariableDeclarator}},{key:"isWhileStatementNode",value:function(e){return e.type===a.NodeType.WhileStatement}}]),e}();t.Node=i},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),c=r(1),s=r(4),u=function(){function e(t){n(this,e),this.options=t}return o(e,[{key:"getCode",value:function(){return this.cachedCode||(this.cachedCode=s.NodeUtils.convertStructureToCode(this.getNode())),this.cachedCode}},{key:"getNode",value:function(){return this.cachedNode||(this.cachedNode=this.getNodeStructure()),this.cachedNode}}]),e}();u=a.__decorate([i.injectable(),a.__param(0,i.inject(c.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object])],u),t.AbstractCustomNode=u},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(25),i=r(10),c=function(){function e(){n(this,e)}return o(e,null,[{key:"getProgramNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.Program,body:e,sourceType:"script",obfuscatedNode:!1}}},{key:"getArrayExpressionNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.ArrayExpression,elements:e}}},{key:"getAssignmentExpressionNode",value:function(e,t,r){return{type:i.NodeType.AssignmentExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getBinaryExpressionNode",value:function(e,t,r){return{type:i.NodeType.BinaryExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getBlockStatementNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.BlockStatement,body:e,obfuscatedNode:!1}}},{key:"getBreakStatement",value:function(e){var t={type:i.NodeType.BreakStatement,obfuscatedNode:!1};return e&&(t.label=e),t}},{key:"getCatchClauseNode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:i.NodeType.CatchClause,param:e.getIdentifierNode("err"),body:e.getBlockStatementNode(t),obfuscatedNode:!1}}},{key:"getCallExpressionNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{type:i.NodeType.CallExpression,callee:e,arguments:t,obfuscatedNode:!1}}},{key:"getContinueStatement",value:function(e){var t={type:i.NodeType.ContinueStatement,obfuscatedNode:!1};return e&&(t.label=e),t}},{key:"getExpressionStatementNode",value:function(e){return{type:i.NodeType.ExpressionStatement,expression:e,obfuscatedNode:!1}}},{key:"getFunctionDeclarationNode",value:function(t,r,n){return{type:i.NodeType.FunctionDeclaration,id:e.getIdentifierNode(t),params:r,body:n,generator:!1,obfuscatedNode:!1}}},{key:"getFunctionExpressionNode",value:function(e,t){return{type:i.NodeType.FunctionExpression,params:e,body:t,generator:!1,obfuscatedNode:!1}}},{key:"getIfStatementNode",value:function(e,t,r){return Object.assign({type:i.NodeType.IfStatement,test:e,consequent:t},r&&{alternate:r},{obfuscatedNode:!1})}},{key:"getIdentifierNode",value:function(e){return{type:i.NodeType.Identifier,name:e,obfuscatedNode:!1}}},{key:"getLabeledStatement",value:function(e,t){return{type:i.NodeType.LabeledStatement,label:e,body:t,obfuscatedNode:!1}}},{key:"getLiteralNode",value:function(e,t){return t=void 0!==t?t:"'"+e+"'",{type:i.NodeType.Literal,value:e,raw:t,"x-verbatim-property":{content:t,precedence:a.Precedence.Primary},obfuscatedNode:!1}}},{key:"getLogicalExpressionNode",value:function(e,t,r){return{type:i.NodeType.LogicalExpression,operator:e,left:t,right:r,obfuscatedNode:!1}}},{key:"getMemberExpressionNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:i.NodeType.MemberExpression,computed:r,object:e,property:t,obfuscatedNode:!1}}},{key:"getObjectExpressionNode",value:function(e){return{type:i.NodeType.ObjectExpression,properties:e,obfuscatedNode:!1}}},{key:"getPropertyNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:i.NodeType.Property,key:e,value:t,kind:"init",method:!1,shorthand:!1,computed:r,obfuscatedNode:!1}}},{key:"getUnaryExpressionNode",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:i.NodeType.UnaryExpression,operator:e,argument:t,prefix:r,obfuscatedNode:!1}}},{key:"getReturnStatementNode",value:function(e){return{type:i.NodeType.ReturnStatement,argument:e,obfuscatedNode:!1}}},{key:"getSwitchStatementNode",value:function(e,t){return{type:i.NodeType.SwitchStatement,discriminant:e,cases:t,obfuscatedNode:!1}}},{key:"getSwitchCaseNode",value:function(e,t){return{type:i.NodeType.SwitchCase,test:e,consequent:t,obfuscatedNode:!1}}},{key:"getUpdateExpressionNode",value:function(e,t){return{type:i.NodeType.UpdateExpression,operator:e,argument:t,prefix:!1,obfuscatedNode:!1}}},{key:"getVariableDeclarationNode",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:i.NodeType.VariableDeclaration,declarations:e,kind:t,obfuscatedNode:!1}}},{key:"getVariableDeclaratorNode",value:function(e,t){return{type:i.NodeType.VariableDeclarator,id:e,init:t,obfuscatedNode:!1}}},{key:"getWhileStatementNode",value:function(e,t){return{type:i.NodeType.WhileStatement,test:e,body:t,obfuscatedNode:!1}}}]),e}();t.Nodes=c},function(e,t){e.exports=require("estraverse")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),c=r(1),s=r(3),u=function(){function e(t,r){n(this,e),this.randomGenerator=t,this.options=r}return o(e,[{key:"initialize",value:function(){this.nodeIdentifier=this.randomGenerator.getRandomInteger(0,1e4)}}]),e}();a.__decorate([s.initializable(),a.__metadata("design:type",Number)],u.prototype,"nodeIdentifier",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],u.prototype,"initialize",null),u=a.__decorate([i.injectable(),a.__param(0,i.inject(c.ServiceIdentifiers.IRandomGenerator)),a.__param(1,i.inject(c.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],u),t.AbstractNodeTransformer=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.ArrayExpression="ArrayExpression",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassDeclaration="ClassDeclaration",e.ContinueStatement="ContinueStatement",e.ExpressionStatement="ExpressionStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",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.ReturnStatement="ReturnStatement",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",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){e.exports=require("string-template")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.BinaryExpressionFunctionNode=0]="BinaryExpressionFunctionNode",e[e.BlockStatementControlFlowFlatteningNode=1]="BlockStatementControlFlowFlatteningNode",e[e.CallExpressionControlFlowStorageCallNode=2]="CallExpressionControlFlowStorageCallNode",e[e.CallExpressionFunctionNode=3]="CallExpressionFunctionNode",e[e.ControlFlowStorageNode=4]="ControlFlowStorageNode",e[e.ExpressionWithOperatorControlFlowStorageCallNode=5]="ExpressionWithOperatorControlFlowStorageCallNode",e[e.LogicalExpressionFunctionNode=6]="LogicalExpressionFunctionNode",e[e.StringLiteralControlFlowStorageCallNode=7]="StringLiteralControlFlowStorageCallNode",e[e.StringLiteralNode=8]="StringLiteralNode"}(t.ControlFlowCustomNode||(t.ControlFlowCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.AfterObfuscation="afterObfuscation",e.BeforeObfuscation="beforeObfuscation"}(t.ObfuscationEvent||(t.ObfuscationEvent={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(53),i=function(){function e(){n(this,e)}return o(e,null,[{key:"decToHex",value:function(e){return e.toString(16)}},{key:"extractDomainFromUrl",value:function(e){var t=void 0;return t=e.indexOf("://")>-1||0===e.indexOf("//")?e.split("/")[2]:e.split("/")[0],t=t.split(":")[0]}},{key:"isCeilNumber",value:function(e){return e%1==0}},{key:"stringRotate",value:function(e,t){if(!e)throw new ReferenceError("Cannot rotate empty string.");for(var r=0;r<t;r++)e=e[e.length-1]+e.substring(0,e.length-1);return e}},{key:"stringToJSFuck",value:function(e){return Array.from(e).map(function(e){return a.JSFuck[e]||e}).join(" + ")}}]),e}();i.hexadecimalPrefix="0x",t.Utils=i},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0}),r(41);var a=r(1),i=r(16),c=r(149),s=function(){function e(){n(this,e)}return o(e,null,[{key:"obfuscate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new i.InversifyContainerFacade;r.load(e,t);var n=r.get(a.ServiceIdentifiers.IJavaScriptObfuscator),o=n.obfuscate(e);return r.unload(),o}},{key:"runCLI",value:function(e){var t=new c.JavaScriptObfuscatorCLI(e);t.initialize(),t.run()}}]),e}();t.JavaScriptObfuscator=s},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(0),i=r(1),c=r(42),s=r(47),u=r(89),l=r(94),d=r(108),f=r(113),p=r(120),y=r(124),m=r(126),b=r(128),g=r(130),v=r(131),h=r(133),_=r(147),N=r(148),O=function(){function e(){n(this,e),this.container=new a.Container}return o(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){this.container.bind(i.ServiceIdentifiers.ISourceCode).toDynamicValue(function(){return new _.SourceCode(e)}).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IOptions).toDynamicValue(function(){return new h.Options(t)}).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.ILogger).to(m.Logger).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IJavaScriptObfuscator).to(y.JavaScriptObfuscatorInternal).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IObfuscator).to(v.Obfuscator).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IObfuscationResult).to(g.ObfuscationResult).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.Factory__IObfuscationResult).toFactory(function(e){return function(t,r){var n=e.container.get(i.ServiceIdentifiers.IObfuscationResult);return n.initialize(t,r),n}}),this.container.bind(i.ServiceIdentifiers.ISourceMapCorrector).to(N.SourceMapCorrector).inSingletonScope(),this.container.bind(i.ServiceIdentifiers.IObfuscationEventEmitter).to(b.ObfuscationEventEmitter).inSingletonScope(),this.container.load(p.utilsModule),this.container.load(f.storagesModule),this.container.load(d.stackTraceAnalyzerModule),this.container.load(s.customNodesModule),this.container.load(l.nodeTransformersModule),this.container.load(c.controlFlowTransformersModule),this.container.load(u.obfuscatingTransformersModule)}},{key:"unload",value:function(){this.container.unbindAll()}}],[{key:"getFactory",value:function(e){return function(t){return function(r){return t.container.getNamed(e,r)}}}},{key:"getCacheFactory",value:function(e){return function(t){var r=new Map;return function(n){if(r.has(n))return r.get(n);var o=t.container.getNamed(e,n);return r.set(n,o),o}}}},{key:"getConstructorFactory",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(t){var n=new Map,o=[];return function(a){if(r.forEach(function(e,r){o[r]||(o[r]=t.container.get(e))}),n.has(a))return new(Function.prototype.bind.apply(n.get(a),[null].concat(o)));var i=t.container.getNamed(e,a);return n.set(a,i),new(Function.prototype.bind.apply(i,[null].concat(o)))}}}}]),e}();t.InversifyContainerFacade=O},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.ConsoleOutputDisableExpressionNode=0]="ConsoleOutputDisableExpressionNode",e[e.DebugProtectionFunctionCallNode=1]="DebugProtectionFunctionCallNode",e[e.DebugProtectionFunctionIntervalNode=2]="DebugProtectionFunctionIntervalNode",e[e.DebugProtectionFunctionNode=3]="DebugProtectionFunctionNode",e[e.DomainLockNode=4]="DomainLockNode",e[e.NodeCallsControllerFunctionNode=5]="NodeCallsControllerFunctionNode",e[e.SelfDefendingUnicodeNode=6]="SelfDefendingUnicodeNode",e[e.StringArrayCallsWrapper=7]="StringArrayCallsWrapper",e[e.StringArrayNode=8]="StringArrayNode",e[e.StringArrayRotateFunctionNode=9]="StringArrayRotateFunctionNode"}(t.CustomNode||(t.CustomNode={}))},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){o(this,e)}return a(e,null,[{key:"appendNode",value:function(t,r){e.validateBodyStatements(r)||(r=[]),r=e.parentizeBodyStatementsBeforeAppend(t,r),t.body=[].concat(n(t.body),n(r))}},{key:"appendNodeToOptimalBlockScope",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=void 0;a=t.length?e.getOptimalBlockScope(t,o):r,e.prependNode(a,n)}},{key:"getOptimalBlockScope",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=t[r];if(n<=0)throw new Error("Invalid `deep` argument value. Value should be bigger then 0.");return n>1&&o.stackTrace.length?e.getOptimalBlockScope(o.stackTrace,0,--n):o.callee}},{key:"insertNodeAtIndex",value:function(t,r,o){e.validateBodyStatements(r)||(r=[]),r=e.parentizeBodyStatementsBeforeAppend(t,r),t.body=[].concat(n(t.body.slice(0,o)),n(r),n(t.body.slice(o)))}},{key:"prependNode",value:function(t,r){e.validateBodyStatements(r)||(r=[]),r=e.parentizeBodyStatementsBeforeAppend(t,r),t.body=[].concat(n(r),n(t.body))}},{key:"parentizeBodyStatementsBeforeAppend",value:function(e,t){return t.forEach(function(t){t.parentNode=e}),t}},{key:"validateBodyStatements",value:function(e){return e.every(function(e){return!!e&&e.hasOwnProperty("type")})}}]),e}();t.NodeAppender=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.BaseIdentifierObfuscatingReplacer=0]="BaseIdentifierObfuscatingReplacer"}(t.IdentifierObfuscatingReplacer||(t.IdentifierObfuscatingReplacer={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),c=r(1),s=function(){function e(t,r){n(this,e),this.randomGenerator=t,this.options=r}return o(e,[{key:"getAppendEvent",value:function(){return this.appendEvent}},{key:"getCustomNodes",value:function(){return this.customNodes}},{key:"appendCustomNodeIfExist",value:function(e,t){var r=this.customNodes.get(e);r&&t(r)}},{key:"getRandomStackTraceIndex",value:function(e){return this.randomGenerator.getRandomInteger(0,Math.max(0,Math.round(e-1)))}}]),e}();s=a.__decorate([i.injectable(),a.__param(0,i.inject(c.ServiceIdentifiers.IRandomGenerator)),a.__param(1,i.inject(c.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],s),t.AbstractCustomNodeGroup=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22);t.NO_CUSTOM_NODES_PRESET=Object.freeze({compact:!0,controlFlowFlattening:!1,controlFlowFlatteningThreshold:0,deadCodeInjection:!1,deadCodeInjectionThreshold:0,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],log:!1,mangle:!1,renameGlobals:!1,reservedNames:[],rotateStringArray:!1,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:n.SourceMapMode.Separate,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Inline="inline",e.Separate="separate"}(t.SourceMapMode||(t.SourceMapMode={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=r(0),i=r(1),c=function e(t){n(this,e),this.options=t};c=o.__decorate([a.injectable(),o.__param(0,a.inject(i.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object])],c),t.AbstractObfuscatingReplacer=c},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),c=r(1),s=u=function(){function e(t,r,o){n(this,e),this.replacerDataByControlFlowStorageId=new Map,this.controlFlowCustomNodeFactory=t,this.randomGenerator=r,this.options=o}return o(e,[{key:"insertCustomNodeToControlFlowStorage",value:function(e,t,r,n){var o=this,a=t.getStorageId(),i=u.getStorageKeysByIdForCurrentStorage(this.replacerDataByControlFlowStorageId,a),c=i.get(r);if(this.randomGenerator.getMathRandom()<n&&c&&c.length)return this.randomGenerator.getRandomGenerator().pickone(c);var s=function e(r){var n=o.randomGenerator.getRandomString(r);return t.getStorage().has(n)?e(r):n}(5);return i.set(r,[s]),this.replacerDataByControlFlowStorageId.set(a,i),t.set(s,e),s}}],[{key:"getStorageKeysByIdForCurrentStorage",value:function(e,t){return e.has(t)?e.get(t):new Map}}]),e}();s=u=a.__decorate([i.injectable(),a.__param(0,i.inject(c.ServiceIdentifiers.Factory__IControlFlowCustomNode)),a.__param(1,i.inject(c.ServiceIdentifiers.IRandomGenerator)),a.__param(2,i.inject(c.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Function,Object,Object])],s),t.AbstractControlFlowReplacer=s;var u},function(e,t){e.exports=require("escodegen-wallaby")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Base64="base64",e.Rc4="rc4"}(t.StringArrayEncoding||(t.StringArrayEncoding={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=r(0),i=function e(){n(this,e)};i=o.__decorate([a.injectable()],i),t.AbstractCalleeDataExtractor=i},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r(0),c=r(1),s=r(118),u=r(119),l=r(3),d=r(14),f=p=function(){function e(t,r){n(this,e),this.randomVariableNameSet=new Set,this.sourceCode=t,this.options=r}return o(e,[{key:"initialize",value:function(){var e=this;this.seed=0!==this.options.seed?this.options.seed:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)}(0,999999999),this.randomGenerator=new u.Chance(function(){var t=s(e.sourceCode.getSourceCode());return e.seed+Number(t.replace(/\D/g,""))}())}},{key:"getMathRandom",value:function(){return this.getRandomInteger(0,99999)/1e5}},{key:"getRandomFloat",value:function(e,t){return this.getRandomGenerator().floating({min:e,max:t,fixed:7})}},{key:"getRandomGenerator",value:function(){return this.randomGenerator}},{key:"getRandomInteger",value:function(e,t){return this.getRandomGenerator().integer({min:e,max:t})}},{key:"getRandomString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.randomGeneratorPool;return this.getRandomGenerator().string({length:e,pool:t})}},{key:"getRandomVariableName",value:function(e){var t="_"+d.Utils.hexadecimalPrefix,r=this.getRandomInteger(1e4,99999999),n=d.Utils.decToHex(r),o=""+t+n.substr(0,e);return this.randomVariableNameSet.has(o)?this.getRandomVariableName(e):(this.randomVariableNameSet.add(o),o)}},{key:"getSeed",value:function(){return this.seed}}]),e}();f.randomGeneratorPool="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",f.randomGeneratorPoolNumbers="0123456789",f.randomGeneratorPoolHexadecimal="abcdef"+p.randomGeneratorPoolNumbers,a.__decorate([l.initializable(),a.__metadata("design:type",Object)],f.prototype,"randomGenerator",void 0),a.__decorate([l.initializable(),a.__metadata("design:type",Number)],f.prototype,"seed",void 0),a.__decorate([i.postConstruct(),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],f.prototype,"initialize",null),f=p=a.__decorate([i.injectable(),a.__param(0,i.inject(c.ServiceIdentifiers.ISourceCode)),a.__param(1,i.inject(c.ServiceIdentifiers.IOptions)),a.__metadata("design:paramtypes",[Object,Object])],f),t.RandomGenerator=f;var p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22);t.DEFAULT_PRESET=Object.freeze({compact:!0,config:"",controlFlowFlattening:!1,controlFlowFlatteningThreshold:.75,deadCodeInjection:!1,deadCodeInjectionThreshold:.4,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],log:!1,mangle:!1,renameGlobals:!1,reservedNames:[],rotateStringArray:!0,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:n.SourceMapMode.Separate,stringArray:!0,stringArrayEncoding:!1,stringArrayThreshold:.75,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.BinaryExpressionControlFlowReplacer=0]="BinaryExpressionControlFlowReplacer",e[e.CallExpressionControlFlowReplacer=1]="CallExpressionControlFlowReplacer",e[e.LogicalExpressionControlFlowReplacer=2]="LogicalExpressionControlFlowReplacer",e[e.StringLiteralControlFlowReplacer=3]="StringLiteralControlFlowReplacer"}(t.ControlFlowReplacer||(t.ControlFlowReplacer={}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),s=r(0),u=r(1),l=r(12),d=r(24),f=r(5),p=function(e){function t(e,r,a){n(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a));return i.replacerDataByControlFlowStorageId=new Map,i}return a(t,e),i(t,[{key:"getControlFlowStorageCallNode",value:function(e,t,r,n){var o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode);o.initialize(e,t,r,n);var a=o.getNode()[0];if(!a||!f.Node.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}}]),t}(d.AbstractControlFlowReplacer);p=c.__decorate([s.injectable(),c.__param(0,s.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,s.inject(u.ServiceIdentifiers.IRandomGenerator)),c.__param(2,s.inject(u.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],p),t.ExpressionWithOperatorControlFlowReplacer=p},function(e,t){e.exports=require("esprima")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.ConsoleOutputCustomNodeGroup=0]="ConsoleOutputCustomNodeGroup",e[e.DebugProtectionCustomNodeGroup=1]="DebugProtectionCustomNodeGroup",e[e.DomainLockCustomNodeGroup=2]="DomainLockCustomNodeGroup",e[e.SelfDefendingCustomNodeGroup=3]="SelfDefendingCustomNodeGroup",e[e.StringArrayCustomNodeGroup=4]="StringArrayCustomNodeGroup"}(t.CustomNodeGroup||(t.CustomNodeGroup={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.BooleanLiteralObfuscatingReplacer=0]="BooleanLiteralObfuscatingReplacer",e[e.NumberLiteralObfuscatingReplacer=1]="NumberLiteralObfuscatingReplacer",e[e.StringLiteralObfuscatingReplacer=2]="StringLiteralObfuscatingReplacer"}(t.LiteralObfuscatingReplacer||(t.LiteralObfuscatingReplacer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.BlockStatementControlFlowTransformer=0]="BlockStatementControlFlowTransformer",e[e.DeadCodeInjectionTransformer=1]="DeadCodeInjectionTransformer",e[e.FunctionControlFlowTransformer=2]="FunctionControlFlowTransformer",e[e.CatchClauseTransformer=3]="CatchClauseTransformer",e[e.FunctionDeclarationTransformer=4]="FunctionDeclarationTransformer",e[e.FunctionTransformer=5]="FunctionTransformer",e[e.LabeledStatementTransformer=6]="LabeledStatementTransformer",e[e.LiteralTransformer=7]="LiteralTransformer",e[e.MemberExpressionTransformer=8]="MemberExpressionTransformer",e[e.MethodDefinitionTransformer=9]="MethodDefinitionTransformer",e[e.ObjectExpressionTransformer=10]="ObjectExpressionTransformer",e[e.TemplateLiteralTransformer=11]="TemplateLiteralTransformer",e[e.VariableDeclarationTransformer=12]="VariableDeclarationTransformer"}(t.NodeTransformer||(t.NodeTransformer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.FunctionDeclarationCalleeDataExtractor=0]="FunctionDeclarationCalleeDataExtractor",e[e.FunctionExpressionCalleeDataExtractor=1]="FunctionExpressionCalleeDataExtractor",e[e.ObjectExpressionCalleeDataExtractor=2]="ObjectExpressionCalleeDataExtractor"}(t.CalleeDataExtractor||(t.CalleeDataExtractor={}))},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&c.return&&c.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),s=r(0),u=r(1),l=r(3),d=function(){function e(t){o(this,e),this.randomGenerator=t}return i(e,[{key:"initialize",value:function(){this.storage=new Map,this.storageId=this.randomGenerator.getRandomString(6)}},{key:"get",value:function(e){var t=this.storage.get(e);if(!t)throw new Error("No value found in map storage with key `"+e+"`");return t}},{key:"getKeyOf",value:function(e){var t=!0,r=!1,n=void 0;try{for(var o,i=this.storage[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var c=a(o.value,2),s=c[0];if(e===c[1])return s}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}return null}},{key:"getLength",value:function(){return this.storage.size}},{key:"getStorage",value:function(){return this.storage}},{key:"getStorageId",value:function(){return this.storageId}},{key:"mergeWith",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.storage=new Map([].concat(n(this.storage),n(e.getStorage()))),t&&(this.storageId=e.getStorageId())}},{key:"set",value:function(e,t){this.storage.set(e,t)}}]),e}();c.__decorate([l.initializable(),c.__metadata("design:type",String)],d.prototype,"storageId",void 0),c.__decorate([l.initializable(),c.__metadata("design:type",Map)],d.prototype,"storage",void 0),c.__decorate([s.postConstruct(),c.__metadata("design:type",Function),c.__metadata("design:paramtypes",[]),c.__metadata("design:returntype",void 0)],d.prototype,"initialize",null),d=c.__decorate([s.injectable(),c.__param(0,s.inject(u.ServiceIdentifiers.IRandomGenerator)),c.__metadata("design:paramtypes",[Object])],d),t.MapStorage=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.EmptySourceCode="Empty source code. Obfuscation canceled...",e.ObfuscationCompleted="Obfuscation completed. Total time: %s sec.",e.ObfuscationStarted="Obfuscation started...",e.RandomGeneratorSeed="Random generator seed: %s...",e.StageControlFlowFlattening="Stage: control flow flattening...",e.StageDeadCodeInjection="Stage: dead code injection...",e.StageObfuscation="Stage: obfuscation..."}(t.LoggingMessage||(t.LoggingMessage={}))},function(e,t){e.exports=require("path")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15);e.exports=n.JavaScriptObfuscator},function(e,t){e.exports=require("reflect-metadata")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(16),o=r(0),a=r(1),i=r(30),c=r(43),s=r(44),u=r(45),l=r(46);t.controlFlowTransformersModule=new o.ContainerModule(function(e){e(a.ServiceIdentifiers.IControlFlowReplacer).to(c.BinaryExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.BinaryExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(s.CallExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.CallExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(u.LogicalExpressionControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.LogicalExpressionControlFlowReplacer),e(a.ServiceIdentifiers.IControlFlowReplacer).to(l.StringLiteralControlFlowReplacer).whenTargetNamed(i.ControlFlowReplacer.StringLiteralControlFlowReplacer),e(a.ServiceIdentifiers.Factory__IControlFlowReplacer).toFactory(n.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.IControlFlowReplacer))})},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),s=r(0),u=r(1),l=r(12),d=r(31),f=p=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"replace",value:function(e,t,r){var n=e.operator,o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.BinaryExpressionFunctionNode);o.initialize(n);var a=this.insertCustomNodeToControlFlowStorage(o,r,n,p.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),a,e.left,e.right)}}]),t}(d.ExpressionWithOperatorControlFlowReplacer);f.usingExistingIdentifierChance=.5,f=p=c.__decorate([s.injectable(),c.__param(0,s.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,s.inject(u.ServiceIdentifiers.IRandomGenerator)),c.__param(2,s.inject(u.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],f),t.BinaryExpressionControlFlowReplacer=f;var p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),s=r(0),u=r(1),l=r(12),d=r(24),f=r(5),p=y=function(e){function t(e,r,a){return n(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,a))}return a(t,e),i(t,[{key:"replace",value:function(e,t,r){var n=e.callee;if(!f.Node.isIdentifierNode(n))return e;var o=String(e.arguments.length),a=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.CallExpressionFunctionNode),i=e.arguments;a.initialize(i);var c=this.insertCustomNodeToControlFlowStorage(a,r,o,y.usingExistingIdentifierChance);return this.getControlFlowStorageCallNode(r.getStorageId(),c,n,i)}},{key:"getControlFlowStorageCallNode",value:function(e,t,r,n){var o=this.controlFlowCustomNodeFactory(l.ControlFlowCustomNode.CallExpressionControlFlowStorageCallNode);o.initialize(e,t,r,n);var a=o.getNode()[0];if(!a||!f.Node.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}}]),t}(d.AbstractControlFlowReplacer);p.usingExistingIdentifierChance=.5,p=y=c.__decorate([s.injectable(),c.__param(0,s.inject(u.ServiceIdentifiers.Factory__IControlFlowCustomNode)),c.__param(1,s.inject(u.ServiceIdentifiers.IRandomGenerator)),c.__param(2,s.inject(u.ServiceIdentifiers.IOptions)),c.__metadata("design:paramtypes",[Function,Object,Object])],p),t.CallExpressionControlFlowReplacer=p;var y},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"functi