javascript-obfuscator
Version:
24 lines (21 loc) • 212 kB
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.
*/
require("source-map-support").install(),module.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=196)}([function(e,t){e.exports=require("inversify")},function(e,t){e.exports=require("tslib")},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__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.ILevelledTopologicalSorter="ILevelledTopologicalSorter",e.ILogger="ILogger",e.INodeGuard="INodeGuard",e.INodeTransformer="INodeTransformer",e.INodeTransformerNamesGroupsBuilder="INodeTransformerNamesGroupsBuilder",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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(13);class n{static isArrayPatternNode(e){return e.type===o.NodeType.ArrayPattern}static isArrowFunctionExpressionNode(e){return e.type===o.NodeType.ArrowFunctionExpression}static isAssignmentPatternNode(e){return e.type===o.NodeType.AssignmentPattern}static isAwaitExpressionNode(e){return e.type===o.NodeType.AwaitExpression}static isBlockStatementNode(e){return e.type===o.NodeType.BlockStatement}static isBreakStatementNode(e){return e.type===o.NodeType.BreakStatement}static isCallExpressionNode(e){return e.type===o.NodeType.CallExpression}static isCatchClauseNode(e){return e.type===o.NodeType.CatchClause}static isClassDeclarationNode(e){return e.type===o.NodeType.ClassDeclaration}static isContinueStatementNode(e){return e.type===o.NodeType.ContinueStatement}static isExportNamedDeclarationNode(e){return e.type===o.NodeType.ExportNamedDeclaration}static isExpressionStatementNode(e){return e.type===o.NodeType.ExpressionStatement}static isFunctionNode(e){return n.isFunctionDeclarationNode(e)||n.isFunctionExpressionNode(e)||n.isArrowFunctionExpressionNode(e)}static isFunctionDeclarationNode(e){return e.type===o.NodeType.FunctionDeclaration}static isFunctionExpressionNode(e){return e.type===o.NodeType.FunctionExpression}static isIdentifierNode(e){return e.type===o.NodeType.Identifier}static isImportDeclarationNode(e){return e.type===o.NodeType.ImportDeclaration}static isImportSpecifierNode(e){return e.type===o.NodeType.ImportSpecifier}static isLabelIdentifierNode(e,t){const r=n.isLabeledStatementNode(t)&&t.label===e,o=n.isContinueStatementNode(t)&&t.label===e,a=n.isBreakStatementNode(t)&&t.label===e;return r||o||a}static isLabeledStatementNode(e){return e.type===o.NodeType.LabeledStatement}static isLiteralNode(e){return e.type===o.NodeType.Literal}static isMemberExpressionNode(e){return e.type===o.NodeType.MemberExpression}static isMethodDefinitionNode(e){return e.type===o.NodeType.MethodDefinition}static isNode(e){return e&&void 0!==!e.type}static isNodeWithLexicalScope(e){return n.isProgramNode(e)||n.isFunctionNode(e)}static isNodeWithBlockLexicalScope(e){return n.isNodeWithLexicalScope(e)||n.isBlockStatementNode(e)}static isNodeWithLexicalScopeStatements(e,t){return n.isProgramNode(e)||n.isBlockStatementNode(e)&&n.nodesWithLexicalStatements.includes(t.type)}static isNodeWithStatements(e){return n.isProgramNode(e)||n.isBlockStatementNode(e)||n.isSwitchCaseNode(e)}static isNodeWithComments(e){return Boolean(e.leadingComments)||Boolean(e.trailingComments)}static isObjectPatternNode(e){return e.type===o.NodeType.ObjectPattern}static isObjectExpressionNode(e){return e.type===o.NodeType.ObjectExpression}static isProgramNode(e){return e.type===o.NodeType.Program}static isPropertyNode(e){return e.type===o.NodeType.Property}static parentNodeIsPropertyNode(e,t){return n.isPropertyNode(t)&&!t.computed&&t.key===e}static parentNodeIsMemberExpressionNode(e,t){return n.isMemberExpressionNode(t)&&!t.computed&&t.property===e}static parentNodeIsMethodDefinitionNode(e,t){return n.isMethodDefinitionNode(t)&&!t.computed}static isReplaceableIdentifierNode(e,t){return n.isIdentifierNode(e)&&!n.parentNodeIsPropertyNode(e,t)&&!n.parentNodeIsMemberExpressionNode(e,t)&&!n.parentNodeIsMethodDefinitionNode(e,t)&&!n.isLabelIdentifierNode(e,t)}static isRestElementNode(e){return e.type===o.NodeType.RestElement}static isReturnStatementNode(e){return e.type===o.NodeType.ReturnStatement}static isSuperNode(e){return e.type===o.NodeType.Super}static isSwitchCaseNode(e){return e.type===o.NodeType.SwitchCase}static isTaggedTemplateExpressionNode(e){return e.type===o.NodeType.TaggedTemplateExpression}static isTemplateLiteralNode(e){return e.type===o.NodeType.TemplateLiteral}static isUnaryExpressionNode(e){return e.type===o.NodeType.UnaryExpression}static isUseStrictOperator(e){return e.type===o.NodeType.ExpressionStatement&&"use strict"===e.directive}static isVariableDeclarationNode(e){return e.type===o.NodeType.VariableDeclaration}static isVariableDeclaratorNode(e){return e.type===o.NodeType.VariableDeclarator}static isWhileStatementNode(e){return e.type===o.NodeType.WhileStatement}}t.NodeGuards=n,n.nodesWithLexicalStatements=[o.NodeType.ArrowFunctionExpression,o.NodeType.FunctionDeclaration,o.NodeType.FunctionExpression,o.NodeType.MethodDefinition]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o={configurable:!0,enumerable:!0},n="_initialized",a="_initializablePropertiesSet",i="_wrappedMethodsSet",s="constructor";function c(e,t,r){Reflect.hasMetadata(e,r)||Reflect.defineMetadata(e,t,r)}t.initializable=function(e="initialize"){const t=Object.keys(this)[0];return(r,d)=>{const l=r[e];if(!l||"function"!=typeof l)throw new Error(`\`${e}\` method with initialization logic not `+`found. \`@${t}\` decorator requires \`${e}\` method`);return c(n,!1,r),c(a,new Set,r),c(i,new Set,r),function(e,t){const r=Object.getOwnPropertyNames(e),c=[t,s];r.forEach(r=>{const s=Reflect.getMetadata(a,e),d=Reflect.getMetadata(i,e);if(c.includes(r)||s.has(r)||d.has(r))return;if("function"!=typeof e[r])return;const l=Object.getOwnPropertyDescriptor(e,r)||o,u=l.value;Object.defineProperty(e,r,Object.assign(Object.assign({},l),{value:function(){if(!Reflect.getMetadata(n,this))throw new Error(`Class should be initialized with \`${t}()\` method`);return u.apply(this,arguments)}})),d.add(r)})}(r,e),function(e,t,r){const a=Object.getOwnPropertyDescriptor(e,t)||o,i=a.value;Object.defineProperty(e,t,Object.assign(Object.assign({},a),{value:function(){Reflect.defineMetadata(n,!0,this);const e=i.apply(this,arguments);return this[r],e}}))}(r,e,d),function(e,t){Reflect.getMetadata(a,e).add(t);const r=`_${t.toString()}`,n=Object.getOwnPropertyDescriptor(e,r)||o;return Object.defineProperty(e,t,Object.assign(Object.assign({},n),{get:function(){if(void 0===this[r])throw new Error(`Property \`${t.toString()}\` is not initialized! Initialize it first!`);return this[r]},set:function(e){this[r]=e}})),n}(r,d)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=o.__importStar(r(35)),a=o.__importStar(r(42)),i=o.__importStar(r(10)),s=r(3),c=r(11);class d{static addXVerbatimPropertyTo(e){return e["x-verbatim-property"]={content:e.raw,precedence:n.Precedence.Primary},e}static clone(e){return d.parentizeAst(d.cloneRecursive(e))}static convertCodeToStructure(e){const t=a.parse(e,{sourceType:"script"});return i.replace(t,{enter:(e,t)=>(d.parentizeNode(e,t),s.NodeGuards.isLiteralNode(e)&&d.addXVerbatimPropertyTo(e),c.NodeMetadata.set(e,{ignoredNode:!1}),e)}),t.body}static convertStructureToCode(e){return e.reduce((e,t)=>e+n.generate(t,{sourceMapWithCode:!0}).code,"")}static getUnaryExpressionArgumentNode(e){return s.NodeGuards.isUnaryExpressionNode(e.argument)?d.getUnaryExpressionArgumentNode(e.argument):e.argument}static parentizeAst(e){return i.replace(e,{enter:d.parentizeNode}),e}static parentizeNode(e,t){return e.parentNode=t||e,e}static cloneRecursive(e){if(null===e)return e;const t={};return Object.keys(e).forEach(r=>{if("parentNode"===r)return;const o=e[r];let n;n=null===o||o instanceof RegExp?o:Array.isArray(o)?o.map(d.cloneRecursive):"object"==typeof o?d.cloneRecursive(o):o,t[r]=n}),t}}t.NodeUtils=d},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=r(2);let i=class{constructor(e,t){this.randomGenerator=e,this.options=t}};i=o.__decorate([n.injectable(),o.__param(0,n.inject(a.ServiceIdentifiers.IRandomGenerator)),o.__param(1,n.inject(a.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object,Object])],i),t.AbstractNodeTransformer=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1).__importStar(r(35)),n=r(13);class a{static programNode(e=[]){return{type:n.NodeType.Program,body:e,sourceType:"script",metadata:{ignoredNode:!1}}}static arrayExpressionNode(e=[]){return{type:n.NodeType.ArrayExpression,elements:e,metadata:{ignoredNode:!1}}}static assignmentExpressionNode(e,t,r){return{type:n.NodeType.AssignmentExpression,operator:e,left:t,right:r,metadata:{ignoredNode:!1}}}static binaryExpressionNode(e,t,r){return{type:n.NodeType.BinaryExpression,operator:e,left:t,right:r,metadata:{ignoredNode:!1}}}static blockStatementNode(e=[]){return{type:n.NodeType.BlockStatement,body:e,metadata:{ignoredNode:!1}}}static breakStatement(e){return{type:n.NodeType.BreakStatement,label:e,metadata:{ignoredNode:!1}}}static callExpressionNode(e,t=[]){return{type:n.NodeType.CallExpression,callee:e,arguments:t,metadata:{ignoredNode:!1}}}static continueStatement(e){return{type:n.NodeType.ContinueStatement,label:e,metadata:{ignoredNode:!1}}}static expressionStatementNode(e){return{type:n.NodeType.ExpressionStatement,expression:e,metadata:{ignoredNode:!1}}}static functionDeclarationNode(e,t,r){return{type:n.NodeType.FunctionDeclaration,id:a.identifierNode(e),params:t,body:r,generator:!1,metadata:{ignoredNode:!1}}}static functionExpressionNode(e,t){return{type:n.NodeType.FunctionExpression,params:e,body:t,generator:!1,metadata:{ignoredNode:!1}}}static ifStatementNode(e,t,r){return Object.assign(Object.assign({type:n.NodeType.IfStatement,test:e,consequent:t},r&&{alternate:r}),{metadata:{ignoredNode:!1}})}static identifierNode(e){return{type:n.NodeType.Identifier,name:e,metadata:{ignoredNode:!1}}}static literalNode(e,t){return t=void 0!==t?t:`'${e}'`,{type:n.NodeType.Literal,value:e,raw:t,"x-verbatim-property":{content:t,precedence:o.Precedence.Primary},metadata:{ignoredNode:!1}}}static logicalExpressionNode(e,t,r){return{type:n.NodeType.LogicalExpression,operator:e,left:t,right:r,metadata:{ignoredNode:!1}}}static memberExpressionNode(e,t,r=!1){return{type:n.NodeType.MemberExpression,computed:r,object:e,property:t,metadata:{ignoredNode:!1}}}static methodDefinitionNode(e,t,r,o){return{type:n.NodeType.MethodDefinition,key:e,value:t,kind:r,computed:o,static:!1,metadata:{ignoredNode:!1}}}static objectExpressionNode(e){return{type:n.NodeType.ObjectExpression,properties:e,metadata:{ignoredNode:!1}}}static propertyNode(e,t,r=!1){return{type:n.NodeType.Property,key:e,value:t,kind:"init",method:!1,shorthand:!1,computed:r,metadata:{ignoredNode:!1}}}static returnStatementNode(e){return{type:n.NodeType.ReturnStatement,argument:e,metadata:{ignoredNode:!1}}}static switchStatementNode(e,t){return{type:n.NodeType.SwitchStatement,discriminant:e,cases:t,metadata:{ignoredNode:!1}}}static switchCaseNode(e,t){return{type:n.NodeType.SwitchCase,test:e,consequent:t,metadata:{ignoredNode:!1}}}static unaryExpressionNode(e,t,r=!0){return{type:n.NodeType.UnaryExpression,operator:e,argument:t,prefix:r,metadata:{ignoredNode:!1}}}static updateExpressionNode(e,t){return{type:n.NodeType.UpdateExpression,operator:e,argument:t,prefix:!1,metadata:{ignoredNode:!1}}}static variableDeclarationNode(e=[],t="var"){return{type:n.NodeType.VariableDeclaration,declarations:e,kind:t,metadata:{ignoredNode:!1}}}static variableDeclaratorNode(e,t){return{type:n.NodeType.VariableDeclarator,id:e,init:t,metadata:{ignoredNode:!1}}}static whileStatementNode(e,t){return{type:n.NodeType.WhileStatement,test:e,body:t,metadata:{ignoredNode:!1}}}}t.NodeFactory=a},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=r(2),s=r(85),c=r(86);let d=o=class{constructor(e,t,r){this.cachedNode=null,this.identifierNamesGenerator=e(r),this.randomGenerator=t,this.options=r}getNode(){return this.cachedNode||(this.cachedNode=this.getNodeStructure()),this.cachedNode}getGlobalVariableTemplate(){return this.randomGenerator.getRandomGenerator().pickone(o.globalVariableTemplateFunctions)}};d.globalVariableTemplateFunctions=[s.GlobalVariableTemplate1(),c.GlobalVariableTemplate2()],d=o=n.__decorate([a.injectable(),n.__param(0,a.inject(i.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),n.__param(1,a.inject(i.ServiceIdentifiers.IRandomGenerator)),n.__param(2,a.inject(i.ServiceIdentifiers.IOptions)),n.__metadata("design:paramtypes",[Function,Object,Object])],d),t.AbstractCustomNode=d},function(e,t){e.exports=require("estraverse")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{static set(e,t){e.metadata=Object.assign(e.metadata||{},t)}static get(e,t){return void 0!==e.metadata?e.metadata[t]:void 0}static isIgnoredNode(e){return!0===o.get(e,"ignoredNode")}static isRenamedIdentifier(e){return!0===o.get(e,"renamedIdentifier")}static isReplacedLiteral(e){return!0===o.get(e,"replacedLiteral")}}t.NodeMetadata=o},function(e,t){e.exports=require("string-template")},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BaseIdentifierObfuscatingReplacer="BaseIdentifierObfuscatingReplacer"}(t.IdentifierObfuscatingReplacer||(t.IdentifierObfuscatingReplacer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(0),n=r(2),a=r(56),i=r(61),s=r(69),c=r(78),d=r(124),l=r(125),u=r(129),p=r(130),m=r(144),f=r(161),g=r(171),N=r(176),_=r(184),h=r(54),b=r(187),y=r(189),S=r(190),I=r(191);t.InversifyContainerFacade=class{constructor(){this.container=new o.Container}static getFactory(e){return t=>r=>t.container.getNamed(e,r)}static getCacheFactory(e){return t=>{const r=new Map;return o=>{if(r.has(o))return r.get(o);const n=t.container.getNamed(e,o);return r.set(o,n),n}}}static getConstructorFactory(e,...t){return r=>{const o=new Map,n=[];return a=>{if(t.forEach((e,t)=>{n[t]||(n[t]=r.container.get(e))}),o.has(a))return new(o.get(a))(...n);const i=r.container.getNamed(e,a);return o.set(a,i),new i(...n)}}}get(e){return this.container.get(e)}getNamed(e,t){return this.container.getNamed(e,t)}load(e,t,r){this.container.bind(n.ServiceIdentifiers.ISourceCode).toDynamicValue(()=>new S.SourceCode(e,t)).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.TInputOptions).toDynamicValue(()=>r).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.ILogger).to(h.Logger).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.IJavaScriptObfuscator).to(_.JavaScriptObfuscator).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.ITransformersRunner).to(I.TransformersRunner).inSingletonScope(),this.container.bind(n.ServiceIdentifiers.IObfuscatedCode).to(y.ObfuscatedCode),this.container.bind(n.ServiceIdentifiers.Factory__IObfuscatedCode).toFactory(e=>(t,r)=>{const o=e.container.get(n.ServiceIdentifiers.IObfuscatedCode);return o.initialize(t,r),o}),this.container.bind(n.ServiceIdentifiers.IObfuscationEventEmitter).to(b.ObfuscationEventEmitter).inSingletonScope(),this.container.load(a.analyzersModule),this.container.load(i.controlFlowTransformersModule),this.container.load(s.convertingTransformersModule),this.container.load(c.customNodesModule),this.container.load(d.finalizingTransformersModule),this.container.load(l.generatorsModule),this.container.load(u.nodeTransformersModule),this.container.load(p.obfuscatingTransformersModule),this.container.load(m.optionsModule),this.container.load(f.preparingTransformersModule),this.container.load(g.storagesModule),this.container.load(N.utilsModule)}unload(){this.container.unbindAll()}}},function(e,t,r){"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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Browser="browser",e.BrowserNoEval="browser-no-eval",e.Node="node"}(t.ObfuscationTarget||(t.ObfuscationTarget={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(3);class n{static getParentNodeWithStatements(e){return n.getParentNodesWithStatementsRecursive(e,1)[0]}static getParentNodesWithStatements(e){return n.getParentNodesWithStatementsRecursive(e)}static getNextSiblingStatement(e){return n.getSiblingStatementByOffset(e,1)}static getPreviousSiblingStatement(e){return n.getSiblingStatementByOffset(e,-1)}static getRootStatementOfNode(e){if(o.NodeGuards.isProgramNode(e))throw new Error("Unable to find root statement for `Program` node");const t=e.parentNode;if(!t)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithStatements(t)?e:n.getRootStatementOfNode(t)}static getScopeOfNode(e){const t=e.parentNode;if(!t)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithStatements(t)?t:n.getScopeOfNode(t)}static getParentNodesWithStatementsRecursive(e,t=1/0,r=[],a=0){if(r.length>=t)return r;const i=e.parentNode;if(!i)throw new ReferenceError("`parentNode` property of given node is `undefined`");return(o.NodeGuards.isProgramNode(e)||o.NodeGuards.isNodeWithLexicalScopeStatements(e,i)&&a>0)&&r.push(e),e!==i?n.getParentNodesWithStatementsRecursive(i,t,r,++a):r}static getSiblingStatementByOffset(e,t){const r=n.getScopeOfNode(e),a=o.NodeGuards.isSwitchCaseNode(r)?r.consequent:r.body,i=a.indexOf(e);return a[i+t]||null}}t.NodeStatementUtils=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BlockStatementControlFlowTransformer="BlockStatementControlFlowTransformer",e.ClassDeclarationTransformer="ClassDeclarationTransformer",e.CommentsTransformer="CommentsTransformer",e.CustomNodesTransformer="CustomNodesTransformer",e.DeadCodeInjectionTransformer="DeadCodeInjectionTransformer",e.EvalCallExpressionTransformer="EvalCallExpressionTransformer",e.FunctionControlFlowTransformer="FunctionControlFlowTransformer",e.CatchClauseTransformer="CatchClauseTransformer",e.FunctionDeclarationTransformer="FunctionDeclarationTransformer",e.FunctionTransformer="FunctionTransformer",e.ImportDeclarationTransformer="ImportDeclarationTransformer",e.LabeledStatementTransformer="LabeledStatementTransformer",e.LiteralTransformer="LiteralTransformer",e.MemberExpressionTransformer="MemberExpressionTransformer",e.MetadataTransformer="MetadataTransformer",e.MethodDefinitionTransformer="MethodDefinitionTransformer",e.ObfuscatingGuardsTransformer="ObfuscatingGuardsTransformer",e.ObjectExpressionKeysTransformer="ObjectExpressionKeysTransformer",e.ObjectExpressionTransformer="ObjectExpressionTransformer",e.ParentificationTransformer="ParentificationTransformer",e.SplitStringTransformer="SplitStringTransformer",e.TemplateLiteralTransformer="TemplateLiteralTransformer",e.VariableDeclarationTransformer="VariableDeclarationTransformer",e.VariablePreserveTransformer="VariablePreserveTransformer"}(t.NodeTransformer||(t.NodeTransformer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(3);class n{static append(e,t){t=n.parentizeScopeStatementsBeforeAppend(e,t),n.setScopeStatements(e,[...n.getScopeStatements(e),...t])}static appendToOptimalBlockScope(e,t,r,o=0){const a=e.length?n.getOptimalBlockScope(e,o):t;n.prepend(a,r)}static getOptimalBlockScope(e,t,r=1/0){const o=e[t];if(r<=0)throw new Error("Invalid `deep` argument value. Value should be bigger then 0.");return r>1&&o.stackTrace.length?n.getOptimalBlockScope(o.stackTrace,0,--r):o.callee}static insertAfter(e,t,r){const o=n.getScopeStatements(e).indexOf(r);n.insertAtIndex(e,t,o+1)}static insertAtIndex(e,t,r){t=n.parentizeScopeStatementsBeforeAppend(e,t),n.setScopeStatements(e,[...n.getScopeStatements(e).slice(0,r),...t,...n.getScopeStatements(e).slice(r)])}static prepend(e,t){t=n.parentizeScopeStatementsBeforeAppend(e,t),n.setScopeStatements(e,[...t,...n.getScopeStatements(e)])}static getScopeStatements(e){return o.NodeGuards.isSwitchCaseNode(e)?e.consequent:e.body}static parentizeScopeStatementsBeforeAppend(e,t){return t.forEach(t=>{t.parentNode=e}),t}static setScopeStatements(e,t){o.NodeGuards.isSwitchCaseNode(e)?e.consequent=t:e.body=t}}t.NodeAppender=n},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";Object.defineProperty(t,"__esModule",{value:!0});const o=r(3);class n{static getLexicalScope(e){return n.getLexicalScopesRecursive(e,1)[0]}static getLexicalScopes(e){return n.getLexicalScopesRecursive(e)}static getLexicalScopesRecursive(e,t=1/0,r=[],a=0){if(r.length>=t)return r;const i=e.parentNode;if(!i)throw new ReferenceError("`parentNode` property of given node is `undefined`");return o.NodeGuards.isNodeWithLexicalScope(e)&&r.push(e),e!==i?n.getLexicalScopesRecursive(i,t,r,++a):r}}t.NodeLexicalScopeUtils=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ConsoleOutputDisableExpressionNode="ConsoleOutputDisableExpressionNode",e.DebugProtectionFunctionCallNode="DebugProtectionFunctionCallNode",e.DebugProtectionFunctionIntervalNode="DebugProtectionFunctionIntervalNode",e.DebugProtectionFunctionNode="DebugProtectionFunctionNode",e.DomainLockNode="DomainLockNode",e.NodeCallsControllerFunctionNode="NodeCallsControllerFunctionNode",e.SelfDefendingUnicodeNode="SelfDefendingUnicodeNode",e.StringArrayCallsWrapper="StringArrayCallsWrapper",e.StringArrayNode="StringArrayNode",e.StringArrayRotateFunctionNode="StringArrayRotateFunctionNode"}(t.CustomNode||(t.CustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(53);const o=r(2),n=r(15);class a{static obfuscate(e,t={}){const r=new n.InversifyContainerFacade;r.load(e,"",t);const a=r.get(o.ServiceIdentifiers.IJavaScriptObfuscator).obfuscate(e);return r.unload(),a}}t.JavaScriptObfuscator=a,a.version="0.20.0"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=r(2);let i=class{constructor(e,t,r){this.identifierNamesGenerator=e(r),this.randomGenerator=t,this.options=r}getAppendEvent(){return this.appendEvent}getCustomNodes(){return this.customNodes}appendCustomNodeIfExist(e,t){const r=this.customNodes.get(e);r&&t(r)}getRandomStackTraceIndex(e){return this.randomGenerator.getRandomInteger(0,Math.max(0,Math.round(e-1)))}};i=o.__decorate([n.injectable(),o.__param(0,n.inject(a.ServiceIdentifiers.Factory__IIdentifierNamesGenerator)),o.__param(1,n.inject(a.ServiceIdentifiers.IRandomGenerator)),o.__param(2,n.inject(a.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Function,Object,Object])],i),t.AbstractCustomNodeGroup=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{static extractDomainFrom(e){let t;return t=(t=e.indexOf("://")>-1||0===e.indexOf("//")?e.split("/")[2]:e.split("/")[0]).split(":")[0]}}t.Utils=o,o.hexadecimalPrefix="0x"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.DictionaryIdentifierNamesGenerator="dictionary",e.HexadecimalIdentifierNamesGenerator="hexadecimal",e.MangledIdentifierNamesGenerator="mangled"}(t.IdentifierNamesGenerator||(t.IdentifierNamesGenerator={}))},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";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Base64="base64",e.Rc4="rc4"}(t.StringArrayEncoding||(t.StringArrayEncoding={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(27),n=r(17),a=r(28);t.NO_ADDITIONAL_NODES_PRESET=Object.freeze({compact:!0,controlFlowFlattening:!1,controlFlowFlatteningThreshold:0,deadCodeInjection:!1,deadCodeInjectionThreshold:0,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],exclude:[],identifierNamesGenerator:o.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",identifiersDictionary:[],inputFileName:"",log:!1,renameGlobals:!1,reservedNames:[],reservedStrings:[],rotateStringArray:!1,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:a.SourceMapMode.Separate,splitStrings:!1,splitStringsChunkLength:0,stringArray:!1,stringArrayEncoding:!1,stringArrayThreshold:0,target:n.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.NumberUtils=class{static toHex(e){return e.toString(16)}static isCeil(e){return e%1==0}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=r(2);let i=class{constructor(e){this.options=e}};i=o.__decorate([n.injectable(),o.__param(0,n.inject(a.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object])],i),t.AbstractObfuscatingReplacer=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0);let a=class{};a=o.__decorate([n.injectable()],a),t.AbstractCalleeDataExtractor=a},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=r(2);let s=o=class{constructor(e,t,r){this.replacerDataByControlFlowStorageId=new Map,this.controlFlowCustomNodeFactory=e,this.randomGenerator=t,this.options=r}static getStorageKeysByIdForCurrentStorage(e,t){let r;return r=e.has(t)?e.get(t):new Map}insertCustomNodeToControlFlowStorage(e,t,r,n){const a=t.getStorageId(),i=o.getStorageKeysByIdForCurrentStorage(this.replacerDataByControlFlowStorageId,a),s=i.get(r);if(this.randomGenerator.getMathRandom()<n&&s&&s.length)return this.randomGenerator.getRandomGenerator().pickone(s);const c=e=>{const r=this.randomGenerator.getRandomString(e);return t.getStorage().has(r)?c(e):r},d=c(5);return i.set(r,[d]),this.replacerDataByControlFlowStorageId.set(a,i),t.set(d,e),d}};s=o=n.__decorate([a.injectable(),n.__param(0,a.inject(i.ServiceIdentifiers.Factory__IControlFlowCustomNode)),n.__param(1,a.inject(i.ServiceIdentifiers.IRandomGenerator)),n.__param(2,a.inject(i.ServiceIdentifiers.IOptions)),n.__metadata("design:paramtypes",[Function,Object,Object])],s),t.AbstractControlFlowReplacer=s},function(e,t){e.exports=require("escodegen-wallaby")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariableNoEvalTemplate=function(){return"\n var that = (typeof window !== 'undefined'\n ? window\n : (typeof process === 'object' &&\n typeof require === 'function' &&\n typeof global === 'object')\n ? global\n : this);\n "}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=r(2);let i=class{constructor(e,t){this.preservedNames=[],this.randomGenerator=e,this.options=t}preserveName(e){this.preservedNames.push(e)}isValidIdentifierName(e){return this.notReservedName(e)&&!this.preservedNames.includes(e)}notReservedName(e){return!this.options.reservedNames.length||!this.options.reservedNames.some(t=>null!==new RegExp(t,"g").exec(e))}};i=o.__decorate([n.injectable(),o.__param(0,n.inject(a.ServiceIdentifiers.IRandomGenerator)),o.__param(1,n.inject(a.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object,Object])],i),t.AbstractIdentifierNamesGenerator=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(27),n=r(17),a=r(28);t.DEFAULT_PRESET=Object.freeze({compact:!0,config:"",controlFlowFlattening:!1,controlFlowFlatteningThreshold:.75,deadCodeInjection:!1,deadCodeInjectionThreshold:.4,debugProtection:!1,debugProtectionInterval:!1,disableConsoleOutput:!1,domainLock:[],exclude:[],identifierNamesGenerator:o.IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,identifiersPrefix:"",identifiersDictionary:[],inputFileName:"",log:!1,renameGlobals:!1,reservedNames:[],reservedStrings:[],rotateStringArray:!0,seed:0,selfDefending:!1,sourceMap:!1,sourceMapBaseUrl:"",sourceMapFileName:"",sourceMapMode:a.SourceMapMode.Separate,splitStrings:!1,splitStringsChunkLength:10,stringArray:!0,stringArrayEncoding:!1,stringArrayThreshold:.75,target:n.ObfuscationTarget.Browser,transformObjectKeys:!1,unicodeEscapeSequence:!1})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.FunctionDeclarationCalleeDataExtractor="FunctionDeclarationCalleeDataExtractor",e.FunctionExpressionCalleeDataExtractor="FunctionExpressionCalleeDataExtractor",e.ObjectExpressionCalleeDataExtractor="ObjectExpressionCalleeDataExtractor"}(t.CalleeDataExtractor||(t.CalleeDataExtractor={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BinaryExpressionControlFlowReplacer="BinaryExpressionControlFlowReplacer",e.CallExpressionControlFlowReplacer="CallExpressionControlFlowReplacer",e.LogicalExpressionControlFlowReplacer="LogicalExpressionControlFlowReplacer",e.StringLiteralControlFlowReplacer="StringLiteralControlFlowReplacer"}(t.ControlFlowReplacer||(t.ControlFlowReplacer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=r(2),i=r(16),s=r(34),c=r(3);let d=class extends s.AbstractControlFlowReplacer{constructor(e,t,r){super(e,t,r)}getControlFlowStorageCallNode(e,t,r,o){const n=this.controlFlowCustomNodeFactory(i.ControlFlowCustomNode.ExpressionWithOperatorControlFlowStorageCallNode);n.initialize(e,t,r,o);const a=n.getNode()[0];if(!a||!c.NodeGuards.isExpressionStatementNode(a))throw new Error("`controlFlowStorageCallCustomNode.getNode()[0]` should returns array with `ExpressionStatement` node");return a.expression}};d=o.__decorate([n.injectable(),o.__param(0,n.inject(a.ServiceIdentifiers.Factory__IControlFlowCustomNode)),o.__param(1,n.inject(a.ServiceIdentifiers.IRandomGenerator)),o.__param(2,n.inject(a.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Function,Object,Object])],d),t.ExpressionWithOperatorControlFlowReplacer=d},function(e,t){e.exports=require("espree")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BlockStatementDeadCodeInjectionNode="BlockStatementDeadCodeInjectionNode"}(t.DeadCodeInjectionCustomNode||(t.DeadCodeInjectionCustomNode={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AssignmentExpressionPropertiesExtractor="AssignmentExpressionPropertiesExtractor",e.VariableDeclaratorPropertiesExtractor="VariableDeclaratorPropertiesExtractor"}(t.PropertiesExtractor||(t.PropertiesExtractor={}))},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=r(2),s=r(20),c=r(8),d=r(3),l=r(18);let u=o=class{constructor(e,t){this.cachedHostNodesWithStatementsMap=new Map,this.cachedHostStatementsMap=new Map,this.randomGenerator=e,this.options=t}static getPropertyNodeKeyName(e){if(!e.key)return null;const t=e.key;return d.NodeGuards.isLiteralNode(t)&&"string"==typeof t.value?t.value:d.NodeGuards.isIdentifierNode(t)?t.name:null}static isProhibitedHostParent(e){return d.NodeGuards.isMemberExpressionNode(e)}static isProhibitedPattern(e){return!e||d.NodeGuards.isObjectPatternNode(e)||d.NodeGuards.isArrayPatternNode(e)||d.NodeGuards.isAssignmentPatternNode(e)||d.NodeGuards.isRestElementNode(e)}extractPropertiesToExpressionStatements(e,t){const r=e.length,n=[],a=[];for(let i=0;i<r;i++){const r=e[i],s=r.value;if(o.isProhibitedPattern(s))continue;const l=o.getPropertyNodeKeyName(r);if(!l)continue;const u=!r.computed||r.computed&&!!r.key&&d.NodeGuards.isLiteralNode(r.key)?c.NodeFactory.literalNode(l):c.NodeFactory.identifierNode(l),p=c.NodeFactory.memberExpressionNode(t,u,!0),m=c.NodeFactory.expressionStatementNode(c.NodeFactory.assignmentExpressionNode("=",p,s));d.NodeGuards.isObjectExpressionNode(r.value)&&this.transformObjectExpressionNode(r.value,p),n.push(m),a.push(i)}return[n,a]}filterExtractedObjectExpressionProperties(e,t){e.properties=e.properties.filter((e,r)=>!t.includes(r))}transformObjectExpressionNode(e,t){const r=e.properties,[o,n]=this.extractPropertiesToExpressionStatements(r,t),a=this.getHostStatement(e),i=this.getHostNodeWithStatements(e,a);return this.filterExtractedObjectExpressionProperties(e,n),s.NodeAppender.insertAfter(i,o,a),e}getHostNodeWithStatements(e,t){if(this.cachedHostNodesWithStatementsMap.has(e))return this.cachedHostNodesWithStatementsMap.get(e);const r=l.NodeStatementUtils.getScopeOfNode(t);return this.cachedHostNodesWithStatementsMap.set(e,r),r}getHostStatement(e){if(this.cachedHostStatementsMap.has(e))return this.cachedHostStatementsMap.get(e);const t=l.NodeStatementUtils.getRootStatementOfNode(e);return this.cachedHostStatementsMap.set(e,t),t}};u=o=n.__decorate([a.injectable(),n.__param(0,a.inject(i.ServiceIdentifiers.IRandomGenerator)),n.__param(1,a.inject(i.ServiceIdentifiers.IOptions)),n.__metadata("design:paramtypes",[Object,Object])],u),t.AbstractPropertiesExtractor=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ConsoleOutputCustomNodeGroup="ConsoleOutputCustomNodeGroup",e.DebugProtectionCustomNodeGroup="DebugProtectionCustomNodeGroup",e.DomainLockCustomNodeGroup="DomainLockCustomNodeGroup",e.SelfDefendingCustomNodeGroup="SelfDefendingCustomNodeGroup",e.StringArrayCustomNodeGroup="StringArrayCustomNodeGroup"}(t.CustomNodeGroup||(t.CustomNodeGroup={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BooleanLiteralObfuscatingReplacer="BooleanLiteralObfuscatingReplacer",e.NumberLiteralObfuscatingReplacer="NumberLiteralObfuscatingReplacer",e.StringLiteralObfuscatingReplacer="StringLiteralObfuscatingReplacer"}(t.LiteralObfuscatingReplacer||(t.LiteralObfuscatingReplacer={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BlackListNodeGuard="BlackListNodeGuard",e.ConditionalCommentNodeGuard="ConditionalCommentNodeGuard"}(t.ObfuscatingGuard||(t.ObfuscatingGuard={}))},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=r(3);let s=o=class{constructor(){this.obfuscationAllowedForCurrentNode=!0,this.obfuscationAllowedForNextNode=null}static isConditionalComment(e){return o.obfuscationEnableCommentRegExp.test(e.value)||o.obfuscationDisableCommentRegExp.test(e.value)}check(e){if(this.obfuscationAllowedForNextNode&&(this.obfuscationAllowedForCurrentNode=this.obfuscationAllowedForNextNode,this.obfuscationAllowedForNextNode=null),!i.NodeGuards.isNodeWithComments(e))return this.obfuscationAllowedForCurrentNode;const t=e.leadingComments,r=e.trailingComments;return t&&(this.obfuscationAllowedForCurrentNode=this.checkComments(t)),r&&(this.obfuscationAllowedForNextNode=this.checkComments(r)),this.obfuscationAllowedForCurrentNode}checkComments(e){const t=e.length;let r=this.obfuscationAllowedForCurrentNode;for(let n=0;n<t;n++){const t=e[n];o.obfuscationEnableCommentRegExp.test(t.value)?r=!0:o.obfuscationDisableCommentRegExp.test(t.value)&&(r=!1)}return r}};s.obfuscationEnableCommentRegExp=new RegExp("javascript-obfuscator *: *enable"),s.obfuscationDisableCommentRegExp=new RegExp("javascript-obfuscator *: *disable"),s=o=n.__decorate([a.injectable()],s),t.ConditionalCommentObfuscatingGuard=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=r(2),i=r(4);let s=class{constructor(e,t){this.randomGenerator=e,this.options=t}initialize(){this.storage=new Map,this.storageId=this.randomGenerator.getRandomString(6)}get(e){const t=this.storage.get(e);if(!t)throw new Error(`No value found in map storage with key \`${e}\``);return t}getKeyOf(e){for(const[t,r]of this.storage)if(e===r)return t;return null}getLength(){return this.storage.size}getStorage(){return this.storage}getStorageId(){return this.storageId}has(e){return this.storage.has(e)}mergeWith(e,t=!1){this.storage=new Map([...this.storage,...e.getStorage()]),t&&(this.storageId=e.getStorageId())}set(e,t){this.storage.set(e,t)}};o.__decorate([i.initializable(),o.__metadata("design:type",String)],s.prototype,"storageId",void 0),o.__decorate([i.initializable(),o.__metadata("design:type",Map)],s.prototype,"storage",void 0),o.__decorate([n.postConstruct(),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],s.prototype,"initialize",null),s=o.__decorate([n.injectable(),o.__param(0,n.inject(a.ServiceIdentifiers.IRandomGenerator)),o.__param(1,n.inject(a.ServiceIdentifiers.IOptions)),o.__metadata("design:paramtypes",[Object,Object])],s),t.MapStorage=s},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=r(2),s=n.__importDefault(r(179)),c=r(180),d=r(4);let l=o=class{constructor(e,t){this.sourceCode=e,this.options=t}initialize(){this.seed=0!==this.options.seed?this.options.seed:((e,t)=>Math.floor(Math.random()*(t-e+1)+e))(0,999999999),this.randomGenerator=new c.Chance((()=>{const e=s.default(this.sourceCode.getSourceCode());return this.seed+Number(e.replace(/\D/g,""))})())}getMathRandom(){return this.getRandomInteger(0,99999)/1e5}getRandomGenerator(){return this.randomGenerator}getRandomInteger(e,t){return this.getRandomGenerator().integer({min:e,max:t})}getRandomString(e,t=o.randomGeneratorPool){return this.getRandomGenerator().string({length:e,pool:t})}getSeed(){return this.seed}};l.randomGeneratorPool="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n.__decorate([d.initializable(),n.__metadata("design:type",Object)],l.prototype,"randomGenerator",void 0),n.__decorate([d.initializable(),n.__metadata("design:type",Number)],l.prototype,"seed",void 0),n.__decorate([a.postConstruct(),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],l.prototype,"initialize",null),l=o=n.__decorate([a.injectable(),n.__param(0,a.inject(i.ServiceIdentifiers.ISourceCode)),n.__param(1,a.inject(i.ServiceIdentifiers.IOptions)),n.__metadata("design:paramtypes",[Object,Object])],l),t.RandomGenerator=l},function(e,t){e.exports=require("chalk")},function(e,t){e.exports=require("reflect-metadata")},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=r(2),s=n.__importDefault(r(52)),c=r(55);let d=o=class{constructor(e){this.options=e}static log(e,t,r,o){const n=e(`\n${t} ${r}`);console.log(n,o||"")}info(e,t){this.options.log&&o.log(o.colorInfo,c.LoggingPrefix.Base,e,t)}success(e,t){this.options.log&&o.log(o.colorSuccess,c.LoggingPrefix.Base,e,t)}warn(e,t){this.options.log&&o.log(o.colorWarn,c.LoggingPrefix.Base,e,t)}};d.colorInfo=s.default.cyan,d.colorSuccess=s.default.green,d.colorWarn=s.default.yellow,d=o=n.__decorate([a.injectable(),n.__param(0,a.inject(i.ServiceIdentifiers.IOptions)),n.__metadata("design:paramtypes",[Object])],d),t.Logger=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Base="[javascript-obfuscator]",e.CLI="[javascript-obfuscator-cli]"}(t.LoggingPrefix||(t.LoggingPrefix={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(15),n=r(0),a=r(2),i=r(39),s=r(57),c=r(58),d=r(59),l=r(60);t.analyzersModule=new n.ContainerModule(e=>{e(a.ServiceIdentifiers.IStackTraceAnalyzer).to(l.StackTraceAnalyzer).inSingletonScope(),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(s.FunctionDeclarationCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.FunctionDeclarationCalleeDataExtractor),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(c.FunctionExpressionCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.FunctionExpressionCalleeDataExtractor),e(a.ServiceIdentifiers.ICalleeDataExtractor).to(d.ObjectExpressionCalleeDataExtractor).whenTargetNamed(i.CalleeDataExtractor.ObjectExpressionCalleeDataExtractor),e(a.ServiceIdentifiers.Factory__ICalleeDataExtractor).toFactory(o.InversifyContainerFacade.getCacheFactory(a.ServiceIdentifiers.ICalleeDataExtractor))})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=o.__importStar(r(10)),i=r(33),s=r(3),c=r(18);let d=class extends i.AbstractCalleeDataExtractor{extract(e,t){if(!s.NodeGuards.isIdentifierNode(t))return null;const r=this.getCalleeBlockStatement(c.NodeStatementUtils.getParentNodeWithStatements(e[0]),t.name);return r?{callee:r,name:t.name}:null}getCalleeBlockStatement(e,t){let r=null;return a.traverse(e,{enter:e=>{if(s.NodeGuards.isFunctionDeclarationNode(e)&&e.id.name===t)return r=e.body,a.VisitorOption.Break}}),r}};d=o.__decorate([n.injectable()],d),t.FunctionDeclarationCalleeDataExtractor=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(1),n=r(0),a=o.__importStar(r(10)),i=r(33),s=r(3),c=r(18);let d=class extends i.AbstractCalleeDataExtractor{extract(e,t){let r=null;return s.NodeGuards.isIdentifierNode(t)&&(r=this.getCalleeBlockStatement(c.NodeStatementUtils.getParentNodeWithStatements(e[0]),t.name)),s.NodeGuards.isFunctionExpressionNode(t)&&(r=t.body),r?{callee:r,name:t.name||null}:null}getCalleeBlockStatement(e,t){let r=null;return a.traverse(e,{enter:(e,o)=>{if(s.NodeGuards.isFunctionExpressionNode(e)&&o&&s.NodeGuards.isVariableDeclaratorNode(o)&&s.NodeGuards.isIdentifierNode(o.id)&&o.id.name===t)return r=e.body,a.VisitorOption.Break}}),r}};d=o.__decorate([n.injectable()],d),t.FunctionExpressionCalleeDataExtractor=d},function(e,t,r){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});const n=r(1),a=r(0),i=n.__importStar(r(10)),s=r(33),c=r(3),d=r(18);let l=o=class extends s.AbstractCalleeDataExtractor{static isValidTargetPropertyNode(e,t){if(!e.key)return!1;const r=c.NodeGuards.isIdentifierNode(e.key)&&e.key.name===t,o=c.NodeGuards.isLiteralNode(e.key)&&Boolean(e.key.value)&&e.key.value===t;return r||o}extract(e,t){if(!c.NodeGuards.isMemberExpressionNode(t))return null;const r=this.createObjectMembersCallsChain([],t);if(!r.length)return null;const o=r[r.length-1],n=this.getCalleeBlockStatement(d.NodeStatementUtils.getParentNodeWithStatements(e[0]),r);return n?{callee:n,name:o}:null}createObjectMembersCallsChain(e,t){if(c.NodeGuards.isIdentifierNode(t.property)&&!1===t.computed)e.unshift(t.property.name);else{if(!c.NodeGuards.isLiteralNode(t.property)||"string"!=typeof t.property.value&&"number"!=typeof t.property.value)return e;e.unshift(t.property.value)}return c.NodeGuards.isMemberExpressionNode(t.object)?this.createObjectMembersCallsChain(e,t.object):(c.NodeGuards.isIdentifierNode(t.object)&&e.unshift(t.object.name),e)}getCalleeBlockStatement(e,t){const r=t.shift();if(!r)return nul